Timesten Backup Recovery and timesten backup
TtIsql "DSN = ttwind; UID = cacheuser; PWD = cacheuser; OraclePWD = cacheuser ;"
-- 1. view the current version
Command> version
TimesTen Release 11.2.2.7.0
Command> cachegroups;
Cache Group CACHEUSER. CACHETBLORDERS:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: On
Autorefresh Interval: 10 Seconds
Autorefresh Status: OK
Aging: No aging defined
Root Table: SCOTT. TBLORDERS
Table Type: Read Only
Command> select count (*) from scott. tblorders;
& Lt; 111001 & gt;
-- 2. Disconnect all connections to TT
-- 3. Back up the database
Mkdir/backup
TtBackup-type fileFull-dir/backup-fname ttwindbk-force-connstr "DSN = ttwind"
-- 4. Delete cachegroup
TtIsql "DSN = ttwind; UID = cacheuser; PWD = cacheuser; OraclePWD = cacheuser ;"
Call ttcachestop;
DROP Cache Group cachetblorders;
Exit;
-- 5. Detach memory
TtDaemonAdmin-stop
Ttadmin-ramunload ttwind -- either
-- 6. Destroy the database
TtDestroy ttwind;
-- 7. delete original data
Rm-rf/app/timesten/TimesTen/ttwind/info/datastore/ttwind. ds *
Rm-rf/app/timesten/TimesTen/ttwind/info/datastore/ttwind. log *
Rm-rf/app/timesten/TimesTen/ttwind/info/datastore/ttwind. res **
-- 8. Restore data
TtDaemonAdmin-start
TtRestore-dir/backup-fname ttwindbk-noconn-connstr "DSN = ttwind"
/****** Common Errors
Error 12133: TT12133: Data store file already exists -- file "restore. c", lineno 1006, procedure "doRestore"
Error 12134: TT12134: Log file (s) already exist -- file "restore. c", lineno 1040, procedure "doRestore"
Solution:
Rm-rf/app/timesten/TimesTen/ttwind/info/datastore/ttwind. ds *
Rm-rf/app/timesten/TimesTen/ttwind/info/datastore/ttwind. log *
Rm-rf/app/timesten/TimesTen/ttwind/info/datastore/ttwind. res **
*********/
TtIsql "DSN = ttwind; UID = cacheuser; PWD = cacheuser; OraclePWD = cacheuser ;"
Call ttCacheStart;
--- 9. Verify the recovery result
Command> cachegroups;
Cache Group CACHEUSER. CACHETBLORDERS:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: On
Autorefresh Interval: 10 Seconds
Autorefresh Status: C
Aging: No aging defined
Root Table: SCOTT. TBLORDERS
Table Type: Read Only
1 cache group found.
Command> select count (*) from scott. tblorders;
& Lt; 111001 & gt;
1 row found.