NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand SQL Query Error

I periodically get the TestStand 2010 SP1 SQL error below when performing a database query in TestStand through an Oracle ODBC connection. It typically happens the first time the query has been ran in a while so I suspect that it has something to do with the SQL query timing out when it is initially caching data upon first database connection and taking longer to complete. If you run the query multiple times in a row it will typically complete without error.

 

Is there some setting in TestStand or ODBC drivers where I can experiment with different query timeout settings?

 

Error, The following SQL command failed: 'SELECT XXVOC_BLUETOOTH_ASSIGNMENT.BLUETOOTH_ID, XXVOC_BLUETOOTH_ASSIGNMENT.CATEGORY, XXVOC_BLUETOOTH_ASSIGNMENT.SERIAL_NUMBER FROM XXVOC.XXVOC_BLUETOOTH_ASSIGNMENT XXVOC_BLUETOOTH_ASSIGNMENT WHERE (XXVOC_BLUETOOTH_ASSIGNMENT.SERIAL_NUMBER='12345678')...' Native error code -2147217871 0x80040e31 Microsoft OLE DB Provider for ODBC Drivers: [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation [Error Code: -10, User-defined error code.]

0 Kudos
Message 1 of 8
(4,884 Views)

Sometimes a simple TestStand repair can fix the problem. Contorl Panel>>Uninstall a Program>>National Instruments Software>>Uninstall/change>>TestStand >>repair.

Also make sure you don't have any variables missing in TS.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(4,866 Views)

Edna - so you're saying that this is not a timeout issue with waiting on the SQL query to complete but rather a TestStand corruption issue?

0 Kudos
Message 3 of 8
(4,864 Views)

It could be. You can also try and see if the same behaviour happens without using testStand. 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(4,844 Views)

Aaron -

I have never personally seen this error; however doing a search it does suggest that this error indicates that Oracle (or your database server) returned a query timeout because the current query was taking too long.

The suggested fix is to do th following:

  1. Open “Data Sources (ODBC); Start->Control Panel->Administrative Tools->Data Sources (ODBC)
  2. On the system or user tab, look for the Data Source the data extractor uses to connect to your Database.
  3. Select it, and click “Configure…”
  4. Make sure that: “Enable Query Timeout” is unchecked
  5. Click OK
  6. Click OK

Hope this helps.

Scott Richardson
0 Kudos
Message 5 of 8
(4,756 Views)

Thanks for the reply Scott,

 

Unfortunately everytime I click on the "Application" tab within the Config window I get the error "An unsupported operation was attempted". It will not let me get to the tab that has that setting. I have tried this on numerous PCs and I get the same error message. Any idea what is causing that?

 

Regards,

Aaron

0 Kudos
Message 6 of 8
(4,694 Views)

Are you sure that you have all the latest patches installed regarding Oracle Database on your computer? It looks like patch 5699495 would fix the issue.

This link talks about a workaround solution: http://www.idevelopment.info/data/Oracle/DBA_tips/Microsoft_Windows/WINDOWS_7.shtml

                                                                https://forums.oracle.com/message/9324776

 

National Instruments
Applications Engineer
0 Kudos
Message 7 of 8
(4,676 Views)

Aaron -

The error you are receiving in the ODBC administrator does appear to be an Oracle client bug of some sort. Can you let us know if you can obtain the patch from Oracle and see if that fixes the issue?

 

If you are creating a User DSN, I believe the settings for the DSN are stored in the Windows registery in a location similar to the following:

Key Path:    HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\<Name of your User DSN>\

Key Name:    QueryTimeout

Key Value:    T or F

 

One option might be to see if the value is T and change it manually in the registry to F.

Scott Richardson
0 Kudos
Message 8 of 8
(4,651 Views)