【问题标题】:Error Creating DB in SQLServer Management Studio 2008在 SQL Server Management Studio 2008 中创建数据库时出错
【发布时间】:2011-04-08 09:25:37
【问题描述】:

当我在管理工作室中运行 sql 以创建数据库时,我从 asp.net 创建学校项目http://msdn.microsoft.com/en-us/library/bb399731.aspx,它说我无法在主服务器中创建它。 我收到此错误“数据库'master'中的权限被拒绝”。我关注此错误的链接,但没有文档

标题:Microsoft SQL Server 管理工作室 ------------------------------ 为数据库“学校”创建失败。 (Microsoft.SqlServer.Smo) 如需帮助,请点击:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates .FailedOperationExceptionText&EvtID=创建+数据库&LinkId=20476 ------------------------------ 附加信息: 执行 Transact-SQL 语句或批处理时发生异常。 (Microsoft.SqlServer.ConnectionInfo) ------------------------------ 数据库“master”中的 CREATE DATABASE 权限被拒绝。 (Microsoft SQL Server,错误:262) 如需帮助,请单击:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476 ------------------------------ 纽扣: 好的 ------------------------------ ==================================== 为数据库“学校”创建失败。 (Microsoft.SqlServer.Smo) ------------------------------ 如需帮助,请点击:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates .FailedOperationExceptionText&EvtID=创建+数据库&LinkId=20476 ------------------------------ 节目地点: 在 Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl() 在 Microsoft.SqlServer.Management.Smo.Database.Create() 在 Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseData.DatabasePrototype.ApplyChanges(控制编组控制) 在 Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabase.DoPreProcessExecution(RunType runType、ExecutionMode& executionResult) 在 Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType) 在 Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo,ExecutionMode& executionResult) 在 Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo,ExecutionMode& executionResult) 在 Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType,对象发件人)

【问题讨论】:

  • 您需要 dbcreator 权限才能创建数据库...您是否以 DBAdmin 身份登录??

标签: asp.net sql-server-2008


【解决方案1】:

您是使用 Windows 凭据登录还是使用“sa”帐户登录?我建议使用服务器登录(使用 sa 帐户并通过您在安装过程中提供)而不是 Windows 身份验证。

如果您在 master 下使用 Windows 身份验证成功登录,则您有安全选项。展开 Security->Logins,您将看到包括 sa 在内的所有用户。右键单击它并选择属性。您可以选择设置密码。

【讨论】:

  • 你能给我执行此操作的步骤吗,因为我对所有这些服务器和登录设置了解不多。我只是将其设置为默认方式,没有提示我任何帐户等。我使用我的计算机名登录,然后单击连接
  • 我必须重新安装 SqlServer 吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-22
  • 1970-01-01
相关资源
最近更新 更多