Change owner of stored procedure SQL Server

Now I am not a DBA by any means but I like to think that I am a pretty damn good Googler but it took me going to the second page of results to find out how to change the owner of a stored procedure.

A lot of posts pointed to this Microsoft article on changing the owner of MANY objects but I only wanted to change ONE.

This post is mostly for me but here is the solution:

sp_changeobjectowner ‘objectName’, ‘newObjectOwner’

It’s that simple. Now kick yourself in the ass for wasting so much time.

  • http://community.dynamics.com/blogs/crmmattwittemann/archive/2009/04/03/error-importing-customizations.aspx Error Importing Customizations – ICU-MSCRM – Life support for the heartbeat of your business

    [...] the ownership didn't get set correctly on these two stored procedures. Tip of the hat to Luke Rogers for the tip on changing ownership of stored procedures one at a time.Environment: SQL Server 2008 [...]

  • Bored

    Amen

  • Gaz

    Consider my arse kicked.