How to Copy SQL Stored Procedures between DataSources/Schemas? - 07-02-2009 , 10:06 PM
I've created SQL stored procedures in our development schema and its working fine. Now we are in the task of moving our development codes to production one. How do I copy those stored procedures from one schema to another schema? Do I need to re-compile whole procedures on targeted schema? Or Is there any way register those procedures on targeted schema? Could any one suggest me a better way to copy stored procedures?
I've created procedures through iSeries Navigator for Windows Version 5 Release 4.
Thanks in Advance,
Re: How to Copy SQL Stored Procedures between DataSources/Schemas? - 07-13-2009 , 01:26 PM
Probably cleanest to recreate the stored procedures on the new target schema.
Another approach is to save & restore the C program objects associated with the
csuresh (AT) itsoln (DOT) com wrote:
Re: How to Copy SQL Stored Procedures between DataSources/Schemas? - 09-04-2009 , 01:38 AM
The starting point for your problem is Kent Milligan's article
"Managing DB2 for i5/OS schemas and journals"
In a flash, to recreate an sql object with iNavigator, sometimes I use to do the following:
1. use "Generate SQL" option on the object in my "dev" system/database/schema
2. take the source and make necessary changes (e.g. maybe one have qualified names... maybe one need to add grant statement etc.)
3. point to my "pro" system/database/schema (more easily to do than to write it down...)
4. run the script.
Of course, if I have hundreds object, some with thousands lines of code, I need to add some "method" and tools to this simple recipe.