To remove shadow table functionality from a Db2 server, remove
database objects and reset Db2 server
configuration.
Before you begin
- Ensure that you can login to the Db2 server with db2-cdc-user
that have the appropriate authorization to remove database objects from db2-database-name.
Procedure
To remove database objects for shadow tables from a Db2
environment:
-
Log in to the Db2 server as db2-cdc-user.
- Connect to db2-database-name as follows:
$ db2 connect to db2-database-name
- Drop the SYSTOOLS.REPL_MQT_LATENCY table by calling the SYSPROC.SYSINSTALLOBJECTS
procedure as follows:
$ db2 "call sysproc.sysinstallobjects ('repl_mqt', 'd',
cast (null as varchar(128)), cast (null as varchar(128)))"
- Drop each shadow table by issuing the following statement:
$ db2 "drop table shadow-table-name"
- If you created a view to show the shadow table latency, drop it as follows:
$ db2 "drop view shadow_latency_view-name"
- Remove the OPT_SORTHEAP_EXCEPT_COL token in the
DB2_EXTENDED_OPTIMIZATION registry variable.
If the only setting of the
DB2_EXTENDED_OPTIMIZATION registry variable is
OPT_SORTHEAP_EXCEPT_COL, issue the following command to delete the setting from
this variable:
$ db2set DB2_EXTENDED_OPTIMIZATION=
- Restore the value of the util_heap_sz,
sheapthres_shr, and sortheap database configuration
parameters to the value they had before you configure the database for shadow tables, as
follows:
$ db2 update db cfg for db2-database-name
using util_heap_sz original-util_heap_sz-value AUTOMATIC
sheapthres_shr original-sheapthres_shr-value
sortheap original-sortheap-value
- If you created the connect procedure for shadow tables, stop executing this procedure by
setting the connect_proc database configuration parameter to
NULL, as follows:
db2 "update db cfg using CONNECT_PROC NULL"
You must specify the
NULL value in uppercase.
- If you created the connect procedure for shadow tables, drop it as follows:
db2 "drop procedure connect-procedure-name"