How to Change SQL Server Password || Two ways || step by step

 Change SQL Server password in two ways step by step

1. Change SQL Server password using SQL Setting

2. Change SQL Server password using SQL Query


Solutions:-

1. Change SQL Server password using SQL Setting

  • First open SQL Server Press Window + R Then Type SSMS
  • Login SQL with Window Authentication
  • Open Security - Logins - open Sa user (which user Password change)
  • SQL Sa user password change image

  • Enter Your password and Confirm your password then ok                                                                 
  • Open SQL Server property -  

v Open SQL Server property – Security

Ø  In Server Authentication

ü  Select SQL Server Authentication

Ø  In Login auditing

ü  Select Successful login only

  • SQL Server property image 


  • Restart SQL Server then does login with SQL Server Authentication successfully.


2. Change SQL Server password using SQL Query

 

v First open SQL Server Press Window + R Then Type SSMS

v Login SQL with Window Authentication

v Open Security - Logins - open Sa user (which user Password change)

v Enable Enforce password Policy And Enforce password Expiration

 

NOTE:- Until you will not enable this policy you can’t change the password          Through SQL query, If you want to Disable this Policy after changing the password.

 




SQL Server password Change Query

GO

ALTER LOGIN [Enter Your User Name] WITH DEFAULT_DATABASE=[master]

GO

USE [master]

GO

ALTER LOGIN [Enter Your User Name] WITH PASSWORD=N'NewPassword' MUST_CHANGE

 

If you have any other queries leave me comments and also like and share 



Post a Comment

0 Comments