Promotic
WikipediaLinkedInYoutubeTwitterFacebook

sp_password - statement of language DB_MSSQL

Description:
Change the password of the login account.
Syntax:

sp_password

  [[@old =] 'old_password',]

  [@new =] 'new_password'

  [, [@loginame =] 'login']

 
@old Original password of the login account (NULL means without the password; the default value is NULL).
@new New password of the login account (NULL means without the password).
@loginame Name of the login account whose password will be changed (NULL means to change the password of the logged in account; the default value is NULL).
Example1:
Change the password for the account 'pm_reader' from the old value 'reader' to the new value 'abcdef'.
EXEC sp_password 'reader', 'abcdef', 'pm_reader'
Example2:
Change the password for the logged in account from the old value 'reader' to the empty value (without the password).
EXEC sp_password 'reader', NULL
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice