rhel6u2 x86_x64安裝TimesTen 112230

公司最近有新項目需要步署TimesTen, 在查看相關文檔後,現將安裝步驟記錄一下,方便以後參考:


1、查看操作系統版本:

[TimesTen@tt ~]$ getconf LONG_BIT
64
[TimesTen@tt ~]$ lsb_release  -a
LSB Version:    :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 6.2 (Santiago)
Release:        6.2
Codename:       Santiago
[TimesTen@tt ~]$ uname -a
Linux tt 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

2、配置系統參數
[root@tt ~]# vim /etc/sysctl.conf
/*使用root用戶將以下參數添加到最後面,重複的前面加#號註釋*/
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
fs.file-max = 6815744
kernel.sem = 400 32000 100 128
net.ipv4.tcp_rmem = 4096 4194304 4194304
net.ipv4.tcp_wmem = 98304 4194304 4194304
net.ipv4.tcp_mem = 98304 4194304 4194304
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 4194304
net.ipv4.tcp_window_scaling = 1
net.ipv4.ip_local_port_range = 9000 65500

/*添加後執行 “sysctl -p” 讓參數生效*/

3、修改hosts文件

[root@tt ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.2.252  tt


4、 添加目錄、用戶、組並修改組和權限

[root@tt ~]#groupadd -g 700 ttadmin
[root@tt ~]#useradd -u 502  TimesTen -g ttadmin
[root@tt ~]#passwd TimesTen
[root@tt ~]#usermod -G sys TimesTen
[root@tt ~]#mkdir /etc/TimesTen
[root@tt ~]#chgrp -R ttadmin /etc/TimesTen
[root@tt ~]#chmod 770 /etc/TimesTen/

5、配置用戶環境
[TimesTen@timesten ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=/u01/oracle/TimesTen/product/11.2.0/client_2
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/home/TimesTen/test/bin
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export TIMESTEN=/home/TimesTen/test
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$TIMESTEN/lib:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
. /home/TimesTen/test/bin/ttenv.sh &> /dev/null
export TNS_ADMIN=/u01/oracle/TimesTen/product/11.2.0/client_2/network/admin

 

6、解壓縮安裝包
[TimesTen@tt ~]$ ll
總用量 314016
-rw-r--r-- 1 TimesTen ttadmin 321547460  9月  7 22:58 timesten112230.linux8664.tar.gz
[TimesTen@tt ~]$ tar -zxvf timesten112230.linux8664.tar.gz
linux8664/
linux8664/install.pl
linux8664/uninst.sh
linux8664/setup.sh
linux8664/doc/
linux8664/doc/doc.zip
linux8664/3rdparty/
linux8664/3rdparty/jms-1_1-fr-apidocs.tar.bz2
linux8664/3rdparty/ant-1.6.2-bin.tar.bz2
linux8664/LINUX8664/
linux8664/LINUX8664/ttclient.tar.bz2
linux8664/LINUX8664/bzip2
linux8664/LINUX8664/unzip
linux8664/LINUX8664/timesten.tar.bz2
linux8664/LINUX8664/common.tar.bz2
linux8664/LINUX8664/ttserver.tar.bz2
linux8664/LINUX8664/ttpatchinst
linux8664/LINUX8664/manifest
linux8664/LINUX8664/perl
linux8664/README.html

[TimesTen@tt ~]$ ll
總用量 314020
drwxr-xr-x 5 TimesTen ttadmin      4096  5月 26 02:44 linux8664
-rw-r--r-- 1 TimesTen ttadmin 321547460  9月  7 22:58 timesten112230.linux8664.tar.gz
[TimesTen@tt ~]$ cd linux8664/
[TimesTen@tt linux8664]$ ll
總用量 384
drwxr-xr-x 2 TimesTen ttadmin   4096  5月 26 02:44 3rdparty
drwxr-xr-x 2 TimesTen ttadmin   4096  5月 26 02:44 doc
-rwxr-xr-x 1 TimesTen ttadmin 242206  5月 26 02:42 install.pl
drwxr-xr-x 2 TimesTen ttadmin   4096  5月 26 02:44 LINUX8664
-rwxr--r-- 1 TimesTen ttadmin  86759  5月 26 02:42 README.html
-rwxr-xr-x 1 TimesTen ttadmin   5623  5月 26 02:42 setup.sh
-rwxr-xr-x 1 TimesTen ttadmin  34343  5月 26 02:42 uninst.sh


7、安裝TimesTen 112230.linux8664
[TimesTen@tt linux8664]$ ./setup.sh

NOTE: Each TimesTen installation is identified by a unique instance name.
      The instance name must be a non-null alphanumeric string, not longer
      than 255 characters.

Please choose an instance name for this installation? [ tt1122 ] test  /* 輸入實例名,默認爲tt1122 */
Instance name will be 'test'.
Is this correct? [ yes ] yes

Of the three components:

  [1] Client/Server and Data Manager
  [2] Data Manager Only
  [3] Client Only
 
Which would you like to install? [ 1 ] 1        /* 選擇安裝的組件*/

Of the following options :

  [1] /home/TimesTen
  [2] /home/TimesTen
  [3] Specify a location
  [q] Quit the installation

Where would you like to install the test instance of TimesTen? [ 1 ] 1       /* 指定安裝實例路徑*/
Where would you like to create the daemon home directory? [ /home/TimesTen/test/info ]    
/* 按回車,指定守護進程安裝目錄*/

The daemon logs will be located in /home/TimesTen/test/info
Would you like to specify a different location for the daemon logs? [ no ] no /* 輸入no,不指定守護進程不同的安裝目錄*/
Installing into /home/TimesTen/test ...
Uncompressing ...

NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
      daemon port number must be the same across all TimesTen installations
      managed within the same Oracle Clusterware cluster.

NOTE: All installations that replicate to each other must use the same daemon
      port number that is set at installation time. The daemon port number can
      be verified by running 'ttVersion'.

The default port number is 53396.

Do you want to use the default port number for the TimesTen daemon? [ yes ] yes
/* 是否使用默認TimesTen 進程端口*/
The daemon will run on the default port number (53396).

NOTE: For security, we recommend that you restrict access to the
      TimesTen installation to members of a single OS group. Only members of
      that OS group will be allowed to perform direct mode connections to
      TimesTen, and only members of that OS group will be allowed to perform
      operations that access TimesTen data stores, TimesTen files and shared
      memory. The OS group defaults to the primary group of the instance
      administrator. You can default to this group, choose another OS group
      or you can make this instance world-accessible. If you choose to make
      this instance world-accessible, all database files and shared memory
      are readable and writable by all users.

Restrict access to the the TimesTen installation to the group 'ttadmin'? [ yes ] yes
 /* 是否限制只有ttadmin組可以訪問TimesTen*/

NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries.

Would you like to enable PL/SQL for this instance? [ yes ] yes
/* 是否啓用pl/sql在這個實例 */

In order to use the 'In-Memory Database Cache' feature in any databases
created within this installation, you must set a value for the TNS_ADMIN
environment variable. It can be left blank, and a value can be supplied later
using <install_dir>/bin/ttModInstall.

Please enter a value for TNS_ADMIN (s=skip)? [  ] $ORACLE_HOME/network/admin/
/* 原因還沒有安裝oracle客戶端,所以會提示不能讀取這個目錄*/
$ORACLE_HOME/network/admin is not a readable directory, use it anyway ? [ no ] no
Please enter a value for TNS_ADMIN (s=skip)? [  ] s
/* 輸入 's' 跳過這步*/


NOTE: It appears that you are running version 4 or higher of the g++
      compiler. TimesTen ships with multiple sets of client libraries and server
      binaries : one built for compatibility with g++ 3.4.6 and one with
      g++ 4.1.0. The installer has created links to the 4.1.0 library in the
      <install_dir>/lib directory and to the 4.1.0 server binary in the
      <install_dir>/bin directory. If you want to use a different compiler,
      please modify the links to point to the desired library and server binary.

Installing server components ...
Do you want to install QuickStart and the TimesTen Documentation? [ no ] yes
Where would you like to install the quickstart and doc directories (s=skip)? [ /home/TimesTen/test ]
/* 輸入 ‘回車’ 下一步*/

The TimesTen Quickstart applications can take up to 64 Mbytes of disk space.
Depending on how your system is configured, you may not want to create the
QuickStart DemoDataStore directory in the default location,
/home/TimesTen/test/info/DemoDataStore

Where would you like to create the DemoDataStore directory? [ /home/TimesTen/test/info ]  /* 輸入 ‘回車’ 下一步*/
Creating /home/TimesTen/test/info/DemoDataStore ...

Installing client components ...

Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] no /* 是否使用集羣套件*/

NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.

Run the 'setuproot' script :
        cd /home/TimesTen/test/bin
        ./setuproot -install
This will move the TimesTen startup script into its appropriate location.

The startup script is currently located here :
  '/home/TimesTen/test/startup/tt_test'.

The Quickstart home page can be accessed here :
  '/home/TimesTen/test/quickstart/index.html'

The 11.2.2.3 Release Notes are located here :
  '/home/TimesTen/test/README.html'

Starting the daemon ...
TimesTen Daemon startup OK.  /* 到這步,TimesTen安裝完成*/
End of TimesTen installation.

[TimesTen@tt linux8664]$ cd /home/TimesTen/test/bin
[TimesTen@tt bin]$ ls  ttenv*.*
ttenv.csh  ttenv.sh
[TimesTen@tt bin]$ . ttenv.sh  /* 執行TimesTen的環境變量*/


LD_LIBRARY_PATH set to /home/TimesTen/test/lib:/home/TimesTen/test/ttoracle_home/instantclient_11_2:/home/TimesTen/tt1122/lib:/u01/app/TimesTen/product/11.2.0/client_2/lib:/u01/app/TimesTen/product/11.2.0/client_2/network/lib

ANT_HOME set to /home/TimesTen/test/3rdparty/ant

PATH set to /home/TimesTen/test/bin:/home/TimesTen/test/quickstart/sample_code/oci:/home/TimesTen/test/quickstart/sample_code/odbc:/home/TimesTen/test/quickstart/sample_code/odbc/xla:/home/TimesTen/test/quickstart/sample_code/jdbc:/home/TimesTen/test/quickstart/sample_code/odbc_drivermgr:/home/TimesTen/test/quickstart/sample_code/proc:/home/TimesTen/test/quickstart/sample_code/ttclasses:/home/TimesTen/test/quickstart/sample_code/ttclasses/xla:/home/TimesTen/test/ttoracle_home/instantclient_11_2:/home/TimesTen/test/ttoracle_home/instantclient_11_2/sdk:/home/TimesTen/test/3rdparty/ant/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/TimesTen/bin:/u01/app/TimesTen/product/11.2.0/client_2/bin:/home/TimesTen/tt1122/bin

CLASSPATH set to /home/TimesTen/test/lib/ttjdbc5.jar:/home/TimesTen/test/lib/orai18n.jar:/home/TimesTen/test/lib/timestenjmsxla.jar:/home/TimesTen/test/3rdparty/jms1.1/lib/jms.jar:.

[TimesTen@tt info]$ ttstatus
TimesTen status report as of Wed Sep 26 10:06:05 2012

Daemon pid 20167 port 53396 instance test
TimesTen server pid 20176 started on port 53397
------------------------------------------------------------------------
Accessible by group ttadmin
End of report
[TimesTen@tt info]$ ttversion
TimesTen Release 11.2.2.3.0 (64 bit Linux/x86_64) (test:53396) 2012-05-24T09:20:08Z
  Instance admin: TimesTen
  Instance home directory: /home/TimesTen/test
  Group owner: ttadmin
  Daemon home directory: /home/TimesTen/test/info
  PL/SQL enabled.
 
8、自啓動腳本
[TimesTen@tt bin]$ ./setuproot -install 
Sorry, you must be root to install the TimesTen daemon start script ...
[TimesTen@tt bin]$ su
密碼:
[root@tt bin]# cd /home/TimesTen/test/bin
[root@tt bin]# ./setuproot -install  /* 設置開機自動啓動TimesTen,需要使用root用戶執行*/
Would you like to install the TimesTen daemon startup scripts into /etc/init.d? [ yes ] yes
Copying /home/TimesTen/test/startup/tt_test to /etc/init.d

Successfully installed the following scripts :
/etc/init.d/tt_test
/etc/rc.d/rc0.d/K45tt_test
/etc/rc.d/rc1.d/K45tt_test
/etc/rc.d/rc2.d/S90tt_test
/etc/rc.d/rc3.d/S90tt_test
/etc/rc.d/rc5.d/S90tt_test
/etc/rc.d/rc6.d/K45tt_test


9、命令啓動|停止
[root@tt ]#  su - tt
[TimesTen@tt ]$ ps -ef | grep timesten
[TimesTen@tt ]$ ttstatus
[TimesTen@tt ]$ ttdaemonadmin -stop
[TimesTen@tt ]$ ttdaemonadmin -start


10、創建數據源
[TimesTen@tt info]$ pwd
/home/TimesTen/test/info
[TimesTen@tt info ]$ vim sys.odbc.ini
test=TimesTen 11.2.2 Driver   /*在‘[ODBC Data Sources]’下面添加實例驅動*/

# New data source definitions can be added below.
[test]                   /*添加數據庫,下面的目錄沒有創建需先創建並授權給TimesTen用戶和ttadmin組*/
Driver=/home/TimesTen/test/lib/libtten.so /*數據庫庫文件路徑,固定路徑*/
DataStore=/u02/ttdata/datastores/test  /*檢查點映像文件存儲路徑*/
logDir=/u03/ttdata/logs     /*日誌文件和保留文件存儲路徑*/
PermSize=800                /*永久的內存空間大小,單位MB*/
TempSize=640                   /*臨時的內存空間大小*/
DatabaseCharacterSet=ZHS16GBK  /*需要根據ORACLE數據庫的字符集確定*/
OracleNetServiceName=test   /*定義連接到ORACLE的TNS名稱*/

 

SQL> select * from v$nls_parameters where PARAMETER='NLS_CHARACTERSET';
/*在oracle裏面查看數據庫是什麼字符集*/

 

11、登錄TimesTen
[TimesTen@tt ~]$ ttisql test

Copyright (c) 1996-2011, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.

 

connect "DSN=test";
Connection successful: DSN=test;UID=TimesTen;DataStore=/u02/ttdata/datastores/test;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=US7ASCII;DRIVER=/home/TimesTen/test/lib/libtten.so;LogDir=/u03/ttdata/logs;PermSize=800;TempSize=640;TypeMode=0;
(Default setting AutoCommit=1)
Command> dssize         /*查看內存使用情況,可以使用help查看幫助*/

  PERM_ALLOCATED_SIZE:      819200
  PERM_IN_USE_SIZE:         8913
  PERM_IN_USE_HIGH_WATER:   8934
  TEMP_ALLOCATED_SIZE:      655360
  TEMP_IN_USE_SIZE:         10981
  TEMP_IN_USE_HIGH_WATER:   13196

Command> host ttstatus   /*查看TimesTen狀態信息*/
TimesTen status report as of Wed Sep 26 10:20:54 2012

Daemon pid 23321 port 53396 instance test
TimesTen server pid 23330 started on port 53397
------------------------------------------------------------------------
Data store /u02/ttdata/datastores/test
There are 12 connections to the data store
Shared Memory KEY 0x020312f8 ID 786451
PL/SQL Memory KEY 0x030312f8 ID 819220 Address 0x7fa0000000
Type            PID     Context             Connection Name              ConnID
Process         23375   0x0000000000afd660  test                           1
Subdaemon       23327   0x00000000006f2c30  Manager                         292
Subdaemon       23327   0x0000000000749360  Rollback                        291
Subdaemon       23327   0x000000000079dbc0  Deadlock Detector               284
Subdaemon       23327   0x00007f1c240008c0  HistGC                          286
Subdaemon       23327   0x00007f1c2406d6b0  Flusher                         282
Subdaemon       23327   0x00007f1c280008c0  IndexGC                         285
Subdaemon       23327   0x00007f1c28054ff0  Monitor                         283
Subdaemon       23327   0x00007f1c2c0008c0  Log Marker                      288
Subdaemon       23327   0x00007f1c300008c0  AsyncMV                         287
Subdaemon       23327   0x00007f1c340008c0  Aging                           289
Subdaemon       23327   0x00007f1c9c0008c0  Checkpoint                      290
Replication policy  : Manual
Cache Agent policy  : Manual
PL/SQL enabled.
------------------------------------------------------------------------
Accessible by group ttadmin
End of report


12、創建用戶並授權用戶
Command> create user john identified by john;
User created.
Command> grant create session,create table to john;

13、使用創建的用戶登錄數據庫
Command> connect "dsn=test;uid=john"
       > ;
Enter password for 'john':
Connection successful: DSN=test;UID=john;DataStore=/u02/ttdata/datastores/test;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=US7ASCII;DRIVER=/home/TimesTen/test/lib/libtten.so;LogDir=/u03/ttdata/logs;PermSize=800;TempSize=640;TypeMode=0;
(Default setting AutoCommit=1)

14、創建表、索引
con1: Command> create table mytable(
             > id number not null primary key,
             > title varchar2(300) not null,
             > code varchar2(50),
             > count number(3),
             > last_updated date);

con1: Command> tables;
  JOHN.MYTABLE
1 table found.

con1: Command> desc mytable;

Table JOHN.MYTABLE:
  Columns:
   *ID                              NUMBER NOT NULL
    TITLE                           VARCHAR2 (300) NOT INLINE NOT NULL
    CODE                            VARCHAR2 (50) INLINE
    COUNT                           NUMBER (3)
    LAST_UPDATED                    DATE

1 table found.
(primary key columns are indicated with *)

創建索引
con1: Command> create index mytable_idx on mytable(code);
con1: Command> indexes;

Indexes on table JOHN.MYTABLE:
  MYTABLE: unique range index on columns:
    ID
  MYTABLE_IDX: non-unique range index on columns:
    CODE
  2 indexes found.

2 indexes found on 1 table.


15、安裝ORACLE客戶端,配置網絡

[TimesTen@tt admin]$ vim tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/TimesTen/product/11.2.0/client_2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

test =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.253)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = test)
    )
  )
 
[TimesTen@tt admin]$ sqlplus test/test@test 

[TimesTen@tt info]$ cat ttendaemon.options
# Commented values are default values
#-supportlog /home/TimesTen/test/info/ttmesg.log
#-maxsupportlogfiles 10
#-maxsupportlogsize 10485760
#-userlog /home/TimesTen/test/info/tterrors.log
#-maxuserlogfiles 10
#-maxuserlogsize 0x100000
#
-verbose
-tns_admin /u01/oracle/TimesTen/product/11.2.0/client_2/network/admin
-server 53397

[TimesTen@tt info]$ ttmodinstall
The daemon for instance 'test' is currently configured to use port 53396.
Would you like to change this port? [ no ] n
The server for instance 'test' is currently configured to use port 53397.
Would you like to change this port? [ no ] n
TNS_ADMIN for the instance 'test' is currently set to '/u01/oracle/TimesTen/product/11.2.0/client_2/network/admin'.
Would you like to change TNS_ADMIN for this instance? [ yes ] yes
Please enter a value for TNS_ADMIN (q=quit)? [  ] /u01/oracle/TimesTen/product/11.2.0/client_2/network/admin

Do you want to restart the daemon using the new configuration? [ yes ] yes
Restarting the daemon ...
TimesTen Daemon stopped.
TimesTen Daemon startup OK.
Instance test is now configured with TNS_ADMIN=/u01/oracle/TimesTen/product/11.2.0/client_2/network/admin
Would you like to configure TimesTen Replication with Oracle Clusterware? [ no ] n
Done ...
   
   
16、Cache Connect配置

(1)oracle創建普通用戶--數據擁有者
SQL> create user test identified by test default tablespace users;
SQL> grant connect,resource,create session to test;

(2)oracle創建超級用戶--傳輸數據
SQL> create tablespace cache_tbs datafile '/data/oradata/test/cache_tbs01.dbf' size 4000m;
SQL> create user cacheadmin identified by oracle default tablespace cache_tbs;
SQL> grant connect,resource,create session,dba to cacheadmin;

[TimesTen@tt info]$ sqlplus sys/test@test as sysdba;
SQL> @/home/TimesTen/test/oraclescripts/initCacheGlobalSchema.sql;
SQL> @/home/TimesTen/test/oraclescripts/grantCacheAdminPrivileges.sql "cacheadmin";
SQL> grant connect,resource,create session,dba to cacheadmin;


(3)oracle測試數據
SQL> conn test/test
SQL> create table t1 (a int not null primary key,b char(10));
SQL> insert into t1 values (1,'aaa');
SQL> commit;
SQL> select * from t1;
SQL> conn cacheadmin/oracle;
SQL> select * from test.t1;
SQL> exit

(4)TT創建用戶
[tt@pan ~]$ ttisql test
Command> create user test identified by test;
Command> grant admin,create session,create any table to test;
Command> create user cacheadmin identified by oracle;
Command> grant create session,cache_manager,create any table to cacheadmin;
Command> exit

(5)TT創建 Cache Group
[tt@pan ~]$ttisql "dsn=dsa;uid=cacheadmin;pwd=oracle;oraclepwd=oracle"
Command> call ttcacheuidpwdset('cacheadmin','oracle');
Command> call ttgridcreate('mygrid');
Command> call ttgridnameset('mygrid');
Command> call ttcachestart;
Command> exit

(6)只讀同步
ttstatus   /*-- 查看TT狀態,特別要注意Cache Agent是否啓動*/
ttisql "dsn=test;uid=test;pwd=test;oraclepwd=test"
Command> CREATE READONLY CACHE GROUP cache_t1 AUTOREFRESH INTERVAL 3 SECONDS FROM t1 (a int NOT NULL PRIMARY KEY, b char(10));
Command> cachegroups;
Command> load cache group cache_t1 commit every 10 rows;
Command> select * from t1;
< 1, aaa       >
1 row found.

(7)異步
SQL> create table t2 (a int not null primary key,b char(10));
SQL> insert into t2 values (11,'aaa');

[TimesTen@tt ~]$  ttisql "dsn=test;uid=test;pwd=tcpgs;oraclepwd=test"
Command> create asynchronous writethrough cache group cache_t2 from t2 (a int not null primary key,b char(10));
Command> cachegroups;
Command> refresh cache group cache_t2 commit every 2 rows; /*oracle數據庫更新到TimesTen*/
Command> select * from t2;
Command> call ttrepstart;
Command> insert into t2 values (22,'bbb');
此時查看Oracle端有新的數據同步

 

(8)同步
SQL>create table t3 (a int not null primary key,b char(10));
SQL>insert into t3 values (111,'aaa');
Command> create synchronous writethrough cache group cache_t3 from t3 (a int not null primary key,b char(10));
Command> cachegroups;
Command> refresh cache group cache_t3 commit every 2 rows;
Command> insert into t3 values(222,'bbb');

此時在oracle端,直接看到數據同步。


=======================================================================

版權所有,文章允許轉載,但必須以鏈接方式註明源地址,否則追究法律責任! 謝謝合作!

QQ: [email protected]
Sina: weibo.com/kaijunfeng
Yahoo: [email protected]

 

 


 

發佈了54 篇原創文章 · 獲贊 5 · 訪問量 24萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章