Skip to content

Latest commit

 

History

History
73 lines (58 loc) · 3.15 KB

File metadata and controls

73 lines (58 loc) · 3.15 KB
title sp_catalogs (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.prod_service database-engine
ms.reviewer
ms.technology system-objects
ms.topic language-reference
f1_keywords
sp_catalogs_TSQL
sp_catalogs
dev_langs
TSQL
helpviewer_keywords
sp_catalogs
ms.assetid ebb29ee2-be65-4e09-9c53-e3c6d12633e1
author stevestein
ms.author sstein

sp_catalogs (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

Returns the list of catalogs in the specified linked server. This is equivalent to databases in [!INCLUDEssNoVersion].

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_catalogs [ @server_name = ] 'linked_svr'  

Arguments

[ @server_name = ] 'linked_svr' Is the name of a linked server. linked_svr is sysname, with no default.

Result Sets

Column name Data type Description
Catalog_name nvarchar(128) Name of the catalog
Description nvarchar(4000) Description of the catalog

Permissions

Requires SELECT permission on the schema.

Examples

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  
EXEC sp_catalogs 'OLE DB ODBC Linked Server #3';  

See Also

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)