background image
<< SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA system procedure | SQLJ.REMOVE_JAR system procedure >>

System procedures for storing jar files

<< SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA system procedure | SQLJ.REMOVE_JAR system procedure >>
Derby Reference Manual
179
SYSCS_UTIL.SYSCS_UPDATE_STATISTICS(IN SCHEMANAME VARCHAR(128),
IN TABLENAME VARCHAR(128),
IN INDEXNAME VARCHAR(128)))
Note: You can specify
null
for the INDEXNAME to update any existing statistics and
create statistics for those statistics that are missing.
Execute privileges
If authentication and SQL authorization are both enabled, all users have execute
privileges on this procedure. However, in order for the procedure to run successfully on
a given table, the user must be the owner of either the
database
or the schema in which
the table resides. See "Enabling user authentication" and "Setting the SQL standard
authorization mode" in the Derby Developer's Guide for more information.
Examples
In the following example, the system procedure updates statistics for the index
PAY_DESC on the SAMP.EMPLOYEE table:
CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('SAMP','EMPLOYEE','PAY_DESC');
In the following example,
null
is specified instead of an index name. For all of the
indexes, the existing statistics are updated and statistics are created for any missing
statistics on the EMPLOYEE table in the SAMP schema.
CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('SAMP', 'EMPLOYEE', null);
System procedures for storing jar files in a database
SQLJ.INSTALL_JAR
,
SQLJ.REMOVE_JAR
, and
SQLJ.REPLACE_JAR
are a set of
procedures in the SQLJ schema that allow you to store jar files in a database.
Your jar file has two names:
· A physical name (the name you gave it when you created it)
· A Derby name (the Derby identifier you give it when you load it into a particular
schema). The Derby name, an
SQL92Identifier
, can be delimited and must be
unique within a schema.
A single schema can store more than one jar file.
For more information on when and how to use these procedures, see the section
"Loading classes from a database" in the Derby Developer's Guide.
SQLJ.INSTALL_JAR system procedure
The SQLJ.INSTALL_JAR system procedure stores a jar file in a database.
Syntax
SQLJ.INSTALL_JAR(IN JAR_FILE_PATH_OR_URL VARCHAR(32672),
IN QUALIFIED_JAR_NAME VARCHAR(32672),
IN DEPLOY INTEGER)
JAR_FILE_PATH_OR_URL
The path or URL of the jar file to add. A path includes both the directory and the
file name (unless the file is in the current directory, in which case the directory is
optional). For example:
d:/todays_build/tours.jar
QUALIFIED_JAR_NAME
The Derby name of the jar file, qualified by the schema name. Two examples: