Results 1 to 3 of 3

Thread: store procedure

  1. #1
    Join Date
    May 2002
    Location
    santa ana
    Posts
    6

    Unanswered: store procedure

    Hi,
    What do I need to install on an aix machine so that a store procedure can be created?
    Your advice is highly appreciated.

    Thanks,

    ************************************************** *****
    [IBM][CLI Driver][DB2/6000] SQL7032N SQL procedure "TEST" not created. Diagnostic file is "P2055860.log". SQLSTATE=42904

  2. #2
    Join Date
    May 2002
    Posts
    20
    I had a similar proble. I use DB2 UDB EE 7.1 on AIX 4.3.3
    To be able to create SQL store procedures you need to install a C/C++ compiler on the server.
    Personally I have installed "IBM C for AIX Version 5.0"
    Then I had to configure some parameters in order to be able to create stored procedures.
    Following is the procedure I followed:

    -C for AIX V. 5.0 was installed on the SEMQA machine by IBM

    -Edit $HOME/sqllib/function/routing/sr_cpath and add the path with invokes the C compiler
    path:/usr/vac/bin

    -Compiler Options
    Set the DB2_SQLROUTINE_COMPILE_COMMAND registry variable of DB2 to use the xlc command

    db2set DB2_SQLROUTINE_COMPILE_COMMAND = “xlc -H512
    -T512 -I/home/dwinst1/sqllib/include SQLROUTINE_FILENAME.c
    -bEQLROUTINE_FILENAME.exp -e SQLROUTINE_ENTRY
    -o SQLROUTINE_FILENAME –L$HOME/sqllib/lib –lc –ldb2”

    -Stop and restart DB2 to apply changes of registry variables.


    Hope this helps! Have fun!

  3. #3
    Join Date
    May 2002
    Posts
    20
    Sorry for this but there is a small mistake on the db2set command
    This is the correct:

    db2set DB2_SQLROUTINE_COMPILE_COMMAND = “xlc -H512
    -T512 –I$HOME/sqllib/include SQLROUTINE_FILENAME.c
    -bEQLROUTINE_FILENAME.exp -e SQLROUTINE_ENTRY
    -o SQLROUTINE_FILENAME –L$HOME/sqllib/lib –lc –ldb2”

    and forget the IBM part and the name of the machine!

Posting Permissions

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