We help IT Professionals succeed at work.

How to Determine what SQL Databases are Installed & Running?

Slator
Slator asked
on
How can I determine (for sure) all of the SQL databases (especially MSDE & SQL Express) installed/running on an SBS Premium machine?

I can only see one instance of a database running:  Microsoft SQL Server Workgroup Edition (9.0.4053 SP3) - which is part of SBS Premium.  I have looked around (services, programs, tools, etc.) but only see one instance.

The reason for my question is that (based on a SBS program's configuration), there should be an instance of MSDE installed/running.

Comment
Watch Question

EXEC sp_msforeachdb 'DBCC CHECKDB(''?'')'


try this.. it will help you.





Thanks
SandeepIVS
Top Expert 2012
Commented:
Try running the following from the command line:
SQLCmd -L

This will tell you if the SQL Server services are running if they are not, you may need to either start the service and if it is not available install SQL Server.

Author

Commented:
Thanks guys...
Your responses were helpful but not exactly what I was looking for - probably my fault in how I asked the question.

My issue/problem is that I suspect there is an instance of (MSDE or Express) SQL running that is not visible via any of the (usual) management consoles.

I want to know how to find ALL instances (and verions) of SQL installed/running even if the instance is (hidden) or (MSDE/Express) or (dedicated) to a specific program such as ISA Server.

If I understand the responses, the SQL commands would only help if I was already connected to the SQL instance/database.

Author

Commented:
OK, I think I got it...

My problem (or confusion) was that the SQL management/configuration consoles were showing different SQL version numbers which led me to believe that I had more than one instance of SQL installed/running - in addition to the MSDE version for ISA Server 2004.

I finally realized all the SQL version numbers were referencing the same {root path} and {instance ID}.  I have no idea why Microsoft would report:
--Version {9.3.4035} in the SQL Server Configuration Manager
--Version {9.0.4053} in the SQL Server Management Express Console
--Version {9.0.4053} in the Vale Software MSDE Manager Console

In any case, it appears I have 1 instance of {SQL Server 2005 - Workgroup} and 1 instance of MSDE running for ISA Server 2004.

Thanks for the help!
Commented:
ANSWER: How to Determine what SQL Databases are Installed & Running?

1) GoTo the Services Console (Start/Administrative Tools/Services)
2) Locate all the occurrences where Name = "MSSQL..."
3) Right-Click on the Name and note the "Path to executable" text box
4) Using the provided path, locate the "sqlservr.exe" file
5) Right-Click on the file and select the Version Tab
6) Note the "File version:" text box + the "Other version information" section
7) Search www.google.com/microsoft for the version number.
8) Results (product version only)
    MSSQL$MSFW:  "8.0.2055"  =  SQL 2000 for ISA Server
    --NOTE: By design, this is a (default/special/hidden) instance of SQL/MSDE
    MSSQL$SBSMONITORING:  "8.0.2055"  =  SQL 2000 for SBS Monitoring
    --NOTE: By design, this is a (default/special/hidden) instance of SQL/MSDE
   MSSQL$SHAREPOINT:   "8.0.2055" = SQL 2000 for Sharepoint
    --NOTE: By design, this is the SBS (default/special/hidden) instance of  SQL/MSDE
9) Results (product level - such as RTM, SP1, SP2)
    Results (edition - such a MSDE, Express, Workgroup, Standard)
Refer to http://support.microsoft.com/kb/321185 and/or the responses provided by the EE experts.  NOTE: This method will require connecting to the SQL Server with a Management Console and creating/running a T-SQL query.



These are some other (internet) resources I found useful:
http://sqlserverbuilds.blogspot.com/
http://www.mskbfiles.com/sqlservr.exe.php
http://support.microsoft.com/kb/321185