473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
2 2947
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
<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

198
by: Michael N. Christoff | last post by:
Java, the software developed by Sun Microsystems in the mid-1990s as a universal operating system for Internet applications, gave NASA a low-cost and easy-to-use option for running Spirit, the...
3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: George | last post by:
HI , I am getting the below error while i compile a Store procedure which is my main store procedure and does the call to all other supporting stored procedure. Compartively its a large file...
14
by: technocrat | last post by:
db2 -t -v -f/home.../filename >output_file-name I have a java stored procedure..which has to run the above command...not sure how i can run this command through java.. any suggestions are...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
by: rxding | last post by:
Hello, Performance reason we need to move some of our code into database. Java Store Procedure is given the first choice. However, while investigating some sample code of Java store procedure, ...
0
by: Nova | last post by:
Hi, I created a Java UDF (PARAMETER STYLE JAVA) for DB2 9 Express-C. I finally does what I want it to do. However, after a few hundred calls to the UDF, it fails and raises an SQL error,...
8
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.