Results 1 to 2 of 2
Thread: Tnsping of some sorts
- 01-23-2010, 03:23 AM #1
Tnsping of some sorts
Good evening everyone,
As part if my Java, I am connecting to a database and doing a few selects. Before I connect though, I would like to make sure that at the very least db is alive. How can I get it done?
I put up tnsping in the subject, but really any other way will do. Connecting to somethig that does not exist or is not responding seems to take too long - I want suggested approach to be following (if db alive - connect)
- 01-23-2010, 03:47 PM #2
tnsping is oracle specific right. In general, it should be possible to try to open a TCP Socket to the host and socket the database service would be running on. When we do a manual socket by hand we would not be able to do anything with it, i mean unless we did the entire what ever the JDBC protocol driver API thing would expect. But the lack of ability to connect to the host network address and port could be helpful to indicate if the service was not running.
- By VinceGuad in forum New To JavaReplies: 3Last Post: 01-26-2009, 12:20 AM
- By Emily in forum Advanced JavaReplies: 1Last Post: 04-03-2008, 04:39 PM
- By Emily in forum New To JavaReplies: 0Last Post: 03-27-2008, 12:11 AM