使用GoldenGate实现MySQL到Oracle的数据实时同步
使用GoldenGate实现MySQL到Oracle的数据实时同步
step 1: 配置mysql
修改配置文件my.ini
#for goldengate
log-bin = "C:/mysql/logbin/logbin.log"
binlog-format = ROW
log-bin-index = "C:\mysql\logindex"
binlog_cache_size=32m
max_binlog_cache_size=512m
max_binlog_size=512m
添加数据库用户ggs,,具有DBA权限
step 2: 在mysql服务器上安装配置GoldenGate
创建mgr.prm
PORT 7809
DYNAMICPORTLIST 7840-7914
STARTUPVALIDATIONDELAY 5
PURGEOLDEXTRACTS C:\ogg\dirdat\*, USECHECKPOINTS, MINKEEPDAYS 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
创建抽取进程参数ext1.prm
--ext1.prm
EXTRACT ext1
SOURCEDB test@localhost:3306, USERID ggs, PASSWORD 123
DISCARDROLLOVER ON FRIDAY
DISCARDFILE C:\ogg\dirrpt\ext1.dsc, APPEND, MEGABYTES 1024
WARNLONGTRANS 2h, CHECKINTERVAL 3m
REPORTCOUNT EVERY 30 MINUTES, RATE
EXTTRAIL C:\ogg\dirdat\ex
DYNAMICRESOLUTION
NUMFILES 5000
TABLE test.test1;
添加抽取进程ext1
ADD EXTRACT ext1, tranlog, begin now
ADD EXTTRAIL C:\ogg\dirrpt\ex, EXTRACT ext1, megabytes 100
创建传播进程参数dp1.prm
--dp1.prm
EXTRACT dp1
RMTHOST 172.27.35.28, MGRPORT 7809,COMPRESS
RMTTRAIL d:\ogg\dirdat\ex
PASSTHRU
NUMFILES 5000
DYNAMICRESOLUTION
TABLE test.*;
添加抽取进程dp1
ADD EXTRACT dp1, EXTTRAILSOURCE C:\ogg\dirdat\ex
ADD RMTTRAIL d:\ogg\dirdat\ex, EXTRACT dp1, MEGABYTES 100
step 3: 配置defgen
创建defgen参数
--defgen.prm
defsfile C:\ogg\dirdef\defgen.prm
sourcedb test@localhost:3306, userid ggs,password 123
table test.test1;
生成defgen文件
defgen paramfile C:\ogg\dirprm\defgen.prm
将C:\ogg\dirdef目录下的文件defgen.prm拷贝到目标端的相应目录下,即目录.\dirdef下。
step 4: Oracle环境准备
创建数据库用户
create tablespace ggs datafile '......' size 200m;
create user ggs identified by 123 default tablespace ggs;
grant dba to ggs;
step 5: 在Oracle服务器安装配置GoldenGate
创建mgr参数
--mgr.prm
PORT 7809
DYNAMICPORTLIST 7840-7914
STARTUPVALIDATIONDELAY 5
PURGEOLDEXTRACTS d:\ogg\dirdat\*, USECHECKPOINTS, MINKEEPDAYS 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
创建复制进程参数rep1.prm
--rep1.prm
replicat rep1
sourcedefs D:\ogg\dirdef\defgen.prm
userid ggs,password ggs
reperror default,discard
discardfile D:\ogg\dirrpt\rep1.dsc,append,megabytes 50
dynamicresolution
map test.test1, target test.test1;
添加复制进程
dblogin userid ggs password 123
add checkpointtable chkpnttab
add replicat rep1,exttrail D:\ogg\dirdat\ex, checkpointtable chkpnttab
Oracle GoldenGate在异种OS上同种DB之间的数据同步
GoldenGate将Oracle数据同步到GreenPlum
Oracle GoldenGate 12c 新特性 Credential Store and USERIDALIAS
GoldenGate疑似BUG:info all查看不到extract
使用GoldenGate的数据泵进行Oracle-Oracle的单向复制
本文永久更新链接地址:

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor