goldengate 12c 针对oracle 12c配置的主要变化

Here are some of the things to keep in mind when dealing with OGG and 12c multitenant architecture.

  • It is available only in integrated capture mode and not classic capture.
  • One extract can be configured to capture changes from multiple PDBs
  • Since we have to use integrated capture mode, a log mining server is involved and this is only accessible from the root container (CDB$ROOT).
  • We have to connect as a common user to attach to the log mining server. For example a user called C##GGADMIN is what we are using in our example.
  • There is a 3 part naming convention in GGSCI and Parameter file. For example Container Name.Schema.Table(or Sequence)
  • The parameter SOURCECATALOG when used enables us to use the earlier Schema.Table type naming convention.
  • Replicat can only connect and apply to one pluggable database.
  • The dbms_goldengate_auth.grant_admin_privilege package grants the appropriate privileges for capture and apply within a multitenant container database. This includes the container parameter, which must be set to ALL, as shown in the following example:

dbms_goldengate_auth.grant_admin_privilege(‘C##GGADMIN’,container=>all)

由于oracle 12c已经是多租户架构,在使用OGG同步的时候,需要考虑下面一些情况

1. 抽取模式只能是integrated(集成)模式,不支持claasic capture传统方式捕获;

2. 一个 CDB包含多个PDB,源端部署的一个extract可访问所有pdb redo,理论上不需要每个pdb单独配置extract.

3. 因为要使用integrated extract,因此,需要能访问log mining server,而这个只能从cdb$root中访问;

4. 源端要使用common user,即c##ogg这种用户来访问源端DB,这样能访问DB的redo log & all pdbs。

5. 在GGSCI或参数文件中,可以使用pdb.schema.table来访问具体的表或序列;

6. 可以在参数文件 中使用sourceCatalog参数,指定一个PDB,后面的参数中只需要schema.table即可;

7. 目标端每个pdb要有一个replicat进程,即一个replicat进程只能投递到一个PDB,不能投递到多个。

8. 源 端OGG用户需要赋权:dbms_goldengate_auth.grant_admin_privilege(‘C##GGADMIN’,container=> ‘all’),同时建议将ogg的用户设置赋权为:grant dba to c##ogg container=all;

9. 源端DB除了以前要打开归档, force logging, 最小附加日志,可能还需要打开一个开关:alter system set enable_goldengate_replication=true;

参考

Configuring Oracle GoldenGate in a Multitenant Container Database

http://docs.oracle.com/goldengate/1212/gg-winux/GIORA/config_containerdb.htm#GIORA942

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。