DB2 10.5 for Linux, UNIX, and Windows

SYSINSTALLOBJECTS procedure

The SYSINSTALLOBJECTS procedure creates or drops the database objects that are required for a specific tool.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-SYSINSTALLOBJECTS--(--tool-name--,--action--,---------------->

>--tablespace-name--,--schema-name--)--------------------------><

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, using one of the following values:
  • '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
action
An input argument of type CHAR(1) that specifies the action that is to be taken. Valid values are:
C
Create objects.
D
Drop objects.
V
Verify objects.
M
Migrate objects. The M option is only valid when used with the tool name EXPLAIN. This option migrates explain tables that were created in Version 7 or later 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 are to be created. If a value is not specified, or the value is an empty or blank string, the default user space is used if the tool name is AM. If the tool name is EXPLAIN and the action is M, the input table space name is ignored and the table space is used where the explain tables that are being migrated were created. Otherwise, the SYSTOOLSPACE table space is used. If SYSTOOLSPACE does not already exist, it will be created.
schema-name
Except for 'EXPLAIN' tool-name option, SYSTOOLS is always used as the schema regardless of the schema-name passed as the input parameter.
For 'EXPLAIN' tool-name option, an input schema-name can be passed and the tables are created under the specified schema-name. If no schema-name is passed as the input parameter, 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

  1. Migrate all explain tables.
    CALL SYSPROC.SYSINSTALLOBJECTS('EXPLAIN', 'M', CAST (NULL AS VARCHAR(128)),
       CAST (NULL AS VARCHAR(128)))
  2. Verify objects that are used for autonomous computing (health monitor).
    CALL SYSPROC.SYSINSTALLOBJECTS('DB2AC', 'V', CAST (NULL AS VARCHAR(128)), 
       CAST (NULL AS VARCHAR(128)))
    This CALL statement results in the following message:
    SQL0438N 
    Application raised error or warning with diagnostic text: "DB2AC INVALID". 
    SQLSTATE=3900