---拷贝老版本的配置文件和tnsnames.ora
?
cp /backup/tnsnames.ora /data/app/timesten/TimesTen/ttwind/ cp /backup/sys.odbc.ini /data/app/timesten/TimesTen/ttwind/info/sys.odbc.ini mkdir -p /data/app/timesten/TimesTen/ttwind/info/datastore/ttwind chmod -R 770 /data/app/timesten/TimesTen/ttwind/info/datastore/ttwind
?
----使用管理员启动
ttIsql ttwind
?
?
---确定数据库里相关的用户权限是否存在
Command> select * from SYS.CACHE_GROUP; < CACHETBLORDERS , CACHEUSER , 3846792, 1798032, 906F1B0000000000, 0000000000000000, #, SCOTT.TBLORDERS#, #, ORCL\000\000\000\000, 0, 1, \000\000\000\000, I, Y, 0,, 10000, 0, 05010000, 383632303000000000000000000000000000000000000000000000000000000000000000000000, 88555\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0003801151501201532021515012015, 10000, 0, , , , , , 00000000 > 1 row found. Command> select * from sys.user$; < 0, SYS , 1, 0, , 2015-01-08 11:30:35.496049, , , 2825416, 0, 0, 0000, 00000000000000000000000000000000 > < 1, PUBLIC , 0, 0, , 2015-01-08 11:30:35.496049, , , 2825432, 0, 0, 0000, 00000000000000000000000000000000 > < 2, TTREP , 1, 0, , 2015-01-08 11:30:35.496049, , , 2825448, 0, 0, 0000, 00000000000000000000000000000000 > < 3, SYSTEM , 1, 0, , 2015-01-08 11:30:35.496049, , , 2825464, 0, 0, 0000, 00000000000000000000000000000000 > < 4, GRID , 1, 0, , 2015-01-08 11:30:35.496049, , , 2825480, 0, 0, 0000, 00000000000000000000000000000000 > < 10, OCPYANG , 1, 0, , 2015-01-08 11:30:35.496049, , , 2825496, 1, 0, 0000, 00000000000000000000000000000000 > < 11, CACHEUSER , 1, 0, $tten1$03e8$Hg2tjjsbKclse9mQNUe1WgVjkA6ztp0nl9lQBFdDR0JcGzhq, 2015-01-08 11:33:10.551269, , , 2825512, 0, 0, 0000, 00000000000000000000000000000000 > < 12, SCOTT , 1, 0, $tten1$03e8$nUihKq91gkCULnhgrkcmcTBcPa/HjbBnR3xrcAy96XZovf7n, 2015-01-08 11:33:29.371828, , , 2825528, 0, 0, 0000, 00000000000000000000000000000000 >
?
--8.恢复数据
ttDaemonAdmin -start rm -rf /data/app/timesten/TimesTen/ttwind/info/datastore/ttwind.ds* rm -rf /data/app/timesten/TimesTen/ttwind/info/datastore/ttwind.log* rm -rf /data/app/timesten/TimesTen/ttwind/info/datastore/ttwind.res** ttRestore -dir /backup -fname ttwindbk -noconn -connstr "DSN=ttwind" ttIsql "DSN=ttwind;UID=cacheuser;PWD=cacheuser;OraclePWD=cacheuser;" call ttCacheStart;
?
---9.验证恢复结果
$ ttversion TimesTen Release 11.2.2.8.2 (64 bit Linux/x86_64) (ttwind:53355) 2015-02-24T18:59:40Z Instance admin: ocpyang Instance home directory: /data/app/timesten/TimesTen/ttwind Group owner: ttadmin Daemon home directory: /data/app/timesten/TimesTen/ttwind/info PL/SQL enabled. Command> version TimesTen Release 11.2.2.8.2 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; < 111001 > 1 row found.
?