About Me

My photo
Colorado
Paul has 18 years experience with Microsoft SQL Server. He has worked in the roles of production DBA, database developer, database architect, applications developer, business intelligence and data warehouse developer, and instructor for students aspiring for MCDBA certification. He has performed numerous data migrations and supported large databases (3 Terabyte, 1+ billion rows) with high transactions. He is a member of PASS, blogs about lessons learned from a developer’s approach to SQL Server administration, and has been the president of the Boulder SQL Server Users’ Group from January 2009 to present.

Thursday, November 14, 2013

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