TimesTen中配置只讀Cache Group to Oracle的基本步驟
1)軟體安裝
安裝TimesTen
安裝Oracle client[@more@]
一、準備工作
1)軟體安裝
安裝TimesTen
安裝Oracle client
2)在Oracle中建立一個讓TimesTen訪問的帳戶
SQL> conn /as sysdba;
已連線。
SQL> create user tt_toms identified by tt_toms;
使用者已建立。
SQL> grant connect,resource,create any trigger ,create session to tt_toms;
授權成功。
SQL>
3)create 一個dsn
我在這裡建立了一個system dsn,命名為tt_study
4)create 一個帳戶在dsn上
E:>ttisql tt_study
Copyright (c) 1996-2006, Oracle. All rights reserved.
Type or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "DSN=tt_study";
Connection successful: DSN=tt_study;UID=46192;DataStore=E:tt_dbdatatt_study;
DRIVER=C:WINDOWSsystem32ttdv60.dll;LogDir=e:tt_dbdatalog;PermSize=20;
(Default setting AutoCommit=1)
Command> create user tt_toms identified by 'tt_toms';
Command> grant ddl,admin to tt_toms;
Command> exit
Disconnecting...
Done.
5)修改DSN tt_study增加
User ID:tt_toms
Oracle ID:ora10
Oracle Password: tt_toms
儲存退出,重新用ttisql 訪問tt_study,你會發現:
E:>ttisql tt_study
Copyright (c) 1996-2006, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "DSN=tt_study";
Enter password for 'tt_toms':
Connection successful: DSN=tt_study;UID=tt_toms;DataStore=E:tt_dbdatatt_study
;DRIVER=C:WINDOWSsystem32ttdv60.dll;OracleId=ora10;LogDir=e:tt_dbdatalog;
PermSize=20;
(Default setting AutoCommit=1)
Command>
二、建立一個read only cache group
1)在Oracle上用tt_toms使用者建立一個測試用的表
SQL> conn
已連線。
SQL> create table tt_test (a int primary key);
表已建立。
SQL> insert into tt_test values(1);
已建立 1 行。
SQL> insert into tt_test values(2);
已建立 1 行。
SQL> commit;
提交完成。
SQL> select * from tt_test;
NO
----------
1
2
SQL>
2)建立一個cache group
E:>ttisql tt_study
Copyright (c) 1996-2006, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "DSN=tt_study";
Enter password for 'tt_toms':
Connection successful: DSN=tt_study;UID=tt_toms;DataStore=E:tt_dbdatatt_study
;DRIVER=C:WINDOWSsystem32ttdv60.dll;OracleId=ora10;LogDir=e:tt_dbdatalog;
PermSize=20;
(Default setting AutoCommit=1)
Command> call ttcacheuidpwdset('tt_toms','tt_toms');
Command> call ttcachestart();
Command> create readonly cache group tt_cache autorefresh interval 2 seconds from tt_test(a int primary key);
Command>
3)Load Cache Group
Command> load cache group tt_cache commit every 2 rows;
2 rows affected.
Command> select *from tt_test;
< 1 >
< 2 >
2 rows found.
Command> cachegroups;
Cache Group TT_TOMS.TT_CACHE:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: On
Autorefresh Interval: 2 Seconds
Autorefresh Limit: 10000
Root Table: TT_TOMS.TT_TEST
Table Type: Read Only
1 cache group found.
Command>
4)測試
在oracle上在插入一行資料
SQL> insert into tt_test values(3);
已建立 1 行。
SQL> commit;
提交完成。
SQL>
到TimesTen上驗證一下
Command> select *from tt_test;
< 1 >
< 2 >
< 3 >
3 rows found.
5)刪除Cache Group
drop cache group tt_cache;
6)stop cache group agent
call ttcachestop();
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9099175/viewspace-905063/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 2.2.3 關於配置Oracle-Home只讀模式Oracle模式
- 【教程】Debug 的基本步驟
- oracle的只讀事務Oracle
- Oracle 11g dataguard 配置簡約步驟Oracle
- 【BUILD_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(二)詳細配置步驟UIOracleASMFilter
- 【UPGRADE】升級到Oracle18c基本步驟參考(留存)Oracle
- 配置 Windows Terminal 步驟Windows
- 資料庫設計的基本步驟資料庫
- Oracle 18c - 配置只讀 OracleHome / DBCA / Patching / Upgrade (文件 ID 2469646.1)Oracle
- Oracle建立只讀使用者Oracle
- LINUX下ORACLE增量備份的步驟LinuxOracle
- oracle中distinct和group by的區別Oracle
- 手機app開發的基本流程步驟APP
- Mac OS 配置Maven步驟MacMaven
- Suse Linux 10中MySql安裝與配置步驟LinuxMySql
- MySQL 配置InnoDB為只讀操作MySql
- Oracle生成awr報告操作步驟Oracle
- Oracle資料庫啟動步驟Oracle資料庫
- 配置PLSQL Developer詳細步驟SQLDeveloper
- laravel 使用guzzlehttp/guzzle 配置步驟LaravelHTTP
- 機器學習操作基本步驟 - svpino機器學習
- realvnc linux,realvnc linux配置的8個步驟VNCLinux
- 網站建設製作網頁的基本步驟網站網頁
- 專案進度管理的基本步驟是什麼
- 乾貨分享:資料分析的6大基本步驟
- 解決Oracle死鎖問題步驟Oracle
- ogg 同步pg資料到oracle--步驟Oracle
- Oracle RAC叢集解除安裝步驟Oracle
- kubernetes-部署Oracle資料庫步驟Oracle資料庫
- Oracle Library cacheOracle
- ubuntu 配置拼音輸入法步驟Ubuntu
- Github配置ssh key詳細步驟Github
- 管理(006):啟用只讀Oracle Home目錄Oracle
- SAP可配置物料的建立過程及步驟
- hadoop的一些知識點 配置步驟Hadoop
- 如何配置web伺服器的詳細步驟Web伺服器
- 爬蟲 | 基本步驟和解析網頁的幾種方法爬蟲網頁
- 思邁特軟體Smartbi:資料探勘的基本步驟
- 小白福利篇,直播APP開發的6條基本步驟APP