Eurodata Computing Logo Technical Tips



Tip : 3
Technology : SQL Server
Title : Changing the Owner of a Stored Procedure
It may be that you have installed Stored Procedures as a user other than sa. If you do the owner of the stored procedure may be other than dbo. To change the ownership of a stored procedure to dbo use the system stored procedure sp_changeobjectowner. If the owner is ‘fred’ then you can use the following SQL statement :

   sp_changeobjectowner ‘fred.upMyStoredProcedure’,’dbo’

Ownership can cause a lot of confusion as it is possible to have identically named stored procedures with different owners, in other words a stored procedure name is only unique when qualified with its owner. The same techniques can be applied to tables and other sql server objects.

Need further technical assistance ? Click here for more technical information.

Tech Tip Index

This article is provided 'as is' and no responsibility can be accepted for any errors. No part of this article may be used or reproduced in any fashion without the prior consent of Eurodata Computing Ltd. For syndication enquiries please contact us.
Site designed and maintained by Eurodata Computing
© Eurodata Computing 2000-13    Last updated : April 2013
Valid XHTML 1.0 Transitional Valid CSS!