Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Log Master for Db2 13.1.

Cloned tables


(SPE2010)

You can process tables in a clone relationship only when they are in current mode. If you process tables in a clone relationship when they are in overtime mode, a warning message is displayed, activity for the cloned tables is ignored, and processing continues.

When a clone table is created, a second instance of the physical table space is also created. SYSIBM.SYSTABLESPACE includes only a single entry for the cloned table space. The value of the INSTANCE column in SYSIBM.SYSTABLESPACE is set to either 1 or 2. The value of the column reflects which table space instance is currently the base instance.

Example

If the base instance is 1, the base table is currently related to table space instance 1, and the clone table is related to instance 2.

When an exchange occurs, the column value is updated to reflect the new base table instance. 

Example

If the instance is set to 1 before the exchange, it is updated to 2. 

If the instance is set to 2 before the exchange, it is updated to 1.

The PSID of instance 2 always has the high bit turned on. The PSID and OBID in the log record are used to determine which object was updated. The PSID for instance 2 of the table space has the high bit turned on.

Example

Instance 1 = psid x0002

Instance 2 = psid x8002

The OBID of the clone table also has the high bit turned on.

Example

Base table OBID = x0003

Clone table OBID = x8003

If a row is inserted into the base table, and the current instance for the base table is instance 1, then the OBID in the log is set to x0003 and the PSID is set to x0002. If an exchange occurs, and a row is inserted into the base table, the OBID in the log record is still set to x0003. However, the PSID is set to 0x8002, because the current table space instance was set to 2 after the exchange. For more information, see Cloned tables#Updates to PSID, OBID, INSTANCE, and CREATE RBA.

When a clone table is dropped, SYSCOPY and SYSLGRNX information for the table space instance that is currently related to the clone table is deleted. If the SYSCOPY information is needed to process the log activity for the table space instance that was dropped, the log activity might not be recoverable with a log scan. Log scans for the previous life of the base table is still possible if row completion or decompression is not required, or if SYSCOPY information is available in the Log Master SYSCOPY repository table. Log scans for the previous life of the base table might result in an error if SYSCOPY information is needed for completion, decompression, or version processing. For more information, see Row-completion-processing-and-your-jobs.

Important

  • If the table space is used as a resource for completion or decompression processing, errors might occur.
  • We recommend not running log scans across multiple lives of a base or clone table.

The CREATE RBA for the base table is not updated when an exchange occurs. If a clone table is dropped and re-created, the CREATE RBA (RBA1 in SYSIBM.SYSTABLES) is reset and reflects a new life of the clone table.

Important

Log scans for previous lives of the clone table is not included in the log scan output when the log scan filter implicates only the clone table.

If a base table is exchanged with the clone table, dropped, and then re-created, the CREATE RBA of the base table is not updated. Running an exchange, dropping, and then re-creating the clone multiple times is equivalent to dropping and re-creating the base table. However, Log Master cannot detect this because there is no update to the base table’s create RBA.  For more information, see Cloned tables#Updates to PSID, OBID, INSTANCE, and CREATE RBA.

Log Master compares the log’s RBA with the table’s create RBA. If the log’s RBA is less than the table’s create RBA, the log record is ignored. Otherwise, it is included in the log scan processing.

Important

  • When processing across multiple lives of a base or clone table, all log records matching the current base table’s PSID.OBID might be included in the log scan output.
  • We recommend not running log scans across multiple lives of a base or clone table.

Updates to PSID, OBID, INSTANCE, and CREATE RBA

The following table describes the updates to PSID, OBID, INSTANCE, and CREATE RBA:

CREATE BASETABLE

ALTER TABLE BASETABLE ADD CLONE CLONETABLE

PSID

OBID

INSTANCE

CREATE RBA

BASETABLE

x0002

x0003

1

x000000000A

CLONETABLE

x8002

x8003

2

x000000000B

EXCHANGE

BASETABLE

x8002

x0003

2

x000000000A

CLONETABLE

x0002

x8003

1

x000000000B

DROP CLONE

ALTER TABLE BASETABLE ADD CLONE CLONETABLE

x0002

x8003



BASETABLE

x8002

x0003

2

x000000000A

CLONETABLE

x0002

x8003

1

x000000000C

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*