Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Change schema of stored procedures

Author  Topic 

jhoffa
Starting Member

1 Post

Posted - 2010-02-18 : 05:35:24
Hi,

I'm trying to figure out how to change the schema of stored procedures in a database. The stored procedures are currently set to a DBO schema, but I want to move it a users schema, any way of doing this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-18 : 05:37:20
http://www.geekzilla.co.uk/View4384ACEC-8C9D-452A-83F6-230FFE43C17B.htm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2010-02-19 : 15:00:08
Okay, I know that I'm a j@{<@$$ for saying this (again) but I have found it has saved my bacon more times than I can say...

1) Go to your source control system
2) Check out the files that hold the stored procedures scripts
3) Edit the scripts to change the explicit schema owner name (add the explicit schema owner name if necessary)
4) Run the scripts on the target system
5) Check your changes back into source control

If your initial reaction is that you don't have a source control system then go get one.

=======================================
Few things are harder to put up with than the annoyance of a good example. (Mark Twain)
Go to Top of Page
   

- Advertisement -