SQL 不能使用特殊主体“sa”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14188629/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot use the special principal 'sa'
提问by ullfindsmit
When I try to run the command:
当我尝试运行命令时:
EXEC master..sp_addsrvrolemember @loginame = N'sa', @rolename = N'serveradmin'
GO
I get the error:
我收到错误:
Msg 15405, Level 11, State 1, Procedure sp_addsrvrolemember, Line 45 Cannot use the special principal 'sa'.
消息 15405,级别 11,状态 1,过程 sp_addsrvrolemember,第 45 行不能使用特殊主体“sa”。
Ideas/suggestions welcome.
欢迎提出想法/建议。
回答by Stuart Ainsworth
'sa' is a reserved login for the sysadmin; it's already a member of the sysadmin group, which trumps all other groups. You don't need to add it to any roles, so why are you trying to do that?
“sa”是系统管理员的保留登录名;它已经是 sysadmin 组的成员,该组胜过所有其他组。您不需要将它添加到任何角色,那么您为什么要这样做呢?