DB2 Stored Procedure Advise

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Dec 22 2003 - 00:05:39 EST

  • Next message: Andrus Adamchik: "[ANN] Cayenne 1.0.5 released"

    I know at least a few people on this list have DB2 experience. Need
    some help to figure out how to test stored procedures.

    I have a free DB2 8 install on Linux. So I wrote a few SQL procedures
    in the test suite (similar to what we are already doing for Oracle and
    Sybase), and tried running the tests. Tests fail during schema
    generation (see DB2SetupDelegate.java).

    Creating a DB2 stored procedure (from Java unit test or from command
    line DB2 tools) generates a C file on the server, and attempts to
    compile it. After spending some time fixing filesystem permissions and
    other nuisances, I got stuck at the compilation stage. The error
    message the following:

    -- COMPILATION MESSAGES FOR
    /home/db2inst1/sqllib/function/routine/sqlproc/TEST/DB2TEST1/tmp/
    P3101529.c
    P3101529.c:14:21: sqladef.h: No such file or directory
    P3101529.sqc:10:20: sqlenv.h: No such file or directory
    P3101529.sqc:11:17: sql.h: No such file or directory
    P3101529.sqc:12:19: sqlda.h: No such file or directory
    P3101529.sqc:13:21: db2psmd.h: No such file or directory

    -- END OF LOG FILE (SQLCODE: -7032)

    Error code 7032 is described here:

    http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/
    com.ibm.db2.udb.doc/core/rsql7000.htm

    One of the reasons mentioned is: "Support for SQL stored procedures is
    not installed and configured on this server. You need to have the DB2
    Application Development Client and a C compiler installed on the server
    to create SQL procedures."

    I most definitely have a C compiler on the box.... as for DB2
    Application Development Client, it doesn't seem to be freely available
    for download.

    Does anyone have any insight of what needs to be done to make stored
    procedures support work? I'd really appreciate any help.

    Thanks
    Andrus



    This archive was generated by hypermail 2.0.0 : Mon Dec 22 2003 - 00:05:44 EST