Friday, December 30, 2011

SQL SERVER – Reset sa Password

1.Open the SQL Server express management studio
2.Connect to SQL Server using windows authentication
3.Right click the server name and choose properties
4.Go to security tab. Change server authentication to “SQL Server and Windows Authentication mode”
5.Click OK and restart SQL Server
6.Go to SQL Server studio management express
7.Expand the server and choose security and expand logins
8.Right click on SA, from properties modify the password and confirm password

OR

To reset the sa password, you can make the following:
1. Login to the SQL Server box as the Administrator.
2. Run SQL Server Enterprise Manager.
3. Right-click the server name and choose ‘Edit SQL Server Registration properties’.
4. Choose ‘Use Windows authentication’ and click OK button.
5. Expand a server, expand a Security and click Logins.
6. Double-click the sa login and specify new password on the General tab. (enable Login to)

Or You Can Use

USE [master]
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N’’ MUST_CHANGE
GO

or

From a command prompt
OSQL -S -E
1> EXEC sp_password NULL, ‘’, ‘sa’
2> GO

No comments:

Post a Comment