Chinaunix首页 | 论坛 | 博客
  • 博客访问: 287359
  • 博文数量: 60
  • 博客积分: 1437
  • 博客等级: 中尉
  • 技术积分: 632
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-10 14:12
文章存档

2012年(7)

2011年(53)

分类: Oracle

2011-02-13 09:56:50

本来想从简单的开始写,但是今天要为客户配置一个GG复制环境支持DDL复制,就先写了这篇安装简述,实际的安装过程随后更新吧。
在Oracle GoldenDate中,为了支持DDL复制,需要安装在source数据库上安装一些GoldenGate的数据库对象,安装过程简述:
1.为这些对象选择一个schema,比如,我们创建一个ggsusr用户来存放这些对象;
2.授予这个用户执行utl_file系统包的权限:
grant execute on utl_file to ggsusr;
3.为ggsusr用户选择默认的表空间,这个表空间用于存放GGS_DDL_HIST及GGS_MARKER表,要保证有足够的空间来存放这些数据,如果空间用满了,那么会业务就会被暂停住;
4.编辑GLOBALS参数文件,添加GGSCHEMA参数:
   GGSCHEMA ggsusr
5.断开所有的数据库连接,包括SQL*PLUS,并阻止新的连接连到数据库上
6.以拥有SYSDBA权限的用户登录数据库,执行如下脚本:
--这个脚本会提示我们输入ggschema参数指定的schema名字
SQL>@marker_setup.sql

SQL>@ddl_setup.sql
--这个脚本会提示:
(1).关闭所有的数据库连接,所有打开的session都会列出来
(2).指定schema名字
(3).指定安装模式,初次安装是:INITALSETUP

SQL>@role_setup.sql
--(1).这个脚本会创建几个角色,记录必要的权限,并授予ggusr用户
--(2).将角色授予所有的extract用户

SQL>@ddl_enable.sql
--使DDL触发器生效

7.为了提高DDL的捕获效率,建议运行ddl_pin脚本,将相关的对象pin在shared pool中

SQL>@ddl_pin ggsusr
--建议每次数据库重启后便执行这个脚本

注意:使用GG 10.4的版本,还需要禁用10g 里的recycle bin!,GG 11以后的版本就不需要了,但是数据库是10g的还是需要禁用recyclebin的!否则,运行ddl_setup.sql的时候会报如下错误:
SQL> @ddl_setup.sql

GoldenGate DDL Replication setup script

Verifying that current user has privileges to install DDL Replication...
Checking user sessions...

Check complete.



You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter GoldenGate schema name:ggs

You will be prompted for the mode of installation.
To install or reinstall DDL replication, enter INITIALSETUP
To upgrade DDL replication, enter NORMAL
Enter mode of installation:INITIALSETUP

Working, please wait ...
Spooling to file ddl_setup_spool.txt


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

Working, please wait ...
BEGIN
*
ERROR at line 1:
ORA-20783:
GoldenGate DDL Replication setup:
*** RECYCLEBIN must be turned off.
*** For 10gr2, set RECYCLEBIN in parameter file to OFF. For 10gr1, set
_RECYCLEBIN in parameter file to FALSE. Then restart database and installation.
ORA-06512: at line 19



Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
阅读(3136) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~