SQL Server 2008 R2 Express permissions — cannot create database or modify users

后端 未结 5 1902
误落风尘
误落风尘 2020-12-08 11:30

Recently just upgraded to SQL Server 2008 R2 Express. When I attempt to create a database after logging in using Windows Authentication with my id myuser I receive this erro

5条回答
  •  时光取名叫无心
    2020-12-08 11:55

    I have 2 accounts on my windows machine and I was experiencing this problem with one of them. I did not want to use the sa account, I wanted to use Windows login. It was not immediately obvious to me that I needed to simply sign into the other account that I used to install SQL Server, and add the permissions for the new account from there

    (SSMS > Security > Logins > Add a login there)

    Easy way to get the full domain name you need to add there open cmd echo each one.

    echo %userdomain%\%username%
    

    Add a login for that user and give it all the permissons for master db and other databases you want. When I say "all permissions" make sure NOT to check of any of the "deny" permissions since that will do the opposite.

提交回复
热议问题