September 5, 2002 at 1:18 pm
Hi,
I have housekeeping question 🙂
Oracle lets me create packages of stored procedures, so I can get them better organized.
Is there a similar option in SQL 2k?
I would love to group my SPs somehow.
If that's not possible, what are the gurus doing to manage hundreds of SPs?
Thanks
Jakub
September 5, 2002 at 2:58 pm
Usually just a good naming convention.
Andy
September 6, 2002 at 4:16 am
Procedure grouping in SQL works like so, but I think I hit this before and found it was a different type of grouping, but hopefully we are talking same here.
CREATE PROC ip_what;1
AS
does stuff
GO
CREATE PROC ip_what;2
AS
does stuff
GO
CREATE PROC ip_what;3
AS
does stuff
GO
All you would see in EM is one listing and when opened will show all together. However you have to be carefull when dropping as doing
DROP PROC ip_what
will drop all 3 above, to drop 2 you have to do
DROP PROC ip_what;2
ALso when changing you have to be carefull to do
ALTER PROC ip_what;2
and when needng to call a specific one you need to call
EXEC ip_what;2
Personally I use this method when dealing with Procs that are candidates for dynamic sql with only a few options as each retains it's own query plan, and for the ip_wat;1 in this case it would make decisions on which of the others to run.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
September 6, 2002 at 5:54 am
It does work, but can't say its very elegant for grouping/packaging!
Andy
September 9, 2002 at 1:46 pm
Thanks guys.
That should do the job for me.
Jakub
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply