Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-24 : 09:22:16
|
| Micah Bowerbank writes "I've got a Web Application on a server that ties into a SQL 2000 Database running on another win2000 machine.End Result: I want to be able to display a message to my users when the database server is down for maintenance or upgrade or cause it exploded.Explination: Basically I need a way of checking to see if the win2000 server is running and the to check and see if the SQL 2000 Database is running.I have no idea how to go about this, I can use many different way if necessary, ASP, SQL, vb COM objects, c++ COM objects, ADO, API....... any way really, I just don't know where to start." |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2002-01-24 : 12:57:43
|
| you could run 'Net Start' and it will tell you the services that are currently running. Search for the string MSSQLServer. If you find that, then SQL Server is running.Or you could just trap the error that is returned when you attempt to connect when the server is down, and assume that that error always means the server is down.HTH-Chad |
 |
|
|
|
|
|