Enable SA account in SQL Server

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

Link:

http://sudeeptaganguly.wordpress.com/2010/04/20/how-to-enable-sa-account-in-sql-server/

Reference:

When you install the SQL Server using Windows authentication mode, by default, the 'sa ' account is disabled. Sometimes, due to users/customers request, your may need to enable the SA account. The authentication mode for SQL Server from Windows authentication mode to SQL Server and need Windows authentication Mode to use the SA account.

To change the authentication Mode:

Follow the steps mentioned below to change the authentication mode from Windows authentication to SQL Server and Windows authentication. You need to remember that, the SQL Server service needs to restartto make this change effective.

1. Login to the SQL Server instance using SQL Server Management Studio. Right-click on the database instance, and go to Properties.

2. On the Server Properties page, Click on Security. Click on the radio button next to SQL Server and Windows authentication mode, and click on OK to close the Serve R Properties page.

3. Once clicked on the Ok button, we'll get the following screen:

As discussed earlier, we need to restart the SQL Server service to make this change effective. After restarting the SQL Server, the authentication mode is changed to SQL Server and Windows authentication mode .

Enable the sa Login:

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

2. You can see the SA account was disabled when you install SQL Server using Windows authentication mode.

3. Right-click on the SA account and go to Login Properties. Specify a complex password for the SA account. By default, the Enforce password policy is checked. (If you don ' t want to provide a complex password for the SA account, you can uncheck this option.) However, this is not recommended.)

4. Click on the Status page. By default, the SA account would be disabled. Click on the Enabled button to enable the SA account. Click on Ok to close the SA Login Properties.

Thus, sa account was enabled and you'll be able to login to the SQL instance using the SA account.

If you want to use a script to enable the SA account, you can use the script mentioned below:

1: USE [master]
2: GO
3: ALTER LOGIN [sa] WITH PASSWORD=N‘[email protected]*60i‘
4: GO
5: ALTER LOGIN [sa] ENABLE
6: GO

Enable SA account in SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.