Promotic
WikipediaLinkedInYoutubeTwitterFacebook

sp_addlogin - statement of language DB_MSSQL

Description:
Create a login account for the connection to the SQL Server instance with using the SQL Server authentication
Syntax:

sp_addlogin

  [@loginame =] 'login'

  [, [@passwd =] 'password']

  [, [@defdb =] 'database']

  [, [@deflanguage =] 'language']

  [, [@sid = ] sid]

  [, [@encryptopt =] 'encryption_option']

 
@loginame Name of the login account.
@passwd Password of the account (NULL means without the password, it is the default value).
@defdb Default database of the account (the default value is 'master').
@deflanguage Default language of the account (the default value is NULL).
@sid Security identification number (the default value is NULL and the system generates the SID automatically).
@encryptopt Determines if the password is stored in the system tables encrypted (the default value is NULL and the password is encrypted).
Example:
Add the account 'pm_reader' with the password 'reader' and the default database 'pm_data'.
EXEC sp_addlogin 'pm_reader', 'reader', 'pm_data'
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice