Timesten cache database的準備

jolly10發表於2012-03-27
Timesten cache database的準備[@more@]

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部落格 ” ,連結:http://blog.itpub.net/271283/viewspace-1057741/,如需轉載,請註明出處,否則將追究法律責任。

相關文章