1.建立 Cache Table User
[timesten@rhel132 ~]$ ttisql
Command> connect ljg_tt1122;
Connection successful: DSN=ljg_tt1122;UID=timesten;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>
Command> create user cacheadm identified by cacheadm;
User created.
Command> grant admin to cacheadm;
2.由于要将hr的表cache到cache database中,cache database也需要建立相应的schema
Command> create user hr identified by hr;
User created.
Command> grant create session to hr;
3.将数据库的cacheadm用户和cache database的cacheadm用户进行关联
Command> connect "dsn=ljg_tt1122;uid=cacheadm;oraclepwd=cacheadm";
Enter password for '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)
con1: Command> call ttcacheuidpwdset ('cacheadm','cacheadm');
con1: Command> call ttcacheuidget;
< CACHEADM >
1 row found.
con1: Command>
4.建立cache grid,只是第一次需要这步,以后就不用了
con1: Command> call ttgridcreate ('samplegrid');
con1: Command> call ttgridinfo;
< SAMPLEGRID, CACHEADM, Linux Intel x86, 32-bit, 11, 2, 2 >
1 row found.
5.将cache grid和cache database进行关联
con1: Command> call ttgridnameset ('samplegrid');
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271283/viewspace-1057741/ ,如需转载,请注明出处,否则将追究法律责任。