Changing a table owner

前端 未结 5 1269
名媛妹妹
名媛妹妹 2021-02-04 00:21

I\'m trying to change the owner of a table:

sp_changeobjectowner \'OWNER.TABLENAME\', \'dbo\'

But when executing I get the error message:

5条回答
  •  广开言路
    2021-02-04 01:08

    Your statement is correct:

    EXEC sp_changeobjectowner '.', '' 
    

    If the error happend, try to check who is the current owner of the table:

    EXEC sp_table_privileges ''  
    

提交回复
热议问题