Home » SQL ServerRSS

SQL 2008 unlock sa account

How can I unlock sa account in sql 2008?  I've tried to uncheck the check box to unlock, but no success.  I'm in mixed mode and I'm logged into sql, but I don't have access to sa apparently.
 

5 Answers Found

 
 

Answer 2

doesn't work, I tried enabling, but no luck.  I don't have permissions.
 

Answer 3

any one else?
 

Answer 4

Are you an administrator of the SQL Server? Or maybe I should ask that as, "Do you think you are an administrator of the SQL Server?" Execute SELECTIS_SRVROLEMEMBER('sysadmin') It will return 1 if you are an administrator and 0 if you are not.

What error are you receiving?

 

Answer 5

You should be memeber of the server roles either "SYSADMIN" or "SECURITYADMIN" to unlock  the 'sa' login.

IF

 

IS_SRVROLEMEMBER('sysadmin')= 1

 

print'Current user''s login is a member of the sysadmin role'

ELSE

 

IFIS_SRVROLEMEMBER('sysadmin')= 0

 

print'Current user''s login is NOT a member of the sysadmin role'

ELSE

 

IFIS_SRVROLEMEMBER('sysadmin')ISNULL

 

print'ERROR: The server role specified is not valid.'

IF

 

IS_SRVROLEMEMBER('securityadmin')= 1

 

print'Current user''s login is a member of the securityadmin role'

ELSE

 

IFIS_SRVROLEMEMBER('securityadmin')= 0

 

print'Current user''s login is NOT a member of the securityadmin role'

ELSE

 

IFIS_SRVROLEMEMBER('securityadmin')ISNULL

 

print'ERROR: The server role specified is not valid.'

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter