Start of change

EVALUATE_RECLONE_RELATED_OBJECTS table function

The EVALUATE_RECLONE_RELATED_OBJECTS table function returns a row for each non-replicated database object dependent upon a replicated object that will be deleted on the copy node during a software reclone.

A software reclone is performed by resynchronizing replicated objects using Save/Restore from the source node to the copy node. As part of this process, some replicated objects must be deleted from the copy node before the resynchronization can be performed. Non-replicated dependent objects will also be deleted by cascading delete rules. Replicated objects will be reestablished on the copy node by the software reclone while non-replicated objects will remain deleted. For example, if a non-replicated view is defined over a replicated table, when the table is dropped during the software reclone processing, the non-replicated dependent view will be dropped and not recreated or restored. The result rows from this function indicate objects that should be saved prior to the software reclone and restored when it is complete.

This function should be run on the node which will be the source node for the software reclone of SYSBAS or an IASP.

When iasp-name is *SYSBAS:
  • This function is invoked on the primary node. The replication state must be TRACKING or BLOCKED. The replication detail must be SUSPENDED.
  • The copy node for the software reclone must be available.
  • The NRGs must be started.
When iasp-name is not *SYSBAS:
  • The replication state for SYSBAS must be ACTIVE.
  • The replication state of the IASP on the node where this function is invoked must be TRACKING. The replication detail must be SUSPENDED.
  • The IASP must be a database IASP and must be available on both nodes.

Authorization: The privileges held by the authorization ID of the statement must include *ALLOBJ special authority. For the authority needed to use this function, see Authorization.

Read syntax diagramSkip visual syntax diagram EVALUATE_RECLONE_RELATED_OBJECTS ( IASP_NAME =>  iasp-name )
The schema is QSYS2.
iasp-name
A character or graphic string expression that identifies the name of the auxiliary storage pool (ASP) group used to locate the objects. Can contain the following special value:
*SYSBAS
The objects are associated with the system ASP (ASP 1) and any basic user ASPs (ASPs 2-32).

The result of the function is a table containing rows with the format shown in the following table. Each row represents an object which would be deleted on the copy node during a software reclone and would not be recreated during that process. All columns are nullable.

Table 1. EVALUATE_RECLONE_RELATED_OBJECTS table function
Column Name Data Type Description
REPLICATED_LIBRARY_NAME VARCHAR(10) The library containing the replicated object that the potentially deleted object is dependent on.
REPLICATED_OBJECT_NAME VARCHAR(10) The replicated object that the potentially deleted object is dependent on.
REPLICATED_OBJECT_TYPE VARCHAR(8) Type of object.
*FILE
Database file
*SQLUDT
SQL user-defined type
*SQLXSR
SQL XML schema repository
LIBRARY_NAME VARCHAR(128) The library that contains the non-replicated object that will be deleted.
OBJECT_NAME VARCHAR(128) The non-replicated object that will be deleted.
SQL_OBJECT_TYPE VARCHAR(24) The SQL type of object that will be deleted.
FUNCTION
This is a function name.
INDEX
This is an index name.
KEYED LOGICAL FILE
This is a keyed logical file.
LOGICAL FILE
This is a non-keyed logical file.
MATERIALIZED QUERY TABLE
This is a materialized query table.
PROCEDURE
This is a procedure name.
SEQUENCE
This is a sequence name.
TABLE
This is a table name.
VARIABLE
This is a variable name.
VIEW
This is a view name.
BASE_TABLE_LIBRARY VARCHAR(10) The library containing the table upon which the row permission, column mask, or trigger is defined.

Contains the null value if SQL_OBJECT_TYPE is not MASK, PERMISSION, or TRIGGER.

BASE_TABLE_NAME VARCHAR(10) The table upon which the row permission, column mask, or trigger is defined.

Contains the null value if SQL_OBJECT_TYPE is not MASK, PERMISSION, or TRIGGER.

Example

  • Generate a table that lists all the related objects in SYSBAS that would be deleted if a software reclone were to be performed.
    CREATE TABLE MYLIB.RECLONE_RELATED_DELETES AS (
      SELECT * FROM TABLE(QSYS2.EVALUATE_RECLONE_RELATED_OBJECTS(IASP_NAME => '*SYSBAS')))
        WITH DATA;
End of change