Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Bath, England

    Unanswered: UDB 7.2 - stored procedures / C compiler

    I recently posted a query regarding problems that I was having when trying to run a stored procedure on DB2 UDB 7.2. A number of you kindly informed me that I need to have a C compiler installed on the server before SQL procedures will run on UDB 7.2.

    The client for whom I am writing the query has questioned why they need a compiler on their server, particularly on the live server (there is a development server, a test server, and a live server here).

    I now have two further questions:

    1) Can I develop SQL procedures with a C compiler installed on my client rather than the server? (I suspect not since stored procedures run server-side, but it is worth asking the question)

    2) If a C compiler were installed on the development server, would it be possible to develop the stored procedures on the development server then transfer them - already compiled - onto the live server (in other words, have a C compiler on the development server but not on the live server)?

    Many thanks for any answers you can give.

    Best regards

    Marc Kozlowski
    Xansa, Birmingham, England

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    Sorry for the fragmented replys, something went haywire while I was
    trying to write my whole reply. I will answer the whole thing again here,
    and maybe the moderator can delete those other replys.

    For question (1) only if you have a DB2 database installed on the client. SPs are server-side processes and are compiled to the OS that
    DB2 runs on top of. For this reason, you can only "Deploy" SPs from
    databases that run on the same OS (Win -> Win, Linux -> Linux, etc).

    For Question (2):
    According to IBM yes you can. They call it "Deploying" SPs. They
    supply two SPs / CLP commands: GET ROUTINE and PUT ROUTINE.
    See the manuals for proper syntax & usage.

    I was unsuccessful getting these to work on DB2 7.2 PE on windows.
    I could not get the GET ROUTINE to run error free. I want to try it on 8.1, but have not had the time and that project is low priority right now.

    Our servers run under Linux which basically have the C compiler built in, so we really do not need to "Deploy" the SP, just build them on each server. I was however able to get the GET ROUTINE to work here just to see if there was a problem with the actual routine.



  3. #3
    Join Date
    Aug 2002
    You might also check this URL:

    It point to a PDF-Document about Stored Procedure Creation and

    This is one of many areas where IBM hopefully benefits from
    the great technology acquired with the Informix products.

    Best regards

    IT-Consulting Herber

    Download the IFMX Database-Monitor for free at:

  4. #4
    Join Date
    Aug 2001
    A short note on deploying Stored Procedures is in the FAQ column of DB2 forum in the following site ..

    It is titled



Posting Permissions

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