Skip to content
DataBaseBlogs.com
DataBaseBlogs.com
  • Basics
  • Functions
  • Stored Procedures

How To Enable SA Account In SQL Server

December 14, 2024November 13, 2024 by Grey

As an SQL Server DBA, you will encounter many scenarios in which enabling the SA (System Administrator) account is necessary. My daily activity is troubleshooting authentication issues and working on some Legacy applications that require sa access. Based on my analysis, I have identified some simple approaches to enabling an account in SQL Server. In this article, let me walk you through all the approaches individually.

Table of Contents

Toggle
  • How To Enable SA Account In SQL Server
    • Approach-1: Using SQL Server Management Studio (SSMS)
    • Approach-2: Using SQL script
  • Conclusion

How To Enable SA Account In SQL Server

Below are the approaches that you need to utilize for this purpose.

Approach-1: Using SQL Server Management Studio (SSMS)

To enable SA account in SQL server, Follow the below steps.

1. Launch SQL Server Management Studio (SSMS) and connect to your SQL instance.

2. Expand the Security folder and then expand the Logins folder, as shown in the screenshot below.

how to enable sa account in sql server 2019

3. Right-click on the SA login and then select the properties option as shown below.

how to enable sa account in sql server express 2019

4. Enter the password and confirm the password in the General tab, then click on the Status tab from the top left, as shown in the screenshot below.

how to enable sa account in sql server 2017

5. On the Status tab, select the Enabled option for Login and then click on the Ok button, as highlighted in the screenshot below.

how to enable sa account in sql server 2014

Check out How To Create A User In SQL Server Database

Approach-2: Using SQL script

We can also execute an SQL script to enable the SA account, as mentioned below.

USE master;
GO
ALTER LOGIN sa ENABLE;
GO
ALTER LOGIN sa WITH PASSWORD = 'Rajkishore@123';
GO

The query was executed successfully, as shown in the screenshot below.

Enable SA Account In SQL Server

Now, we can cross-check if it is enabled using the SSMS; we can see that the red cross mark is not on top of the SA account, which means it is enabled. Refer to the screenshot below.

enable sa account sql server

Alternatively, we can execute the below query; if is_disabled is 0, it is enabled.

SELECT name, is_disabled
FROM sys.server_principals
WHERE name = 'sa';

After executing the above query, you can see the is_disabled is 0, which means the account is enabled now. Refer to the screenshot below.

sql server how to enable sa account

Conclusion

Enabling the SA account in SQL Server requires careful execution. As mentioned in this article, you can either use the SQL Server Management Studio (SSMS) design approach or an SQL query to enable this. This is crucial to maintain a secure database.

You may also like following the articles below.

  • Grant Write Access To Table In SQL Server
  • How To Get Table Count In SQL Server
  • SQL Server Remove Duplicates From A Table
Grey
Grey

Grey is a highly experienced and certified database expert with over 15 years of hands-on experience in designing, implementing, and managing complex database systems. Currently employed at WEX, USA, Grey has established a reputation as a go-to resource for all things related to database management, particularly in Microsoft SQL Server and Oracle environments. He is a Certified Microsoft SQL Server Professional (MCSE: Data Management and Analytics) and Oracle Certified Professional (OCP), with Extensive database performance tuning and optimization knowledge and a proven track record in designing and implementing high-availability database solutions.

Recent Posts

  • How To Shrink A Database In SQL Server
  • How To Generate Script Of Table With Data In SQL Server
  • How To Get The Primary Key Of A Table In SQL Server
  • How To Count Number Of Columns In A Table In SQL Server
  • How To Enable SA Account In SQL Server

Recent Comments

No comments to show.
  • About
  • Contact
  • Privacy Policy
© 2025 DatabaseBlogs.com