开发者

Creating a user without an associated login is not supported in SQL Server 2008 R2

开发者 https://www.devze.com 2023-04-06 13:00 出处:网络
When scripting a SQL Server 2000 database, on an SQL Server 2000 version of SQL Server, with SQL Server Management Studio 2008 R2 (10.50.1617.0) i get the error:

When scripting a SQL Server 2000 database, on an SQL Server 2000 version of SQL Server, with SQL Server Management Studio 2008 R2 (10.50.1617.0) i get the error:

Creating a user without an associated login is not supported i开发者_C百科n SQL Server 2008 R2.

With the full stack trace:

Microsoft.SqlServer.Management.Smo.SmoException: Creating a user without an associated login is not supported in SQL Server 2008 R2.;   
at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)  
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

What is a good way to resolve this issue.

i've considered:

  • creating a login (and incur the wrath high atop the thing)
  • deleting the user (and incur the wrath from high atop the place)
  • select some rather than all objects to script, and don't script the user that offends SQL Server 2008 R2

But i'll let people on SO post answers, get answers upvoted, and accept an answer that best solves the problem.


As instructed. Just don't script the database users that have no associated login. You can do this in the Tasks > Generate Scripts wizard (pointing 2008 or later SSMS at your 2000 instance) by choosing to select specific database objects and unchecking any troublesome users:

Creating a user without an associated login is not supported in SQL Server 2008 R2


I suspect that your SQL Server 2000 database has user aliases: these were required in SQL Server 6.5 in some circumstances because it was, er, crap,

Note what MSDN says:

sp_addalias is provided for backward compatibility. Microsoft® SQL Server™ version 7.0 provides roles and the ability to grant permissions to roles as an alternative to using aliases.

Run sp_helpuser on the SQL Server 2000 box and review the output and remove them

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号