Change server authentication mode

 Change server authentication mode

Applies to: SQL Server

This article describes how to change the server authentication mode in SQL Server by using SQL Server Management Studio or Transact-SQL. During installation, SQL Server Database Engine is set to either Windows Authentication mode or SQL Server and Windows Authentication mode. After installation, you can change the authentication mode at any time.

If Windows Authentication mode is selected during installation, the sa login is disabled and a password is assigned by setup. If you later change authentication mode to SQL Server and Windows Authentication mode, the sa login remains disabled. To use the sa login, use the ALTER LOGIN statement to enable the sa login and assign a new password. The sa login can only connect to the server by using SQL Server Authentication.

Before you begin

The sa account is a well known SQL Server account and it is often targeted by malicious users. Don't enable the sa account unless your application requires it. It's important that you use a strong password for the sa login.

Change authentication mode with SQL Server Management Studio

  1. In SQL Server Management Studio (SSMS) Object Explorer, right-click the server, and then select Properties.

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

  3. In the SQL Server Management Studio dialog box, select OK to acknowledge the requirement to restart SQL Server.

  4. In Object Explorer, right-click your server, and then select Restart. If SQL Server Agent is running, it must also be restarted.

Enable sa login

You can enable the sa login with SSMS or Transact-SQL.

Use SSMS

  1. In Object Explorer, expand Security, expand Logins, right-click sa, and then select Properties.

  2. On the General page, you might have to create and confirm a password for the sa login.

  3. On the Status page, in the Login section, select Enabled, and then select OK.

Comments

Popular posts from this blog

Google: How to disable Auto Licensing

Microsoft 365で多要素認証の設定を解除したい