TimesTen memory fragmentation (high water level) recovery steps
Memory is the most important resource in the TimesTen memory database, just like the Oracle database we are familiar with has only one System tablespace; unfortunately, the memory resources of TimesTen are not only similar to Oracle databases with only one System tablespace, but also a tablespace that does not support online resizing and cannot be automatically expanded. The expansion of TimesTen is very simple. You only need to modify sys. odbc. the PermSize parameter in ini can be reloaded, but after all, memory resources are limited. In actual O & M, we often need to recycle memory fragments to reclaim the memory, similar to Oracle's memory fragmentation recovery for table space, but because TimesTen's memory fragmentation recovery is not as intelligent as Oracle's high-level recovery for table space, to help children's shoes in need, share the memory fragmentation Recovery Method in the actual O & M.
1. migrate and recreate the master node to recycle memory fragments from the master node
L use the ttMigrate tool provided by the TT memory library to migrate the slave node memory library
1. Stop the slave application and other processes.
A) Check the application process
Ps-fu timesten # all processes except the TT database process are stopped
B) Check other processes on the slave Node
Ttstatus
C) Stop the TTSERVER process on the slave node.
Ttdaemonadmin-stopserver # Check whether multiple DSN addresses exist.
D) check whether all the checkpoint processes on the master and slave nodes are completed.
Call ttckpthistory
Stop the master-slave node replication process:
Ttadmin-repstop $ DSN
2. Use the ttMigrate tool to migrate the backup node Memory Database
TtMigrate-c $ DSN/ttbackup/m $ DSNstandby. dat
L Delete the DSN of the standby Node
1. Backup the TT memory library object creation script
TtSchema $ DSN
2. unload slave node DSN
Call ttckpt; # Do the checkpoint twice before unload
Call ttckpt;
Ttadmin-ramunload $ DSN
3. Delete the backup node DS
Ttdestroy $ DSN
4. Stop daemon and check the memory segment release
Ttdaemonadmin-stop # stop daemon here. Check whether multiple DSN addresses exist.
Ipcs-map | grep timesten
Ps-fu timesten
Topas
L use the previously migrated backup file to reconstruct the DS Node
1. Use ttisql to pull the instance
Ttdaemonadmin-start
Ttisql $ DSN # determine whether the autocreate parameter is equal to 1
Command> host ttadmin-rampolicy manual $ DSN
2. Use the management account to back up the previously migrated backup nodes.
TtMigrate-r-connstr "dsn = $ DSN; uid = timesten"/ttbackup/m $ DSNstandby. dat
3. Start the master-slave node replication process and check the master-slave Replication
Master node:
Ttadmin-repstart $ DSN
Call ttrepstatget;
Call ttlogholds; # The purpose here is to check whether long transactions occur on the master node, causing the master and slave nodes not to be synchronized.
Slave node:
Ttadmin-repstart $ DSN
Command> call ttRepStateGet;
<STANDBY, no grid>
1 row found.
4. Check whether the memory fragments are released and whether the master-slave replication is normal.
Slave node:
Command> dssize m;
Command> call ttblockinfo;
Ttadmin-noautoreload $ DSN # disable auto loading
Ttstatus-debug | grep-I auto
Master node:
Call ttbookmark;
Ttstatus
Check the tterror. log of the master and slave nodes.
2. Master-slave switchover, migration and Reconstruction of the master node memory library
Check whether the master node memory library is normal and whether the replication process is normal.
Check whether the master-slave synchronization is normal
1. Stop the replication process on the master and slave nodes.
Stop the master-slave node replication process:
Ttadmin-repstop $ DSN
L Delete the new standby node DSN
1. Backup Node object creation script
TtSchema $ DSN
2. unload the standby node DSN.
Call ttckpt; # Do the checkpoint twice before unload
Call ttckpt;
Ttadmin-ramunload $ DSN
3. Delete the backup node DS
Ttdestroy $ DSN
4. Stop daemon and check the memory segment release
Ttdaemonadmin-stop # stop daemon here. Check whether multiple DSN addresses exist.
Ipcs-map | grep timesten
Ps-fu timesten
Topas
L use the re-built slave script to directly re-build the slave (new slave node)
1. Use the re-built backup script to re-build the backup
Refer to rebuilding backup server operations
2. Start the replication process for the new slave Node
Ttadmin-repstart $ DSN
Command> call ttRepStateGet;
<STANDBY, no grid>
1 row found.
3. Check whether the high water level is released and whether the new master-slave replication is normal.
New Slave node:
Command> dssize m;
Command> call ttblockinfo;
Ttadmin-noautoreload $ DSN ##
Ttstatus-debug | grep-I auto
New master node:
Call ttbookmark;
Ttstatus
Check the tterror. log of the master and slave nodes.
4. The high water level recovery of the new slave node has been completed. Start and check whether the service is running properly.
So far, the recovery of memory fragments on the master and slave nodes has been completed.
Note:
1. If the slave node IDLE occurs during the implementation of the slave node memory fragment recovery operation, you can check whether the master node has a long transaction. If there is a long transaction, process the long transaction first.
2. If any exceptions occur during the implementation process, the Standby server should be reactivated in an emergency manner.
3. In version 11.2.1.x, The Master/Slave Mode cannot be enabled after memory fragment is recycled. We recommend that you check whether the master/slave mode can be enabled before memory fragment recovery.