Can't create a new Database on my desktop

zachvaldez
zachvaldez used Ask the Experts™
on
I'm getting  message
CREATE DATABASE permission denied in database 'master'
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Master is already a DB. What exactly are you doing???

Right click on the Databases and then choose create database ..

EE.jpg
That error will show if you're logged in as a user that doesn't have dbcreator or sysadmin roles.
How are you connecting, with SQL or integrated auth?
David FavorFractional CTO
Distinguished Expert 2018

Commented:
The master database normally manages system data.

Follow Pawan's example to create a database.

If you still get this message, when creating any new database, likely your specific user requires some additional privilege to create databases.

In this case, you'd visit with your admin about fixing this for you.
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Please see-

Only the dbo or a user with dbo rights is allowed to create new databases. You must be logged on with a user that has rights on the master database.  Otherwise it is not possible to make changes to the master database. And also, when you create a new database that information is stored in the master database, so you must have at least some kind of INSERT rights to the master.
No, you simply need "dbcreator" or "sysadmin" server roles.
The master db acts a fair bit differently than user databases, you don't need to manually add the user to the master users list, or give any insert permissions.
Just the server roles.

dbo is not sufficient or required to create a new database.
Vitor MontalvãoIT Engineer
Distinguished Expert 2017

Commented:
The CREATE DATABASE permission is set on the master database and that's why the error message.
Since you don't have a sysadmin role in the SQL Server instance you'll need to ask a DBA to create the database for you or ask the DBA to grant you the CREATE DATABASE permission.

Commented:
you just need to get  "right' sql server permissions -- > if you are DBA on this box  "sa role' permission will cover it"

"Create a Database"
https://docs.microsoft.com/en-us/sql/relational-databases/databases/create-a-database
"Permissions: Requires CREATE DATABASE permission in the master database, or requires CREATE ANY DATABASE, or ALTER ANY DATABASE permission.
To maintain control over disk use on an instance of SQL Server, permission to create databases is typically limited to a few login accounts.

Author

Commented:
I redownloaded and installed SSMS 2014 just to make sure I start fresh. I could not find any LocalDB "server" that I can use for practice.  I thought LocalDB as a server instance is provided by default on install?
Vitor MontalvãoIT Engineer
Distinguished Expert 2017

Commented:
The LocalDB doesn't come with SSMS but with SQL Server setup media.

Author

Commented:
Thanks but what you mean by 'SQL Server setup media'
IT Engineer
Distinguished Expert 2017
Commented:
LocalDB is only available with SQL Server Express Edition. Is this Edition that you have?
If affirmative then follow this instructions.

Author

Commented:
Well done!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial