Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify SQL installed

Status
Not open for further replies.

JBaileys

Technical User
Jun 23, 2003
244
US

Is there a function to identify that an instance of SQL Server already exists on a machine?

For example, if SQL Server / MSDE exists on a server or client, we want to install our database. However, if MSDE does not exist we want to install MSDE.
 

One method:

Look in the registry for
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
 
You can use the sc command in dos to check to see if the service is installed.
Code:
sc MACHINENAME query bufsize= 10000 state= all | grep -i "SERVICE_NAME: MSSQL"
You can then redirect the output from that into a text file via "> filename.txt" and then check the file. If it is blank then SQL isn't installed. If there is something in it then SQL is installed.

Denny

--Anything is possible. All it takes is a little research. (Me)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top