构建一个有实用价值的TimesTen高可用系统

上传人:壹****1 文档编号:490741191 上传时间:2023-03-01 格式:DOC 页数:4 大小:47.50KB
返回 下载 相关 举报
构建一个有实用价值的TimesTen高可用系统_第1页
第1页 / 共4页
构建一个有实用价值的TimesTen高可用系统_第2页
第2页 / 共4页
构建一个有实用价值的TimesTen高可用系统_第3页
第3页 / 共4页
构建一个有实用价值的TimesTen高可用系统_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《构建一个有实用价值的TimesTen高可用系统》由会员分享,可在线阅读,更多相关《构建一个有实用价值的TimesTen高可用系统(4页珍藏版)》请在金锄头文库上搜索。

1、精选优质文档-倾情为你奉上构建一个有实用价值的 TimesTen 高可用系统下图是我们要实现的系统架构: 从上图可以看到,系统中有一个 Oracle DB 位于 TEST_ORCL 机器上,两个 TimesTen 的实例,分别位于 TEST_TT1 和 TEST_TT2 两台机器上。其中,表 T1 的更新操作在 oracle db 中,然后同步到 TimesTen 中,由 oracle db 来保证数据的安全性;而表 T2 的更新操作在 TimesTen 中,然后同步到 oracle db 里面,由两个 TimesTen 之间的复制来保证数据的安全性。 表 T1 和表 T2 的这种存储方式在实

2、际生产环境中,是一种很典型的情况。 下面将分步骤详细描述如何安装配置这个系统: 一、 在 test_orcl 上安装 oracle ,建立实例 bossdb ,用户 tzos/tzos ;在 test_tt1 和 test_tt2 上安装 oracle 客户端和 TimesTen 内存数据库和 Cache Connect ,新建 TimesTen 的用户 tzos/tzos 。 二、 在 test_tt1 和 test_tt2 上面建立 TimesTen 实例,配置文件如下: imdb Driver=/home/tt/TimesTen/tt70/lib/libtten.so DataStore

3、=/home/tt/TimesTen/imdb DatabaseCharacterSet=ZHS16GBK Authenticate=0 PermSize=64 TempSize=16 UID=tzos OracleId=bossdb OraclePwd=tzos 三、 在 oracle 的 bossdb 里面,建立两个表: create table t1(id number(2) primary key); create table t2(id number(2) primary key); 四、 分别在 test_tt1 和 test_tt2 上为表 T1 建立一个名为 cache_1 的

4、只读 Cache Group Commandcall ttCacheUidPwdSet(tzos,tzos); Commandcall ttCacheStart; CommandCREATE READONLY CACHE GROUP cache_1 AUTOREFRESH State ON MODE INCREMENTAL INTERVAL 5 SECONDS FROM t1(id number(2) primary key,PROPAGATE); 五、 测试 cache_1 ,在 oracl 的 bossdb 中往 t1 中 insert 记录,在两个内存数据库中查看 t1 中的数据,将跟随

5、发生变化 六、 分别在 test_tt1 和 test_tt2 上为表 T2 建议一个名为 cache_2 的 write through 的 Cache Group Command create asynchronous writethrough cache group cache_2 from tzos.t2(id number(2) primary key); 七、 在 test_tt1 和 test_tt2 上分别建立 replication schema CommandCREATE REPLICATION reptest ELEMENT e_1 TABLE t2 MASTER imd

6、b on test_tt1 SUBSCRIBER imdb on test_tt2 ELEMENT e_2 TABLE t2 MASTER imdb on test_tt2 SUBSCRIBER imdb on test_tt1 ; Command call ttrepstart; 在两个数据库上都运行,说明两个数据库互为 Master 和 Subscriber These are the roles of the data stores in a replication scheme: Master: Applications update the master data store. Th

7、e master sends the updates to the propagator or to the subscribers directly. Propagator: The propagator data store receives updates from the master data store and sends them to subscriber data stores. Subscriber: Subscribers receive updates from the propagator or the master.Before you define the rep

8、lication scheme, you need to define the DSNs for the data stores in the replication scheme. On Linux or UNIX, create an odbc.ini file. On Windows, use the ODBC Administrator to name the data stores and set data store attributes.八、 测试如下: 1、 在 test_tt1 中往 t2 中 insert 数据, test_tt2 和 test_orcl 的表中都能复制过来数据; 2、 在 test_tt2 中往 t2 中 insert 数据, test_tt1 和 test_orcl 的表中都能复制过来数据; 3、 停掉 test_tt2 的 timesten ,往 test_tt1 中的 t2 添加数据, test_orcl 中能复制到数据;再把 test_tt2 的 timesten 起来,刚才的数据也能复制过来。反之亦然。 专心-专注-专业

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 教学/培训

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号