0

This question is identical to this one: How do I grant myself admin access to a local SQL Server instance?, except... my question is about SQL-Server 2012, not 2008. The answers from above question do not work, since, as it seems, I do not have enough rights.

The problem: I have a SQL-server instance (SQL-Server Express 2012), the original owner is killed (the account is killed, not the person himself), so no one is sysadmin anymore.

I am local administrator on the machine and want to grant myself the sysadmin-role on SQL-Server, without reinstalling it.

How?

Community
  • 1
  • 1
Martin Mulder
  • 12,642
  • 3
  • 25
  • 54
  • 2
    what's wrong with that post? why it is not working? why it seems you have not enough rights? there is also a specific answer for sql 2012: does that one failed too? – Paolo Oct 27 '15 at 14:52
  • At this moment SQL-server is reinstalled. My question remains valid since this issue will occur again. As I remember correctly, after I have entered `sp_addsrvrolemember '', 'sysadmin'`, the response is something like: `Role does not exists or user does not have enough rights`. – Martin Mulder Oct 27 '15 at 15:16

1 Answers1

0

You can use this option: https://www.red-gate.com/simple-talk/blogs/careful-trustworthy-setting/

Or you can rebuild the entire master database, re-attach each user database and adjust the server configurations again.

Here is a reference: http://documentation.commvault.com/commvault/v11/article?p=57350.htm

Dennes Torres
  • 396
  • 2
  • 10