Changing schema or owner of an object in SQL Server
There is a way to change owner of a given object in SQL Server 2005 and higher version.
Object can be a stored procedure or table or view or user-defined function.
In the following code snippet you see an example.
ALTER SCHEMA dbo TRANSFER [MyOwner].[uspMyStoredProcedureName]
The preceding example changes owner of uspMyStoredProcedureName to dbo.
If you are using SQL Server 2000, you can use of the following script.
EXEC sp_changeobjectowner '[MyOwner].[uspMyStoredProcedureName]','dbo'
The preceding script hast the same functionality.
Note that Microsoft has recommended to avoid using this feature in later
version of SQL Server and use of first trick in that versions.