Setup Cache Connect Step by Step on Solaris
来源:互联网 发布:淘宝内衣试穿视频 编辑:程序博客网 时间:2024/06/07 06:18
1. Install TimesTen with Cache Connect option and access control.
2. Install Oracle10g Client.
3. Setup environment variable.
$ cd /export/home/timesten
$ vi .profile
ORACLE_HOME=/disk01/app/oracle/products/10.2.0
TT_HOME=/opt/TimesTen/tt60
PATH=$PATH:$ORACLE_HOME/bin:$TT_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$TT_HOME/lib
SHLIB_PATH=$SHLIB_PATH:$ORACLE_HOME/lib:$TT_HOME/lib
export ORACLE_HOME TT_HOME PATH LD_LIBRARY_PATH SHLIB_PATH
4. Need to create a soft link for the oracle LIBRARY file to solve 5192 error message.
# su - oracle
$cd $ORACLE_HOME/lib
$ln -s libclntsh.so.10.1 libclntsh.so
5. Setup Oracle client connection string to connect to oracle server.
$ cd $ORACLE_HOME/network/admin
$ more tnsnames.ora
MSP = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sc-msplsnr)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME = MSP)
)
6. Create required oracle accounts.
$ sqlplus sys/change_on_install@MSP as sysdba
SQL>CREATE USER test IDENTIFIED BY test;
SQL>GRANT connect, resource, create any trigger to test;
SQL>COMMIT;
SQL>CREATE USER test IDENTIFIED BY test;
SQL>GRANT connect, resource, create any trigger to test;
SQL>COMMIT;
7. Create an account on TimesTen by connecting to TimesTen using the TT_tt60 DSN.
# su - timesten
$ ttisql TT_tt60
$ CREATE USER test IDENTIFIED BY 'test';
$ GRANT ADMIN, DDL TO test;
$ ttisql TT_tt60
$ CREATE USER test IDENTIFIED BY 'test';
$ GRANT ADMIN, DDL TO test;
8. Create a TimesTen DSN named tt_study.
$ vi /opt/TimesTen/tt60/info/sys.odbc.ini
tt_study=TimesTen 6.0 Driver
tt_study=TimesTen 6.0 Driver
……………………………………….
[tt_study]
[tt_study]
DataStore=/var/TimesTen/tt_study/tt_study
PermSize=20
TempSize=20
OracleID=msp (oracle client connection string name)
OraclePWD=test (oracle account password)
UID=test (oracle and timesten account name)
PWD=test (timesten account password)
9. Create an Oracle table.
$ sqlplus test/test@msp
SQL> create table tt_test (a int primary key);
$ sqlplus test/test@msp
SQL> create table tt_test (a int primary key);
SQL> insert into tt_test values(1);
SQL> insert into tt_test values(2);
SQL>COMMIT;
SQL>COMMIT;
10. Create the cache group.
$ ttisql tt_study
Command> call ttCacheUidPwdSet('test','test');
Command> call ttCacheStart();
Command> create readonly cache group tt_cache autorefresh interval 2 seconds from tt_test(a int primary key);
11. Load the cache group.
Command> load cache group tt_cache commit every 2 rows;
Command> cachegroups;
Cache Group TEST.TT_CACHE:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: On
Autorefresh Interval: 2 Seconds
Autorefresh Limit: 10000
Root Table: TEST.TT_TEST
Table Type: Read Only
1 cache group found.
12. Check the result and the result should be 2 records.
Command> select * from tt_test;
< 1 >
< 2 >
2 rows found.
13. Insert one more record from database and check the result from TimesTen, the result should be 3 recourd.
$ sqlplus test/test@msp
SQL> insert into tt_test values(3);
SQL> commit;
$ ttisql tt_study
Command> select *from tt_test;
< 1 >
< 2 >
< 3 >
3 rows found.
- Setup Cache Connect Step by Step on Solaris
- MOSS Single Sign On Setup Step-By-Step
- Informix Setup Step by Step
- 在solaris安装Mongo step by step
- Android Beginners: NDK Setup Step by Step
- Android Beginners: NDK Setup Step by Step
- Install Oracle on RHEL5 - step by step
- Solaris 10 学习笔记step by step(一)
- Step by step tutorial to setup a JBoss Seam application
- Setup IP PBX for small business step by step
- Apache Cassandra Learning Step by Step (1): Setup to play
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- step by step to build website project architecture2(pages cache)
- NHibernate Step by Step
- OGRE step by step
- step by step
- MinGW Step by Step
- 请记住以及与他人分享你“失败”的经历!
- TimesTen6.0 for Solaris installation manual
- Internet Explorer 1 hour page refresh
- Win32 SDK注册表操作——RegCloseKey
- pl/sql developer 中文字段显示乱码问题
- Setup Cache Connect Step by Step on Solaris
- 在jsf中引用资源信息
- 讲P2P基础知识的文章
- Oracle PL/Sql循序渐进全面学习教程
- Peering into Video's Future
- 如何用vb将值写入注册表
- 转贴:关于双缓冲绘图(1)
- 恶意代码的亲密接触之病毒编程技术
- zoundry 测试