OGG Installing support for Oracle sequences

huzhichengforce發表於2014-07-01
Installing support for Oracle sequences
設定OGG 支援sequences
To support Oracle sequences, you must install some database procedures. 
你必須安裝一些過程來支援ORACLE 的sequences.
These procedures support the Oracle GoldenGate FLUSH SEQUENCE command
 which you issue immediately after you start the Oracle GoldenGate processes for the first time 
安裝編譯完這些過程之後你能夠在配置OGG 時使用FLUSH SEQUENCE 命令直接初始化系統SEQUENCE
(typically when you perform the initial data synchronization procedure).
To install Oracle sequence objects
You will perform steps on the source and target systems.
安裝oracle sequence 物件,你需要在源端和目標端執行一下步驟
1. In SQL*Plus, connect to the sourceand target Oracle systems as SYSDBA.
1、在源端和目標端使用sqlplus 工具用sysdba 角色登入
2. If you already assigned a database user to support the Oracle GoldenGate DDL 
replication feature, you can skip this step. Otherwise, in SQL*Plus on both systems 
create a database user that can also be the DDL user.
如果你已經在配置系統支援DDL複製功能的時候建立了資料庫角色 你可以跳過此步
執行下列命令:
CREATE USER DDLuser IDENTIFIED BY password;
GRANT CONNECT, RESOURCE, DBA TO DDLuser;
3. From the Oracle GoldenGate installation directory on each system, run GGSCI.
在OGG 安裝目錄執行GGSCI命令
4. In GGSCI, issue the followingcommand on each system.
在源端,和目標端 GGSCI裡面執行下列命令
EDIT PARAMS ./GLOBALS
5. In each GLOBALS file, enter the GGSCHEMA parameter and specify the schema of the 
DDL user that you created earlier in this procedure.
在每個全域性系統檔案裡面加入GGSCHEMA 引數:
GGSCHEMA schema
6. Save and close the files.
關閉儲存檔案
7. In SQL*Plus on both systems, run the sequence.sql script from the root of the 
Oracle GoldenGate installation directory. This script creates some procedures for 
use by Oracle GoldenGate processes. (Do not run them yourself.) You are 
prompted for the user information that you created in the first step.
在源端和目標端都執行sequence.sql指令碼(sequence.sql 在OGG安裝目錄下使用sysdba 登入)
@sequence.sql
8. In SQL*Plus on the source system, grant EXECUTE privilege on the updateSequence
procedure to a database user that can be used to issue the DBLOGINc ommand. 
Remember or record this user. You use DBLOGINto log into the database prior to 
issuing the FLUSH SEQUENCE command, which calls the procedure.
在源端執行下列命令
GRANT EXECUTE on DDLuser.updateSequence TO DBLOGINuser;
(ddluser是你剛建立的使用者,DBLOGINuser 是你複製表的使用者)
9. In SQL*Plus on the target system, grant EXECUTE privilege on the 
replicateSequenceprocedure to the Replicat database user.
在目標端執行下列命令:
GRANT EXECUTE on DDLuser.replicateSequence TO Replicatuser;
(ddluser是你剛建立的使用者,Replicatuser 是你目標端的負責使用者)
10. In SQL*Plus on the source system, issue the following statement in SQL*Plus.
在源端執行下列命令(sysdba 登入)
ALTER TABLE sys.seq$ ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;

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

相關文章