Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    5

    Thumbs up Unanswered: DB2(v72) SQL Procedure

    Hi all,

    I created 20+ SQL procedure on DB2(V72) Development database on AIX5.2, now I want move them to Production DB2 database(same as V72) on AIX(Same as 5.2).

    Since I have not installed any C/C++ compilers on Production server, can I use GET ROUTINE/PUT ROUTINE? How can Production database get these SQL procedure from Development database?

    I appreciate your time very much!

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Prior to Version 7.2, DB2 required a compiler to be present on every system where the stored procedure will be deployed. From Version 7.2, it is sufficient to have the compiler on only one system for every OS platform. Two new commands were introduced to deploy the Stored Procedure developed/created on one system to another. GET ROUTINE Command for extracting the stored procedure and PUT ROUTINE Command for deploying the Stored procedure on another machine.

    GET ROUTINE INTO filename FROM [SPECIFIC] PROCEDURE routine-name

    The Specific name of the routine is used when two procedures exist with the same name. The specific name of a procedure can be obtained from the SYSCAT.PROCEDURES Table.

    If ftp is used for file transfer, the binary mode should be used.

    PUT ROUTINE FROM filename [OWNER new-owner] [USE REGISTERS]

    The OWNER Name is used when the Stored Procedure is deployed in another instance with a different name.

    USE REGISTERS uses the current values of CURRENT SCHEMA and CURRENT PATH Registry variables. If not used, the original ones at the source are used.
    Prashant

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2(v72) SQL Procedure

    You can also read the procedure at http://www.tek-tips.com/faqs.cfm?spid=178&sfid=2953

    Cheers
    Sathyaram

    Originally posted by chi
    Hi all,

    I created 20+ SQL procedure on DB2(V72) Development database on AIX5.2, now I want move them to Production DB2 database(same as V72) on AIX(Same as 5.2).

    Since I have not installed any C/C++ compilers on Production server, can I use GET ROUTINE/PUT ROUTINE? How can Production database get these SQL procedure from Development database?

    I appreciate your time very much!
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Jul 2003
    Posts
    5
    Thanks Prashant,

    Your identifications are great.Would you please tell me in details: how to use GET ROUTINE INTO filename/PUT ROUTINE from filename? Could I exec the command via COMMAND CENTRE directly? Where will these news SQL Procedures locate (default path)?

    Many thanks

    Chi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •