Saturday, November 12, 2011

How to enable the sa login in SQL Server 2008 R2?

If you don't see the 'sa' account in SQL server 2008 under security node even you have already enabled ' SQL Server and Windows Authentication mode' then Just follow the steps below to enable 'sa' login in SQL Server 2008 R2.


Method 1 - Enable the sa login by using Transact-SQL:


ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = '<enterStrongPasswordHere>' ;
GO

 

Method 2 - Enable the sa login by using Management Studio:

  1. In Object Explorer, expand Security, expand Logins, right-click sa, and then click 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, click Enabled, and then click OK.



Reference: Zubair Ahmed (http://mssql-tech.blogspot.com/)

No comments:

Post a Comment

How to resolve "Msg 3013, Sev 16: BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000]"?

If SQL database is getting failed leaving the below error message. Msg 3013, Sev 16: BACKUP DATABASE is terminating abnormally. [SQLSTATE ...