1

I started working at a new job and when I opened up SSMS and tried connecting to my local DB (by connecting to ".") I got a cannot connect message.

I was finally able to connect to my local DB by connecting to ".\SQLEXPRESS"

The problem I am having now is that I am not able to create any databases, tables etc on my local DB. I get the CREATE DATABASE permission denied in database 'master'

I also tried running the Activity monitor as a test and received the error message "The user does not have permission to perform this action. (Microsoft SQL Server, Error: 297).

I am wondering if this has anything to do with the fact that I am not an "Administrator" on my computer or if it is just the way SQL Server was installed.

When I go into Security > Logins I see BUILTIN\Users and sa (which has a little red arrow pointing down next to it)

When I double click on the sa Login it shows that there is a pasdword for the SA account.

Does this mean that whoever installed SQL Server on my machine created an sa user during installation with a password which is why I have no permissions??

1

If the instance name is .\SQLEXPRESS you have an instance of SQL Server Express but not localdb.

The default install will give builtin\administrators permissions on the database so you will have to start the Managment Studio (SSMS) by right clicking the shortcut and select run as admin to have an administrative token and be able to create databases.

When running the SSMS as admin you can add your user account to the sysadmin role in the database server and after that run things using your user account without elevation.

  • Thank you, so basically I will need to do a default installation of SQL Server before following the steps you suggested right? In other words with the SQL EXPRESS installation I currently have I will not be able to create databases right? – Juan Velez Jun 12 '15 at 17:07
  • Yes you can, if you can start ssms with run as admin – Spörri Jun 12 '15 at 17:12
  • I right clicked on the SSMS icon and then "Run as Administrator". Then logged in to .\SQLEXPRESS using win. authent. Under Security>Logins I double clicked on the BUILTIN\Users login and tried adding it to the sysadmin server role but got an error saying "Add member failed for ServerRole 'sysadmin' User does not have permission to perform this action." I also created a login with my Domain\Username but I also get the same error message when I try to add it to the sysadmin server role. Even though I am running SSMS as Administrator like u mentioned I am not Admin on my PC cld that be issue? – Juan Velez Jun 12 '15 at 17:45
  • 1
    Yes, you will need an administrator to give you access or to do the following msdn.microsoft.com/en-us/library/dd207004.aspx – Spörri Jun 12 '15 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.