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;
设置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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26764973/viewspace-1201245/