Link to home
Start Free TrialLog in
Avatar of madhav_119
madhav_119

asked on

Is there a way to check if thepartcular DB is started using Win APIs?

I need to  check if the partcular DB is started using VC++> and the database that i have created is in SQL  Server 2005.
Please help with the code.

Thanks in advance.
Avatar of BrandonGalderisi
BrandonGalderisi
Flag of United States of America image

Define "db is started"?  Do you mean the SQL Server engine or a particular database?
Avatar of madhav_119
madhav_119

ASKER

I guess starting SQL server engine includes starting all the databases also..It would be great if you can tell me the way to check both. SQL Server Engine (i think here you check if MSSQLSERVER service is started) and particular DB.

Thanks
Are you looking to test the connection to the local machine that you are running on, or a remote machine?
On both. Local and remote
ASKER CERTIFIED SOLUTION
Avatar of BrandonGalderisi
BrandonGalderisi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial