Currently, my local instance looks like this
I want to restore my user database
I have tried restoring my database my rightclicking on Databases and also tried right clicking and doing it on system databases but I get this error
I also have the same permission error when trying to create a new empty database.
Best Answer
If you are a Windows admin, you may create a sysadmin login for yourself following the procedure documented here: Connect to SQL Server when system administrators are locked out
Here it is in batch file form to run (from an elevated command prompt), for a default instance:
or for a named instance:
Note that if you create the login for
BUILTIN\administrators
and you've got User Account Control enabled then you'll have to elevate to connect. If you create a login for your individual account you won't need to elevate.