配置ogg异构oracle-mysql(1)基础环境配置
一、环境描述:
192.168.0.164 ( Oracle ) —> 192.168.0.165 (Mysql )
版本:
操作系统:redhat5.8
Oracle: 11.2.0.3
Mysql: 5.5.37
goldgate:
11.2.0.1.3 for oracle
11.2.0.1.1 for mysql
测试用户:
在oracle的hr下面创建几张表,在mysql创建一个hr数据库,看数据能否同步过去。
二、Oracle to Mysql 需要注意的地方:
Supported data types for mysql:
CHAR | DOUBLE | TINYTEXT |
VARCHAR | DATE | MEDIUMTEXT |
INT | TIME | LONGTEXT |
TINYINT | YEAR | BLOB |
SMALL INT | DATETIME | TINYBLOB |
MEDIUM INT | TIMESTAMP | MEDIUMBLOB |
BIG INT | BINARY | LONGBLOB |
DECIMAL | VARBINARY | ENUM |
FLOAT | TEXT | BIT(M) |
Oracle GoldenGate supports InnoDB storage engine for a source MySQL database
goldengate对mysql只支持innodb引擎
所以,在创建mysql端的表的时候,要指定表为innodb引擎。
create table mysql (name char(10)) engine=innodb;
当然5.5默认的存储引擎就是InnoDB。
三、Oracle端的基础配置
1.安装oracle11g略过
2.初始化ogg
将ogg压缩包(V34339-01.zip)解压到 /u01/ogg/11.2 下
[oracle@ora11g 11.2]$ ./ggsci Oracle GoldenGate Command Interpreter for Oracle Version OGGCORE_11..3_PLATFORMS_120823.1258_FBO Linux, x64, 64bit (optimized), Oracle 11g on Aug :: Copyright (C) , , Oracle and/or its affiliates. All rights reserved. GGSCI (ora11g) > create subdirs Creating subdirectories under current directory /u01/ogg/11.2 Parameter files /u01/ogg/11.2/dirprm: already exists Report files /u01/ogg/11.2/dirrpt: created Checkpoint files /u01/ogg/11.2/dirchk: created Process status files /u01/ogg/11.2/dirpcs: created SQL script files /u01/ogg/11.2/dirsql: created Database definitions files /u01/ogg/11.2/dirdef: created Extract data files /u01/ogg/11.2/dirdat: created Temporary files /u01/ogg/11.2/dirtmp: created Stdout files /u01/ogg/11.2/dirout: created
3.修改oracle数据库的参数
3.1 修改数据库为归档模式
3.2 打开辅助日志
alter database add supplemental log data;
3.3 关闭回收站
alter system set recyclebin=off scope=both;
3.4 创建复制用的用户,并授权
--创建相应表空间create tablespace oggtbs datafile '/u01/app/oracle/oradata/onimei1/oggtbs01.dbf' size 500M autoextend on; --授权 create user ggs identified by ggs default tablespace oggtbs; GRANT create table to ggs; GRANT CONNECT TO ggs; GRANT ALTER ANY TABLE TO ggs; GRANT ALTER SESSION TO ggs; GRANT CREATE SESSION TO ggs; GRANT FLASHBACK ANY TABLE TO ggs; GRANT SELECT ANY DICTIONARY TO ggs; GRANT SELECT ANY TABLE TO ggs; GRANT RESOURCE TO ggs; GRANT DELETE ANY TABLE TO ggs; GRANT INSERT ANY TABLE TO ggs; GRANT UPDATE ANY TABLE TO ggs; GRANT RESTRICTED SESSION TO ggs;
3.5 登陆到ogg,执行初始化
在源库上执行: GGSCI (ora11g) > edit params ./globals 在统计模式下输入并保存:ggschema ggs 在SQLPLUS 下去运行: sql> @sequence.sql 根据提示输入:ggs sqlplus / as sysdba sql> alter system set recyclebin=off deferred scope=both; #必须,针对ddl复制 sql> @marker_setup.sql prompt: ggs sql> @ddl_setup.sql prompt: ggs sql> @role_setup.sql sql> grant GGS_GGSUSER_ROLE to ggs; SQL> @ddl_enable.sql 10g需要安装dbms_share_pool包: sql> @?/rdbms/admin/dbmspool.sql sql> @ddl_pin ggs;
四、Mysql端的基础配置
1.安装mysql5.5.37略过
2.给root配置密码:
mysql> use mysql Database changed mysql') where USER='root' and host='root' or host='localhost'; Query OK, rows affected (0.00 sec) Rows matched: Changed: Warnings: mysql> show grants for root@localhost; +---------------------------------------------------------------------+ | Grants for root@localhost | +---------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION | | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION | +---------------------------------------------------------------------+ rows in set (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, rows affected (0.00 sec) mysql> mysql> exit
3.因为复制需要二进制日志,所以启动mysql的时候需要启用二进制日志
mysqld_safe --user=mysql --log-bin=/tmp/binlog. --log-bin-index=/tmp/binlog.index --max-binlog-size=10M --binlog-do-db=mysql &
4.创建ogg的初始化目录
[mysql@nosql2 11.2]$ ./ggsci Oracle GoldenGate Command Interpreter for MySQL Version OGGCORE_11..1_PLATFORMS_120423. Linux, x64, 64bit (optimized), MySQL Enterprise on Apr :: Copyright (C) , , Oracle and/or its affiliates. All rights reserved. GGSCI (nosql2) > create subdirs Creating subdirectories under current directory /u01/ogg/11.2 Parameter files /u01/ogg/11.2/dirprm: already exists Report files /u01/ogg/11.2/dirrpt: created Checkpoint files /u01/ogg/11.2/dirchk: created Process status files /u01/ogg/11.2/dirpcs: created SQL script files /u01/ogg/11.2/dirsql: created Database definitions files /u01/ogg/11.2/dirdef: created Extract data files /u01/ogg/11.2/dirdat: created Temporary files /u01/ogg/11.2/dirtmp: created Stdout files /u01/ogg/11.2/dirout: created GGSCI (nosql2) >
配置ogg异构oracle-mysql(1)基础环境配置的更多相关文章
- LNMP(linux+nginx+mysql+php)服务器环境配置【转载】
本文转载自 园友David_Tang的博客,如有侵权请联系本人及时删除,原文地址: http://www.cnblogs.com/mchina/archive/2012/05/17/2507102.h ...
- 【No.1 Ionic】基础环境配置
Node 安装 git clone https://github.com/nodejs/node cd node ./configure make sudo make install node -v ...
- win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装、优化、安全等)
这篇文章主要介绍了win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装.优化.安全等),需要的朋友可以参考下 win2008 r2 安装 http://www ...
- kubernetes基础环境配置
一.基础环境配置 环境详情 主机名(FQDN) IP地址(NAT) 描述 linux-node1.example.com eth0:192.168.56.11 1VCPU.2G内存.一块硬盘s da5 ...
- Debian7配置LAMP(Apache/MySQL/PHP)环境及搭建建站
完整Debian7配置LAMP(Apache/MySQL/PHP)环境及搭建建站 第一.安装和配置Apache Web服务器 运行升级命令来确保我们的系统组件各方面都是最新的. apt-get upd ...
- k8s基础环境配置:基于CentOS7.9
k8s基础环境配置:基于CentOS7.9 wmware15安装centos7.9:https://www.cnblogs.com/uncleyong/p/15261742.html 1.配置静态ip ...
- CentOS 8.2 对k8s基础环境配置
一.基础环境配置 1 IP 修改 机器克隆后 IP 修改,使Xshell连接上 [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg- ...
- 配置ogg异构oracle-mysql(3)目的端配置
目的端配置大致分为如下三个步骤:配置mgr,配置checkpoint table,配置应用进程 在目的端先创建一张表,记得带主键: mysql> create database hr;Query ...
- 配置ogg异构oracle-mysql(2)源端配置
源端配置大致分为如下三个步骤:配置mgr,配置抽取进程,配置投递进程 在源端先创建一张表,记得带主键: SQL> create table ah4(id int ,name varchar(10 ...
随机推荐
- Sublime text2 插件推荐
HTML-CSS-JS Prettify: 前端插件,使用 ctrl+shift+h 格式化代码
- C# 毕业证书打印《六》
整理思路,从新出发. 加载模版 public void loadtemplate(Label lable) { string p_tempateFile = @"fomate.xml&quo ...
- ASP.NET Web API与Rest web api
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of ...
- 在eclipse上开发hadoop2.5.2程序的快捷方法
本文仍然使用MapReduce的经典例子 WordCount来测试eclipse的开发环境. 与大部分教程不同的是,本文使用的hadoop是2.5.2的版本,相较于之前的0.X版本,hadoop 2. ...
- Python操作PDF与Tiff文件
1.PDF文件的合并与拆分 pypdf http://www.douban.com/note/455252403/ http://www.redicecn.com/html/Python/201301 ...
- http get vs post
http get vs post GET与POST方法有以下区别:(1) 在客户端,Get方式在通过URL提交数据,数据在URL中可以看到:POST方式,数据放置在HTML HEADER内提交.(2) ...
- c++ 引用和指针
1.引用 程序把引用和它的初始值绑定在一起,而不是将初始值拷贝给引用.一旦初始化完成,引用将和它的初始值对象一直绑定在一起.因为无法令引用重新绑定到另外一个对象,因此引用必须初始化. int ival ...
- UVALive 6577 Binary Tree 二叉树的LRU串
今天继续攒人品...真开心啊O(∩_∩)O~~各种身体不舒服~~ https://icpcarchive.ecs.baylor.edu/external/65/6577.pdf 题意是这样的,现在有一 ...
- JPA查询语句(转载)
JPQL就是一种查询语言,具有与SQL 相类似的特征,JPQL是完全面向对象的,具备继承.多态和关联等特性,和hibernate HQL很相似. 查询语句的参数 JPQL语句支持两种方式的参数定义 ...
- 【资料】Boost的资料
http://blog.csdn.net/pongba/article/details/1561110