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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mamuninfo@gmail.com

    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_ja r() command in the windows platform.

    Thank's and Regard
    Mamun

  • Artur

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

    development center (db2dc) can teach you, read the build messages:

    DB2ADMIN.P1 - Build started.
    C:\IBM\SQLLIB\j ava\jdk\bin\jav ac -classpath
    ".;C:\IBM\SQLLI B\java\db2java. zip;C:\IBM\SQLL IB\java\runtime .zip;C:\IBM\SQL LIB\java\sqlj.z ip"
    MYPAKCAGE\P1.ja va
    DB2ADMIN.P1 - Javac completed.
    C:\IBM\SQLLIB\j ava\jdk\bin\jar cf MYJARID.jar MYPAKCAGE\P1.cl ass
    DB2ADMIN.P1 - Jar file created.
    Call SQLJ.DB2_INSTAL L_JAR (<<C:\Document s and
    Settings\Admini strator\Applica tion
    Data\IBM\DB2\DC \Projects\bld11 28939529688\MYJ ARID.jar>>,
    'DB2ADMIN.MYJAR ID', 0)
    DB2ADMIN.P1 - SQLJ.DB2_INSTAL L_JAR using jar name DB2ADMIN.MYJARI D
    completed.
    Call sqlj.refresh_cl asses( )
    DB2ADMIN.P1 - sqlj.refresh_cl asses completed.
    Call SQLJ.DB2_UPDATE JARINFO ('DB2ADMIN.MYJA RID', 'MYPAKCAGE.P1',
    <<C:\Document s and Settings\Admini strator\Applica tion
    Data\IBM\DB2\DC \Projects\bld11 28939529688\MYP AKCAGE\P1.java> >)
    DB2ADMIN.P1 - Source updated.
    CREATE PROCEDURE DB2ADMIN.P1 ( )
    SPECIFIC MYSPECIFICNAME
    DYNAMIC RESULT SETS 1
    NOT DETERMINISTIC
    LANGUAGE Java
    EXTERNAL NAME 'DB2ADMIN.MYJAR ID:MYPAKCAGE.P1 .p1'
    FENCED
    THREADSAFE
    PARAMETER STYLE JAVA
    DB2ADMIN.P1 - Create stored procedure completed.
    --Build committed--
    DB2ADMIN.P1 - Build successful.

    Regards, Artur

    Comment

    • Mark A

      #3
      Re: How can i write java store procedure in DB2 universal database8.2

      <Mamuninfo@gmai l.com> wrote in message
      news:1128929780 .383528.290480@ g49g2000cwa.goo glegroups.com.. .[color=blue]
      > 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_ja r() command in the windows platform.
      >
      > Thank's and Regard
      > Mamun
      >[/color]

      Be aware that java SP's noticeably slower than SQL SP's or C SP's.


      Comment

      Working...