无法创build添加SQL Server用户:login已经有一个不同的用户名下的帐户

环境:

  • SQL Server 2005 Express
  • Windows 7的

当我安装SQL Server时,我按照http://msdn.microsoft.com/en-us/library/aa905868.aspx上的说明将我的计算机pipe理员帐户设置为SQL Serverpipe理员。

但是,当我尝试通过Visual Studio 2008访问我的计算机上的数据库时,出现以下错误消息:

--------------------------- Microsoft Visual Studio --------------------------- The database 'Parkinsons' does not exist or you do not have permission to see it. Would you like to attempt to create it? --------------------------- Yes No --------------------------- 

然后,如果我去SQL Server并将用户添加到该数据库,我收到以下错误信息:

 TITLE: Microsoft SQL Server Management Studio Express ------------------------------ Create failed for User 'zian'. (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+User&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo) ------------------------------ The login already has an account under a different user name. (Microsoft SQL Server, Error: 15063) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=15063&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ 
  1. 为什么不在dbo账户上捎带?
  2. 如果dbo帐户不可用,那么SQL Server为什么不让我创build一个帐户,以便我可以访问自己的数据?

这个数据库已经存在了吗? 如果是这样,你将不得不把它称为dbo.Parkisins或任何用户架构被用来创build它。

尝试以pipe理员身份运行Visual Studio。 在我的Server 2008框中,除非以pipe理员身份运行Management Studio,否则我的用户(它是本地pipe理员和数据库上的系统pipe理员)无法使用SQL Management Studio进行连接。