System stored procedures for granting and revoking access to the current database : sp_GrantDbAccess « System Functions « SQL Server / T-SQL Tutorial






The syntax for sp_GrantDbAccess
sp_GrantDbAccess [@loginame = ] 'login_ID'
               [,[@name_in_db  = ] 'database_alias']
The syntax for sp_RevokeDbAccess
sp_RevokeDbAccess 'name_in_db'
Statements that use these procedures








25.39.sp_GrantDbAccess
25.39.1.System stored procedures for granting and revoking access to the current database
25.39.2.A statement that grants access to a database for a SQL Server login ID