Sunday, February 19, 2012

Error message creating database

hi all,
While creating a database in SQL 2005 i get an error message like:
Create failed for Database 'Student_Course'.
(Microsoft.SqlServer.Express.Smo)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00. 3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Create+Database&LinkId=20476[/url]
Program Location:
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Cr eateImpl()
at Microsoft.SqlServer.Management.Smo.Database.Create ()
at
Microsoft.SqlServer.Management.SqlManagerUI.Create DatabaseData.DatabasePrototype.ApplyChanges(Contro l marshallingControl)
at
Microsoft.SqlServer.Management.SqlManagerUI.Create Database.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at
Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTree ViewControl.DoPreProcessExecutionAndRunViews(RunTy pe runType)
at
Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTree ViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at
Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTree ViewControl.Microsoft.SqlServer.Management.SqlMgmt .IExecutionAwareSqlControlCollection.PreProcessExe cution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at
Microsoft.SqlServer.Management.SqlMgmt.ViewSwitche rControlsManager.RunNow(RunType runType, Object sender)
===================================
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
Program Location:
at
Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String
sqlCommand, ExecutionTypes executionType)
at
Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
at
Microsoft.SqlServer.Management.Smo.ExecutionManage r.ExecuteNonQuery(StringCollection queries)
at
Microsoft.SqlServer.Management.Smo.SqlSmoObject.Ex ecuteNonQuery(StringCollection queries, Boolean includeDbContext)
at
Microsoft.SqlServer.Management.Smo.SqlSmoObject.Cr eateImplFinish(StringCollection createQuery, ScriptingOptions so)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Cr eateImpl()
===================================
CREATE DATABASE permission denied in database 'master'. (.Net SqlClient Data
Provider)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .1399&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476[/url]
Server Name: PREM-PC\SQLEXPRESS
Error Number: 262
Severity: 14
State: 1
Line Number: 1
Program Location:
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String
methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at
Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String
sqlCommand, ExecutionTypes executionType)
Pls help me in resolving the issue.
Mail me at "prem_karuna@.hotmail.com"
thanks & rgds,
prem.
Prem,
The message that matters is: CREATE DATABASE permission denied in database
'master'.
Therefore you will need to have Create Database permissions granted to you
before you can create a database. Talk to the administrator of the SQL
Server or, if you are the administrator, grant yourself that permission.
RLF
"Prem" <Prem@.discussions.microsoft.com> wrote in message
news:3CE44971-6BB7-4350-807E-B01A35C40429@.microsoft.com...
> hi all,
> While creating a database in SQL 2005 i get an error message like:
> Create failed for Database 'Student_Course'.
> (Microsoft.SqlServer.Express.Smo)
> --
> For help, click:
> [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00. 3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Create+Database&LinkId=20476[/url]
> --
> Program Location:
> at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Cr eateImpl()
> at Microsoft.SqlServer.Management.Smo.Database.Create ()
> at
> Microsoft.SqlServer.Management.SqlManagerUI.Create DatabaseData.DatabasePrototype.ApplyChanges(Contro l
> marshallingControl)
> at
> Microsoft.SqlServer.Management.SqlManagerUI.Create Database.DoPreProcessExecution(RunType
> runType, ExecutionMode& executionResult)
> at
> Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTree ViewControl.DoPreProcessExecutionAndRunViews(RunTy pe
> runType)
> at
> Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTree ViewControl.ExecuteForSql(PreProcessExecutionInfo
> executionInfo, ExecutionMode& executionResult)
> at
> Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTree ViewControl.Microsoft.SqlServer.Management.SqlMgmt .IExecutionAwareSqlControlCollection.PreProcessExe cution(PreProcessExecutionInfo
> executionInfo, ExecutionMode& executionResult)
> at
> Microsoft.SqlServer.Management.SqlMgmt.ViewSwitche rControlsManager.RunNow(RunType
> runType, Object sender)
> ===================================
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.Express.ConnectionInfo)
> --
> Program Location:
> at
> Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String
> sqlCommand, ExecutionTypes executionType)
> at
> Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(StringCollection
> sqlCommands, ExecutionTypes executionType)
> at
> Microsoft.SqlServer.Management.Smo.ExecutionManage r.ExecuteNonQuery(StringCollection
> queries)
> at
> Microsoft.SqlServer.Management.Smo.SqlSmoObject.Ex ecuteNonQuery(StringCollection
> queries, Boolean includeDbContext)
> at
> Microsoft.SqlServer.Management.Smo.SqlSmoObject.Cr eateImplFinish(StringCollection
> createQuery, ScriptingOptions so)
> at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Cr eateImpl()
> ===================================
> CREATE DATABASE permission denied in database 'master'. (.Net SqlClient
> Data
> Provider)
> --
> For help, click:
> [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .1399&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476[/url]
> --
> Server Name: PREM-PC\SQLEXPRESS
> Error Number: 262
> Severity: 14
> State: 1
> Line Number: 1
>
> --
> Program Location:
> at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
> Boolean breakConnection)
> at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj)
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String
> methodName, Boolean async)
> at
> System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult
> result, String methodName, Boolean sendToPipe)
> at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
> at
> Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String
> sqlCommand, ExecutionTypes executionType)
> Pls help me in resolving the issue.
> Mail me at "prem_karuna@.hotmail.com"
> thanks & rgds,
> prem.
|||Re: "granting yourself", sorry but my sentence looks very unclear.
If you are the sysadmin on the server you will have create database rights.
However, if you are running your create database task using an alternate
login that has fewer rights, then that login will need to have additional
rights granted.
RLF
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:uRxVAjNbIHA.4344@.TK2MSFTNGP02.phx.gbl...
> Prem,
> The message that matters is: CREATE DATABASE permission denied in database
> 'master'.
> Therefore you will need to have Create Database permissions granted to you
> before you can create a database. Talk to the administrator of the SQL
> Server or, if you are the administrator, grant yourself that permission.
> RLF
> "Prem" <Prem@.discussions.microsoft.com> wrote in message
> news:3CE44971-6BB7-4350-807E-B01A35C40429@.microsoft.com...
>

No comments:

Post a Comment