Timesten新增Cache Groups到 Cache Database
1.用cacheadmin使用者登入cache database,並啟動cache agent
[timesten@rhel132 ~]$ ttisql
Copyright (c) 1996-2011, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
Command> connect "dsn=ljg_tt1122;uid=cacheadm;pwd=cacheadm;oraclepwd=cacheadm";
Connection successful: DSN=ljg_tt1122;UID=cacheadm;DataStore=/home/timesten/TimesTen/tt1122/info/ljg;DatabaseCharacterSet=WE8MSWIN1252;ConnectionCharacterSet=US7ASCII;DRIVER=/home/timesten/TimesTen/tt1122/lib/libtten.so;LogDir=/home/timesten/TimesTen/tt1122/info/ljg/logs;PermSize=64;TempSize=32;TypeMode=0;OracleNetServiceName=orcl131;
(Default setting AutoCommit=1)
Command>
如果cache agent沒有啟動,則需要執行:
Command> call ttcachestart;
2.定義兩個cache group
按是否共享可以分為兩種cache groups,local cache group和global cache group, local cache group 不被其它cache grid其它成員共享,global cache group可以被cache grid的其它成員共享。
按是否updatable可以分為asynchronous writethrough和readonly兩種 。
按照文件,建立一個可讀寫的global和一個read only的cache group
Command> @/home/timesten/TimesTen/tt1122/quickstart/sample_scripts/cachegrid/create_global_awt.sql
create dynamic asynchronous writethrough global cache group g_awt from
hr.employees ( employee_id number (6) not null,
first_name varchar2(20),
last_name varchar2(25) not null,
email varchar2(25) not null,
phone_number varchar2(20),
hire_date date not null,
job_id varchar2(10) not null,
salary number (8,2),
commission_pct number (2,2),
manager_id number (6),
department_id number(4),
primary key (employee_id)),
hr.job_history (employee_id number(6) not null,
start_date date not null,
end_date date not null,
job_id varchar2(10) not null,
department_id number(4),
primary key (employee_id,start_date),
foreign key (employee_id)
references hr.employees (employee_id));
Command> @/home/timesten/TimesTen/tt1122/quickstart/sample_scripts/cachegrid/create_local_ro.sql
create readonly cache group ro
autorefresh
interval 5 seconds
mode incremental
from
hr.departments (
department_id number(4) not null primary key,
department_name varchar2(30) not null,
manager_id number(6),
location_id number(4));
Command>
透過cachegroups命令來驗證一下:
Command> cachegroups;
Cache Group CACHEADM.G_AWT:
Cache Group Type: Asynchronous Writethrough global (Dynamic)
Autorefresh: No
Aging: LRU on
Root Table: HR.EMPLOYEES
Table Type: Propagate
Child Table: HR.JOB_HISTORY
Table Type: Propagate
Cache Group CACHEADM.RO:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: Paused
Autorefresh Interval: 5 Seconds
Autorefresh Status: ok
Aging: No aging defined
Root Table: HR.DEPARTMENTS
Table Type: Read Only
2 cache groups found.
3.如果有asynchronous writethrough (AWT) cache groups,則需要開啟Replication agent。
Command> call ttrepstart;
4.如果有global的 cache groups,則需要執行ttgridattach 將此cache grid和cache database進行關聯。
call ttgridattach (1, 'cachedb1', 'tthost1', 9991);
Note: tthost1 is the host name of the machine where the database cachedb1_1122 is located. The TCP/IP port number 9991 is arbitrary, but it should not conflict with other TCP ports (e.g. ftp, telnet etc.), specifically the hostname + port combination should be unique.
我的例項需要執行:
Command> call ttgridattach (1,'cachdb1','rhel132',9991);
透過ttgridnodestatus來驗證
Command> call ttgridnodestatus;
< SAMPLEGRID, 1, 1, T, rhel132, SAMPLEGRID_cachdb1_1, 172.17.61.132, 9991,
1 row found.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271283/viewspace-1057742/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Timesten cache database的準備Database
- Oracle_TimesTen_and_In-Memory_Database_Cache_11g_Ed_1OracleDatabase
- Oracle database buffer cacheOracleDatabase
- Database Buffer Cache (79)Database
- Timesten匯入資料到Cache Group
- Organization of the Database Buffer Cache (80)Database
- Size of the Database Buffer Cache (82)Database
- database buffer cache之我見Database
- Timesten cache group aging 功能的實現
- prepare statement cache size influence databaseDatabase
- TimesTen中配置只讀Cache Group to Oracle的基本步驟Oracle
- Linux下TimesTen主備搭建、重建cache group、重建備機操作[TimesTen運維]Linux運維
- How To Size the Database Smart Flash Cache (Doc ID 1317950.1)Database
- page cache與buffer cache的關係
- Guava CacheGuava
- Service Worker Cache 和 HTTP Cache 的區別HTTP
- cache buffers chains vs cache buffers lru chainAI
- cache buffers chains and cache buffers lru chainsAI
- Oracle與TimesTen記憶體資料庫Cache Group同步效率與TimesTen主備資料同步機制研究Oracle記憶體資料庫
- MySQL:Table_open_cache_hits/Table_open_cache_misses/Table_open_cache_overflowsMySql
- How To Identify a Hot Block Within The Database Buffer Cache. [ID 163424.1]IDEBloCDatabase
- PWA(Progressive Web App)入門系列:Cache Storage & CacheWebAPP
- How to Match a Row Cache Object Child Latch to its Row CacheObject
- buffer cache實驗5-latch:cache buffers chainAI
- Library Cache Pin 及 Library Cache Lock分析
- library cache lock和library cache pin理解
- 【Cache】將常用的“小表”快取到Buffer Cache快取
- MySQL Query CacheMySql
- Buffer Cache 原理
- cache buffer chainAI
- torrent cache websiteWeb
- Spring CacheSpring
- Oracle11gr2新增表的RESULT CACHE屬性Oracle
- oracle library cache之library cache lock_library cache pin wait event釋義OracleAI
- Using Oracle Database 11g Release 2 Result Cache in an Oracle RAC EnvironmentOracleDatabase
- 手工建立ASM Disk Groups、為 ASM Disk Groups 新增 diskASM
- mybatis原始碼學習------cache-ref和cache的解析MyBatis原始碼
- Service Worker cache 相比 HTTP cache 的一些優點HTTP