Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Checking a remote DB connection

I need to check the readiness of a SQLServer database prior to proceed to a Login dialog.
I tried the vi "DB Tools Open Connection" and tried to catch an error flag. However, sometimes the vi returns no error even though I uplugged the LAN cable.
It starts returning errors after 2 or 3 trials.
In addition, the timeout parameter this VI has seems not to apply. It waits whatever it wants even though I connect low numbers.

Please somebody let me know if this VI needs any particular handling. Otherwise, I will appreciate any suggestion for testing the readiness of the remote DB.

Thanks in advance and best regards.
Juan.
0 Kudos
Message 1 of 4
(3,881 Views)
ok there is not much you can do to check it before you log in to the server its self. The only thing that comes to mind is trying to go though CMD mode at that time. Or you could log in and ghost the server and then reformating the mainframe. It only works if done properaly
If any more help or queries
5bennema@demonmail.net
0 Kudos
Message 2 of 4
(3,881 Views)
Thanks Techo,
Based on comments from several sources I finally decided to ping the server through System Exec.vi.
It returns an error flag which I can grab and find out whether the server is live or not. I cannot know at that time the DB service is working but this would be a minimal chance. My main concern is to know if the PC is running in online or stand alone mode.

Thanks again and best regards.
JMV.
0 Kudos
Message 3 of 4
(3,880 Views)
Hi Juan,

Pinging for your connection would be the best bet right now. If you need some help with pinging or extracting the status, let me know and I will see what I can help you out with. Thanks!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,881 Views)