Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Location
    Chennai, India
    Posts
    184

    Unanswered: Compiling Stored Procedures on Solaris using gcc

    DB2 UDB 7.2
    Solaris Sparc 8
    gcc

    Has any one been able to compile a stored procedure using gcc on Solaris Sparc 8 - DB2 UDB 7.2?

    db2 -td@ -vf <procname>

    Registry variables have to be modified. I tried using what gcc uses on Linux. But it fails.

    TIA.

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    gcc

    why not indicating the error immediatly ?
    how can we guess what is going wrong ?
    using gcc is possible..
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    CHANGED THE DB2_SQLROUTINE_COMPILE_COMMAND AS
    FOLLOWING:
    DB2SET DB2_SQLROUTINE_COMPILE_COMMAND="GCC -FPIC -D_REENTRANT -I/HOME/TS5INST/SQLLIB/INCLUDE SQLROUTINE_FILENAME.C -SHARED -LPTHREAD -O SQLROUTINE_FILENAME -R/HOME/TS5INST/SQLLIB/LIB -R/USR/LOCAL/LIB -L/HOME/TS5INST/SQLLIB/LIB -L/USR/LOCAL/LIB -LDB2" AND THEN RECYCLE DB2, THEN RECREATE SQL PROCEDURE.

    hope it work.
    please give error message next time
    Last edited by wangzhonnew; 11-20-05 at 21:41.

  4. #4
    Join Date
    Aug 2002
    Location
    Chennai, India
    Posts
    184
    Quote Originally Posted by wangzhonnew
    CHANGED THE DB2_SQLROUTINE_COMPILE_COMMAND AS
    FOLLOWING:
    DB2SET DB2_SQLROUTINE_COMPILE_COMMAND="GCC -FPIC -D_REENTRANT -I/HOME/TS5INST/SQLLIB/INCLUDE SQLROUTINE_FILENAME.C -SHARED -LPTHREAD -O SQLROUTINE_FILENAME -R/HOME/TS5INST/SQLLIB/LIB -R/USR/LOCAL/LIB -L/HOME/TS5INST/SQLLIB/LIB -L/USR/LOCAL/LIB -LDB2" AND THEN RECYCLE DB2, THEN RECREATE SQL PROCEDURE.

    hope it work.
    please give error message next time
    Thanks a ton! It works with the following case changes...
    Code:
    db2set DB2_SQLROUTINE_COMPILE_COMMAND="gcc -fpic -D_REENTRANT -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -shared -lpthread -o SQLROUTINE_FILENAME -R/export/home/db2inst1/sqllib/lib -R/usr/local/lib -L/export/home/db2inst1/sqllib/lib -L/usr/local/lib -ldb2"
    GET ROUTINE also works. However, PUT ROUTINE fails with the following error:

    PHP Code:
    db2 "put routine from UPDATE_SALARY_1.sar"
    SQL0443N  Routine "PUT_ROUTINE_SAR" (specific name
    "db2udp!put_routine_sar_1parm"has returned an error SQLSTATE with diagnostic
    text 
    "-14847,      , failed ...".  SQLSTATE=38000


Posting Permissions

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