设为首页 加入收藏

TOP

搭建oracle到oracle的Goldengate双向复制环境(二)
2014-11-23 20:01:44 来源: 作者: 【 】 浏览:90
Tags:搭建 oracle Goldengate 双向 复制 环境
0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Miningand Real Application Testing options

--脚本1:

SQL> @marker_setup.sql;

Marker setup script

You will be prompted for the name of aschema for the GoldenGate database objects.

NOTE: The schema must be created prior torunning this script.

NOTE: Stop all DDL replication beforestarting this installation.

--输入我们之前创建的用户名:

Enter GoldenGate schema name:ggtest

Marker setup table script complete, runningverification script...

Please enter the name of a schema for theGoldenGate database objects:

Setting schema name to ggtest

MARKER TABLE

-------------------------------

OK

MARKER SEQUENCE

-------------------------------

OK

Script complete.

--脚本2:

SQL> @ddl_setup.sql;

GoldenGate DDL Replication setup script

Verifying that current user has privilegesto install DDL Replication...

You will be prompted for the name of aschema for the GoldenGate database objects.

NOTE: For an Oracle 10g source, the systemrecycle bin must be disabled. For Oracle 11g and later, it can be enabled.

--注意这里提示我们在10g里,必须关闭recycle bin,在11g以后的版本,可以不用关闭。

NOTE: The schema must be created prior torunning this script.

NOTE: Stop all DDL replication beforestarting this installation.

--提示输入GG的用户:

Enter GoldenGate schema name:ggtest

You will be prompted for the mode ofinstallation.

To install or reinstall DDL replication,enter INITIALSETUP

To upgrade DDL replication, enter NORMAL

--这里让我们选择安装模式: install 和 reinstall 选择INITIALSETUP

Enter mode of installation:INITIALSETUP

Working, please wait ...

Spooling to file ddl_setup_spool.txt

Checking for sessions that are holdinglocks on Oracle Golden Gate metadata tables ...

Check complete.

Using ggtest as a GoldenGate schema name,INITIALSETUP as a mode of installation.

Working, please wait ...

DDL replication setup script complete,running verification script...

Please enter the name of a schema for theGoldenGate database objects:

Setting schema name to ggtest

DDLORA_GETTABLESPACESIZE STATUS:

……

STATUS OF DDL REPLICATION

-------------------------------------------------------------------------------------------------------

SUCCESSFUL installation of DDL Replicationsoftware components

Script complete.

--脚本3:

SQL> @role_setup.sql;

GGS Role setup script

This script will drop and recreate the roleGGS_GGSUSER_ROLE

To use a different role name, quit thisscript and then edit the params.sql script to change the gg_role parameter tothe preferred name. (Do not run the script.)

You will be prompted for the name of aschema for the GoldenGate database objects.

NOTE: The schema must be created prior torunning this script.

NOTE: Stop all DDL replication beforestarting this installation.

--同样输入GG用户名:

Enter GoldenGate schema name:ggtest

Wrote file role_setup_set.txt

PL/SQL procedure successfully completed.

Role setup script complete

Grant this role to each user assigned tothe Extract, GGSCI, and Manager processes, by using the following SQL command:

--这里提示我们赋权给相关的用户:

GRANT GGS_GGSUSER_ROLE TO

where is the userassigned to the GoldenGate processes.

--脚本4:赋权

SQL> grant GGS_GGSUSER_ROLE to ggtest;

Grant succeeded.

--脚本5:

SQL> @ddl_enable.sql;

Trigger altered.

注意这里脚本创建的table都是使用默认的名称,当然也可以修改这些table的默认名。

三、测试

注意:

(1) 目标库的用户名和对象名称可以与源端不同,关键在于配置文件中要能够正确匹配。

(2) 配置源和目标两端tnsnames,保持互联互通。(记得启动lsnrctl)

gg1:

SQL> create user ssgg identified by oracle default tablespa

首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇如何判断多个字段组成的关键字在.. 下一篇Oracle技术_UTL_FILE包用法详解_..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: