Welcome to the Oracle community forum and interact with 2 million technical staff. Go to GG to configure Oracle to synchronize to the SQLServer source end and prepare a test table. Oracle Source: droptableggmgr. t1; createtableggmgr. t1 (idintprimarykey, namevarchar2 (50), timedate); Sqlserver object
Welcome to the Oracle community forum and interact with 2 million technical staff> go to GG to configure Oracle to synchronize to the SQLServer source end and prepare a test table. Oracle Source: drop table ggmgr. t1; create table ggmgr. t1 (id int primary key, name varchar2 (50), time date); Sqlserver object
Welcome to the Oracle community forum and interact with 2 million technical staff> enter
GG configure Oracle synchronization to SQLServer
Prepare a test table for the source and target end. Oracle Source: drop table ggmgr. t1; create table ggmgr. t1 (id int primary key, name varchar2 (50), time date );
Sqlserver target end: begin transaction set QUOTED_IDENTIFIER on set arithabort on set NUMERIC_ROUNDABORT off set priority on set ANSI_NULLS on set ANSI_PADDING on set ANSI_WARNINGS on commit begin transaction go create table dbo. table_1 (id numeric (18, 0) not null, name nvarchar (40) NULL, time date NULL) ON [PRIMARY] go alter table dbo. table_1 add constraint PK_Table_1 primary key clustered (id) WITH (partition = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] go alter table dbo. table_1 SET (LOCK_ESCALATION = TABLE) GO COMMIT
Online Continuous synchronization table
Dblogin userid ggmgr and password Oracle add trandata test. n on the oracle side (configure the extract process)
Edit param e_erp extract e_erp userid ggmgr, password oracle setenv (ORACLE_SID = orcl) exttrail./dirdat/dd table ggmgr. t1;
Add extract process add extract e_erp, tranlog, and begin now to create a local trail file (not physically created). The extract process is added according to this name before this e_erp process is required. Add exttrail./dirdat/dd, extract e_erp
Configure the data pump process edit params d_erp extract d_erp userid ggmgr, password oracle rmthost 10.60.17.48, mgrport 7809 rmttrail D: \ gg \ dirdat \ dd table ggmgr. t1;
Add extract d_erp, exttrailsource/home/ora/gg/dirdat/dd add rmttrail D: \ gg \ dirdat \ dd, extract d_erp
Sqlserver (configure the replicat process)
Transfer defgen tool definition file
On the SQLServe target end, configure the globals file to specify a checkpoint table/ggsci edit params./globals checkpointtable master. DBO. GG_CHECKPOINT_TAB.
The globals file must be in the $ GGS_HOME directory, that is, the software root directory. If one already exists, move it first.
Configure checkpoint table dblogin sourcedb mssql for the target end (this name is the one defined in the ODBC data source that represents a sqlserver service descriptor) add checkpointtable master. dbo. gg_checkpoint_tab
Configure the replicat process edit params R_ERP replicat r_erp sourcedb mssql sourcedefs D: \ gg \ dirdef \ defgen. def reperror default, discard discardfile. /dirrpt/r_erp.dsc, append, megabytes 50 map ggmgr. t1, target fwy. dbo. t1;
This parameter is recommended for the discardfile parameter. Data rejected by the database will be reflected in this file.
Add replicat r_erp, exttrail D: \ gg \ dirdat \ dd
Then, use the defgen tool to transmit the table definition to the target end.
Start e_bom start d_bom start replicat r_bom view report r_erp
If you want to filter some columns, you do not need to do anything. For example, if the source end has 7 fields and the target end has 6 fields, the fields with the same name will be automatically matched and the fields without the same name will be removed automatically. But what if the field names are the same? Map ggmgr. t3, target fwy. dbo. t3, colmap (usedefaults, -- indicates that if the field names are the same, use the default copy target_col = source_col); -- the target table field name is target_col, and the source field name is extracted from the field of source_col.