0

I have unchecked the 'sysadmin' server role for my default windows user in SSMS for exploration purpose. And that time, it executed successfully and the "default windows user" is no more a 'sysadmin'.

But now, I want to check it again. Means I want to make my windows user sysadmin again. How can I do that? Thanks. enter image description here

Charlieface
  • 52,284
  • 6
  • 19
  • 43
Robin
  • 85
  • 2
  • 12
  • *"I want to make my windows user sysadmin again"* log in as a different `LOGIN` with the `sysadmin` `ROLE` and give your `LOGIN` the `syadmin` privilege again. – Thom A Oct 27 '21 at 14:40
  • Though, looking at that screenshot, you have revoked your permissions and not (re)enabled the `sa` account; so there is no one with the `sysadmin` `ROLE` that can access the instance. You'll have to follow the documentation and not make the same (silly) mistake again: [Connect to SQL Server when system administrators are locked out](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out?view=sql-server-ver15) – Thom A Oct 27 '21 at 14:41
  • Thanks yo! It worked. You should compose this as an answer, it will help newbie like me. – Robin Oct 27 '21 at 15:12
  • Does this answer your question? [How do I grant myself admin access to a local SQL Server instance?](https://stackoverflow.com/questions/9889334/how-do-i-grant-myself-admin-access-to-a-local-sql-server-instance) – Charlieface Oct 27 '21 at 15:33
  • @Charlieface Answer in your link is correct but as a newbie that method seems a bit confusing. Larnu 's link is simple with UI. It's just my point of view. – Robin Oct 29 '21 at 11:02
  • It is actually linked in one of the answers there, and the fundamental idea is the same: run it in single user mode, then connect as `.\Administrator`. This is definitely a duplicate question – Charlieface Oct 29 '21 at 11:05

0 Answers0