Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

96

积分

0

好友

4

主题
1#
发表于 2012-3-21 16:36:16 | 查看: 4454| 回复: 4
有多对一的同步关系,假设其中有一台有逻辑错误,update或delete几张表,OGG已经应用过去了。我应该怎么把这个错误回退或减少到最小损失。OGG有这个错误的处理办法么?
2#
发表于 2012-3-21 16:44:51
看   reverse,前提是OGG的日志没有删除。
但总归是麻烦的

回复 只看该作者 道具 举报

3#
发表于 2012-3-21 17:50:12

回复 2# 的帖子

有具体的一些资料,或配置文档么?

回复 只看该作者 道具 举报

4#
发表于 2012-3-21 19:47:14
Oracle® GoldenGate
Windows and UNIX Administrator’s Guide
11g Release 1 (11.1.1)
E17341-01

CHAPTER 21
Undoing data changes with the Reverse utility


How Do I Roll Back Inserts Using A Trail File With OGG Reverse? [ID 971707.1]

[ 本帖最后由 teapot 于 2012-3-21 19:52 编辑 ]

回复 只看该作者 道具 举报

5#
发表于 2012-3-21 23:36:44

回复 4# 的帖子

To roll back Inserts for a specific Table using "GoldenGate Reverse"
- Run LogDump to create a file with only Insert Operations for a specific Table(s) from a specific Timestamp
- Run Reverse to turn Insert Operations into Delete Operations
- Run Replicat to apply the Delete Operations to the Target DB
- Run LogDump from the Command Prompt:
>Logdump
logdump>open [tr]
logdump>ghdr on
logdump>filter rectype inserts
logdump>filter filename
logdump>filter match all
logdump>scanfortime
logdump>count
logdump>save ## records
logdump>quit
- Once the file is created from LogDump, the Insert Operations can be changed to Delete Operations using the
"Reverse" application.
- Run Reverse from the command prompt:
>reverse ,
The Replicat Parameter File will need the following parameters:
MAXTRANSOPS 1
HANDLECOLLISIONS
- MAXTRANSOPS splits transactions overriding Transaction Boundaries
- HANDLECOLLISIONS will cause Replicat to ignore Delete Collisions, i.e. Delete Operation for rows that do not
exist in the Target Database
- Add the Replicat using the new file as Input
ggsci> add replicat , extfile , nodbcheckpoint
ggsci> start replicat
ggsci> stop replicat
N.B. If the user intends to use REVERSE for more than just INSERTS, certain restrictions (requirements) apply
1) you will need to add supplemental logging to all columns
2) you will need to use NOCOMPRESSUPDATES and NOCOMPRESSDELETES
3) you will need to use GETUPDATEBEFORES

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-24 11:07 , Processed in 0.047203 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569