SQL Server Windows authentication change mixed login SQL Server authentication user name password

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

During installation, the SQL Server database engine is set to either Windows Authentication mode or SQL Server and Windows Authentication mode. This topic describes how to change the security mode after installation.

If you select Windows Authentication mode during the installation process, the SA login is disabled. If you later change the authentication mode to SQL Server and Windows authentication mode, the SA logon name is still disabled. To enable the SA login account, use the ALTER login statement.




The sa login can only connect to the server using SQL server Authentication.

1. Change the security authentication mode
In SQL server Management Studio, in Object Explorer, right-click the server, and then click Properties.

On the Security page, under Server Authentication, select the new server authentication mode, and then click OK.

In the SQL Server Management Studio dialog box, click OK to confirm that SQL Server needs to be restarted.

2. Restart SQL Server from SQL Server Management Studio
In Object Explorer, right-click your server, and then click Restart. If you run a SQL Server agent, you must also restart the agent.

3. Enable the SA login account

Method One: Enable the SA logon account by using Transact-SQL

Execute the following statement to enable the SA password and assign a password.

ALTER LOGIN sa ENABLE; GO ALTER  with = ' Sa123456 '  ; GO

Method Two: Use Management Studio to enable the sa login account

In Object Explorer, expand Security, tap Logins, right-click SA, and then click Properties.

On the General page, you may need to create a password for the sa login and confirm the password.

On the Status page, in the logon section, click Enable, and then click OK.

SQL Server Windows authentication change mixed login SQL Server authentication user name password

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.