Running as local system to allow administrators in to SQL Server

In cases when there are no provisioned accounts in a SQL Server instance which are known or working, then there is an option instead to run as nt authority \ system (local system). Note that in SQL 2012 local system no longer has sa and you will have to instead start SQL Server in single user mode. http://technet.microsoft.com/en-us/library/dd207004.aspx

Method 1

This method basically involves creating a new windows service which starts an interactive command prompt.

1. sc create _IC binpath= “cmd /K start” type= interact type= own

[SC] CreateService SUCCESS
WARNING: The service _IC is configured as interactive whose support is being deprecated. The service may not function properly.

2. sc start _IC

[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely fashion.

3. Check for the spawned dialog and click view the message

system_prompt

4. This will then lead to a command prompt running as local system. When finished close all your opened apps.

system_cmd_prompt

5. The final tidy up step is to delete the elevator sc delete _IC

Method 2

You need psexec from http://technet.microsoft.com/en-gb/sysinternals/bb897553.aspx

1. psexec –s –i cmd


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *