Security stored procedures
58 reference entries
- sp_audit_write
spauditwrite adds a user-defined audit event to USERDEFINEDAUDITGROUP.
- sp_control_dbmasterkey_password
spcontroldbmasterkeypassword adds or drops a credential containing the password needed to open a database master key.
- sp_describe_parameter_encryption
spdescribeparameterencryption analyzes the specified Transact-SQL statement and its parameters.
- sp_dropalias
Deprecated procedure listed in the Security stored procedures index. Review the Microsoft reference before use.
- sp_external_policy_refresh
Reference documentation to explain spexternalpolicyrefresh (Transact-SQL) system stored procedure.
- sp_migrate_user_to_contained
spmigrateusertocontained converts a database user that is mapped to a SQL Server login, to a contained database user with password.
- sp_MShasdbaccess
spMShasdbaccess lists the name and owner of all the databases to which the user has access.
- sp_validatelogins
Reports information about Windows users and groups that are mapped to SQL Server principals but no longer exist in the Windows environment.
- sp_xp_cmdshell_proxy_account
Creates a proxy credential for xpcmdshell.
- sys.sp_add_trusted_assembly
Adds an assembly to the list of trusted assemblies for the server.
- sys.sp_addapprole
Adds an application role to the current database.
- sys.sp_addlogin
Creates a new SQL Server login that allows a user to connect to a SQL Server instance with SQL Server authentication.
- sys.sp_addremotelogin
spaddremotelogin adds a new remote login ID on the local server.
- sys.sp_addrole
spaddrole creates a new database role in the current database.
- sys.sp_addrolemember
Adds a database user, database role, Windows login, or Windows group to a database role in the current database.
- sys.sp_addserver
spaddserver defines the name of the local instance of SQL Server.
- sys.sp_addsrvrolemember
spaddsrvrolemember adds a security principal as a member of a fixed server role.
- sys.sp_adduser
spadduser adds a new user to the current database.
- sys.sp_approlepassword
spapprolepassword changes the password of an application role in the current database.
- sys.sp_change_users_login
spchangeuserslogin Maps an existing database user to a SQL Server login.
- sys.sp_changedbowner
spchangedbowner changes the owner of the current database.
- sys.sp_changeobjectowner
spchangeobjectowner changes the owner of an object in the current database.
- sys.sp_copy_data_in_batches
Copies data from the source table to the target table after verifying that their schema is identical in terms of number of columns, column names and their data types.
- sys.sp_dbfixedrolepermission
spdbfixedrolepermission displays the permissions of a fixed database role.
- sys.sp_defaultdb
spdefaultdb changes the default database for a SQL Server login.
- sys.sp_defaultlanguage
spdefaultlanguage changes the default language of for a SQL Server login.
- sys.sp_denylogin
spdenylogin Prevents a Windows user or Windows group from connecting to an instance of SQL Server.
- sys.sp_drop_trusted_assembly
Drops an assembly from the list of trusted assemblies on the server.
- sys.sp_dropapprole
spdropapprole removes an application role from the current database.
- sys.sp_droplogin
spdroplogin removes a SQL Server login.
- sys.sp_dropremotelogin
Removes a remote login mapped to a local login used to execute remote stored procedures against the local server running SQL Server.
- sys.sp_droprole
spdroprole removes a database role from the current database.
- sys.sp_droprolemember
spdroprolemember removes a security account from a SQL Server role in the current database.
- sys.sp_dropsrvrolemember
spdropsrvrolemember removes a SQL Server login, Windows user, or Windows group, from a fixed server role.
- sys.sp_dropuser
spdropuser removes a database user from the current database.
- sys.sp_generate_database_ledger_digest
produces the current ledger digest
- sys.sp_grantdbaccess
spgrantdbaccess adds a database user to the current database.
- sys.sp_grantlogin
spgrantlogin creates a SQL Server login.
- sys.sp_helpdbfixedrole
sphelpdbfixedrole returns a list of the fixed database roles.
- sys.sp_helplinkedsrvlogin
Provides information about login mappings defined against a specific linked server used for distributed queries and remote stored procedures.
- sys.sp_helplogins
sphelplogins provides information about logins and the users associated with them in each database.
- sys.sp_helpntgroup
sphelpntgroup reports information about Windows groups with accounts in the current database.
- sys.sp_helpremotelogin
Reports information about remote logins for a particular remote server, or for all remote servers, defined on the local server.
- sys.sp_helprole
sphelprole returns information about the roles in the current database.
- sys.sp_helprolemember
sphelprolemember returns information about the direct members of a role in the current database.
- sys.sp_helprotect
sphelprotect returns a report that's information about user permissions for an object, or statement permissions, in the current database.
- sys.sp_helpsrvrole
sphelpsrvrole Returns a list of the SQL Server fixed server roles.
- sys.sp_helpsrvrolemember
sphelpsrvrolemember returns information about the members of a SQL Server fixed server role.
- sys.sp_helpuser
sphelpuser reports information about database-level principals in the current database.
- sys.sp_password
sppassword adds or changes a password for a SQL Server login.
- sys.sp_refresh_parameter_encryption
sprefreshparameterencryption updates the Always Encrypted metadata for the parameters of the specified non-schema-bound object.
- sys.sp_remoteoption
spremoteoption displays or changes options for a remote login defined on the local server running SQL Server.
- sys.sp_revokedbaccess
sprevokedbaccess removes a database user from the current database.
- sys.sp_revokelogin
sprevokelogin Removes the login entries from SQL Server for a Windows user or group.
- sys.sp_setapprole
spsetapprole activates the permissions associated with an application role in the current database.
- sys.sp_srvrolepermission
spsrvrolepermission displays the permissions of a fixed server role.
- sys.sp_unsetapprole
Deactivates an application role and reverts to the previous security context.
- sys.sp_verify_database_ledger
recomputes hashes and compares with digests