Home > Database > MS SQL Server > SQL SERVER – List all the database

SQL SERVER – List all the database

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 ”?”’

This Article is TAGGED in , , , , . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">