sp_grantdbaccess (Transact-SQL)
Adds a database user to the current database.
Important |
|---|
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use CREATE USER instead. |
sp_grantdbaccess calls CREATE USER, which supports additional options. For information about creating database users, see CREATE USER (Transact-SQL). To remove a database user from a database, use DROP USER.
sp_grantdbaccess cannot be executed within a user-defined transaction.

Important