Gain Administrative Access to a SQL Instance

security-policies-icon

Info

If a user requires administrative access to a SQL instance they can easily gain administrative access as long as the following is true:

  • The user is an administrator on the Windows Server that host the SQL instance
  • SQL Server Management Studio is installed on the Windows Server
  • PSExec can be copied to the Windows Server

Steps

  • Download PSExec and copy it locally to the SQL Server
  • Login to the SQL server with an administrative account
  • Find the installation location of SQL Management Studio
    • Typically somewhere under C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
    • The name of the .exe is SSMS.exe

  • Open an administrative command prompt
  • cd to the location of psexec
  • Issue the following command where the path specified is the location of SSMS.exe

psexec -s -i “C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SSMS.exe”

  • This will open SQL Management Studio as the NT Authority\System account which automatically has administrative privileges to SQL.
  • Make any changes necessary and don’t forget to add an administrative account that can be used in the future.

One thought to “Gain Administrative Access to a SQL Instance”

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.