Skip to content

Latest commit

 

History

History
290 lines (283 loc) · 9.04 KB

File metadata and controls

290 lines (283 loc) · 9.04 KB
title Security Stored Procedures (Transact-SQL)
description Security stored procedures (Transact-SQL)
author VanMSFT
ms.author vanto
ms.reviewer randolphwest
ms.date 06/23/2025
ms.service sql
ms.subservice system-objects
ms.topic reference
ms.custom
ignite-2025
helpviewer_keywords
system stored procedures [SQL Server], security
stored procedures [SQL Server], security
security [SQL Server], stored procedures
dev_langs
TSQL
monikerRange =azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric-sqldb

Security stored procedures (Transact-SQL)

[!INCLUDE SQL Server SQL Database-fabricsqldb]

[!INCLUDE ssNoVersion] supports the following system stored procedures that are used to manage security. Some of these stored procedures are deprecated, but continue to be available to support backward compatibility. The topics for deprecated procedures will list their replacement.

:::row::: :::column::: sys.sp_add_trusted_assembly
:::column-end::: :::column::: sp_addapprole (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_addlinkedserver :::column-end::: :::column::: sp_addlinkedsrvlogin :::column-end::: :::row-end::: :::row::: :::column::: sp_addlogin (Deprecated)
:::column-end::: :::column::: sp_addremotelogin (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_addrole (Deprecated)
:::column-end::: :::column::: sp_addrolemember (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_addserver (Deprecated)
:::column-end::: :::column::: sp_addsrvrolemember (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_adduser (Deprecated)
:::column-end::: :::column::: sp_approlepassword (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_audit_write
:::column-end::: :::column::: sp_change_users_login (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_changedbowner (Deprecated)
:::column-end::: :::column::: sp_changeobjectowner (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_control_dbmasterkey_password
:::column-end::: :::column::: sys.sp_copy_data_in_batches
:::column-end::: :::row-end::: :::row::: :::column::: sp_dbfixedrolepermission (Deprecated) :::column-end::: :::column::: sp_defaultdb (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_defaultlanguage (Deprecated) :::column-end::: :::column::: sp_denylogin (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_describe_parameter_encryption :::column-end::: :::column::: sp_dropalias (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sys.sp_drop_trusted_assembly
:::column-end::: :::column::: sp_dropapprole (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_droplinkedsrvlogin
:::column-end::: :::column::: sp_droplogin (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_dropremotelogin (Deprecated)
:::column-end::: :::column::: sp_droprole (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_droprolemember (Deprecated)
:::column-end::: :::column::: sp_dropserver
:::column-end::: :::row-end::: :::row::: :::column::: sp_dropsrvrolemember (Deprecated)
:::column-end::: :::column::: sp_dropuser (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sys.sp_generate_database_ledger_digest
:::column-end::: :::column::: sp_external_policy_refresh
:::column-end::: :::row-end::: :::row::: :::column::: sp_grantdbaccess (Deprecated)
:::column-end::: :::column::: sp_grantlogin (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_helpdbfixedrole
:::column-end::: :::column::: sp_helplinkedsrvlogin
:::column-end::: :::row-end::: :::row::: :::column::: sp_helplogins
:::column-end::: :::column::: sp_helpntgroup
:::column-end::: :::row-end::: :::row::: :::column::: sp_helpremotelogin (Deprecated)
:::column-end::: :::column::: sp_helprole
:::column-end::: :::row-end::: :::row::: :::column::: sp_helprolemember
:::column-end::: :::column::: sp_helprotect (Deprecated)
:::column-end::: :::row-end::: :::row::: :::column::: sp_helpsrvrole
:::column-end::: :::column::: sp_helpsrvrolemember
:::column-end::: :::row-end::: :::row::: :::column::: sp_helpuser (Deprecated)
:::column-end::: :::column::: sp_migrate_user_to_contained :::column-end::: :::row-end::: :::row::: :::column::: sp_MShasdbaccess
:::column-end::: :::column::: sp_password (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_refresh_parameter_encryption
:::column-end::: :::column::: sp_remoteoption (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_revokedbaccess (Deprecated)
:::column-end::: :::column::: sp_revokelogin (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_setapprole
:::column-end::: :::column::: sp_srvrolepermission (Deprecated) :::column-end::: :::row-end::: :::row::: :::column::: sp_testlinkedserver
:::column-end::: :::column::: sp_unsetapprole
:::column-end::: :::row-end::: :::row::: :::column::: sp_validatelogins
:::column-end::: :::column::: sys.sp_verify_database_ledger
:::column-end::: :::row-end::: :::row::: :::column::: sys.sp_verify_database_ledger_from_digest_storage
:::column-end::: :::column::: sp_xp_cmdshell_proxy_account
:::column-end::: :::row-end:::

 

Related content