Creates a new SQL Server user by adding an entry to the master.dbo.syslogins system table. A fifth parameter specifies a login suid for the syslogins table to repair an orphan user that occurs as a result of a database load.
For additional syntax information for sp_addlogin, see the Microsoft SQL Server Transact-SQL Reference.
sp_addlogin login_id [, password [, defdb [, deflanguage [, login_suid]]]]
where
This example creates a SQL Server login for the login ID Victoria. Victoria's password is citybythewater, her default database is products, her language defaults to the system language, and the new login suid in the syslogins table is 44882.
sp_addlogin 'Victoria','citybythewater','products',default,44882
Only the system administrator can use this stored procedure.