By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,004 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,004 IT Pros & Developers. It's quick & easy.

How can i write java store procedure in DB2 universal database8.2

P: n/a
Hello all,
I want to write java store procedure in db2 universal database
by jdbc.
After creating the java class, How can i load this class to the
database by the sqlj.install_jar() command in the windows platform.

Thank's and Regard
Mamun

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
development center (db2dc) can teach you, read the build messages:

DB2ADMIN.P1 - Build started.
C:\IBM\SQLLIB\java\jdk\bin\javac -classpath
".;C:\IBM\SQLLIB\java\db2java.zip;C:\IBM\SQLLIB\ja va\runtime.zip;C:\IBM\SQLLIB\java\sqlj.zip"
MYPAKCAGE\P1.java
DB2ADMIN.P1 - Javac completed.
C:\IBM\SQLLIB\java\jdk\bin\jar cf MYJARID.jar MYPAKCAGE\P1.class
DB2ADMIN.P1 - Jar file created.
Call SQLJ.DB2_INSTALL_JAR (<<C:\Documents and
Settings\Administrator\Application
Data\IBM\DB2\DC\Projects\bld1128939529688\MYJARID. jar>>,
'DB2ADMIN.MYJARID', 0)
DB2ADMIN.P1 - SQLJ.DB2_INSTALL_JAR using jar name DB2ADMIN.MYJARID
completed.
Call sqlj.refresh_classes( )
DB2ADMIN.P1 - sqlj.refresh_classes completed.
Call SQLJ.DB2_UPDATEJARINFO ('DB2ADMIN.MYJARID', 'MYPAKCAGE.P1',
<<C:\Documents and Settings\Administrator\Application
Data\IBM\DB2\DC\Projects\bld1128939529688\MYPAKCAG E\P1.java>>)
DB2ADMIN.P1 - Source updated.
CREATE PROCEDURE DB2ADMIN.P1 ( )
SPECIFIC MYSPECIFICNAME
DYNAMIC RESULT SETS 1
NOT DETERMINISTIC
LANGUAGE Java
EXTERNAL NAME 'DB2ADMIN.MYJARID:MYPAKCAGE.P1.p1'
FENCED
THREADSAFE
PARAMETER STYLE JAVA
DB2ADMIN.P1 - Create stored procedure completed.
--Build committed--
DB2ADMIN.P1 - Build successful.

Regards, Artur

Nov 12 '05 #2

P: n/a
<Ma*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hello all,
I want to write java store procedure in db2 universal database
by jdbc.
After creating the java class, How can i load this class to the
database by the sqlj.install_jar() command in the windows platform.

Thank's and Regard
Mamun


Be aware that java SP's noticeably slower than SQL SP's or C SP's.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.