How do I Change a single object to DBO?

Step 1


The following stored procedure can be very handy when you need to change the ownership of a table or any other object on your MS SQL database:

1
EXEC sp_changeobjectowner

 

Step 2


Here is the Syntax:

1
EXEC sp_changeobjectowner 'USERname.OBJECTname', 'dbo'

This example changes the owner of the TEST table owned by TESTUSER to DBO.

1
EXEC sp_changeobjectowner 'TESTUSER.TEST', 'dbo'

 


Add Feedback