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