The SYSCS_UTIL.SYSCS_REGISTER_TOOL system procedure loads and unloads optional tools packages.
SYSCS_UTIL.SYSCS_REGISTER_TOOL(IN TOOLNAME VARCHAR(128), IN REGISTER BOOLEAN, IN OPTIONALARGS VARCHAR(128) ... )
No result set is returned by this procedure.
If authentication and SQL authorization are both enabled, only the database owner has execute privileges on this procedure by default. See "Configuring user authentication" and "Configuring user authorization" in the Derby Security Guide for more information. The database owner can grant access to other users.
The following optional tools are supported:
This optional tool creates functions and table functions to wrap the methods in java.sql.DatabaseMetaData, allowing you to use DatabaseMetaData methods in queries. For example, you can join and filter the ResultSets returned by DatabaseMetaData methods. This tool does not require any optional arguments. To create the metadata functions and table functions, do the following:
call syscs_util.syscs_register_tool( 'databaseMetaData', true )
To drop the functions and table functions, do the following:
call syscs_util.syscs_register_tool( 'databaseMetaData', false )
This optional tool creates schemas, table functions, and convenience views for all user tables in a foreign database. The table functions and views are useful for bulk-importing foreign data into Derby. This tool takes two additional arguments:
To create views on the foreign data, do the following:
call syscs_util.syscs_register_tool( 'foreignViews', true, 'foreignDatabaseURL', 'XYZ_' )
To drop the views on the foreign data, do the following:
call syscs_util.syscs_register_tool( 'foreignViews', false, 'foreignDatabaseURL', 'XYZ_' )
See the Derby Tools and Utilities Guide for more information on how to use these tools. Before you run an optional tool, make sure that your classpath contains the Derby jar files, including derbytools.jar.