Open In App

How To Enable SA Account in MSSQL?

Last Updated : 07 May, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will understand to enable the sa account which is not activated when MSSQL is installed for the first time. You are in windows authentication mode when you install MSSQL and by default there is no sa account . To enable it , you need to change the authentication mode for SQL server from Windows Authentication Mode to SQL Server and Windows Authentication Mode. After that you can add the sa account.

Follow the below steps to change the authentication mode in mssql :

1.  Open SSMS and Login to one of your default SQL server instance using SQL Server Management Studio (SSMS). , 

 

2.   Right-click on the database instance and go to Properties. 

 

3. On the Properties page, goto Security, then click on the radio button next to SQL Server and Windows Authentication mode.

 

4. Finally, you need to restart the server instance to apply the changes.

Now, next steps are for Enabling the sa account :

1. Connect to the SQL Server instance using SSMS and go to Security and Expand, then go to Logins.

 

2.  You can see the sa account is disabled in the logins tab when SQL Server is in Windows Authentication mode.

3. Right-click on the sa account and go to Login Properties, then Specify a password for the sa account in general page. 

 

4. Goto the Status page. By default, the sa account will be disabled, so click on the Enabled button to enable the sa account.

 

Alternatively you can use the following SQL statements to enable the sa account :

 USE [master]
 GO
 ALTER LOGIN [sa] WITH PASSWORD=N'z43VGYT@Iu*60i'
 GO
 ALTER LOGIN [sa] ENABLE
 GO

In the above statements , initially you are going to master database then altering the password for sa account then you are enabling the sa account.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads