NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the connection to a local database get lost when the network is disconnected?

Solved!
Go to solution

I am using TestStand 3.1. I have a database setup on the local drive and I am using the "Log on the Fly" option.

 

The test takes 48 hours and I want to make sure that it will not stop if the network connection is lost.

 

If I unplug the network before starting the test, everything is fine. I can plug the network in and out again while the test runs with no issue.

 

But if the network is connected and I start the test, and then unplug the network the logging on the fly will give an error. 

 

I have narrowed this down to the step "New UUT for Database Logging" in the SequentialModel.seq (process model). If this step is run with the network connection then the rest of the test needs a network connection.

 

Is there any way to avoid this error?  The whole point of the local database was to avoid network issues.

 

Thank you for your help.

0 Kudos
Message 1 of 9
(5,087 Views)
I doubt that TestStand is doing anything explicit with the network. This is probably a quirk of the database provider you are using. Can you try a different one and see if the problem disappears?
0 Kudos
Message 2 of 9
(5,083 Views)

I am using SQL Server 2005 Express.

 

I will look into that side of it. Thanks for the suggestion.

0 Kudos
Message 3 of 9
(5,078 Views)

Tdot -

I am curious as to what the error code and text that TestStand is returning?

Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 9
(5,066 Views)

Hi Scott,

The Error Code is:

-2147467259; User-defined error code.
Possible System Error: Unspecified error 

 

The Error Message is: 

An error occurred calling 'LogUUTResult' in 'ITSDBLog' of 'TestStand Database Logging'
An error occurred executing a statement.
Statement: UutResult.
Connection failure
Description: Connection failure
Number: -2147467259
NativeError: 0
SQLState: 08S01
Reported by: Microsoft OLE DB Provider for SQL Server
Description: Unspecified error
Number: -2147467259
NativeError: 0
SQLState: 08S01
Reported by: Microsoft OLE DB Provider for SQL Server

Source: TSDBLog

 

The Location is:

Step 'LogResult' of sequence 'ProcessModelPostResultListEntry' in 'SequentialModel.seq'

0 Kudos
Message 5 of 9
(5,062 Views)

Tdot -

I found a posting on the net that reported this similar issue when they used a specific server name in the connection string, but they no longer had a problem when they used 127.0.0.1 or localhost. What are you using?

Scott Richardson
https://testeract.com
0 Kudos
Message 6 of 9
(5,041 Views)

Hi Scott,

The connection string would be something like:

 

Provider=SQLOLEDB.1;Password=chamber;User ID=thermal;Initial Catalog=ThermalChamber2009;Data Source=XP-LAB-2858\SQLEXPRESS

 

Where the data source computer name (XP-LAB-2858), changes based on the computer that is running the sequence.

0 Kudos
Message 7 of 9
(5,036 Views)
Solution
Accepted by topic author Tdot

Tdot -

I you are always logging locally, please try to change it to "localhost\SQLEXPRESS" to see if you can connect, and then see if disconnecting the LAN causes the same problem you previous saw.

Scott Richardson
https://testeract.com
0 Kudos
Message 8 of 9
(5,014 Views)

Yes, that works.

 

Thanks very much for the help Scott.

 

Tyler

0 Kudos
Message 9 of 9
(5,008 Views)