构建一个有实用价值的TimesTen高可用系统_第1页
构建一个有实用价值的TimesTen高可用系统_第2页
构建一个有实用价值的TimesTen高可用系统_第3页
构建一个有实用价值的TimesTen高可用系统_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

构建一个有实用价值的 TimesTen 高可用系统下图是我们要实现的系统架构: 从上图可以看到,系统中有一个 Oracle DB 位于 TEST_ORCL 机器上,两个 TimesTen 的实例,分别位于 TEST_TT1 和 TEST_TT2 两台机器上。其中,表 T1 的更新操作在 oracle db 中,然后同步到 TimesTen 中,由 oracle db 来保证数据的安全性;而表 T2 的更新操作在 TimesTen 中,然后同步到 oracle db 里面,由两个 TimesTen 之间的复制来保证数据的安全性。 表 T1 和表 T2 的这种存储方式在实际生产环境中,是一种很典型的情况。 下面将分步骤详细描述如何安装配置这个系统: 一、 在 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=/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 的只读 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 中的数据,将跟随发生变化 六、 分别在 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 imdb 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. The 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 replication 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_orc

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论