Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    61

    Unanswered: What's the problem with the following stored proc?

    Hi there,

    What's the problem with the following stored proc (proc1)? When it is called, the error is occured:

    11:01:35.911 DBMS LBUINVDM -- Error: [IBM][CLI Driver][DB2/6000] SQL10013N The specified library "/.../sqllib/function/LOTADMIN.proc1" could not be loaded.

    But a similar proc runs well (proc2).

    Thanks in advance,

    Steven H.

    CREATE PROCEDURE LOTADMIN.Proc1 ( IN rl int )
    RESULT SETS 1
    LANGUAGE SQL
    ------------------------------------------------------------------------
    -- SQL Stored Procedure
    ------------------------------------------------------------------------
    P1: BEGIN
    -- Declare cursor
    DECLARE cursor1 CURSOR WITH RETURN FOR
    SELECT
    LOTADMIN.RETAIL_LOCATION.RETLR_LOC_ID AS RETLR_LOC_ID,
    LOTADMIN.RETAIL_LOCATION.NAME AS NAME,
    LOTADMIN.RETAIL_LOCATION.ADDRESS AS ADDRESS,
    LOTADMIN.RETAIL_LOCATION.CITY AS CITY,
    LOTADMIN.RETAIL_LOCATION.FSA_CODE AS FSA_CODE,
    LOTADMIN.RETAIL_LOCATION.LDU_CODE AS LDU_CODE
    FROM
    LOTADMIN.RETAIL_LOCATION
    WHERE
    (
    ( LOTADMIN.RETAIL_LOCATION.RETLR_LOC_ID = rl )
    );

    -- Cursor left open for client application
    OPEN cursor1;

    END P1

    ;

    CREATE PROCEDURE LOTADMIN.Proc2 ( )
    RESULT SETS 1
    LANGUAGE SQL
    ------------------------------------------------------------------------
    -- SQL Stored Procedure
    ------------------------------------------------------------------------
    P1: BEGIN
    -- Declare cursor
    DECLARE cursor1 CURSOR WITH RETURN FOR
    SELECT
    LOTADMIN.RETAIL_LOCATION.RETLR_LOC_ID AS RETLR_LOC_ID,
    LOTADMIN.RETAIL_LOCATION.NAME AS NAME,
    LOTADMIN.RETAIL_LOCATION.ADDRESS AS ADDRESS,
    LOTADMIN.RETAIL_LOCATION.CITY AS CITY,
    LOTADMIN.RETAIL_LOCATION.FSA_CODE AS FSA_CODE,
    LOTADMIN.RETAIL_LOCATION.LDU_CODE AS LDU_CODE
    FROM
    LOTADMIN.RETAIL_LOCATION
    WHERE
    (
    ( LOTADMIN.RETAIL_LOCATION.RETLR_LOC_ID = 110163 )
    );

    -- Cursor left open for client application
    OPEN cursor1;

    END P1

    ;

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: What's the problem with the following stored proc?

    See if the description of the error message helps


    $ db2 ? SQL10013N


    SQL10013N The specified library "<name>" could not be loaded.

    Explanation:

    The library module could not be found.

    User Response:

    For DARI users, ensure that the specified library is available.

    o If the client application uses a fully qualified path name to
    specify the DARI library, the DARI library must be stored in
    the given directory path. If the client application does not
    use the path name, the DARI library must be stored in the
    default directory (<InstanceHomeDir>/sqllib/function).
    Where <InstanceHomeDir> is the home directory of the
    database manager instance.

    o If the error message occurs during database manager start
    time then the user will have to reinstall the DB2 instance or
    the database manager product.



    Federated system users: if the error message occurs as a result
    of issuing db2start on the federated system and the "<name>" is
    "from DB2_DJ_COMM" then the federated server experienced a
    problem loading one of the wrapper modules identified by the
    DB2_DJ_COMM environment variable. The DB2_DJ_COMM environment
    variable must be updated to contain only valid wrapper modules.

    If the error message occurs as a result of issuing db2start on
    the federated system and the "<name>" is not "from DB2_DJ_COMM",
    the user must re-install the federated instance.

    If the library identifies a wrapper module, that module must be
    installed, link-edited (as required), and available in the
    correct directory. The data source client libraries (used by the
    wrapper module) must also be installed and available in the
    correct directory. Refer to the Installation and Configuration
    Supplement for more information about configuring wrapper
    modules.

    sqlcode : -10013

    sqlstate : 42724
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Mar 2004
    Posts
    61

    Re: What's the problem with the following stored proc?

    We read this message several times before post the question. Do you think it help? I don't think. You see the similar one works fine. Why this one you can not load?

    Thanks anyway,

    Originally posted by sathyaram_s
    See if the description of the error message helps


    $ db2 ? SQL10013N


    SQL10013N The specified library "<name>" could not be loaded.

    Explanation:

    The library module could not be found.

    User Response:

    For DARI users, ensure that the specified library is available.

    o If the client application uses a fully qualified path name to
    specify the DARI library, the DARI library must be stored in
    the given directory path. If the client application does not
    use the path name, the DARI library must be stored in the
    default directory (<InstanceHomeDir>/sqllib/function).
    Where <InstanceHomeDir> is the home directory of the
    database manager instance.

    o If the error message occurs during database manager start
    time then the user will have to reinstall the DB2 instance or
    the database manager product.



    Federated system users: if the error message occurs as a result
    of issuing db2start on the federated system and the "<name>" is
    "from DB2_DJ_COMM" then the federated server experienced a
    problem loading one of the wrapper modules identified by the
    DB2_DJ_COMM environment variable. The DB2_DJ_COMM environment
    variable must be updated to contain only valid wrapper modules.

    If the error message occurs as a result of issuing db2start on
    the federated system and the "<name>" is not "from DB2_DJ_COMM",
    the user must re-install the federated instance.

    If the library identifies a wrapper module, that module must be
    installed, link-edited (as required), and available in the
    correct directory. The data source client libraries (used by the
    wrapper module) must also be installed and available in the
    correct directory. Refer to the Installation and Configuration
    Supplement for more information about configuring wrapper
    modules.

    sqlcode : -10013

    sqlstate : 42724

  4. #4
    Join Date
    Nov 2003
    Location
    kualaumpur
    Posts
    33

    Smile

    try this :

    update dbm cfg using KEEPDARI YES

    and try to recompile ....

    hope this works ...

    Moy

  5. #5
    Join Date
    Mar 2004
    Posts
    61
    Thanks, the problem was resolved. The proc is right, every thing is in good condition, but it does not work. Even the manual does not give you an answer. But answer is in some place. That's the IBM!

    Thanks,

Posting Permissions

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