The sa login can only connect to the server by using SQL Server Authentication.
To change security authentication mode -
In SQL Server Management Studio 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 acknowledge the requirement to restart SQL Server.

To restart SQL Server from SQL Server Management Studio
-
In Object Explorer, right-click your server, and then click Restart. If SQL Server Agent is running, it must also be restarted.
To enable the sa login by using Transact-SQL -
Execute the following statements to enable the sa password and assign a password.
ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = '' ;
GO

To enable the sa login by using Management Studio
-
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 sa login.
-
On the Status page, in the Login section, click Enabled, and then click OK.
Không có nhận xét nào:
Đăng nhận xét