| title | Change Server Authentication Mode | Microsoft Docs | ||||
|---|---|---|---|---|---|
| ms.custom | |||||
| ms.date | 03/14/2017 | ||||
| ms.prod | sql | ||||
| ms.prod_service | database-engine | ||||
| ms.service | |||||
| ms.component | configure-windows | ||||
| ms.reviewer | |||||
| ms.suite | sql | ||||
| ms.technology |
|
||||
| ms.tgt_pltfrm | |||||
| ms.topic | article | ||||
| helpviewer_keywords |
|
||||
| ms.assetid | 79babcf8-19fd-4495-b8eb-453dc575cac0 | ||||
| caps.latest.revision | 31 | ||||
| author | MikeRayMSFT | ||||
| ms.author | mikeray | ||||
| manager | craigg | ||||
| ms.workload | Active |
[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md] This topic describes how to change the server authentication mode in [!INCLUDEssCurrent] by using [!INCLUDEssManStudioFull] or [!INCLUDEtsql]. During installation, [!INCLUDEssDEnoversion] 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 [!INCLUDEssNoVersion] Authentication.
In This Topic
-
Before you begin:
-
To change server authentication mode, using:
The sa account is a well-known [!INCLUDEssNoVersion] account and it is often targeted by malicious users. Do not enable the sa account unless your application requires it. It is very important that you use a strong password for the sa login.
-
In [!INCLUDEssManStudioFull] 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 [!INCLUDEssManStudioFull] dialog box, click OK to acknowledge the requirement to restart [!INCLUDEssNoVersion].
-
In Object Explorer, right-click your server, and then click Restart. If [!INCLUDEssNoVersion] Agent is running, it must also be restarted.
-
In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.
-
On the General page, you might have to create and confirm a password for the login.
-
On the Status page, in the Login section, click Enabled, and then click OK.
To enable the sa login
-
In Object Explorer, connect to an instance of [!INCLUDEssDE].
-
On the Standard bar, click New Query.
-
Copy and paste the following example into the query window and click Execute. The following example enables the sa login and sets a new password.
ALTER LOGIN sa ENABLE ; GO ALTER LOGIN sa WITH PASSWORD = '<enterStrongPasswordHere>' ; GO
Strong Passwords
Security Considerations for a SQL Server Installation
ALTER LOGIN (Transact-SQL)
Connect to SQL Server When System Administrators Are Locked Out