Gginitload initialization directly Loads

Source: Internet
Author: User
Tags table definition
Instance: Initialize data from Oracle to Sqlserver. Configure directload to add batchtaskgroupaddextracteini01 to the source end (oracle). parse the sourceistable parameter: # sourceistable indicates that data is retrieved from the table direct instead of the redo log. Infoextract *, tasks # view the status

Instance: Initialize data from Oracle to Sqlserver. Configure direct load (oracle) to add the batch task groupadd extract eini01 for initialization and loading. parse the sourceistable parameter: # sourceistable indicates that data is retrieved from the table direct instead of redo logs. Info extract *, tasks # view status

Instance: Initialize data from Oracle to Sqlserver. Configure the initialization data capture (direct load) Source end (oracle) to add the initialization load batch task groupadd extract eini01, sourceistable
Parameter Parsing: # sourceistable indicates that data is retrieved from the table direct instead of the redo log. Info extract *, tasks # check that the status is STOPPED to configure the Parameter edit params of the initial loading process eini01 eini01userid ggmgr, password contains lermthost 10.1.220, mgrport 7809, replicated replicat, group rini01table ggmgr. t1;

Parameter Parsing: rmttask replicat, group inir_erp enables direct manager to enable the rini01 process at the same time on the target end to complete one-time loading, that is, on the target end, we do not need to manually start the rini01 process.
Note: because it is directly extracted from the original table, rather than from the log, you do not need to add trandata to the table.

Use the defgen tool to transmit the source definition to the target.

Target end (sqlserver): manually create the table for configuring the target end of the initial application log, instead of automatically creating the corresponding table during initialization.
Add replicat rini01, specialruninfo replicat *, tasks -- configure the Parameter edit params into rini01targetdb mssqlsourcedefs D: \ gg \ dirdef \ defgen. defmap ggmgr. t1, target erpdb. dbo. t1;

When can I use assumetargetdefs? If the database type is the same, for example, Oracle charactor set and locale, for example, american_AMERICA. contains the number of identical columns. The column names must be identical, including uppercase and lowercase space characters. Same data types. The same column length. Have the same column length semantics for character columns (bytes versus characters). It means that a letter occupies several bytes. The field order must be consistent. If tables with the same structure have different structures. Both sourcedefs and assumetargetdefs can appear at the same time. Sourcedefs D: \ gg \ dirdef \ defgen. def
Map ord. prod; target ord. prod; assumetargetdefsmap rpt. stock, target rpt. stock
Discardfile D: \ gg \ dirrpt \ rini01.dsc, purges

# ASSUMETARGETDEFS: indicates that the source table has the same structure as the target table. It is estimated that int and number are different data types. This and sourcedefs can only be selected.
# Specialrun indicates that this is a one-time run, not a continuous process.

Initiate init Loading
Source end (oracle) start extract eini01 # The Source end can be initiated, and the target end's replicat process will be called for one-time loading. Info eini01view report eini01
Target end (sqlserver) view report rini01
The specialrun parameter defines an initial loading process (this is a one-time loading without a checkpoint ). The next line of the file indicates that the replicat process is terminated after loading. Extfile indicates the extraction file. sourcedefs specifies the table definition.
Firewall should be noted that telnet 192.168.1.71 7809 may be used for verification.
In this case, the target table of my original table has no primary key and can be synchronized. In addition, when I run start extract eini01 again on the source end, the number of rows in the target table is doubled.

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.