Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize


SQL Server 2000

  Topic last updated -- July 2003

Lists databases that reside in an instance of Microsoft® SQL Server™ or are accessible through a database gateway.



Return Code Values


Result Sets
Column name Data type Description
DATABASE_NAME sysname Name of the database. In SQL Server, this column represents the database name as stored in the sysdatabases system table.
DATABASE_SIZE int Size of database, in kilobytes.
REMARKS varchar(254) For SQL Server, this field always returns NULL.


In SQL Server, sp_databases returns the databases listed in the sysdatabases system table.

Database names that are returned can be used as parameters in the USE statement to change the current database context.

sp_databases has no equivalent in Open Database Connectivity (ODBC).


Execute permissions default to the public role.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft