SYSINSTALLOBJECTS procedure
The SYSINSTALLOBJECTS procedure creates, drops, verifies, or migrates the database objects that are required for a specific tool.
Syntax
The schema is SYSPROC.
Procedure parameters
-
tool-name
- An input argument of type VARCHAR(128) that specifies the name of the tool that is to be loaded:
- 'DB2AC' for autonomous computing (health monitor)
- 'STMG_DBSIZE_INFO' for storage management
- 'OPT_PROFILES' for creating the optimization profile table
- 'POLICY' for policy (tables and triggers)
- 'EXPLAIN' for creating or migrating explain tables
- 'INGEST' for creating the restart table used by the ingest utility
- 'REPL_MQT' for creating the latency table for shadow tables
- 'GEO' for creating or updating Spatial Analytics artifacts
- 'LBAR' for logical backup and restore
action
- An input argument of type CHAR(1) that specifies the action that is to be taken:
- C
- Create objects.
- D
- Drop objects.
- V
- Verify objects.
- M
- Migrate objects. The M option is valid only when used with the tool names EXPLAIN, GEO, or LBAR. This option migrates tables that were created in previous Db2 versions to be compatible with the current version.
tablespace-name
- An input argument of type VARCHAR(128) that specifies the name of the table space in which the objects reside. If the tool name is EXPLAIN and the action is M, the specified value (if any) is ignored and the objects are created in the table space where the explain tables that are being migrated were created. Otherwise, the default is the SYSTOOLSPACE table space. If SYSTOOLSPACE does not already exist, it is created. schema-name
- An input argument of type VARCHAR(128):
- If the tool name is EXPLAIN, the name of the schema where the tables reside. The default is SYSTOOLS.
- If the tool name is GEO, the name of the schema where the Spatial Analytics metadata tables are installed. The default is SYSGEO.
- Otherwise, the specified value (if any) is ignored and the SYSTOOLS schema is used.
Authorization
One of the
following authorities is required to execute the procedure:
- EXECUTE privilege on the procedure
- DATAACCESS authority
- DBADM authority
- SQLADM authority
Default PUBLIC privilege
In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the procedure is automatically created.
Examples
- Migrate all explain
tables.
CALL SYSPROC.SYSINSTALLOBJECTS('EXPLAIN', 'M', CAST (NULL AS VARCHAR(128)), CAST (NULL AS VARCHAR(128)))
- Enabling the Spatial Analytics
component:
CALL SYSPROC.SYSINSTALLOBJECTS('GEO', 'C', CAST (NULL AS VARCHAR(128)), CAST (NULL AS VARCHAR(128)))
- Verify objects that are used for autonomous computing (health
monitor).
This CALL statement results in the following message:CALL SYSPROC.SYSINSTALLOBJECTS('DB2AC', 'V', CAST (NULL AS VARCHAR(128)), CAST (NULL AS VARCHAR(128)))
SQL0438N Application raised error or warning with diagnostic text: "DB2AC INVALID". SQLSTATE=3900