Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002

    Unhappy Unanswered: SQL7032N - SQL Procedure sp_A not created.

    I have a testing MPP database with 1 node running on NT2000 box. With Microsoft Visual Studio .NET developing environment. Got SQL7032N when trying to build a SQL procedure sp_A.

    Anyone here had same experience!? I couldn't figure out what exactly went wrong here.. HELP..

    Thanks in Advance.

    The followings are from the diagnostic file:

    *** BIND \\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780.sqc ***

    LINE MESSAGES FOR P0220780.sqc
    ------ --------------------------------------------------------------------
    SQL0060W The "C" precompiler is in progress.
    SQL0091W Precompilation or binding was ended with "0"
    errors and "0" warnings.

    *** COMPILE \\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780.c ***

    DB2_SQLROUTINE_COMPILER_PATH="C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\vcvars32.bat"

    DB2_SQLROUTINE_COMPILE_COMMAND=cl -Ox -W2 /TC -D_X86_=1 -IC:\Program Files\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll -defQLROUTINE_FILENAME.def /outQLROUTINE_FILENAME.dll C:\Program Files\SQLLIB\lib\db2api.lib

    @echo on
    set SQLROUTINE_FILENAME=\\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780
    set db2path=\\DB2TEST\DB2-MPP

    cl -Ox -W2 /TC -D_X86_=1 -IC:\Program Files\SQLLIB\include \\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780.c /link -dll -def:\\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780.def /out:\\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780.dll C:\Program Files\SQLLIB\lib\db2api.lib

    *** \\DB2TEST\DB2-MPP\function\routine\sqlproc\SAMPLE\DB2ADMIN\tmp\P 0220780.def ***
    LIBRARY P0220780
    EXPORTS _pgsjmp@4


    SQL7032N SQL procedure "sp_A" not created. Diagnostic file is
    "P0220780.log". SQLSTATE=42904

  2. #2
    Join Date
    Dec 2002

    Re: SQL7032N - SQL Procedure sp_A not created.

    sorry, forgot the following line which show up on top in the Stored Procedure Builder Message Pane.

    DB2ADMIN.INSERT_100000_A - Create stored procedure returns -7032.

  3. #3
    Join Date
    Jul 2006

    Solving your problem with SQL7032N

    Before, you must prepare you database for run SP's:

    For stored procedures, the keyword KEEPDARI has the default value yes. This keeps the stored procedure process alive.
    If you are developing a stored procedure, you may want to test loading the same stored procedure library a number of times.
    This default setting may interfere with reloading the library. Its best to change the value of this keyword to no while
    developing stored procedures, and then change it back to yes when you are ready to load the final version of your stored

    - Set your KEEPDARI like NO.
    If the value of KEEPDARI is not appropriate, execute these commands:
    > db2 update dbm cfg using keepdari no [or yes if you want KEEPDARI on]
    > db2 terminate
    > db2 force application all
    > db2stop
    > db2start


    - install the last fixpack

    - (For DB2 UDB 7 before installed the FixPack)To distribute compiled SQL procedures between DB2 servers for databases created prior to DB2 Version 7 FixPak 3,
    you must enable DB2 to extract and install them. To do this, enter the following command on every DB2 server
    that is the source of, or destination for, a compiled SQL procedure:

    >db2updv7 -d database_name
    >choice 'Y'

    For more details:


    Observation: You need have the Visual Studio C++ 6.0 and the DB2 Application Development Client in your machine.

    1- STEP
    Sometimes, the compiler C++ don't understand the 'blank spaces' in the path of 'INCLUDE' environment variables,
    for example [ c:\Program Files\SQLLIB\INCLUDE], so, you must create a directory SQLLIB in c:\ and to copy the following directories
    INCLUDE, Lib and temaplates from c:\Program Files\SQLLIB to C:\SQLLIB.

    Your structure must be:


    For more details about this error, look your log in this path C:\Program Files\SQLLIB\spb\projects\P?????.log
    and the route cause in this address:

    2- STEP

    Edit your environment variable INCLUDE and change the the paht:



    3- STEP

    Set the variable DB2_SQLROUTINE_COMPILE_COMMAND with the following command:

    For Windows:
    db2set DB2_SQLROUTINE_COMPILE_COMMAND="cl -Ox -W2 -DWIN32 -TC -D_X86_=1 -MD -IC:\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll -defQLROUTINE_FILENAME.def /outQLROUTINE_FILENAME.dll C:\SQLLIB\lib\db2api.lib"

    The option -DWIN32 it only Windows SO.

    For Unix:


    Set the variable DB2_SQLROUTINE_COMPILER_PATH with the following command:

    db2set DB2_SQLROUTINE_COMPILER_PATH="C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.bat"

    (In this case don't have problem the blank spaces, you must use the path correctly)

    For more details:

    4- Step

    Restart your DB and your machine for the update set up correctly.

    PS.:Following this steps your problem must be solve it. )if not, send me the error for help you!

    Robelis Mussatto Database Administrator

Posting Permissions

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