Unanswered: sa locked and BUILIN\Administrator account disable
Need your assistance currently I have a problem to access SQL Server using sa due account locked and BUILIN\Adminsitrator was disable during database hardening. So i cant access using Windows Authentication .
I have few step such as login as single user mode and create new user ID with sysadmin prvilages. But still not work .
Need your assistance and help, is it any other way or step that i can use to unlocked sa and access into sql database environment
Really appreciate your kind assistance
SQL SERVER VERSION : MSSQL 2012 Express Edt
OS SYSTEM : Windows Server 2008 Standard Edt
For unlocking SA, you just have to connect as a machine administrator to the server. The machine administrators are by default granted access to SQL Server. Once you connect as an administrator, you can issue:
ALTER LOGIN sa WITH PASSWORD = 'new_password' UNLOCK
I have (fortunately) never had to do this sort of thing myself, but I believe in order to gain access again, you will have to do the following:
1) Get the Windows admins to create a group for the DBA(s). I don't care if there is only one of them.
2) Log into the machine via the console, or RDP.
3) Shut down SQL Server
4) Open SQL Server Configuration, and navigate to the SQL Server Services in the left pane.
5) Alter the properties of the SQL Server service and add a startup parameter of "-m" (it is a semi-colon separated list)
6) Start SQL Server only (do not start the agent, Reporting Services, or anything else).
7) Open a command window, and connect to the SQL Server with the SQLCMD utility
sqlcmd /E /S ServerNameGoesHere
You should be connected to the sql server, now with a prompt that looks like: 1>
8) issue the following commands:
create login [domain\groupname] from windows -- group name should be the DBA group
sp_addsrvrolemember [domain\groupname] , sysadmin
9) Shut down the SQL Server service
10) Undo the change you made in step 5
11) Start SQL Server normally.
12) Test your access.
Last edited by MCrowley; 06-29-16 at 10:25.
Reason: Missed a step