以下示例将 authors 表的所有者更改为 Corporate\GeorgeW。
EXEC sp_changeobjectowner 'authors', 'Corporate\GeorgeW';
GO

解决方案 »

  1.   


    'Corporate\GeorgeW' 是什么呀? 不明! 我的如何改呢?
      

  2.   

    改了要小心程序,
    EXEC sp_changeobjectowner 'A', 'dbo'; 
    GO 
      

  3.   

    不好意思,我讲错了!应该是如何让一个所建的用户在TB数据库的角色由owner 提升为 DBO ,请再指教,谢谢!
      

  4.   

    db_owner是角色
    dbo是使用者
    你要做什麼,說詳細點
      

  5.   

    declare testcurs cursor
    for
       select 'dbo.' + name
       from sysobjects
       where xtype = 'u'open testcurs
    declare @tname nvarchar(517)
    fetch next from testcurs into @tname
    while @@fetch_status = 0
    begin
       exec sp_changeobjectowner @tname, 'test'
       fetch next from testcurs into @tname
    end
    close testcurs
    deallocate testcurs反正是以上代码的意思,但以上代码出错了! 麻烦看看,谢谢!
      

  6.   


    exec sp_changeobjectowner @tname, 'test' 
    你这里是将表的使用者更改为test。