您好,欢迎访问一九零五行业门户网

Oracle Timesten 7.0 内存数据库: (3)创建一个只读的CacheGroup

欢迎进入oracle社区论坛,与200万技术人员互动交流 >>进入 1. 先在sys.odbc.ini配置一个dsn ####################################################### [ttdemo] driver=/opt/timesten/tt70/lib/libtten.so datastore=/var/timesten/tmp/ttdemo databasechar
欢迎进入oracle社区论坛,与200万技术人员互动交流 >>进入
    1. 先在sys.odbc.ini配置一个dsn
#######################################################
[ttdemo]
driver=/opt/timesten/tt70/lib/libtten.so
datastore=/var/timesten/tmp/ttdemo
databasecharacterset=we8iso8859p1
tempsize=20
permsize=20
authenticate=0
uid=test
oracleid=shacola
oraclepwd=123456
logging=1
isolation=1
passthrough=0
locklevel=0
typemode=0
#######################################################
2 创建oracle测试表并准备数据
sqlplus test/123456
create table readtab (a number not null primary key, b varchar2(31));
insert into readtab values (1, 'hello');
insert into readtab values (2, 'world');
commit;
3. 创建 cache group
ttisql ttdemo
call ttcacheuidpwdset('test','123456');
call ttcachestart;
create readonly cache group readcache
autorefresh interval 5 seconds
from readtab
(a number not null primary key, b varchar2(31));
4. 装载数据
load cache group readcache commit every 256 rows;
select * from readtab;
5: 在源表里插入新的数据
sqlplus test/123456
insert into readtab values (3, 'hello');
insert into readtab values (4, 'again');
commit;
6. 检查cache是否刷新
    需要等待autorefresh interval 指定的时间,本例中是5秒
    7. 测试完毕, 打扫一下
drop cache group readcache;
call ttcachestop;
其它类似信息

推荐信息