| title | sp_catalogs (Transact-SQL) | ||
|---|---|---|---|
| description | sp_catalogs returns the list of catalogs in the specified linked server. | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| ms.reviewer | randolphwest | ||
| ms.date | 06/23/2025 | ||
| ms.service | sql | ||
| ms.subservice | system-objects | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
[!INCLUDE SQL Server]
Returns the list of catalogs in the specified linked server. This is equivalent to databases in [!INCLUDE ssNoVersion].
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_catalogs [ @server_name = ] N'server_name'
[ ; ]
The name of a linked server. @server_name is sysname, with no default.
| Column name | Data type | Description |
|---|---|---|
CATALOG_NAME |
nvarchar(128) | Name of the catalog |
DESCRIPTION |
nvarchar(4000) | Description of the catalog |
Requires SELECT permission on the schema.
The following example returns catalog information for the linked server named OLE DB ODBC Linked Server #3.
Note
For sp_catalogs to provide useful information, the OLE DB ODBC Linked Server #3 must already exist.
USE master;
GO
EXECUTE sp_catalogs 'OLE DB ODBC Linked Server #3';- sp_addlinkedserver (Transact-SQL)
- sp_columns_ex (Transact-SQL)
- sp_column_privileges (Transact-SQL)
- sp_foreignkeys (Transact-SQL)
- sp_indexes (Transact-SQL)
- sp_linkedservers (Transact-SQL)
- sp_primarykeys (Transact-SQL)
- sp_tables_ex (Transact-SQL)
- sp_table_privileges (Transact-SQL)
- System stored procedures (Transact-SQL)