473,385 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Surefire Method to Determine that SQL is running programmatically.

All, if I were to write an app that has one task, determine whether or
not an SQL Instance is running, what would be the easist method for
this? I personally think that a query against the masterdb would do
the trick. I would appreciate any feedback you can provide.

L
Jul 20 '05 #1
3 1835

"Louis Frolio" <fr*****@yahoo.com> wrote in message
news:94**************************@posting.google.c om...
All, if I were to write an app that has one task, determine whether or
not an SQL Instance is running, what would be the easist method for
this? I personally think that a query against the masterdb would do
the trick. I would appreciate any feedback you can provide.

L


If you want to know if the SQL Server service is running, then you can use
any tool which can tell you the state of a Windows service - WMI is one way,
or the SQLDMO SQLServer2 object has a Status property.

Simon
Jul 20 '05 #2
"Simon Hayes" <sq*@hayes.ch> wrote in message news:<40********@news.bluewin.ch>...
"Louis Frolio" <fr*****@yahoo.com> wrote in message
news:94**************************@posting.google.c om...
All, if I were to write an app that has one task, determine whether or
not an SQL Instance is running, what would be the easist method for
this? I personally think that a query against the masterdb would do
the trick. I would appreciate any feedback you can provide.

L


If you want to know if the SQL Server service is running, then you can use
any tool which can tell you the state of a Windows service - WMI is one way,
or the SQLDMO SQLServer2 object has a Status property.

Simon


Thank You Simon. I had a hunch that SQLDMO was the way to go.

L
Jul 20 '05 #3
"Simon Hayes" <sq*@hayes.ch> wrote in message news:<40********@news.bluewin.ch>...
"Louis Frolio" <fr*****@yahoo.com> wrote in message
news:94**************************@posting.google.c om...
All, if I were to write an app that has one task, determine whether or
not an SQL Instance is running, what would be the easist method for
this? I personally think that a query against the masterdb would do
the trick. I would appreciate any feedback you can provide.

L


If you want to know if the SQL Server service is running, then you can use
any tool which can tell you the state of a Windows service - WMI is one way,
or the SQLDMO SQLServer2 object has a Status property.

Simon


Thank You Simon. I had a hunch that SQLDMO was the way to go.

L
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tomas | last post by:
I have two questions: (1) How (if possible) can you, with ASP.NET (and with the IIS 5 included with win2000) specify an maximum limit of the memory that a web application may consume, as an...
3
by: John A Grandy | last post by:
programmatically, how to determine the IP of the web-server running the web-app's code ?
0
by: icodeurs2 | last post by:
I am interested in how to determine if a particular type of hardware has been plugged inot Windows XP/2000 programmatically. It could be a service or application running that could detect like XP...
2
by: icodeurs2 | last post by:
I am interested in how to determine if a particular type of hardware has been plugged into Windows XP/2000 programmatically. It could be a service or application running that could detect the new...
3
by: Merk | last post by:
How can I programmatically determine the from within that method. For example, consider the following code: private void DoSomething() { string s = ???; }
6
by: Jana | last post by:
Greetings Access Gurus! I am working on an app to send batch transactions to our bank, and the bank requires that we place an effective date on our files that is 'one business day in the future,...
12
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
I am writing a web app to be widely distributed where I do not know the installed .NET Framework version. I want to take advantage of some .NET 3.0 classes if they are installed, but gracefully...
2
by: stonkers | last post by:
My Title is a suggested solution rather than the actual question. Let me explain. I have a C# ASP.NET 2.0 website that I wrote to run deployments to my many environments. It uses PSExec to kick...
3
by: Dennis | last post by:
Is there a way to programmatically determine if a vb.net app is running from the IDE? -- Dennis
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.