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