参考:百度多个网站,成功将内存数据库配置成功了
1、安装 timesten完成 安装后 ,由于已经安装了oracle所以环境 变量发生变化,安装后,环境变量修改如下(timesten的环境变量放后面)
C:\TimesTen\TT1122~1\ttoracle_home\instantclient_11_2;
2、创建数据源
创建cxk_demo数据源
3、创建用户
>connect cxk_demo;
>create user cxk_demo identified by 'cxk_demo';
>grant all to cxk_demo;
------------------------------------------------
数据源配置 oracle的service_name以及timesten的uid
------------------------------------
4、 创建Readonly Cache Group
–设置cache administration user ID
Command> call ttCacheUidPwdSet('cxk_demo','cxk_demo');
command>call ttcacheuidget;
–启动cache agent
Command> call ttCacheStart;
----------------------------------------------------------------
5、oracle数据库需要创建用户
创建表空间
create tablespace timesten datafile'' size 50M;
--创建用户
@C:\TimesTen\tt1122_32\oraclescripts\initCacheGlobalSchema "timesten";
-------------------------------------------------------------
6、Command>call ttGridCreate('myGrid');
Command> call ttGridNameSet('myGrid');
create readonly cache group car_color_cg
autorefresh interval 5 seconds
from car_color
(CARCOLOR_CODE VARCHAR2(50) NOT NULL PRIMARY KEY,CARCOLOR_NAME VARCHAR2(50));
Command> cachegroups ;
Command> call ttcachestop;
Command> call ttcachestart;
Command>load cache group car_color_cg commit every 1 rows;
--是因为TNS_ADMIN参数设置的问题,在安装tt的时候没有设置tns_admin参数的值
--现在应该重新执行一下tt安装目录下bin目录中的 ttModinstall.bat 文件重新设置tns_admin的值位tnsnames.ora文件的正确位置.
7、--需要将oracle下的 listener.ora和tnsnames.ora 拷贝到指定的目录下