oracle人才盘点演示,Oracle 11g Golden Gate DDL单向同步实例演示
1.指定Source端数据库模式
GGSCI (ogg1) 19> edit params ./GLOBALS
ggschema ogg
GGSCI (ogg1) 23> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)? y
Sending STOP request to MANAGER ...
Request processed.
Manager stopped.
GGSCI (ogg1) 24> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
EXTRACT RUNNING EXT1 00:00:00 00:00:10
EXTRACT RUNNING PUMP1 00:00:00 00:00:00
2 Source Database安装DDL支持
SQL> conn /as sysdba;
Connected.
SQL> !pwd
/u01/app/oracle/ogg
#######创建用于记录DDL信息的表
SQL> @marker_setup.sql
Marker setup script
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:ogg
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to OGG
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
#######创建相应的存储过程和trigger
SQL> @ddl_setup
Oracle GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the Oracle 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 Oracle GoldenGate schema name:ogg
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...
Check complete.
Using OGG as a Oracle GoldenGate schema name.
Working, please wait ...
DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to OGG
CLEAR_TRACE STATUS:
Line/pos Error
--------------------------------------
No errors No errors
CREATE_TRACE STATUS:
Line/pos Error
---------------------------------------- -
No errors No errors
TRACE_PUT_LINE STATUS:
Line/pos Error
----------------------------------------
No errors No errors
INITIAL_SETUP STATUS:
Line/pos Error
--------------------------------------
No errors No errors
DDLVERSIONSPECIFIC PACKAGE STATUS:
Line/pos Error
----------------------------------------
No errors No errors
DDLREPLICATION PACKAGE STATUS:
Line/pos Error
-----------------------------------
No errors No errors
DDLREPLICATION PACKAGE BODY STATUS:
Line/pos Error
------------------------------------
No errors No errors
DDL IGNORE TABLE
-----------------------------------
OK
DDL IGNORE LOG TABLE
-----------------------------------
OK
DDLAUX PACKAGE STATUS:
Line/pos Error
----------------------------------------------------------------
No errors No errors
DDLAUX PACKAGE BODY STATUS:
Line/pos Error
----------------------------------------
No errors No errors
SYS.DDLCTXINFO PACKAGE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
SYS.DDLCTXINFO PACKAGE BODY STATUS:
Line/pos Error
---------------------------------------- -
No errors No errors
DDL HISTORY TABLE
-----------------------------------
OK
DDL HISTORY TABLE(1)
-----------------------------------
OK
DDL DUMP TABLES
-----------------------------------
OK
DDL DUMP COLUMNS
-----------------------------------
OK
DDL DUMP LOG GROUPS
-----------------------------------
OK
DDL DUMP PARTITIONS
-----------------------------------
OK
DDL DUMP PRIMARY KEYS
-----------------------------------
OK
DDL SEQUENCE
-----------------------------------
OK
GGS_TEMP_COLS
-----------------------------------
OK
GGS_TEMP_UK
-----------------------------------
OK
DDL TRIGGER CODE STATUS:
Line/pos Error
---------------------------------------- --
No errors No errors
DDL TRIGGER INSTALL STATUS
-----------------------------------
OK
DDL TRIGGER RUNNING STATU
-------------------------------------------------
ENABLED
STAYMETADATA IN TRIGGER
--------------------------------------------------
OFF
DDL TRIGGER SQL TRACING
---------------------------------------------------
0
DDL TRIGGER TRACE LEVEL
----------------------------------------------------
0
LOCATION OF DDL TRACE FILE
---------------------------------------------------
/u01/app/oracle/diag/rdbms/ogg1/ogg1/trace/ggs_ddl_trace.log
Analyzing installation status...
STATUS OF DDL REPLICATION
----------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Script complete.
#######创建DDL同步需要的角色
SQL> @role_setup
GGS Role setup script
This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:ogg
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
Role setup script complete
Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:
GRANT GGS_GGSUSER_ROLE TO
where is the user assigned to the GoldenGate processes.
#######启动ddl trigger
SQL> @ddl_enable.sql
Trigger altered.
#######优化ddl trigger性能
SQL> @ddl_pin ogg
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
[oracle@ogg1 ogg]$ pwd
/u01/app/oracle/ogg
[oracle@ogg1 ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
#######关闭Manager进程
GGSCI (ogg1) 11> stop mgr
3 修改Source Database参数
#######停止Extract进程
GGSCI (ogg1) 2> stop ext1
Sending STOP request to EXTRACT EXT1 ...
Request processed.
GGSCI (ogg1) 4> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
EXTRACT STOPPED EXT1 00:00:00 00:00:08
EXTRACT RUNNING PUMP1 00:00:00 00:00:03
#######修改Extract参数
GGSCI (ogg1) 6> edit params ext1
extract ext1
dynamicresolution
setenv (NLS_.AL32UTF8)
userid ogg,password ogg
exttrail /u01/app/oracle/ogg/dirdat/et
ddl include all
ddloptions addtrandata, report
table askoracle.*;
ddl include all:启动ddl支持,并且包含所有的ddl操作
#######启动MGR & Extract进程
GSCI (ogg1) 11> start mgr
Manager started.
GGSCI (ogg1) 12> start ext1
Sending START request to MANAGER ...
EXTRACT EXT1 starting
GGSCI (ogg1) 14> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:02:51 00:00:04
EXTRACT RUNNING PUMP1 00:00:00 00:00:03
4 修改Target Database参数
#######停止MGR和REP1进程
GGSCI (ogg2) 3> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)? y
Sending STOP request to MANAGER ...
Request processed.
Manager stopped.
GGSCI (ogg2) 4> stop rep1
Sending STOP request to REPLICAT REP1 ...
Request processed.
GGSCI (ogg2) 5> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
REPLICAT STOPPED REP1 00:00:00 00:00:04
#######修改Rep1参数
GGSCI (ogg2) 6> edit params rep1
replicat rep1
userid ogg,password ogg
assumetargetdefs
reperror default,discard
discardfile /u01/app/oracle/ogg/dirrpt/rep1.dsc,append,megabytes 50
dynamicresolution
ddloptions report
ddlerror default ignore retryop maxretries 3 retrydelay 5
ddlerror default discard
ddlerror default ignore retryop
map askoracle.*, target askoracle.*;
#######启动MGR进程
GGSCI (ogg2) 7> start mgr
Manager started.
GGSCI (ogg2) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:02
5 单向DDL同步测试
Source端:
SQL> show user;
USER is "ASKORACLE"
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
OGG_TEST
SQL> create table askoracle(id number(10),createdate date,name varchar2(100));
Table created.
SQL> insert into askoracle values (1,sysdate,'askoracle');
1 row created.
SQL> commit;
Commit complete.
Target端:
SQL> show user;
USER is "ASKORACLE"
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
OGG_TEST
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
ASKORACLE
OGG_TEST
SQL> select * from askoracle;
ID CREATEDAT NAME
---------------------------------
1 07-JAN-14 askoracle
oracle人才盘点演示,Oracle 11g Golden Gate DDL单向同步实例演示相关推荐
- Oracle 数据库利用sql语句判断某个表是否是临时表实例演示,达梦数据库查询出所有临时表
-- 创建临时表 create global temporary table tem_1 (pk_tem char); -- 创建常规表 create table not_tem_1 (pk_not_ ...
- php mysql数据库同步_实现MySQL数据库同步实例演示_MySQL
本次实验的主要目的是剖析配置MySQL(和PHP搭配之最佳组合) 数据库的主辅MySQL数据库同步的实际操作步骤,我前两天在相关网站看见的资料,觉得挺好,就拿出来供大家分享,开始具体的配置. 本次试验 ...
- oracle golden gate原理和安装配置
oracle golden gate使用配置 我们采用oracle 11g数据库对应的golden gate传统模式配置: oracle golden gate的逻辑架构: oracle golden ...
- Oracle Golden Gate
Oracle Golden Gate 系列 小结 花了大半个月的时间小研究了一下Oracle Golden Gate. 先简单的说说自己学习GG的一个过程.参考资料都是官方文档,官网的链接如下: ht ...
- Oracle Golden Gate 系列十一 -- 配置 GG DDL 同步 说明 与 示例
一.DDL 说明 1.1 说明 这部分的说明,在系列四和系列六中已经说明: Oracle Golden Gate 系列六 --11gR2 Ora2Ora 单向复制GG 示例 www.2cto.com/ ...
- Oracle Golden Gate 系列十二 -- GG 数据初始化装载二 基于SCN 的初始化 说明 与 示例...
一.初始化说明 GG实施过程中,初始化是一个重要的工作,尤其是要初始化的数据较多,并且系统又是7*24的时. 对于静态初始化,把业务停掉,DB 上的数据就不会有变化,这时候,我们可以用expdp/im ...
- Oracle Golden Gate 11.2.0.3安装详解
Oracle Golden Gate 11.2.0.3安装详解 环境 环境变量 安装OGG软件 开始OGG配置 配置源端数据库 源端OGG配置 配置目标端数据库 目标端OGG配置 开启同步 环境 ce ...
- Oracle Golden Gate体系架构详解(原创) - CzmMiao的博客生活 - ITeye技术网站
Oracle Golden Gate体系架构详解(原创) - CzmMiao的博客生活 - ITeye技术网站
- Oracle Golden Gate 系列 小结
花了大半个月的时间小研究了一下Oracle Golden Gate. 先简单的说说自己学习GG的一个过程. 参考资料都是官方文档,官网的链接如下: http://download.oracle.com ...
最新文章
- Hibernate 配置C3P0 连接池
- C语言选择排序Selection sort算法(附完整源码)
- Hyper-V下的Linux虚拟机网卡丢失问题原因及解决办法
- java main方法背后的故事?(转)
- c#程序中使用quot;like“查询access数据库查询为空的问题
- JS之onsubmit事件与组织事件外延
- win10雷电3接口驱动_“雷电3”接口知识大科普
- tensorrt轻松部署高性能dnn推理_基于TensorRT车辆实时推理优化
- Python编程基础20:实例成员与类成员
- [转]在Sql Server中将字符串分割成表格数据示例
- git学习笔记-(3-linux基本命令)
- 数据结构课程设计c语言运动会管理系统
- 计算机网络基础知识教案模板,网络技术应用教案模板
- iOS脚本一键生成各种尺寸的icon
- attrib批量显示文件夹_[attrib命令隐藏文件夹]Attrib命令,可以让文件夹彻底的隐藏起来(转载)...
- 如何根据样本估计总体的均值、比例与方差?如何进行参数估计及选择对应公式?
- AD软件系统属性配置
- 船长就是法律!古代海盗残酷刑罚
- 奇偶校验(附代码实现)
- 西游记中13大高手排名
热门文章
- matlab (.m)文件生成 windows 可执行(.exe)文件
- 分治法(divide conquer)与动态规划(dynamic programming)应用举例
- 数据结构与算法的分析 —— 渐进复杂度(三个记号)
- 机器学习基础(二十五)—— Feature Selection
- 矩阵分解——三角分解(Cholesky 分解)
- 面向对象——意图与逻辑
- python可以用del释放资源_Python中垃圾回收和del语句详解
- 保护眼睛的电脑设置_专为长期玩电脑的你准备的3种护眼模式,你学到了吗?...
- 开课吧python小课学了有用吗-(内推实习)年薪30万,大量缺人,这个技能在金融圈到底有多吃香?...
- 精通python工资高吗-2020年10月程序员工资再创新高