If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > What's the problem with the following stored proc?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-04, 13:53
hiolgc hiolgc is offline
Registered User
 
Join Date: Mar 2004
Posts: 61
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

;
Reply With Quote
  #2 (permalink)  
Old 04-22-04, 15:09
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #3 (permalink)  
Old 04-22-04, 15:46
hiolgc hiolgc is offline
Registered User
 
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,

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 04-26-04, 00:08
trinmoy trinmoy is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 04-28-04, 09:28
hiolgc hiolgc is offline
Registered User
 
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,
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On