Results 1 to 5 of 5

Thread: SP Builder

  1. #1
    Join Date
    Dec 2002
    Location
    CALIFORNIA
    Posts
    5

    Unanswered: SP Builder

    I'm working on windows 2000 and trying to use Stored Procedure Builder, could some one help me what are the properties i have to set in SQL SP Build Options tab:
    1. Compiler environment
    2. Compiler Options
    3. Precompiler option

    i tried to build a test store proc and got the following error:

    DB2ADMIN.PROC1 - Create stored procedure returns -104.

    DB2ADMIN.PROC1: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "Precompilation/Compilation error" was found following "". Expected tokens may include: "". SQLSTATE=42601

    DB2ADMIN.PROC1 - Changes rolled back.
    DB2ADMIN.PROC1 - Build failed.


    Thanks in advance for ur suggestions...

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,
    I hope you have installed the VC++. Basically Db2 uses the C compiler for building the stored procedures.

    In that case you need to set the enviornment variable DB2_SQLROUTINE_COMPILER_PATH
    with value
    C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.bat

    This value will appear in your Compiler environment also.

    Please check it.

    Cheers,
    Prashant

  3. #3
    Join Date
    Dec 2002
    Location
    CALIFORNIA
    Posts
    5
    Hi Prashant , thanks for ur response...
    i have not installed VC++ compiler and there is no VCVARS32.bat
    file on my system. am i right that while installing db2 C compiler is installed by default, how can i check that C compiler is installed on my system?

    This is the error i'm getting, i appreciate for ur suggestions/ideas:-

    DB2ADMIN.PROC1 - Create stored procedure returns -7032.

    DB2ADMIN.PROC1:

    *** BIND C:\PROGRA~1\SQLLIB\function\routine\sqlproc\CUSTOM ER\DB2ADMIN\tmp\P0525260.sqc ***

    LINE MESSAGES FOR P0525260.sqc

    ------ --------------------------------------------------------------------

    SQL0060W The "C" precompiler is in progress.
    SQL0091W Precompilation or binding was ended with "0"

    errors and "0" warnings.


    *** COMPILE C:\PROGRA~1\SQLLIB\function\routine\sqlproc\CUSTOM ER\DB2ADMIN\tmp\P0525260.c ***

    DB2_SQLROUTINE_COMPILE_COMMAND=c:\Program Files\SQLLIB\function\routine\sr_cpath

    @echo off
    REM set VCV6_DRIVE=c:\Microsoft Visual Studio
    REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%V CV6_DRIVE%\VC98\mfc\include;%VCV6_DRIVE%\VC98\incl ude

    REM set lib=%lib%;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_DRIVE%\V C98\lib

    REM set path=%path%;%VCV6_DRIVE%\Common\Tools\WinNT;%VCV6_ DRIVE%\Common\MSDev98\Bin;%VCV6_DRIVE%\Common\Tool s;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib; %VCV6_DRIVE%\VC98\lib

    @echo off

    REM set VCV5_DRIVE=c:\Program Files\devstudio

    REM set include=%include%;%VCV5_DRIVE%\vc\include;%VCV5_DR IVE%\vc\atl\include;%VCV5_DRIVE%\vc\mfc\include

    REM set lib=%lib%;%VCV5_DRIVE%\vc\lib;%VCV5_DRIVE%\vc\mfc\ lib

    REM set path=%path%;%VCV5_DRIVE%\sharedide\bin\ide;%VCV5_D RIVE%\sharedide\bin;%VCV5_DRIVE%\vc\bin

    @echo on

    set SQLROUTINE_FILENAME=P0525260
    set db2path=C:\PROGRA~1\SQLLIB

    c:\Program Files\SQLLIB\function\routine\sr_cpath

    *** C:\PROGRA~1\SQLLIB\function\routine\sqlproc\CUSTOM ER\DB2ADMIN\tmp\P0525260.def ***

    LIBRARY P0525260

    EXPORTS _pgsjmp@4

    pgsjmp=_pgsjmp@4

    C:\PROGRA~1\SQLLIB\function\routine\sqlproc\CUSTOM ER\DB2ADMIN\tmp>set SQLROUTINE_FILENAME=P0525260

    C:\PROGRA~1\SQLLIB\function\routine\sqlproc\CUSTOM ER\DB2ADMIN\tmp>set db2path=C:\PROGRA~1\SQLLIB

    C:\PROGRA~1\SQLLIB\function\routine\sqlproc\CUSTOM ER\DB2ADMIN\tmp>c:\Program Files\SQLLIB\function\routine\sr_cpath

    'c:\Program' is not recognized as an internal or external command,
    operable program or batch file.
    ----------------------------------------------------------------------------

    SQL7032N SQL procedure "" not created. Diagnostic file is "".
    DB2ADMIN.PROC1 - Changes rolled back.
    DB2ADMIN.PROC1 - Build failed.

  4. #4
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi Sam,

    Can you just give the output of the db2diag.log which is created while you try to compile the procedure.

    Cheers,
    Prashant

  5. #5
    Join Date
    Dec 2002
    Location
    CALIFORNIA
    Posts
    5
    Hi Prashant, here is db2diag log... in fact i have not set any SQL Procedure Build Options ie. compier env, compiler options, pre compiler options... what value i need to set if i have to... once again thanks for you patience.


    2002-12-31-09.38.53.421000 InstanceB2 Node:000
    PID:1328(db2syscs.exe) TID:1580 Appid:none
    syncpoint_manager sqlcspl_pgrlg Probe:111

    DiagData


    2002-12-31-09.38.54.140000 InstanceB2 Node:000
    PID:1328(db2syscs.exe) TID:1580 Appid:none
    syncpoint_manager sqlcspl_log_scanread Probe:3

    DiagData
    4a00 0000 J...


    2002-12-31-09.38.54.593000 InstanceB2 Node:000
    PID:1328(db2syscs.exe) TID:1580 Appid:none
    syncpoint_manager sqlcspm_readlog Probe:10
    SPM0438 The Sync point manager recovery log is bad.

    2002-12-31-09.38.56.156000 InstanceB2 Node:000
    PID:1328(db2syscs.exe) TID:1436 Appid:none
    base_sys_utilities sqleInitSysCtlr Probe:88

    DiagData
    9000 0000 ....

Posting Permissions

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