yangtingkun
===========================================================
配置AWT CACHE GROUP(一)
===========================================================

配置ASYNCHRONOUS WRITETHROUGH CACHE GROUP的过程很简单,这里除了描述配置的过程,还会讨论一下AWT CACHE GROUP的特点。


建立AWT的过程:

F:>ttisql test_cache

Copyright (c) 1996-2006, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.

connect "DSN=test_cache";
Connection successful: DSN=test_cache;UID=YANGTINGKUN;DataStore=F:timestenstor
eTEST_CACHETEST_CACHE;DRIVER=C:WINDOWSSystem32ttdv60.dll;OracleId=TEST1;Pe
rmSize=20;TempSize=20;
(Default setting AutoCommit=1)
Command> autocommit 0;
Command> call ttcacheuidpwdset('yangtingkun', 'abc');
Command> call ttcachestart();
Command> create asynchronous writethrough cache group testawt
> from t (id int primary key);
Command> select * from t;
0 rows found.
Command> commit;
Command> load cache group testawt commit every 30 rows;
8 rows affected.
Command> commit;
Command> select * from t;
< 1 >
< 2 >
< 3 >
< 4 >
< 5 >
< 7 >
< 6 >
< 8 >
8 rows found.

AWT CACHE GROUP和SWT CACHE GROUP的区别是:SWT会首先在Oracle中提交,然后进行本地修改。而对于AWT,会首先在TIMESTEN中提交,并在合适的时候将修改传播到Oracle数据库。

看下面的例子:

Command> insert into t values (10);
1 row inserted.
Command> commit;
Command> select * from t;
< 1 >
< 2 >
< 3 >
< 4 >
< 5 >
< 7 >
< 6 >
< 8 >
< 10 >
9 rows found.

修改已经在Timesten中完成,这个时候查询Oracle数据库:

SQL> CONN YANGTINGKUN/ABC@TEST1
已连接。
SQL> SELECT * FROM T;

ID NAME
---------- ------------------------------
1 YANGTK
2 ABC
3 AAA
4 C
5 D
7 ab
6
8 ab

已选择8行。

可见,修改还没有传播到Oracle中,等待一段时间后,再次查询结果仍然不变:

SQL> SELECT * FROM T;

ID NAME
---------- ------------------------------
1 YANGTK
2 ABC
3 AAA
4 C
5 D
7 ab
6
8 ab

已选择8行。

这是由于AWT不仅需要启动CACHE AGENT,还需要启动REPLICATION AGENT才能将修改传播到Oracle。

启动的REPLICATION AGENT的方法有两种,一种是通过命令行方式:

Command> host ttadmin -repstart test_cache
RAM Residence Policy : inUse
Replication Agent Policy : manual
Replication Manually Started : True
Cache Agent Policy : manual
Cache Agent Manually Started : True

另一种是通过调用过程的方式:

Command> call ttrepstop();
Command> call ttrepstart();

这个时候检查,发现修改已经传播到Oracle中了。

SQL> SELECT * FROM T;

ID NAME
---------- ------------------------------
1 YANGTK
2 ABC
3 AAA
4 C
5 D
7 ab
6
10
8 ab

已选择9行。

yangtingkun 发表于:2006.07.20 23:48 ::分类: ( TIMESTEN ) ::阅读:(897次) :: 评论 (3)
re: 配置AWT CACHE GROUP(一) [回复]

我在运行
Command> call ttrepstop();
Command> call ttrepstart();
这两个指令的时候,报错,错误信息如下:

*** [TimesTen][TimesTen 6.0.8 ODBC Driver][TimesTen]TT8191: This store (TT_FEE o
n SURGE-110) is not involved in a replication scheme -- file "eeProc.c", lineno
10012, procedure "RepAdmin()"
*** ODBC Error = S1000, TimesTen Error = 8191

楼主能帮忙解惑么?

履行人生 评论于: 2007.09.12 15:53
re: 配置AWT CACHE GROUP(一) [回复]

是不是要配置replicaition,那些英文的文档看不懂,要是有配置replication的步骤就好了

履行人生 评论于: 2007.09.12 16:12
re: 配置AWT CACHE GROUP(一) [回复]

安装这个文章进行配置也会失败?

建议你还是看看文档,太长时间不用,已经一点都想不起来了

yangtingkun 评论于: 2007.09.14 00:53

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)

 authimage


切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
Blog信息
网站链接...