From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

database connection error

Hello!

I have a TestStand application running on the production floor and I just noticed an error that I need to find a solution for. Over the weekend our IT department performed some SQL server maintenances and the tester lost connection to the server. Production resumed but after the maintenance the database reporting stopped sending the data to the server due to the lost connection. It did not throw an error just continued testing and now I have lost a day’s production data to the server. I have restarted Windows now and the connection is now valid again and saving data as normal. Is there a simple way to check the connection? Ping and the test connection in the UDL does not work to reestablish the data link if lost since I tried these. Only the reboot would work.

 

No errors are generated in the sequence file either.

 

LabView 2015 and TestStand 2014

 

Bill

Bill Lewis
0 Kudos
Message 1 of 8
(7,534 Views)

Hi,

 

Probably the station options would have been set to ignore errors.If the option would be for popup then you would have seen it.But this is expected to be ignored as its in the production floor.

 

You can write a simple program to connect to the SQL ( lots of codes available if you google it) whcih will simply check for connection.

 

or as a backup option you can use the offline processing tool which generates a .tsr file as you test your product.From this file you can recreate your reports or write to database using the tool.

 

Hope this helps.

 

Ravi

0 Kudos
Message 2 of 8
(7,519 Views)

thanks for the reply!

 

I do have the ignore errors but in the prodcution enviroment that will have to be set.

 

When this happened, I went to the UDL configuration and tested the connnection. It passed but the TestStand applicaiton still did not write data to the SQL database until i completely restarted the program. It seems that the connection for results processing remains open and if interputed it will not show the error.

 

Is there a flag i can monitor in the TestStand engine?

 

the writing the .tsr file kind of defeats the whole results processing model

Bill Lewis
0 Kudos
Message 3 of 8
(7,512 Views)

Hi Bill,

 

I was able to find another forum post where users put together VIs that can successfully monitor database connection! You can find them here: http://forums.ni.com/t5/LabVIEW/verify-connection-to-database/td-p/3283723

 

0 Kudos
Message 4 of 8
(7,494 Views)

The issue is not connecting to the database or verification of the connection, it is that the TestStand engine "Database reporting" options do not report an error on the SQL insert statement's if a insert does not commit. In SQL if the insert is not successful you will return an error. In TestStand, there is no error trapping it just goes off with the "hope" of an successful insert. Its is a bug in the TestStand environment in my opinion since I lost days of production data after a connection was interrupted.

 


@danniwithNI wrote:

Hi Bill,

 

I was able to find another forum post where users put together VIs that can successfully monitor database connection! You can find them here: http://forums.ni.com/t5/LabVIEW/verify-connection-to-database/td-p/3283723

 


 

Bill Lewis
0 Kudos
Message 5 of 8
(7,433 Views)

Bill,

 

If it appears to be a bug, you can submit it here along with steps to reproduce the error and any relevant files. An Applications Engineer will be assigned to investigating it further to have it addressed in future releases if it is in fact a bug.

 

0 Kudos
Message 6 of 8
(7,412 Views)