17 July 2013

Getting access to SQL Server

Everyone of us knows the problem that after a SQL Server Installation you suddenly recognize that you have forgotten to grant your user access to the SQL Server instance.
Due to the fact that the NT AUTHORITY\SYSTEM account alwas has access to the SQL server a simple workaround is using PsExec. It allows you to run programs as the SYSTEM user.
  1. download PsExec and extract it somewhere
  2. open CMD and navigate to PsExec folder
  3. start SQL Server Manager with the following command:
    PsExec -s -i "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"

Add your user in the Security settings :)

For me this worked fine with SQL Server 2008 but seems to be not working with SQL Server 2012. You can get access to the SQL Server but you are not allowed to change Security settings or add users.
Post a Comment