Skip to main content

Posts

Showing posts with the label changing password of user

Tips to alter login in sql server for database

1. Enabling a disabled log in The following example enables the login  for user name is TestUser5. ALTER LOGIN TestUser5 ENABLE; 2. Changing the password of a login for User TestUser5 The following example changes the password of login TestUser5 to a strong password. ALTER LOGIN TestUser5 WITH PASSWORD = '<enterStrongPasswordHere>'; 3. Changing the name of a login  for user TestUser5 The following example changes the name of login TestUser5 to Abc2. ALTER LOGIN TestUser5 WITH NAME = Abc2; 4. Mapping a login to a credential The following example maps the login Abc2 to the credential Custodian04. ALTER LOGIN Abc2 WITH CREDENTIAL = abc04; 5. Mapping a login to an Extensible Key Management credential The following example maps the login TestUser5 to the EKM credential EKMProvider1. ALTER LOGIN TestUser5 ADD CREDENTIAL EKMProvider1; GO 6. Unlocking a login for user TestUser5 To unlock a SQL Server login, execute the following statement, replacing **** with the...