Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 change ownership of a table

Author  Topic 

slimjen
Yak Posting Veteran

61 Posts

Posted - 2007-01-24 : 10:56:39
I am trying to change ownership of a table in my sql database to dbo. I am getting this error "Object 'UserLog' does not exist or is not a valid object for this operation." Here is my script:
use ePAC
EXEC sp_changeobjectowner 'UserLog', 'dbo'
I checked and this is the correct spelling of this table.

What could I be doing wrong?

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-01-24 : 11:07:49
[code]use ePAC
EXEC sp_changeobjectowner 'oldusername.UserLog', 'dbo'[/code]

CODO ERGO SUM
Go to Top of Page

slimjen
Yak Posting Veteran

61 Posts

Posted - 2007-01-24 : 11:12:47
It worked!Thank you so much!
Go to Top of Page
   

- Advertisement -