Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

programatically find out is there''s a SQL installation Expand / Collapse
Author
Message
Posted Wednesday, July 20, 2005 6:44 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, March 20, 2009 5:30 PM
Points: 213, Visits: 65
Before installing my product, I need my module to find out if there's a SQL server already installed and what are the directories - SQL server installation directory and the datafiles and log.
I'm trying to search into the registry keys, but getting confused when multiple instances and/or versions are installed.

What will be the easiest way to do that?

Can somebody send me an export from the registry where there are both SQL 7 and 2000. I do not have such anymore and I cannot include it into my code...

Thanks,
MJ



Post #202719
Posted Monday, July 25, 2005 8:00 AM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
Post #203954
Posted Tuesday, July 26, 2005 9:42 PM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Monday, September 15, 2014 8:57 AM
Points: 6,634, Visits: 1,872
Default Instance:

Install Path: HKLM\Software\Microsoft\MSSQLServer\Setup\SQLPath

If they are defined:
Default Data File Path: HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\DefaultData
Default Log File Path: HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\DefaultLog

Named Instance:

Install Path: HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>\Setup\SQLPath

If they are defined:
Default Data File Path: HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>MSSQLServer\DefaultData
Default Log File Path: HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>\MSSQLServer\DefaultLog


K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #204719
Posted Tuesday, July 26, 2005 10:18 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 4:59 PM
Points: 2,693, Visits: 1,204

You could also run script to check the services list using WMI.

 

 



Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface

Australian SQL Server User Groups - My profile
Phills Philosophies
Murrumbeena Cricket Club
Post #204739
Posted Wednesday, July 27, 2005 9:04 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, March 20, 2009 5:30 PM
Points: 213, Visits: 65
Thanks a lot, guys.
What kind of script I can run to to check WMI?
Is there a place to see an example?
Thanks again, mj



Post #204957
Posted Wednesday, July 27, 2005 9:16 AM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Monday, September 15, 2014 8:57 AM
Points: 6,634, Visits: 1,872
Microsoft Script Repository:

Services Scripts


K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #204967
Posted Wednesday, July 2, 2014 10:12 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 8:33 AM
Points: 26, Visits: 114
I am looking for someting similar and I must not be searching correctly.

I was looking for either a T-SQL or WMI or even Powershell script that can scan a registry or server looking for specific SQL components.

I saw some references to xp_regread but I do not want to use that undocumentec procedure in a scheduled daily policy check.


I looked at the Script Repository but only found the VB scan tool.

Any suggestions would be appreciated.
Post #1588540
Posted Wednesday, July 2, 2014 10:20 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 8:33 AM
Points: 26, Visits: 114
I am looking for someting similar and I must not be searching correctly.

I was looking for either a T-SQL or WMI or even Powershell script that can scan a registry or server looking for specific SQL components.

I saw some references to xp_regread but I do not want to use that undocumentec procedure in a scheduled daily policy check.


I looked at the Script Repository but only found the VB scan tool.

Any suggestions would be appreciated.
Post #1588542
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse