Key Performance Tool error

dsatriadsatria Member Posts: 80
edited 2010-12-08 in SQL Performance
Hi,

We're using NAV 4.0 without SP with SQL Option (SQL 2000 SP3a)

I successfully installed "Key Information Tool".fob and setup SQL Connection (Test Connection succeeded)
Load Text Objects didn't return any error but when we clicked "Get SIFT Info" threw an error like this:
fne2jr.jpg

Any idea what's wrong? I tried with 2 tables (G/L Entry and Warehouse Entries) but same error occured.
Thanks in advance

Regards,
David

Answers

  • strykstryk Member Posts: 645
    Hi David,

    well, I guess you have to debug this - I don't have the tool available, but obviously there's something wrong with the ADO connection string:

    There should be a line like this:
    ...
    ADOConnection.DefaultDatabase(GetCurrentDatabase);
    ...
    
    And the function should look like this:
    GetCurrentDatabase() : Text[250]
    Databases.SETRANGE("My Database", TRUE);
    Databases.FINDFIRST;
    EXIT(STRSUBSTNO('[%1]', Databases."Database Name"));
    
    If this does not work, maybe you could "hard-code" the default db?!

    But: if you are trying to fix some SIFT issues, maybe this could also help:
    http://dynamicsuser.net/blogs/stryk/archive/2010/05/29/optimizing-sift-and-vsift.aspx

    Regards,
    Jörg
    Jörg A. Stryk (MVP - Dynamics NAV)
    NAV/SQL Performance Optimization & Troubleshooting
    STRYK System Improvement
    The Blog - The Book - The Tool
  • dsatriadsatria Member Posts: 80
    Hi Jörg,

    Thanks for your reply

    There is a line like you mentioned but with slightly different name, i.e. GetCurrentDB instead of GetCurrentDatabase

    But the function code is totally different:
    SessionInfo.SETRANGE(SessionInfo."My Session",TRUE);
    IF SessionInfo.FIND('-') THEN
      DBName := SessionInfo."Database Name";
    
    IF (STRPOS(DBName,'.') <> 0) OR
       (STRPOS(DBName,'-') <> 0) THEN
      DBName := '[' + DBName + ']';
    
    EXIT(DBName);
    
    Using Debugger I can assure you that DBName variable contains correct database name.
    Is there any other information I can supply you to make things clearer?

    Regards,
    David

    PS. Thanks for the URL to the article regarding SIFT, I'm reading it now...
  • dsatriadsatria Member Posts: 80
    Hi all,

    The problem turned out to be our database name which contains spaces :wink:
    So changing the function code will solve it:
    ...
    IF (STRPOS(DBName,'.') <> 0) OR
       (STRPOS(DBName,'-') <> 0) OR
       (STRPOS(DBName,' ') <> 0) THEN
      DBName := '[' + DBName + ']';
    ...
    
    Thanks and regards,
    David
Sign In or Register to comment.