Appendix C. System Stored Procedure Reference

This appendix is not meant to be all-inclusive. There are a few types of system stored procedures that are very rarely used in an ad hoc fashion and then only by senior database administrators or programmers. As a result, this appendix intentionally omits inclusion of stored procedures affecting replication data warehouse data collection, notification services (2005 only), and spatial indexes.

SQL Server 2005 and SQL Server 2008 support the following system and extended stored procedures except where indicated.

Active Directory

Procedure

Description

sp_ActiveDirectory_Obj

Adds, updates, or removes the registration record of a SQL Server database in the Active Directory.

sp_ActiveDirectory_SCP

Adds, updates, or removes the registration record of a SQL Server instance in the Active Directory.

Catalog

Procedure

Description

sp_column_privileges

Returns column privileges for a table in the current session.

sp_column_privileges_ex

Returns column privileges for a table on a linked or remote server.

sp_columns

Returns column information for a table or view.

sp_columns_ex

Returns column information for a table or view on a linked or remote server.

sp_databases

Returns information about databases on the local server.

sp_fkeys

Returns foreign key information for a table.

sp_pkeys

Returns primary key information for a table.

sp_server_info

Returns server attributes for the server on a specified connection.

sp_special_columns

Returns columns used to uniquely identify a row (that ...

Get Beginning T-SQL with Microsoft® SQL Server® 2005 and 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.