SharePlexForOracle_安裝配置_基礎使用

seagull76發表於2008-04-13
1)準備好vmware + oracle9204的環境,保證/etc/oratab有oracle相關條目,保證/etc/hosts檔案
有hostname.
2)以root使用者建立/quest目錄
3)將SharePlex_Oracle-5.3.0.57-Linux-x86-Oracle92.run傳到/quest目錄
4)以root使用者執行SharePlex_Oracle-5.3.0.57-Linux-x86-Oracle92.run
[root@single quest]# ./SharePlex_Oracle-5.3.0.57-Linux-x86-Oracle92.run
Creating directory SharePlex_Oracle-5.3.0.57-Linux-x86-Oracle92.run.tmp
Verifying archive integrity... All good.
Uncompressing SharePlex_Oracle-5.3.0.57-Linux-x86-Oracle92-Self_Extra Tar File....................................................................................................................

Checking usage of a nameserver for users and groups;
Enter your nameserver or 'none' [NIS/NISPLUS/none]: none
Installing Product(s): SPLEX-ORACLE
Please specify an existing user who has read privileges to
the Oracle redo logs and will own the SharePlex product and
variable-data directories. This user will be a SharePlex
Administrator and placed in the SharePlex admin group [oracle]: oracle9
Adding groups to the system.
Groups Added: spadmin spopr spview
695
702

Enter Oracle 92 SID[ ]: ora9iEnter Oracle home directory or press Enter to use [/oracle9/product/9i]:
Please specify a new product directory location: /quest/splex
Please specify the variable data directory location: /quest/vardir
Do you have a valid SharePlex for Oracle license key for version 5.3.0 [y/n] ?y
Enter license key =DSRSLKD5RLUGQBXAAXB2Q373BWH5LEV
Enter customer name =SharePlex_Trial
Product Name : SharePlex for Oracle
Key Type : "Trial Key"
Status : Expires at Midnight of Jan 02, 2009
Please Wait. . . . .
Gathering installation information & modules from the directory .
Please wait . . . . . Installing the SharePlex Files
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Please wait while completing the post-installation procedures
SharePlex License Utility
Installing SharePlex for Oracle License Key:
License Key = DSRSLKD5RLUGQBXAAXB2Q373BWH5LEV Customer Name = SharePlex_Trial
The SharePlex for Oracle license, "Trial Key" has been successfully added for host 50031.
It will expire after Midnight of Jan 02, 2009
You can upgrade the license key at any time by executing splex_add_key utility.
Would you like to upgrade this license or to add licenses for additional hosts [y/n]n
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Installation Complete...
5)以oracle使用者,執行/quest/splex/bin/ora_setup
[oracle9@single bin]$ ./ora_setup
Welcome to the Oracle SharePlex setup process.
This process creates tables and user accounts needed to run
Oracle SharePlex replication.
Please note the following:
** In response to prompts, a carriage return will choose the default
given in brackets. If there is no default, a reply must be entered.
** To exit the program while the program is waiting for input, use the
CTRL-C key sequence.
This sequences can be entered by holding down the CONTROL key and
pressing the C key.
Enter the Oracle SID for which SharePlex should be installed [ora9i] : ora9i
In order to create the SharePlex tables and user account, we must
connect to the database as SYSTEM. The SYSTEM account must have
SYSDBA privileges.
Enter password for the SYSTEM account, which will not echo [MANAGER] :
connecting--This may take a few seconds.
validating user name and password. . . This may take a few seconds.
SharePlex objects will need to be created under a special
account. You can pick an existing user or create a new one.
Would you like to create a new SharePlex user ? [y] : yEnter username for new user [SPLEX/SPLEX] : splexEnter password for new user :
Re-enter password for new user :
Warning: This user is now being granted unlimited tablespace.
This privilege will remain in effect until it is explicitly changed.
Setup will now install SharePlex objects.
These are the existing tablespaces.
SYSTEM UNDOTBS1 TEMP INDX TOOLS USERS
Enter the default tablespace for use by SharePlex [TOOLS] : tools
Enter the temporary tablespace for use by SharePlex [TEMP] : temp
Enter the index tablespace for use by SharePlex [TOOLS] : tools
Enter the tablespace for the SharePlex index
SHAREPLEX_ROWIDMAP_I1 [TOOLS] : tools
Enter the tablespace for the SharePlex index
SHAREPLEX_ROWIDMAP_I2 [TOOLS] : tools
Enter the tablespace for the SharePlex index
SHAREPLEX_ROWIDMAP_I3 [TOOLS] : tools
Creating SharePlex objects . . .
Creating Conflict Resolution Package . . . Done.
Setup of SharePlex objects successful . . .
Changing SharePlex parameter database . . .
Setup completed successfully
[oracle9@single bin]$
6)以oracle使用者,啟動shareplex
[oracle9@single ~]cd /quest/splex/bin
[oracle9@single bin]$nohup ./sp_cop &
7)以oracle使用者,啟動shareplex管理控制檯
[oracle9@single ~]cd /quest/splex/bin
[oracle9@single bin]$./sp_ctrl
7.1)status 檢視當前執行的shareplex程式
sp_ctrl (single:2100)> status
Brief Status for single
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 9975 25-Mar-08 21:57:44
Cmd & Ctrl Running 10002 25-Mar-08 22:06:34
7.2)list config檢視當前的鏈路配置檔案
sp_ctrl (single:2100)> list config
File Name State Datasource
-------------------------------------------------- ---------- ---------------
ORA_config Inactive o.SOURCE_SID
Last Modified At: 25-Mar-08 21:00 Size: 151
7.3)從預設的鏈路配置檔案中複製一個配置檔案
sp_ctrl (single:2100)> copy config ORA_config to c1
7.4)編輯配置檔案c1
--備註:編輯後的檔案內容如下(我的source庫和dest庫是同一個庫的不用的使用者下的兩張表,一張是splex_demo_src,一張是test.demo_dest,注意事先建好test.demo_dest表)
sp_ctrl (single:2100)> edit config c1
datasource:o.ora9i
#source tables target tables routing map
splex.demo_src test.demo_dest
7.5)啟用配置檔案c1
sp_ctrl (single:2100)> activate config c1
7.6)檢視鏈路是否生效
sp_ctrl (single:2100)> list config
File Name State Datasource
-------------------------------------------------- ---------- ---------------
ORA_config Inactive o.SOURCE_SID
Last Modified At: 25-Mar-08 21:00 Size: 151
c1 Active o.ora9i
Last Modified At: 25-Mar-08 22:07 Size: 139 Internal Name: .conf.1
7.7)測試
a.insert into splex.demo_src values('asdf,'asdf','asdf');
commit;
b.select * from test.demp_dest ;可以看到被同步過來的資料
7.8)其他
sp_ctrl (single:2100)> show sql (可以看鏈路發生的sql)
Last SQL statement of queue single and instance o.ora9i-o.ora9i on single
Thread Session
------ -------
49156 2
insert into "TEST"."DEMO_DEST" ("NAME","ADDRESS","PHONE#") values (:V001,:V002,:V003)
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8861952/viewspace-1034683/,如需轉載,請註明出處,否則將追究法律責任。

相關文章