Ogg Configuration review (Dml>ddl>sequnce)

Source: Internet
Author: User

<strong><span style= "color: #ff6666;" &GT;DML configuration process and test summary </span></strong> Create a dedicated tablespace, schema, and authorization on the source side. Create tablespace goldengate datafile ' goldengate01.dbf ' size 100m autoextend on;create user goldengate identified by gold Engate default tablespace goldengate temporary tablespace temp;grant connect to goldengate;grant alter all table to Golden Gate;grant alter session to Goldengate;grant create session to goldengate;grant Flashback no table to Goldengate;grant SE Lect any dictionary to goldengate;grant select any table to goldengate;grant resource to goldengate;grant select any trans Action to Goldengate; checking whether the source-side database is in archive mode is strongly recommended in archive mode. Sql> Archive Log listdatabase log mode archive modeautomatic archival enabledarchive Destinati On/archoldest Online log sequence 1Next log sequence to archive 3Current log sequence 3 end: Add additional Day Log to uniquely identify a row of records to open the minimum switch at the database level. To reduce the addition of additional logs to the entire database, and to reduce the amount of archiving, Goldengate recommends which objects to copy and add additional logs for which tables are added (we will experiment with the table under HR users). Check:sql> Select Supplemental_log_data_min from V$database; Suppleme--------no open:sql> ALTER DATABASE add supplemental log data;database altered. View:sql> <span style= Again " Color: #ff6666; " >select supplemental_log_data_min from V$database;</span>suppleme--------Yes toggle the log group so that the additional log switch takes effect. sql> alter system switch logfile; System altered. Explanation: Under normal circumstances, Oracle uses ROWID to uniquely mark a row of records, but Goldengate is not enough here to open additional logs. Install and configure Ggsci (GG2) 2><span style= "color: #ff6666;" > Create SUBDIRS&LT;/SPAN&GT;GGSCI (oratest) 80> view params mgrport 7839 dynamicportlist 7840-7850autostart EXTRAC T *autorestart EXTRACT *purgeoldextracts/dirdat/*,usecheckpoints, minkeepdays 7LAGREPORTHOURS 1LAGINFOMINUTES 30LAGCRITICALMINUTES 45 Management process for boot configuration ggsci (gg2) 4> start Mgrmanager started.select owner| | '. ' | | table_name table_name,logging from Dba_tableswhere owner= ' SENDER '; Sql> ALTER TABLE SENDER. A1 logging; Source: Configure the table-level additional logs for the following table. Configure the login user. And check if the log was added successfully. Log in to the database using the Goldengate schema. Ggsci (GG1) 10><span style= "COLOR: #ff6666;" > dblogin userid goldengate, password goldengate</span>successfully logged into database. View: Ggsci (GG1) 11> I NFO trandata Hr.*add Extract Ext_demo, Tranlog, begin now, threads 1 parametric analysis: Tranlog: Indicates that the source of data fetching is the redo data of the database. Begin now: That means we crawl the data as we start the crawl process. Threads 1: Indicates how many redo threads in our database, the single instance is basically 1 or not, the RAC sets itself, and the basic of configuring the RAC is to know the queue file to add the source side. Ggsci (GG1) 15> <span style= "color: #3333ff;" >add extract Ext_demo,<span style= "Background-color:rgb (102, 102, 204);" >tranlog</span>, begin now, Threads 1</span>ggsci (GG1) 15> <span style= "color: #ff0000;" >add exttrail/dirdat/r1, extract ext_demo,megabytes 100</span>exttrail added./ Dirdat: The prefix for the directory R1:trail file that represents the trail file extract Ext_demo: The value is assigned to that process (Ext_demo). Megabytes 100: File size is 100m edit the parameters of the fetch process we just configured on the source side: Ggsci (GG1) 16><span style= "color: #ff6666;" > Edit param ext_demo</span>extract ext_demouserid goldengate,password goldengatereportcount EVERY 1 MINUTES, Ratenumfiles 5000DISCARDFILE./dirrpt/ext_demo.dsc,append, megabytes 1000DISCARDROLLOVER at 3:00exttrail./dirdat/r1,megabytes 100dynamicresolutionTRANLOGOPTIONS Excludeuser Goldengatetranlogoptions convertucs2clobs tranlogoptions dblogreadertable sender.*;setenv (ORACLE_SID=ogg) : Specify the SID of Oracle, the standalone environment can not be set or the default in the Bashprofile file, or can not set, but the cluster environment is to be specified, here we strongly recommend to specify. Setenv (Nls_lang=american_america. ZHS16GBK): The character set of the source-side database must match the database. UserID Goldengate,password goldengate: Tells the crawl process to log in to the database through this user. Exttrail./dirdat/r1,megabytes 100: Configure the crawl process with the same settings as the path and size. Table hr.*: Most importantly, tell the crawl process which users are fetching which tables of data are configured DataPump processes to upload the fetched data to the target host. Responsible for TCPIP communication. Ggsci (GG1) 31> <span style= "color: #ff0000;" >add extract Dpe_demo, Exttrailsource./dirdat/r1</span>extract added. Output: How the target host is written and the output of the Datapumo process is defined. Ggsci (GG1) 33><span style= "color: #ff6666;" > Add Rmttrail./dirdat/t1,extract dpe_demo,megabytes 100</span>rmttrail added. Analysis: Exttrailsource: The source of the fetch process, because the process does not otherwise fetch the fetch in the database, so the source of the fetch is the content in the trail file that has been generated by the crawl process. 17. Configure DataPump Process parameters: Ggsci (oratest) 83> <span style= "color: #ff0000;" >vIew params dpe_demo</span>extract dpe_demodynamicresolutionpassthrurmthost 192.168.175.139, Mgrport 7840, Compressrmttrail./dirdat/t1numfiles 5000TABLE sender.*;                                           Ggsci (oratest) 84> info allprogram Status Group Lag at chkpt time Since Chkptmanager RUNNING     EXTRACT RUNNING dpe_demo 00:00:00 00:00:00 EXTRACT RUNNING Ext_demo 00:00:00 00:00:06 Ggsci (oratest) 85> PassThru: The above has said no need to connect to the database, so use this command. Rmthost: The IP address of the target host, that is, the host to which our rmttrail process is sent. Mgrport: The port number of the target host management process, which we have configured above. Compress: Compression is enabled during the transfer process. Rmttrail: Paths and files are consistent with the configuration above. Table sender.*: As stated above, which tables of redo information are transmitted. Target: Create the schema used by the Golengate software, and authorize some of the necessary special permissions, note the difference from the source, and ensure that we can DML. Create tablespace goldengate datafile ' goldengate01.dbf ' size 100m autoextend on;create user goldengate identified by gold Engate default tablespace goldengate temporary tablespace temp;grant connect to goldengate;grant alter all table to Golden Gate;grant alter session to Goldengate;graNT create session to Goldengate;grant flashback any table to goldengate;grant select any dictionary to goldengate;grant SE Lect any table to goldengate;grant resource to goldengate;grant inserts any table to goldengate;grant update any table to G Oldengate;grant Delete any table to goldengate;grant create all index to goldengate;grant select any transaction to Golden Gate; Target side: Create checkpoint table for Replicat process: Ggsci (GG2) 1> <span style= "color: #ff0000;" >dblogin userid Goldengate,password goldengate</span>successfully logged into database. Ggsci (GG2) 2> <span style= "color: #ff0000;" >add checkpointtable goldengate.rep_demo_ckpt</span>successfully created checkpoint table Goldengate.rep_ demo_ckpt.21, configuring the target end replicate process: Ggsci (GG2) 3> <span style= "color: #ff6666;" >add replicat rep_demo,exttrail./dirdat/t1,checkpointtable goldengate.rep_demo_ckpt</span>replicat added. Analysis: Exttrail: Indicates where this process gets the source of the data, which is set by our source-side rmttrail. 22, configure the target end replicate parameters: Ggsci (oratest) 13> <sPan style= "color: #ff6666;" >view params rep_demo</span>replicat rep_demouserid goldengate,password goldengatereportcount EVERY 30 MINUTES, Ratereperror DEFAULT, Abendnumfiles 5000--handlecollisionsassumetargetdefsdiscardfile./dirrpt/rep_ DEMO.DSC, APPEND, megabytes 1000ALLOWNOOPUPDATESMAP sender.*,target sender.*; Analysis: Important places are basically consistent with the above, and are interested in checking information on other parameters. Map: The source and target side of the corresponding. Add the table when the target is added, the meta-side, the database can be automatically synchronized! <strong><span style= "color: #ff6666;" >1.4 enable ddl</span></strong>sql> @marker_setup. SQL-Prompts for the target schemasql> @ddl_setup. SQL--Prompt for Target Sch EMA, input Initialsetup last input yessql> @role_setup. sqlsql>grant ggs_ggsuser_role to DDW; --Do not take this step after the process will be error sql> @ddl_enable. SQL-Enables triggers to take effect 1.5 clear DDL synchronization settings If there are many problems with DDL synchronization, the simplest way is to rebuild after uninstalling. The installation directory only provides a script to clear the object, you can do the following: First of all the GG process is required to stop, including the MGR Process sql> @ddl_disable. SQL-First to invalidate the DDL trigger sql> @ddl_remove. sqlsql > @marker_remove. sqlalter table OGG1. A1 logging;info trandata Ogg1.*add extract ext2,tranlog, begin now, Threads 1add exttrail./diRDAT/R3, extract ext2,megabytes 100EXTRACT ext2userid goldengate,password goldengatereportcount every 1 MINUTES, Ratenumfiles 5000DISCARDFILE./dirrpt/ext_demo1.dsc,append,megabytes 1000DISCARDROLLOVER at 3:00exttrail./dirdat/r2 , megabytes 100DDL include alltable Ogg1.*;add extract dpe_ext2, Exttrailsource./dirdat/r3add rmttrail./dirdat/t3, EXTRACT dpe_ext2,megabytes 100extract dpe_ext2dynamicresolutionpassthrurmthost 192.168.175.139, Mgrport 7840, Compressrmttrail./dirdat/t3numfiles 5000TABLE ogg1.*;add replicat rep_ext2,exttrail./dirdat/t3,checkpointtable Goldengate.rep_demo_ckptreplicat Rep_ext2userid Goldengate,password Goldengatereportcount EVERY, Ratereperror DEFAULT, Abendnumfiles 5000--handlecollisionsassumetargetdefsdiscardfile/DIRRPT/REP_REP2.DSC, APPEND , megabytes 1000ALLOWNOOPUPDATESMAP Ogg1.*,target ogg1.*;
<strong ><span style= "color: #ff6666;" > Enable sequence: </span><span style= "color: #ff6666;" > Target side: </span></strong> 
Sql> @sequence. Sqlplease Enter the name of a schema for the GoldenGate database objects:goldengatesetting schema name T o goldengateupdate_sequence status:line/pos Error---------------------------------------------------------------- -----------No errors no errorsgetseqflushline/pos Error----------------------------------------------------------- ----------------No errors no errorsseqtraceline/pos Error--------------------------------------------------------- ------------------No errors no errorsreplicate_sequence status:line/pos Error-------------------------------------- -------------------------------------no errors no errorsstatus of SEQUENCE Support--------------------------------------------------------------Successful installation of Oracle Sequence Replication supportsql> GRANT EXECUTE on goldengate.replicatesequence to OGG1; Grant succeeded. Sql> Target End:sql> @sequence. Sqlplease Enter the name of a schema for the GoldenGate database objects:goldengatesetting sChema name to Goldengateupdate_sequence status:line/pos Error------------------------------------------------------ ---------------------No errors no errorsgetseqflushline/pos Error------------------------------------------------- --------------------------No errors no errorsseqtraceline/pos Error----------------------------------------------- ----------------------------no errors no errorsreplicate_sequence status:line/pos Error---------------------------- -----------------------------------------------no errors no errorsstatus of SEQUENCE Support--------------------------------------------------------------Successful installation of Oracle Sequence Replication supportsql> GRANT EXECUTE on goldengate.replicatesequence to OGG1; Grant succeeded. sql> replication process: Transfer process: Ggsci (oratest) 41> edit params dpe_ext2extract dpe_ext2dynamicresolutionpassthrurmthost 192.168.175.139, Mgrport 7840, Compressrmttrail/dirdat/t3numfiles 5000TABLE ogg1.*; SEQUENCE ogg1.*;~ "DIRPRM/DPE_EXT2.PRM"8L, 158C Writtenggsci (oratest) 42> info allprogram Status Group Lag at chkpt time Since Chkptmanager RUNNING EXTRACT RUNNING dpe_demo 00:00:00 00:00:00 EXTRA CT RUNNING dpe_ext2 00:00:00 00:00:04 EXTRACT RUNNING EXT1 00:00:00 00:00:09 EXT RACT RUNNING EXT2 00:00:00 00:00:06 EXTRACT RUNNING ext_demo 00:00:00 00:00:09 G GSCI (oratest) 43> stop dpe_ext2sending stop request to EXTRACT dpe_ext2 ... Request processed. Ggsci (oratest) 44> start dpe_ext2sending start request to MANAGER ... EXTRACT dpe_ext2 Startingggsci (oratest) 45> info allprogram Status Group Lag at chkpt time Since chkpt    MANAGER RUNNING EXTRACT RUNNING dpe_demo 00:00:00 00:00:00      EXTRACT RUNNING dpe_ext2 00:00:00 00:00:05 EXTRACT RUNNING EXT1  00:00:00 00:00:00 EXTRACT RUNNING EXT2 00:00:00 00:00:03 EXTRACT RUNNING Ext_demo 00:00:00 00:00:09 Ggsci (oratest) 46> extraction process: Ggsci (oratest) 48> edit params ext2extract ext2userid Golden Gate,password Goldengatereportcount every 1 MINUTES, Ratenumfiles 5000DISCARDFILE./dirrpt/ext2.dsc,append,megabytes 1000DISCARDROLLOVER at 3:00exttrail./dirdat/r3,megabytes 100ddl include alltranlogoptions dblogreadertable ogg1.*; SEQUENCE ogg1.*;~ "DIRPRM/EXT2.PRM" 11L, 284C Writtenggsci (oratest) 49> stop ext2sending stop request to EXTRACT EXT2. .. Request processed. Ggsci (oratest) 50> start ext2sending start request to MANAGER ... EXTRACT EXT2 Startingggsci (oratest) 51> info allprogram Status Group Lag at chkpt time Since Chkptmana GER RUNNING EXTRACT RUNNING dpe_demo 00:00:00 00:00:07 EX  Tract RUNNING dpe_ext2 00:00:00 00:00:02 EXTRACT   RUNNING EXT1 00:00:00 00:00:06 EXTRACT RUNNING EXT2 00:00:03 00:00:07 EXTRACT RUNNING Ext_demo 00:00:00 00:00:05 ggsci (oratest) 52> Modify the file in advance: Modify the file: Ggsci (oratest) 79> EDIT PAR AMS./globalsggschema goldengate~flush SEQUENCE ogg1.*<strong><span style= "color: #ff0000;" > Restart more effective results! </span></strong>


Ogg Configuration review (Dml>ddl>sequnce)

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.