dbTalk Databases Forums  

How to Copy SQL Stored Procedures between DataSources/Schemas?

ibm.software.db2.os400 ibm.software.db2.os400


Discuss How to Copy SQL Stored Procedures between DataSources/Schemas? in the ibm.software.db2.os400 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
csuresh@itsoln.com
 
Posts: n/a

Default How to Copy SQL Stored Procedures between DataSources/Schemas? - 07-02-2009 , 10:06 PM






Hi Friends,
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,
Suresh

Reply With Quote
  #2  
Old   
Kent Milligan
 
Posts: n/a

Default 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
stored procedures.

csuresh (AT) itsoln (DOT) com wrote:
Quote:
Hi Friends,
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,
Suresh

Reply With Quote
  #3  
Old   
giovanni_figari@it.ibm.com
 
Posts: n/a

Default 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"
http://www.ibm.com/developerworks/da...5milligan.html

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.

giovanni

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.