Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Developer Day
http://www.oracle.com/technetwork
I want to improve
the performance of
my application...
I coded it
this way...
Is the app
customizable?
How does
restricted task
reassignment
work?
OracleTechnology Network.
Its code for sharing expertise.
Come to the best place to collaborate with other
IT professionals.
OracleTechnology Network is the worlds largest community
of developers, administrators, and architects using industrystandard technologies with Oracle products. Sign up for a free
membership and youll have access to:
JOINTODAY
Go to:oracle.com/technetwork
Copyright 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners. 10039688
Developer Day Hands-on Lab, Workbook for Introduction to Oracle GoldenGate, version 11.1.1
Copyright 1995, 2010 Oracle and\or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or
allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit,
perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or
decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find
any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the
U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant
to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use,
duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in
the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the
additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA,
Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software is developed for general use in a variety of information management applications. It is not developed or
intended for use in any inherently dangerous applications, including applications which may create a risk of personal
injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its
affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.
Oracle is a registered trademark of Oracle Corporation and\or its affiliates. Other names may be trademarks of their
respective owners.
This software and documentation may provide access to or information on content, products, and services from third
parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind
with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible
for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
Contents
Trail
To reset the lab environment, execute the cleanup_goldengate.sh script from the.
/Oracle_GoldenGate directory:
cd /Oracle_GoldenGate
cleanup_goldengate.sh
If it is not running, then start the manager with the following command:
GGSCI> start manager
Review the Manager run-time parameters by entering the GGSCI command
GGSCI> view param mgr
Review the Extract Task runtime parameters. Issue the GGSCI command
GGSCI> view param eload
Press the space bar to display the next page. (Comments are denoted by two dashes).
10
Review the Replicat Task runtime parameters. Issue the GGSCI command
GGSCI> view param rload
Press the space bar to display the next page.
11
Review the change data capture runtime settings by executing the GGSCI command
GGSCI> view param emastr
1.4.3ExtractDataPumpandAssociatedGoldenGateTrail
Next, the Extract Data Pump and associated Remote GoldenGate Trail are created. A
Remote GoldenGate trail is one where the Extract (typically a Data Pump) transmits data
over a network (LAN or WAN) to a target file location.
Review the Data Pump runtime configuration by executing the GGSCI command
GGSCI> view param pmastr
14
Accessories
Terminal
cd /Oracle_GoldenGate/dirsql
sqlplus east/Oracle @trans_generator.sql
Note: It is recommended you leave this window open throughout the entire workshop.
15
16
Continue checking the Task status until both ELOAD and RLOAD go into the
STOPPED state.
17
To validate instantiation results, review the Extract Task report file by issuing the GGSCI
command
GGSCI> view report eload
Press the space bar to page down in the display. Take note of the record counts reported
for each table.
18
Execute the same command for rload, the Replicat Task. The report counts for the two
Tasks must match.
If the Extract and Replicat Task counts match, start overlap data replication processing by
executing the following GGSCI commands:
GGSCI> start rmastr
To see the status and current checkpoint of the real-time capture and apply processes,
execute the following GGSCI command:
GGSCI> info er *
19
This overlap period is the time during which both the Extract reading redo and the
Extract Task reading directly from the source tables were both running. During this
period transactions written to redo could have also been captured by the Extract Task and
written to the target during the instantiation process. We must take this into consideration
and have GoldenGate handle any duplicate or missing records.
This is accomplished by two special Replicat runtime parameters,
HANDLECOLLISIONS and END RUNTIME.
When HANDLECOLLISIONS is active, Replicat performs the following special
operations:
1. Duplicate inserts.
a.If Replicat attempts to write a row into the target that already exists, the target
row is over-written.
2. Missing updates or deletes
a.If Replicat attempts to update or delete a row that is missing, the data is thrown
out.
END RUNTIME sets Replicat to perform a normal shutdown when a record in the
Extract Trail is encountered with commit timestamp equal to, or after the process start
time.
20
When Replicat goes into the STOPPED state, view the report file via the command
GGSCI> view report rmastr
Press the space bar to page down in the display.
21
Take note of the transaction counts for each table reported at the end of the file. Duplicate
rows are reported as insert collisions.
22
Save and close the file; then restart Replicat via the GGSCI command
GGSCI> start rmastr
Wait for the trans_generator script, which was executed in step 1.5, to complete.
23
Repeat the command until the response is At EOF, no more records to process.
Start a sqlplus session for the east schema
sqlplus east/Oracle
Note the row counts for the following tables:
select count(*) from ACCOUNT;
select count(*) from ACCOUNT_TRANS;
select count(*) from TELLER_TRANS;
select count(*) from BRANCH_ATM;
24
Repeat the command until the response is At EOF, no more records to process.
Start a sqlplus session for the west schema at a Windows Command prompt by executing
the command
sqlplus west/Oracle
Note the row counts for the following tables:
select count(*) from ACCOUNT;
select count(*) from ACCOUNT_TRANS;
select count(*) from TELLER_TRANS;
select count(*) from BRANCH_ATM;
25
If the row counts match those returned for the source tables; congratulations, you have
successfully completed this section of the workshop.
26