Advanced goldengate training ⅰ

6,428 views

Published on

oracle goldengate training

1 Comment
1 Like
Statistics
Notes
  • If you want to be perfect in Oracle golden gate then choose Samhita IT best oracle golden gate training provider in the market. We Offer oracle golden gate training in various platforms, like Linux, Unix. Our oracle golden gate trainer is expert in the subject, and gives all real time project during the training. We are proud enough to say that we are the best online training provider for oracle golden gate.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
6,428
On SlideShare
0
From Embeds
0
Number of Embeds
269
Actions
Shares
0
Downloads
303
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Advanced goldengate training ⅰ

  1. 1. Advanced Goldengate Training Ⅰ<br />www.oggers.net<br /> 2011-07-25<br />
  2. 2. Agenda<br />□Mothod of initialize data<br />□ Handing essential DML and DML error<br />□ Handing Advanced DDL sync and DDL error<br />□ Map and manipulating data<br />□ Monitor and Troubleshooting<br />Ⅰ<br />
  3. 3. Initialize Data<br /> If your database is huge and application transcations are still ongoing ,there is little stop-time,How should you Initialize your data?<br /> □ Use Keys + Handlecollsions<br /> □Use the commit SCN<br />
  4. 4. Handlecollsions<br />□How does the Handlecollsions work? <br />□ Where is the drawbacks with Handlecollsions? <br />● Does your tables have any primary key or unique key?<br />● Is there primary key update during initialization ?<br />Suitable for your environment ?<br />Ⅰ<br />
  5. 5. Commit SCN<br />♦ Commit SCN/GoldengateCSN<br />♦ the common initialized mothods Via SCN<br />□ exp/imp <br /> □ expdp/impdp<br />□ Transport Tablespace with Backupset(compare Transport Tablespace)<br />□ Datagurd/RMAN<br /> □ Other consistent read utility<br />Ⅰ<br />□ <br />
  6. 6. How to re-initialize a special table<br /> □ split replicat group and merge it<br /> □ Using transaction CSN Filter <br />map hr.job, target hr.job, filter (@GETENV ("transaction", "csn") > xxx);<br />
  7. 7. Agenda<br />□Mothod of initialize data<br />□ Handing essential DML and DML error<br />□ Handing Advanced DDL sync and DDL error<br />□ Map and manipulating data<br />□ Monitor and Troubleshooting<br />Ⅰ<br />
  8. 8. Non-supported data types<br />● ANYDATA<br />● ANYDATASET<br />● ANYTYPE<br />● BFILE<br />● BINARY_INTEGER<br />● MLSLABEL<br />● PLS_INTEGER<br />● TIMEZONE_ABBR<br />● TIMEZONE_REGION<br />● URITYPE<br />● UROWID<br />Ⅰ<br />
  9. 9. DML replication action<br />□ Keys(Primary key/unique key/keycols) action<br />● why to recommend to use keys?<br /> ● How to use keycols?<br />□supplemental non-key column action<br />Ⅰ<br />
  10. 10. Handing DML error <br />□ Handing replicat errors on DML operations via REPERROR<br /> Abort: roll back the transaction and stop processing<br />Discard: log the error to the discard file and continue processing<br />Exception: send the error for exceptions processing<br />Ignore: ignore the error and continue processing<br /> example:<br />reperror default,discard<br /> discardfile ./dirrpt/rep_hr.dsc,append,megabytes 100<br />Ⅰ<br />
  11. 11. Use multiple REPERROR statements<br />□ handing special error-code<br />reperror XXXX discard<br />□ handing special object <br />reperror default ignore exclude/include objname “hr.jobs”<br />Ⅰ<br />
  12. 12. Use exception table <br />REPERROR (DEFAULT, EXCEPTION)<br />MAP hr.jobs, TARGET hr.jobs, &<br />COLMAP (USEDEFAULTS);<br />MAP hr.jobs, TARGET hr.jobs_exception, &<br />EXCEPTIONSONLY, &<br />INSERTALLRECORDS &<br />COLMAP (USEDEFAULTS, &<br />DML_DATE = @DATENOW(), &<br />OPTYPE = @GETENV("LASTERR", "OPTYPE"), &<br />ERR_NUM = @GETENV("LASTERR", "DBERRNUM"), &<br />ERR_MSG = @GETENV("LASTERR", "DBERRMSG"));<br />Ⅰ<br />
  13. 13. Agenda<br />□Mothod of initialize data<br />□ Handing essential DML and DML error<br />□ Handing Advanced DDL sync and DDL error<br />□ Map and manipulating data<br />□ Monitor and Troubleshooting<br />Ⅰ<br />
  14. 14. DDL limitations and influence <br />□ Disable recycle bin and affect other database environment<br />□ affect data filtering, and manipulation by the data pump (passthru/nopassthru)<br />□affect data-definition <br />□Others<br />Ⅰ<br />Must configure DDL synchronization?<br />
  15. 15. DDL Scope<br />□ Mapped<br />Objects that are specified in TABLE and MAP statements <br />□ Unmapped<br />Objects that are not specified in TABLE and MAP statements <br />□Other scope<br />DDL operations that cannot be mapped are of OTHER scope,justlike the follow operations: create user,grantrole,createtablespace ,alter datafile …<br />Ⅰ<br />
  16. 16. DDL Filter <br />● exclude/include <br />● mapped/unmapped/other/all<br />filter scope<br />● opttype/objtype/objname<br />filter special ddl action and object<br />● instr/instrwors<br /> filter via matching<br />Ⅰ<br />ddl &<br />include mapped exclude objtype'table‘ objname"hr.jobs", &<br />exclude INSTRWORDS 'alter add “city"', &<br />include unmapped, objname "hr3.jobs", &<br />include other<br />
  17. 17. DDL DDLSUBST<br />● When may we use DDLSUBST<br /> like as the objects on source and target have the different tablespace<br /> like as the datafile on source and tarhet have different destination<br /> ---------<br />DDLSUBST 'users' with 'system' include mapped objtype ‘table’ INSTRWORDS 'create table tablespace "users"'<br />Ⅰ<br /> Notice:<br />Must be careful and the best way is to restrict the DDL statement via DDL inclusion and exclusion options<br />Take care of ddl matching via instr, it’s strict matching, including space character, carriage-return character<br />
  18. 18. derived object<br />□ Notice the derived object action<br />● Rename<br />● CTAS<br />● Index<br />● Trigger<br />□ mapderived/ nomapderived<br />Ⅰ<br />
  19. 19. DDL Other Topic<br />□ Sequence<br />can the sequence really be synchronized before V11.1.1.1.0?<br />□ Password<br />□ Add supplemental log groups<br />ddloptionsaddtrandataretryop<br />Ⅰ<br />
  20. 20. Use multiple DDLERROR statements<br />□ handing special error-code<br />ddlerror XXXX discard<br />□ handing special object <br />ddlerror default ignore include OBJTYPE TABLE OBJNAME “hr1.*”<br />Ⅰ<br />
  21. 21. Agenda<br />□Mothod of initialize data<br />□Handing essential DML and DML error<br />□ Handing Advanced DDL sync and DDL error<br />□ Map and manipulating data<br />□ Monitor and Troubleshooting<br />Ⅰ<br />
  22. 22. Select Rows<br />□Method of select rows<br />● Filter<br />select rows based on a numeric value by using basic operators or one or more GoldenGate column-conversion functions<br />MAP hr.jobs,TARGET hr.jobs, FILTER (ON INSERT, job_id > 1000);<br /> ● Where<br />select rows based on a conditional statement<br />MAP hr.jobs,TARGET hr.jobs, where (job_name=@presentand= “Jerry”);<br />Ⅰ<br />
  23. 23. Map Columns<br />□COLMAP<br />map table-level column<br /> map hr.jobs, target hr.jobs_add,&<br />colmap (usedefaults,totol_salary=salary*days); <br /> □COLMATCH<br /> map between similarly structured tables that have different column names for the same sets of data<br />colmatch suffix _s<br /> map hr.jobs, target hr.jobs, colmap(usedefaults);<br />The column named Job_id on source is named Job_id_s on target <br />Ⅰ<br />
  24. 24. Data-definationsfile<br />□data-definations file<br />It’s used to synchronize source and target tables that have dissimilar data definitions<br />● DEFGEN <br /> the tool is used to create a data-definations file<br />defgenparamfiledirprm/defgen.prm<br />● SOURCEDEFS<br /> Specifies a file that contains source data definitions created by <br />the DEFGEN utility<br />Ⅰ<br />
  25. 25. Convert DML operations<br />□ select dml type<br /> ● GETUPDATES | IGNOREUPDATES<br /> ● GETDELETES | IGNOREDELETES<br /> ● GETINSERTS | IGNOREINSERTS<br />□ convert dml type<br /> ● INSERTALLRECORDS <br /> ● INSERTUPDATES<br /> ● INSERTDELETES<br />● UPDATEDELETES<br />Ⅰ<br />
  26. 26. Obtain transaction info<br />□ the useful of transaction info<br />□ Function<br />GETENV (“TRANSACTION”, “<return value>”)<br />GETENV (“GGHEADER”, “<return value>”)<br /> map hr.jobs, target hr.jobs,&<br />colmap & <br /> ( &<br />usedefaults,&<br />Op_type = @GETENV (“GGHEADER”, “OPTYPE”),&<br /> Indicator = @GETENV (“GGHEADER”, “BEFOREAFTERINDICATOR”), & <br />commit_ts= @GETENV (“GGHEADER”, “COMMITTIMESTAMP”) &<br /> ) <br />Ⅰ<br />

×