可能当初是用Sa用户建立Database的,所以该Database的dbo是Sa,可是目前该Database不显示所有的User,给Sa赋予权限的时候,错误提示如下: Error 21776:[SQL-DMO]The name 'dbo' was not found in the Users collection.If the name is a qualified name,use [] to separate various parts of the name, and try again.
不知道谁还有好方法。
usr yourdatabase
sp_dropuser mis
删除该用户,
然后在重建该用户。
use yourdatabase
...不好意思
如果当初是用SA的用户使用sp_attach呢?
帮帮忙,我先给你50分,OK?
Error 21776:[SQL-DMO]The name 'dbo' was not found in the Users collection.If the name is a qualified name,use [] to separate various parts of the name, and try again.
无法修改也不能删除,所以是不能给sa赋权限的,
出现你所说的现象的原因是原来的SQLserver上有
某个用户,如mis,你attach的SQLServer没有这个
用户,但是数据库内还有这个用户的权限设置信息,
所以先要把这个用户删除:
启动查询分析器Query Analyzer,选中你的数据库,
使用 sp_dropuser yourusername 删除该用户,
然后在SQLServer的Sericuty里面重新建立Login,
并允许对该数据库的Access权限,就可以了。
----- 哎呀,好累,也不知道说的是不是你想要的