Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
TITLE: Microsoft SQL Server Management Studio
------------------------------

Create failed for Database 'myworld'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2500.0+((KJ_PCU_Main).110617-0026+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

i need to create through this permission only that is sql server authentication
Posted
Comments
Sergey Alexandrovich Kryukov 9-Feb-14 14:03pm    
To be logical, if you have "permission denied", how can you "this permission only"?
—SA

1 solution

Hi,

Apparently, your SQL Server login doesn't have a permission to create a database. SQL Server login must be a member of the sysadmin or dbcreator server role in order to do that.

EXAMPLE:
Add a SQL Server login named User to the dbcreator fixed server role (using an account with administrative rights):
SQL
USE master;
GO
EXEC sp_addsrvrolemember 'User', 'dbcreator';
GO

More information here: sp_addsrvrolemember (Transact-SQL)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900