In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Description of OGG common parameters 1. Configuration Management process mgr:ggsci (test01) 1 > view param mgr
Port 7809
Dynamicportlist 7809-7900
-- autostart er *
Autorestart extract *, retries5,waitminutes 3
Purgeoldextracts./dirdat/*,usecheckpoints, minkeepdays 3
Lagreporthours 1
Laginfominutes 30
Lagcriticalminutes 45
Configuration instructions for manager process parameters:
Port: specifies the service listening port; the default port is 7809
Dynamicportlist: dynamic ports: you can make a dynamic list of up to 256available ports. When the specified port is not available, the management process will select an available port from the list, and these ports will also be used for collector, replicat, and ggsci process communication between the source side and the destination segment.
Comment: comment line, or you can use-- instead
Autostart: specifies which processes are started automatically when the administrative process starts
Autorestart: automatic restart parameter setting: this setting means that all extract processes are attempted to restart every 3 minutes, with a total of 5 attempts
Purgeoldextracts: regularly clean up the trail file settings: this setting indicates that the trail files that are more than 3 days old are deleted.
Lagreport 、 laginfo 、 lagcritical:
Define the early warning mechanism of data delay: the setting here means that the mgr process checks the delay of extract every 1 hour, and records the delay as a message in the error log if it exceeds 30 minutes, and writes it in the error log as a warning if the delay exceeds 45 minutes.
two。 Extraction process and transport process
In fact, both the extraction process and the transmission process are extract processes, and they can also be configured in one process to complete these two functions, but when there is a problem with network transmission, the extraction process can not continue to run, so it is recommended to configure them separately as two processes.
Extraction process:
GGSCI (test01) 1 > view param ETEST01
Extract ETEST01
Setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
Setenv (ORACLE_HOME = / oracle/app/oracle/product/11.2.4/db_1)
Setenv (ORACLE_SID = test01)
Userid goldengate, password goldengate
REPORT AT 01:59
REPORTROLLOVER at 02:00
GETTRUNCATES
EXTTRAIL. / dirdat/exp
NUMFILES 2000
DYNAMICRESOLUTION
DDL INCLUDE MAPPED
DDLOPTIONS ADDTRANDATA RETRYOP RETRYDELAY 10 MAXRETRIES 10
DDLOPTIONS REPORT
-lizhen-
TABLE DEMO.CALL_RULE_INFO
GGSCI > ADD EXTRACT ETEST01, TRANLOG, BEGIN NOW, threads 1-RAC attention
GGSCI > ADD EXTTRAIL. / dirdat/exp, EXTRACT ETEST01, MEGABYTES
Transmission process
GGSCI (test01) 1 > edit param PTEST01
Extract PTEST01
Setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
Setenv (ORACLE_HOME = / oracle/app/oracle/product/11.2.4/db_1)
Setenv (ORACLE_SID = testdb)
Userid goldengate, password goldengate
PASSTHRU
REPORT AT 01:59
REPORTROLLOVER at 02:00
RMTHOST 10.18.4.41, MGRPORT 7809, COMPRESS
RMTTRAIL. / dirdat/rep
DYNAMICRESOLUTION
NUMFILES 2000
Gettruncates
-lizhen-
TABLE DEMO.CALL_RULE_INFO
GGSCI > ADD EXTRACT PTEST01, EXTTRAILSOURCE. / dirdat/exp
GGSCI > ADD RMTTRAIL. / dirdat/rep, EXTRACT PTEST01, MEGABYTES
Configuration instructions for extract process parameters:
Extract
Configuration instructions for extract process parameters
Setenv
Configure system environment variables
Userid/password
Specify the user name and password for the ogg connection database
Comment
Note line, you can also use-- instead of
Table
Define the table to be replicated, ending with;
Tableexclude
Define tables that need to be excluded. If wildcards are used in the table parameter, you can use this parameter to specify excluded tables.
Getupdateafters | ignoreupdateafters
Whether to write the post-image in the queue, copy by default
Getupdatebefores | ignoreupdatebefores
Whether to write the previous image in the queue. It is not copied by default.
Getupdates | ignoreupdates
Whether to copy update operation, default replication
Getdeletes | ignoredeletes
Whether to copy update operation, default replication
Getinserts | ignoreinserts
Whether to copy insert operation, default replication
Gettruncates | ignoretrundates
Whether to copy truncate operations. Default is not to copy.
NUMFILES
Use the NUMFILES parameter to control how many TABLE and MAP memory allocations are initialized by OGG, and this parameter must take effect before TABLE or MAP,SOURCEDEFS or TARGETDEFS, Default 1000.
Rmthost
Specifies the port number of the destination system and its goldengatemanager process. It is also used to define whether compression is used for transmission. In this case, compress is compressed transmission.
Rmttrail
Specify which queue to write to the destination break
Exttrail
Specify which queue to write to locally
Sqlexec
First run a sql statement when the extract process is running
Passthru
Prohibit extract process from interacting with database, applicable to data pump transport process
Report
Define automatic scheduled reports
Statoptions
Define whether statistics need to be reset each time you use stat
Reportcount
Statistics on the number of records processed in the report
Tltrace
Open the trace log for the database log
Discardfile
Define the location of the discardfile file. If there is a record error in processing, it will be written to this file.
Dboptions
Specify the special parameters required for a particular database
Tranlogoptions
Specify the special parameters required when parsing database logs, for example, for bare devices, you may need to add the following parameter rawdeviceoggset 0
Warnlongtrans
It is specified that warnings can be written in gsserr.log for long transactions over a certain period of time. This office is configured to check transactions every 3 minutes and warn for transactions that exceed 2 hours.
3. Replication process GGSCI (test01) 1 > view param RTEST01
Replicat RTEST01
Setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
Userid goldengate, password goldengate
REPORTCOUNT EVERY 30 MINUTES,RATE
REPORT AT 01:00
REPORTROLLOVER at 02:00
DISCARDFILE. / DIRRPT/RTEST01.DSC,APPEND, MEGABYTES 1000
DISCARDROLLOVER on friday
HANDLECOLLISIONS
REPERROR DEFAULT,ABEND
ASSUMETARGETDEFS
CHECKSEQUENCEVALUE
ALLOWNOOPUPDATES
DYNAMICRESOLUTION
NUMFILES 2000
DDL INCLUDE MAPPED
DDLOPTIONS REPORT
GROUPTRANSOPS 500
MAXTRANSOPS 500
-lizhen-
MAP DEMO.CALL_RULE_INFO,TARGET TEST.CALL_RULE_INFO
Ggsci > add replicat RTEST01, exttrail. / dirdat/rep
Setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
Setenv (ORACLE_HOME = / oracle/app/oracle/product/11.2.4/db_1)
Setenv (ORACLE_SID = testdb)
Set environment variabl
DBOPTIONS DEFERREFCONST
Constraint delay setting. Delay the checksum implementation of cascading deletions and cascading updates before the replication process is submitted.
GETTRUNCATES
Capture the operation of the production side truncate table.
REPORT AT 01:00
Report at 1: 00 every morning
REPORTCOUNT EVERY 30 MINUTES, RATE
Report the number of transaction records from the beginning of the program to the present extraction process or replication process every 30 minutes, and report the statistical information of the process
REPORTROLLOVER AT 02:00
To prevent the report file from being full, set the file expiration at 2:00 every day.
REPERROR DEFAULT, ABEND
Except for specially specified REPERROR statements, report all errors during replication and roll back things and processes that are not normally interrupted
Define the response of the process after an error, generally can be defined as two kinds: abend, that is, stop replication once an error occurs, which is the default configuration; discard, continue to copy after an error occurs, but put the wrong data into the discard file.
-HANDLECOLLISIONS
When the data already exists at the disaster recovery end, resolve the conflicts in the replication process. If you want to reinitialize, you can delete the database on the drop disaster recovery side and then restore it with rman. If you do so, you don't need this parameter.
ALLOWNOOPUPDATES
When the production side has certain columns but the target table does not, or the COLSEXCEPT parameter is configured during the replication process, when the production side updates those columns, the target table will not change.
Assumetargetdefs
When using the ASSUMETARGETDEFS parameter, the production database source table specified in the map statement and the disaster recovery destination table have the same column structure. The Oracle GoldenGate it indicates does not look up the structure definition of the source table on the production side.
DISCARDFILE. / dirrpt/repsa.dsc, APPEND, MEGABYTES 1024M
Save the record of the failed execution in discard file, which is located in. / dirrpt/extya.dsc and the size is 1024MB. If a record is already included in the file, it will be appended later without deleting the previous record.
DISCARDROLLOVER AT 02:00
To prevent the discard file from being full, set the file expiration at 2:00 every day.
MAP
Used to specify the mapping between the source side and the destination side table
MAPEXCLUDE
Used to exclude specified tables when using * matching in map
MAXTRANSOPS
Break up the big transaction and submit each xx record.
GROUPTRANSOPS
Merge small transactions into one large transaction for submission, reduce the number of submissions and reduce system io consumption
SOURCEDEFS
Assuming that the data structures on both sides are inconsistent, use this parameter to specify the data structure definition file on the source side, which needs to be generated by the glodengate tool.
SQLEXEC
First run a sql statement when the process is running
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.