【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
1,在oracle里建表并分配权限
CREATE TABLE UADPT_TAC_OCT
(
TAC VARCHAR2(50) NOT NULL,
TERMINAL VARCHAR2(50),
BRAND VARCHAR2(50),
MODEL VARCHAR2(50),
CM_TYPE VARCHAR2(50),
CONSTRAINT PK_UADPT_TAC_OCT PRIMARY KEY (TAC)
)
2,在oracle里分配权限
GRANT SELECT ON UADPT_TAC_OCT TO cacheadmin;
GRANT INSERT ON UADPT_TAC_OCT TO cacheadmin;
GRANT UPDATE ON UADPT_TAC_OCT TO cacheadmin;
GRANT DELETE ON UADPT_TAC_OCT TO cacheadmin;
3,停止replication agent
ttAdmin -repStop
4,执行SQL
CREATE ASYNCHRONOUS WRITETHROUGH cache group cache_tac_oct
FROM UADPT_TAC_OCT
(
TAC VARCHAR2(50) NOT NULL,
TERMINAL VARCHAR2(50),
BRAND VARCHAR2(50),
MODEL VARCHAR2(50),
CM_TYPE VARCHAR2(50),
PRIMARY KEY (TAC));
5,启动replication agent
ttAdmin -repStart
6,常用的操作
1,启动TimesTen
ttdaemonadmin -stop
ttdaemonadmin -start
2,启动其它服务
ttadmin -query tt
ttadmin -repStart tt
ttadmin -repStop tt
ttadmin -cacheStart tt
ttadmin -cacheStop tt
3,command中操作
call ttcachestart
call ttcachestop
call ttrepstart
call ttrepstop
4,查询内存大小设置
dssize m;
5,加载数据到TimesTen中
load cache group cache_sms_config commit every 10 rows;
6,创建自刷新的只读cache表
create readonly cache group cache_cachename
autorefresh interval 5 seconds mode incremental
from a(id number not null primary key , name varchar2(20));
7,创建自刷新的cache表
create asynchronous writethrough cache group cachename
from b(id number not null primary key , name varchar2(20));
8,首次创建需要设置autorefresh state on
alter cache group cache_cachename set autorefresh state on;
7,维护命令
-- 因缓存表不能修改,只能删除重新建,建好后,执行第5条命令将数据加载进去
DROP CACHE GROUP cache_cachename;
来源:oschina
链接:https://my.oschina.net/u/96936/blog/550212