Document Type | Technical Information
Category | Administration
Applicable Product Versions | Tibero5, Tibero6, Tibero7
Document Number | TADTI209
Overview
This document describes how to delete the Redo and Undo of unused threads when changing the configuration to Single in Tibero TAC (Tibero Active Cluster).
Method
1. Perform on the unused node
- Stop tibero and tbcm on the unused node
$ tbdown
$ tbcm -d
2. Perform on the node to be used
- Disable the thread of the unused node and delete the Redo and Undo of that thread
- Connect to tbsql
$ tbsql sys/tibero
- Disable the thread of the node not to be used
SQL> alter database disable thread 1;
- Prevent the use of undo segments other than the System Undo Segment 0
SQL> alter system set _tx_bind_usgmt_id = 0;
- Change Undo Tablespace to the Undo TS to be deleted
SQL> alter system set undo_tablespace='UNDO1';
- Change Undo Tablespace to the Undo TS to be used
SQL> alter system set undo_tablespace='UNDO0';
- When switching Undo, all previously used Undo segments are changed to Offline.
- Therefore, after switching to Undo1 and then switching back to Undo0,
all usgmt statuses of Undo1 will be changed to Offline, allowing them to be dropped.
- Enable hidden parameter to allow Undo TS to be taken Offline
SQL> alter system set _ENABLE_UNDO_TS_OFFLINE=Y;
- Take the unused Undo TS offline
SQL> alter tablespace undo1 offline;
- Drop the unused Undo TS
SQL> drop tablespace undo1 including contents and datafiles;
- Change to use Undo TS with the logic that assigns the existing usgmt id
SQL> alter system set _tx_bind_usgmt_id = 65535;
- Backup control file script
SQL> alter database backup controlfile to trace as 'cre_con.sql';
- Shutdown Tibero to recreate control file
$ tbdown
- Delete Redo information of unused thread in control file recreation script and recreate control file
$ tbboot nomount
$ tbsql sys/tibero
SQL> @cre_con.sql
$ tbdown
- Perform recovery in mount mode and restart
$ tbboot mount
$ alter database recover automatic;
$ tbdown
$ tbboot