SQL Server 2005: List all databases
List all the databases on SQL Server:
----SQL SERVER 2005 System Procedures EXEC sp_databases EXEC sp_helpdb ----SQL 2000 Method still works in SQL Server 2005 SELECT name FROM sys.databases SELECT name FROM sys.sysdatabases ----SQL SERVER Un-Documented Procedure EXEC sp_msForEachDB 'PRINT ''?'''
Comments