0

I know this question already exists but I couldn't find a solution for me. So, I'm using windows 10. There are two accounts (both admin) with the only difference that my account is not the first created when windows was installed.

This was my process from the beginning:

I have installed sql server expressSP1 2016 and SSMS. (and yes at the end of sql installation the sql administrator was me: PC-Name/myname)

I ran SSMS and connected to the server with server-name: PC-NAME \SQLEXPRESS

Ran the query Create database newDatabase.....and I got the error.

The weird thing is that if I run SSMS from the other Account I don't have problems. It let me create the database!

Is there a configuration in SSMS that I'm missing or is Windows that somehow won't grant me admin role?

Shadow
  • 33,525
  • 10
  • 51
  • 64
Sergio
  • 250
  • 1
  • 4
  • 18
  • Possible duplicate of [How do I grant myself admin access to a local SQL Server instance?](http://stackoverflow.com/questions/9889334/how-do-i-grant-myself-admin-access-to-a-local-sql-server-instance) Computer Admin and SSMS admin are two different things – Master Apr 26 '17 at 20:28
  • Under the ServerName->Security, right-click your login, select properties, and make sure you have sysadmin permissions. – pmbAustin Apr 26 '17 at 20:30
  • @pmbAustin under Logins folder there's a bunch of login's name(which I didn't create) so I don't know which one is mine. There's nothing like my windows account name. When I was supposed to create this login? Anyway I have resolved by logging into the other account and granting sysadmin permission to BUILTIN\Users (I could not do it from my account). But now I'm curious to understand if this was the right way to solve it – Sergio Apr 26 '17 at 21:51
  • Sorry, I wasn't clear... you need to log in with the 'sa' or working sysadmin account, then go to the security node, and you should see all the logins there. And there you can ensure your login has the proper sysdamin role/permissions. Any login you use to physically log into SQL Server (including your windows Domain/Account login, if that's how you're set up) should be listed. Your non-sysadmin account might not have permission to see all users/logins. You'd also need to check your database user associated with your login. – pmbAustin Apr 26 '17 at 22:00
  • I don't know how to login with 'sa' since the login and password are greyed out. What I did, instead, was to switch windows account, create a new login with the same name of the greyed out login and granted sysadmin permission. I have also revoked sysadmin permission to BUILTIN\Users because I guess this is for all users (I am right?) – Sergio Apr 26 '17 at 23:07
  • https://stackoverflow.com/questions/34866014/sql-server-2012-create-database-permission-denied-in-database-master-error-262 – Shady Mohamed Sherif Apr 21 '18 at 07:55

0 Answers0