<span id="blogname"></span>


All that's beautiful drifts away like the waters ——W. B. Yeats
Modisied by Leslie-Cheung.com
 
2008/1/18 16:25:00
如何修改数据库表或存储过程的所有者
 

问题:
   有一个数据库AA,里面有一张数据表BB,将数据库文件直接附加到另一个数据库服务器中去,附加成功后出现了问题,直接读取数据库会报对象BB不存在的错误,  
   查看数据库AA,发现数据表BB的所有者不是dbo
解答:修改数据表BB的所有者为dbo
修改方法:

    1.使用sp_changeobjectowner在查询分析器中执行  
      如:EXEC   sp_changeobjectowner   'tableName',   'dbo'
    2.直接在企业管理器中,设计表,点击"表和索引属性"按钮打开属性页,修改所有者。 

 
By 小鱼儿  阅读全文 | 回复(0) | 引用通告 | 编辑

发表评论:
 
Calendar

<<  < 2009 - >  >>
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Login


Bulletin
Recent Entries
Comments
Messages
Information
Links


Designed by Subdreamer
 
Powered by Oblog.