How can I change from SQL Server Windows mode to mixed mode (SQL Server)

When installing SQL SERVER, i have installed it on Windows Authentication mode.But after according to my needs, i want to have mixed mode, so that i can use sa account.

To change security authentication mode:
In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
1.jpg

On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
2.jpg
In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
3.jpg
In Object Explorer, right-click your server, and then click Restart.



To enable sa user graphically :
In Object Explorer, expand Security, expand Logins, right-click SA, and then click Properties.
4.jpg
On the General page, you might have to create and confirm a password for the login.
5.jpg
On the Status page, in the Login section, click Enabled, and then click OK.
6.jpg

To enable sa user through code :
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'sa123'
GO
ALTER LOGIN [sa] ENABLE
GO

Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post

Contact Form