To change the owner of an SQL database object (for example a table or stored procedure) this sql procedure can be used:
sp_changeobjectowner '<current owner>.<object name>','<new owner>'
- current owner = the current owner of the object
- object name = the object's name (could be the table's name or stored procedure's name)
- new owner = the database user that should be the new owner of the object
sp_changeobjectowner is a built in SQL server object.
Last Modified:
4/26/2005 2:10:03 AM