1. OGG手动删除trail文件
https://www.cndba.cn/leo1990/article/2866https://www.cndba.cn/leo1990/article/2866https://www.cndba.cn/leo1990/article/2866https://www.cndba.cn/leo1990/article/2866
https://www.cndba.cn/leo1990/article/2866https://www.cndba.cn/leo1990/article/2866https://www.cndba.cn/leo1990/article/2866
1.1. 查看源端trail文件信息
GGSCI (cndba) 45> INFO EXTTRAIL *
Extract Trail: ./dirdat/et
Extract: EXT1
Seqno: 0
RBA: 0
File Size: 100M
Extract Trail: ./dirdat/ex
Extract: EXT2
Seqno: 7
RBA: 1075
File Size: 100M
Extract Trail: ./dirdat/et
Extract: PUMP1
Seqno: 0
RBA: 0
File Size: 100M
Extract Trail: ./dirdat/ex
Extract: PUMP2
Seqno: 3
RBA: 1279
File Size: 100M
1.2. 查看目标端trail文件信息
GGSCI (cndba) 46> INFO RMTTRAIL *
Extract Trail: ./dirdat/et
Extract: EXT1
Seqno: 0
RBA: 0
File Size: 100M
Extract Trail: ./dirdat/ex
Extract: EXT2
Seqno: 7
RBA: 1075
File Size: 100M
Extract Trail: ./dirdat/et
Extract: PUMP1
Seqno: 0
RBA: 0
File Size: 100M
Extract Trail: ./dirdat/ex
Extract: PUMP2
Seqno: 3
RBA: 1279
File Size: 100M
1.3. 删除trail 文件语法
DELETE RMTTRAIL dirdat/et
相对路径或完全路径,包括两个字符前缀。
使用DELETE EXTTRAIL/RMTTRAIL删除与本地或者远程系统上的跟踪关联的检查点记录。 检查点保存在与Oracle GoldenGate目录的dirchk子目录中的组具有相同名称的文件中。
该命令仅从检查点文件中删除对指定路径的引用。 它不会自行删除跟踪文件。 要删除跟踪文件,请使用标准操作系统命令删除文件。
DELETE EXTTRAIL/RMTTRAIL 这两个命令在源端执行即可删除本地和目标端trail文件检查点记录
1.4. 删除本地trail 文件
GGSCI (cndba) 104> DELETE EXTTRAIL ./dirdat/et
Cannot delete extract trail ./dirdat/et, extract EXT1 is running.
Cannot delete extract trail ./dirdat/et, extract PUMP1 is running.
GGSCI (cndba) 105> stop ext1
Sending STOP request to EXTRACT EXT1 ...
Request processed.
GGSCI (cndba) 106> DELETE EXTTRAIL ./dirdat/et
Deleting extract trail ./dirdat/et for extract EXT1
Cannot delete extract trail ./dirdat/et, extract PUMP1 is running.
GGSCI (cndba) 107> stop pump1
Sending STOP request to EXTRACT PUMP1 ...
Request processed.
GGSCI (cndba) 108> DELETE EXTTRAIL ./dirdat/et
Deleting extract trail ./dirdat/et for extract PUMP1
[oracle@www.cndba.cn dirdat]$ ll
total 48
drwxr-xr-x 2 oracle oinstall 4096 Jun 8 11:21 backup
-rw-rw-rw- 1 oracle oinstall 1016 Jun 17 22:13 et000000
-rw-rw-rw- 1 oracle oinstall 1212 Jun 17 22:34 et000001
-rw-rw-rw- 1 oracle oinstall 1385 Jun 17 22:34 et000002
操作系统命令删除
[oracle@www.cndba.cn dirdat]$ rm -rf et*
[oracle@www.cndba.cn dirdat]$ ll
total 32
drwxr-xr-x 2 oracle oinstall 4096 Jun 8 11:21 backup
-rw-rw-rw- 1 oracle oinstall 1175 Jun 9 02:20 ex000000
-rw-rw-rw- 1 oracle oinstall 1322 Jun 9 02:49 ex000001
-rw-rw-rw- 1 oracle oinstall 2513 Jun 9 03:01 ex000002
-rw-rw-rw- 1 oracle oinstall 1350 Jun 12 18:42 ex000003
-rw-rw-rw- 1 oracle oinstall 1352 Jun 13 10:05 ex000004
-rw-rw-rw- 1 oracle oinstall 1075 Jun 17 16:08 ex000005
-rw-rw-rw- 1 oracle oinstall 1075 Jun 17 16:08 ex000006
重新添加extract,pump进程trail文件
注意:如果不执行DELETE EXTTRAIL ./dirdat/et文件只是从操作系统级别删除trail文件,重启extract进程,生成的trail文件序列号会从以前删除的最大的trail文件号加1。执行删除trail 文件命令时,再次生成trail文件会重新从0开始。
ADD EXTTRAIL ./dirdat/et, EXTRACT EXT1
ADD RMTTRAIL ./dirdat/et, EXTRACT PUMP1
[oracle@www.cndba.cn dirdat]$ ll
total 36
drwxr-xr-x 2 oracle oinstall 4096 Jun 8 11:21 backup
-rw-rw-rw- 1 oracle oinstall 1016 Jun 17 19:54 et000000
-rw-rw-rw- 1 oracle oinstall 1175 Jun 9 02:20 ex000000
-rw-rw-rw- 1 oracle oinstall 1322 Jun 9 02:49 ex000001
-rw-rw-rw- 1 oracle oinstall 2513 Jun 9 03:01 ex000002
-rw-rw-rw- 1 oracle oinstall 1350 Jun 12 18:42 ex000003
-rw-rw-rw- 1 oracle oinstall 1352 Jun 13 10:05 ex000004
-rw-rw-rw- 1 oracle oinstall 1075 Jun 17 16:08 ex000005
-rw-rw-rw- 1 oracle oinstall 1075 Jun 17 16:08 ex000006
1.5. 删除目标端trail文件
先执行以下命令DELETE EXTTRAIL ./dirdat/et
在操作系统级别删除trail文件
版权声明:本文为博主原创文章,未经博主允许不得转载。