TimesTen In-Memory Database Cache 配置整理
2012-11-27 10:24
323 查看
TimesTen In-Memory Database Cache 配置其实在在TimesTen Quick Start有详细说明,在这里用自已的语言整理总结一下,方便查阅。这里使用TimesTen 11.2.2在widnows平台下操作(http://www.cnblogs.com/mlog/)
一,oracle配置
(以:sqlplus sys@orcl as sysdba)
1,在oracle创建一个专用表空间用于管理缓存到timesten 的对象
create tablespace ttusers datafile 'ttusers.dbf' SIZE 40M;
2,创建timesten用户:运行initCacheGlobalSchema.sql脚本来创建用户
@D:\TimesTen\tt1122_32\oraclescripts\initCacheGlobalSchema.sql 'ttusers'
3,创建一个cache管理用户,这个用户负责追踪oracle database和cache database之间数据的改变
create user cacheadm identified by cacheadm
default tablespace ttusers
quota unlimited on ttusers
temporary tablespace temp;
4,授予系统管理权限给cache管理用户,即3,创建的cacheadm用户 运行grantCacheAdminPrivileges.sql即可
@D:\TimesTen\tt1122_32\oraclescripts\grantCacheAdminPrivileges.sql
5,授予数据访问权限给cache管理用户,即对表的select, insert, update, delete之类的权限
如:conn scott/tiger
grant select on scott.dept to cacheadm;
grant select,insert,update,delete on scott.emp to cacheadm;
grant select,insert,update,delete on scott.bonus to cacheadm;
二, TimesTen配置
1,创建一个DSN实例: OracleNetServiceName为oracle数据库实例名。DatabaseCharacterSet与oracle数据库一致。User ID:为与oracle一致的Cache Administration 用户(创建时先不写,等一下写)
ttisql;
connect my_ttdb;
2,创建一个Cache Manager 用户,授予admin或者cache_manager权限,此用户负责设置和管理cache grid 和cache group 操作,授与oracle配置3中用户名一致.
create user cacheadm identified by cacheadm;
grant admin to cacheadm;
3,创建Cache Table 用户,与oracle实际用户一致.
create user scott identified by scott;
grant create session to scott;
4,将oracle cache管理用户与timesten关联
call ttcacheuidpwdset ('cacheadm','cacheadm');
call ttcacheuidget;
5,创建一个cache grid.
call ttcacheuidpwdset ('cacheadm','cacheadm');
call ttcacheuidget;查看创建信息
6,将cache database 和cache grid关联
call ttgridnameset ('samplegrid');
三,添加缓存组到内存数据库
1,启动cache agent高速缓存代理,cache agent进程负责cache database之间的够沟通,同时也负责oracle database 到cache database之间的数据流。
connect XX;
call ttcachestart;
2, 根据需要创建CREATE CACHE GROUP,如:
create readonly cache group ro autorefresh
interval 5 seconds mode incremental
from scott.dept(
deptno number(2) not null primary key,
dname varchar2(14),
loc varchar2(13));
3,启动复制代理,如果数据库中有asynchronous writethrough cache groups就必须要启动这个agent,这个进程负责TT数据库之间,TT和oracle之间的数据复制。
call ttrepstart;
4,将高速缓存数据库高速缓存网格(只有当当前数据库包含global cache groups或者需要进行global cache grid操作时才需要这一步骤,注:windows不支持)
call ttgridattach(1,'my_ttdb','liyanwei',9991);
call ttgridnodestatus;//
5,使用LOAD CACHE GROUP语句来预加载数据。如下
load cache group RO commit every 1 rows;
完成!
靓点博客,在0与1之间的博客
一,oracle配置
(以:sqlplus sys@orcl as sysdba)
1,在oracle创建一个专用表空间用于管理缓存到timesten 的对象
create tablespace ttusers datafile 'ttusers.dbf' SIZE 40M;
2,创建timesten用户:运行initCacheGlobalSchema.sql脚本来创建用户
@D:\TimesTen\tt1122_32\oraclescripts\initCacheGlobalSchema.sql 'ttusers'
3,创建一个cache管理用户,这个用户负责追踪oracle database和cache database之间数据的改变
create user cacheadm identified by cacheadm
default tablespace ttusers
quota unlimited on ttusers
temporary tablespace temp;
4,授予系统管理权限给cache管理用户,即3,创建的cacheadm用户 运行grantCacheAdminPrivileges.sql即可
@D:\TimesTen\tt1122_32\oraclescripts\grantCacheAdminPrivileges.sql
5,授予数据访问权限给cache管理用户,即对表的select, insert, update, delete之类的权限
如:conn scott/tiger
grant select on scott.dept to cacheadm;
grant select,insert,update,delete on scott.emp to cacheadm;
grant select,insert,update,delete on scott.bonus to cacheadm;
二, TimesTen配置
1,创建一个DSN实例: OracleNetServiceName为oracle数据库实例名。DatabaseCharacterSet与oracle数据库一致。User ID:为与oracle一致的Cache Administration 用户(创建时先不写,等一下写)
ttisql;
connect my_ttdb;
2,创建一个Cache Manager 用户,授予admin或者cache_manager权限,此用户负责设置和管理cache grid 和cache group 操作,授与oracle配置3中用户名一致.
create user cacheadm identified by cacheadm;
grant admin to cacheadm;
3,创建Cache Table 用户,与oracle实际用户一致.
create user scott identified by scott;
grant create session to scott;
4,将oracle cache管理用户与timesten关联
call ttcacheuidpwdset ('cacheadm','cacheadm');
call ttcacheuidget;
5,创建一个cache grid.
call ttcacheuidpwdset ('cacheadm','cacheadm');
call ttcacheuidget;查看创建信息
6,将cache database 和cache grid关联
call ttgridnameset ('samplegrid');
三,添加缓存组到内存数据库
1,启动cache agent高速缓存代理,cache agent进程负责cache database之间的够沟通,同时也负责oracle database 到cache database之间的数据流。
connect XX;
call ttcachestart;
2, 根据需要创建CREATE CACHE GROUP,如:
create readonly cache group ro autorefresh
interval 5 seconds mode incremental
from scott.dept(
deptno number(2) not null primary key,
dname varchar2(14),
loc varchar2(13));
3,启动复制代理,如果数据库中有asynchronous writethrough cache groups就必须要启动这个agent,这个进程负责TT数据库之间,TT和oracle之间的数据复制。
call ttrepstart;
4,将高速缓存数据库高速缓存网格(只有当当前数据库包含global cache groups或者需要进行global cache grid操作时才需要这一步骤,注:windows不支持)
call ttgridattach(1,'my_ttdb','liyanwei',9991);
call ttgridnodestatus;//
5,使用LOAD CACHE GROUP语句来预加载数据。如下
load cache group RO commit every 1 rows;
完成!
靓点博客,在0与1之间的博客
相关文章推荐
- TimesTen In-Memory Database Cache 配置整理
- In-Memory Database Cache 入门配置
- Oracle In-Memory database cache --TimesTen
- 堆内内存(in heap cache/memory)还是堆外内存(off heap cache/memory)
- Using Oracle Database 11g Release 2 Result Cache in an Oracle RAC Environment
- database control服务配置错误整理
- 堆内内存(in heap cache/memory)还是堆外内存(off heap cache/memory)?
- 内存In-memory模型 缓存Cache
- How to programmatically clear the filesystem memory cache in C++ on a Linux system?
- Oracle In-Memory Database Cache 概述
- 133 You want to enable automatic PGA memory management in your database. Which setting is required t
- Oracle数据库案例整理-登录Oracle数据库失败-系统内存小于Oracle参数配置的memory_target值
- How-to: resolve spark streaming "Not enough space to cache input-0-* in memory! "
- 12.Which is the correct description of a pinned buffer in the database buffer cache?
- Nginx错误ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"解决方法
- C#系列之聊聊.Net Core的InMemoryCache
- Ehcache配置时出错- Another unnamed CacheManager already exists in the same VM. Please provide unique name
- Informix database oninit: Fatal error in shared memory creation
- How can a database be in-memory and durable at the same time?
- org.springframework.security.userdetails.memory.InMemoryDaoImpl安全配置