To gain control of a SQL instance if the user is an Admin on
the machine but not in SQL Server
1.
Stop SQL
Server service if it is running.
2.
Set the
start up parameter to “-m”. Do this in the
General tab of the service. Remember any
pre-existing start-up parameters so you can restore to the original
configuration later.
3.
Start
service.
4.
At a command prompt:
sqlcmd
create login Paul WITH PASSORD =
'hello!1'
go
sp_addsrvrolemember 'Paul',
'sysadmin'
go
Note: SQL has default strong password policy
5.
Put back
to normal user mode
remove -m
stop service
start service
No comments:
Post a Comment