GG Configuring Oracle synchronization to SQL Server

Source: Internet
Author: User


GG Configuring Oracle Synchronization to SQL Server

Prepare a test table for the source end target side. Oracle Source: Drop table Ggmgr.t1;create table ggmgr.t1 (id int primary key,name varchar2 (), time date);
SQL Server target end: BEGIN transactionset quoted_identifier ONSET ARITHABORT ONSET numeric_roundabort OFFSET Concat_null_ Yields_null ONSET ansi_nulls ONSET ansi_padding ONSET ansi_warnings oncommitbegin transactiongocreate TABLE dbo. Table_1 (ID numeric (0) not NULL, name nvarchar (+) NULL, time date null) on [Primary]goalter TABLE dbo. Table_1 ADD CONSTRAINT pk_table_1 PRIMARY KEY CLUSTERED (ID) with (Statistics_norecompute = off, Ignore_dup_key = off, A Llow_row_locks = on, allow_page_locks = on) on [Primary]goalter TABLE dbo. Table_1 SET (lock_escalation = TABLE) gocommit

Online Continuous synchronization table

Oracle Side (Configure extract process) dblogin userid Ggmgr,password OracleAdd Trandata TEST.N
edit param E_erpExtract E_erpuserid Ggmgr,password Oraclesetenv (ORACLE_SID=ORCL)exttrail./dirdat/ddtable ggmgr.t1;
Adding the Extract process Add extract e_erp,tranlog,begin now creates the local trail file (not physically created), and this e_erp adds the extract process to that name before. Add Exttrail/dirdat/dd, extract E_erp


Configuring the data pump processEdit params D_erpExtract D_erpuserid Ggmgr,password Oraclermthost 10.60.17.48,mgrport 7809Rmttrail D:\gg\dirdat\ddtable ggmgr.t1;
Add extract D_erp, Exttrailsource/home/ora/gg/dirdat/ddAdd Rmttrail D:\gg\dirdat\dd, extract D_erp


SQL Server side (configure Replicat process)
Transfer Defgen tool definition file
on the Sqlserve target side, configure the Globals file to specify a checkpoint table/ggsciedit params./globalscheckpointtable MASTER. Dbo. Gg_checkpoint_tab
The globals file must be in the $ggs_home directory, that is, under the software root directory, if one already exists, you can move it first.
Configure checkpoint table for the target sidedblogin sourcedb MSSQL (this name is the one that we defined in the ODBC data source that represents a given SQL Server service descriptor)Add checkpointtable master.dbo.gg_checkpoint_tab

Configuring the Replicat processEDIT PARAMS r_erpReplicat R_erpSourcedb MSSQLsourcedefs D:\gg\dirdef\defgen.defReperror Default,discarddiscardfile./dirrpt/r_erp.dsc,append,megabytesmap ggmgr.t1, target fwy.dbo.t1;

discardfile ParametersThis parameter is recommended for data that is rejected by the database and is reflected in this file.
Increase the REPLICAT processadd Replicat r_erp, Exttrail D:\gg\dirdat\dd
then use the Defgen tool to transfer the table definition to the target side
source side run upStart E_bomStart D_bomTarget SideStart Replicat R_bomView Report R_erp
If you want to filter some columns, you don't have to do anything. For example, there are 7 fields on the source side, there are 6 targets, the same name field automatically matches, and no will be automatically removed. But what if the field names are somewhat different? map Ggmgr.t3, Target fwy.dbo.t3,Colmap (Usedefaults,--means that the field name is the same as the default copytarget_col = Source_col); --The target table field name is Target_col, which is extracted from fields on the source side where the field name is Source_col.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.