I faced this issue last week. my manager told me that we have access to the windows server but no to SQL. he asked me to add an AD group . I went in the 'local users and groups ' and tried to add them to that administrator group but the AD groups was already there . I told same to my manager ,but he told that group will not have sysadmin role. So could you please tell me how to get added ourselves to sysadmin group.
Asked
Active
Viewed 34 times
-2
-
SQL Server won't let you add yourself, as this would create a security hole. You'll need to find someone who already has permissions. Talk to your database administrator. They should be able to help. – David Rushton Dec 05 '16 at 17:45
-
I have the permission to windows server , where the SQL is installed. So I should be able to add myself. But I do not know the right place ! – Sunny Dec 05 '16 at 19:45
-
Sysadmin is a group within SQL Server. It's not part of the AD. Only accounts already in that group can add others to it. Using a sysadmin account start up SQL Server Management Studio. See the Microsoft documentation for more on [SQL Server authentication](https://msdn.microsoft.com/en-us/library/bb669066(v=vs.110).aspx). – David Rushton Dec 05 '16 at 20:14
-
[This link](https://msdn.microsoft.com/en-us/library/aa337562.aspx), again from MS, is probably a better read. – David Rushton Dec 05 '16 at 20:38
1 Answers
0
I could resolve the issue as below.
If you have permission to get added yourself as sysadmin and you have local admin access to the server below is the method in which you can get added yourself to SQL sysadmin.
- Stop the SQL services on the instance you want to get sysadmin access.
- Start the server in the single user mode by executing the command in cmd sqlservr -m -sI01 Note : you need to execute the above cmd in the path where your instance is there and run cmd as admin. Also -sI01 is a named instance. For default instance no need to give this.
Then run the below commands in another window to add yourself to SA
create login americas\dc-dba-sql-admins-win from windows;
Go
EXEC master..sp_addsrvrolemember 'americas\dc-dba-sql-admins-win', 'sysadmin'
Go

David Duponchel
- 3,959
- 3
- 28
- 36

Sunny
- 1
- 1