ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/sqljinst.htm

113 lines
7.4 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="SQLJ.INSTALL_JAR" />
<meta name="abstract" content="The SQLJ.INSTALL_JAR stored procedure installs a JAR file into the database system. This JAR file can be used in subsequent CREATE FUNCTION and CREATE PROCEDURE statements." />
<meta name="description" content="The SQLJ.INSTALL_JAR stored procedure installs a JAR file into the database system. This JAR file can be used in subsequent CREATE FUNCTION and CREATE PROCEDURE statements." />
<meta name="DC.Relation" scheme="URI" content="sqljjar.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljremv.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljrplc.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljupdt.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljrcvr.htm" />
<meta name="DC.Relation" scheme="URI" content="sqljrfc.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="sqljinst" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>SQLJ.INSTALL_JAR</title>
</head>
<body id="sqljinst"><a name="sqljinst"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">SQLJ.INSTALL_JAR</h1>
<div><p>The SQLJ.INSTALL_JAR stored procedure installs a JAR file into
the database system. This JAR file can be used in subsequent CREATE FUNCTION
and CREATE PROCEDURE statements.</p>
<div class="section"><h4 class="sectiontitle">Authorization</h4><p>The privilege held by the authorization
ID of the CALL statement must include at least one of the following for the
SYSJAROBJECTS and SYSJARCONTENTS catalog tables:</p>
<ul><li>The following system authorities: <ul><li>The INSERT and SELECT privileges on the table</li>
<li>The system authority *EXECUTE on library QSYS2</li>
</ul>
</li>
<li>Administrative authority</li>
</ul>
<p>The privilege held by the authorization ID of the CALL statement must
also have the following authorities:</p>
<ul><li>Read (*R) access to the JAR file specified in the <em>jar-url</em> parameter
being installed.</li>
<li>Write, Execute, and Read (*RWX) access to the directory where the JAR
file is installed. This directory is /QIBM/UserData/OS400/SQLLib/Function/jar/<em>schema</em>,
where <em>schema</em> is the schema of the <em>jar-id</em>.</li>
</ul>
<p>Adopted authority cannot be used for these authorities.</p>
</div>
<div class="section"><h4 class="sectiontitle">SQL syntax</h4><pre> &gt;&gt;-CALL--SQLJ.INSTALL_JAR-- (--<em>'jar-url'</em>--<em>,</em>--<em>'jar-id'</em>--<em>,</em>--<em>deploy</em>--)--&gt;
&gt;--------------------------------------------------------------&gt;&lt;</pre>
</div>
<div class="section"><h4 class="sectiontitle">Description</h4><dl><dt class="dlterm"><strong><em>jar-url</em></strong></dt>
<dd>The URL containing the JAR file to be installed or replaced. The only
URL scheme supported is 'file:'.</dd>
</dl>
<dl><dt class="dlterm"><strong><em>jar-id</em></strong></dt>
<dd>The JAR identifier in the database to be associated with the file specified
by the <em>jar-url</em>. The <em>jar-id</em> uses SQL naming and the JAR file
is installed in the schema or library specified by the implicit or explicit
qualifier.</dd>
</dl>
<dl><dt class="dlterm"><strong><em>deploy</em></strong></dt>
<dd>Value used to describe the install_action of the deployment descriptor
file. If this integer is a nonzero value, then the install_actions of a deployment
descriptor file should be run at the end of the install_jar procedure. The
current version of DB2<sup>®</sup> UDB for iSeries™ only supports a value of zero.</dd>
</dl>
</div>
<div class="section"><h4 class="sectiontitle">Usage notes</h4><p>When a JAR file is installed, DB2 UDB for iSeries registers
the JAR file in the SYSJAROBJECTS system catalog. It also extracts the names
of the Java<sup>(TM)</sup> class files from the JAR file and registers each
class in the SYSJARCONTENTS system catalog. DB2 UDB for iSeries copies the JAR file to a jar/schema
subdirectory of the /QIBM/UserData/OS400/SQLLib/Function directory. DB2 UDB for iSeries gives
the new copy of the JAR file the name given in the <em>jar-id</em> clause. A
JAR file that has been installed by DB2 UDB for iSeries into a subdirectory of /QIBM/UserData/OS400/SQLLib/Function/jar
should not be changed. Instead, the CALL SQLJ.REMOVE_JAR and CALL SQLJ.REPLACE_JAR
SQL commands should be used to remove or replace an installed JAR file.</p>
</div>
<div class="section"><h4 class="sectiontitle">Example</h4><p>The following command is issued from an
SQL interactive session.</p>
<pre> CALL SQLJ.INSTALL_JAR('file:/home/db2inst/classes/Proc.jar' , 'myproc_jar', 0)</pre>
<p>The
Proc.jar file located in the file:/home/db2inst/classes/ directory is installed
into DB2 UDB
for iSeries with
the name myproc_jar. Subsequent SQL commands that use the Procedure.jar file
refer to it with the name myproc_jar. </p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="sqljjar.htm" title="Both Java stored procedures and Java UDFs can use Java classes that are stored in Java JAR files.">SQLJ procedures that manipulate JAR files</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="sqljremv.htm" title="The SQLJ.REMOVE_JAR stored procedure removes a JAR file from the database system.">SQLJ.REMOVE_JAR</a></div>
<div><a href="sqljrplc.htm" title="">SQLJ.REPLACE_JAR</a></div>
<div><a href="sqljupdt.htm" title="The SQLJ.UPDATEJARINFO updates the CLASS_SOURCE column of the SYSJARCONTENTS catalog table. This procedure is not part of the SQLJ standard but is used by the DB2 UDB for iSeries stored procedure builder.">SQLJ.UPDATEJARINFO</a></div>
<div><a href="sqljrcvr.htm" title="The SQLJ.RECOVERJAR procedure takes the JAR file that is stored in the SYSJAROBJECTS catalog and restores it to the /QIBM/UserData/OS400/SQLLib/Function/jar/jarschema/jar_id.jar file.">SQLJ.RECOVERJAR</a></div>
<div><a href="sqljrfc.htm" title="The SQLJ.REFRESH_CLASSES stored procedure causes the reloading of user defined classes used by Java stored procedures or Java UDFs in the current database connection. This stored procedure must be called by existing database connections to obtain changes made by a call to the SQLJ.REPLACE_JAR stored procedure.">SQLJ.REFRESH_CLASSES</a></div>
</div>
</div>
</body>
</html>