1. OGG modify trail file size
1.1. Adding process specified trail file size
添加本地队列文件的时候megabytes 添加参数指定队列文件的大小,如果指定默认是100m
例如:
add exttrail ./dirdat/et, extract ext1
add rmttrail ./dirdat/et,extract pump1
GGSCI (cndba) 8> info exttrail *
Extract Trail: ./dirdat/et
Extract: EXT1
Seqno: 8
RBA: 1075
File Size: 100M
Extract Trail: ./dirdat/et
Extract: PUMP1
Seqno: 6
RBA: 1314
File Size: 100M
可通过以下方式在添加时指定trail文件大小:
add exttrail ./dirdat/et,extract ext1,megabytes 500
ADD RMTTRAIL ./dirdat/et, EXTRACT pump1, MEGABYTES 500
1.2. Modify trail file size
你可以通过alter 命令调整MEGABYTES 参数的值来改变trail 文件的大小,是使用ALTER EXTTRAIL
或者 ALTER RMTTRAIL要看trail 文件是在本地还是在其它地方
使用下面的命令获得你想修改trail 文件的存放地址,你的trail文件所属的组
本地
INFO EXTTRAIL * (Local trail)
INFO RMTTRAIL * (Remote trail)
通过以下命名修改本地和远端的trail文件
(Remote trail)
ALTER RMTTRAIL <trail name>, EXTRACT <group name>, MEGABYTES <n>
(Local trail)
ALTER EXTTRAIL <trail name>, EXTRACT <group name>, MEGABYTES <n>
1.3. Trail file size modification step
1.3.1. Stop the source extraction and delivery process
GGSCI (cndba) 12> stop ext1
Sending STOP request to EXTRACT EXT1 ...
Request processed.
1.3.2. Check the replication process applications trail of documentation
检查源端投递到目标端的trail文件和目标端trail文件检查点是否一致,若果一样说明复制进程应用完成可以继续后面的操作
--源端查看检查点信息
GGSCI (cndba) 5> info pump1,showch
EXTRACT PUMP1 Last Started 2018-06-11 21:17 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Log Read Checkpoint File ./dirdat/et000025
2018-06-11 21:17:54.955265 RBA 1075
Current Checkpoint Detrail:
Read Checkpoint #1
GGS Log Trail
Startup Checkpoint (starting position in the data source):
Sequence #: 24
RBA: 1324
Timestamp: 2018-06-11 18:49:55.000000
Extract Trail: ./dirdat/et
Current Checkpoint (position of last record read in the data source):
Sequence #: 25
RBA: 1075
Timestamp: 2018-06-11 21:17:54.955265
Extract Trail: ./dirdat/et
Write Checkpoint #1
GGS Log Trail
Current Checkpoint (current write position):
Sequence #: 22
RBA: 1314
Timestamp: 2018-06-11 21:20:05.434123
Extract Trail: ./dirdat/et
CSN state information:
CRC: 41-A9-39-75
Latest CSN: 1311152
Latest TXN: 3.2.972
Latest CSN of finished TXNs: 1311152
Completed TXNs: 3.2.972
Header:
Version = 2
Record Source = A
Type = 1
# Input Checkpoints = 1
# Output Checkpoints = 1
File Information:
Block Size = 2048
Max Blocks = 100
Record Length = 2048
Current Offset = 0
Configuration:
Data Source = 0
Transaction Integrity = 1
Task Type = 0
Status:
Start Time = 2018-06-11 21:17:53
Last Update Time = 2018-06-11 21:20:05
Stop Status = A
Last Result = 400
--目标端查看检查点信息
GGSCI (cndba) 6> info rep1,showch
REPLICAT REP1 Last Started 2018-06-11 21:18 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:02 ago)
Log Read Checkpoint File ./dirdat/et000022
2018-06-11 21:17:55.377684 RBA 1314
Current Checkpoint Detrail:
Read Checkpoint #1
GGS Log Trail
Startup Checkpoint (starting position in the data source):
Sequence #: 21
RBA: 2327
Timestamp: 2018-06-11 18:49:49.320050
Extract Trail: ./dirdat/et
Current Checkpoint (position of last record read in the data source):
Sequence #: 22
RBA: 1314
Timestamp: 2018-06-11 21:17:55.377684
Extract Trail: ./dirdat/et
CSN state information:
CRC: 9-70-46-F2
Latest CSN: 1311152
Latest TXN: 3.2.972
Latest CSN of finished TXNs: 1311152
Completed TXNs: 3.2.972
Header:
Version = 2
Record Source = A
Type = 1
# Input Checkpoints = 1
# Output Checkpoints = 0
File Information:
Block Size = 2048
Max Blocks = 100
Record Length = 2048
Current Offset = 0
Configuration:
Data Source = 0
Transaction Integrity = -1
Task Type = 0
Database Checkpoint:
Checkpoint table = ogg.checkpoint
Key = 401993224 (0x17f5ee08)
Create Time = 2018-06-07 16:09:16
Status:
Start Time = 2018-06-11 21:18:05
Last Update Time = 2018-06-11 21:35:09
Stop Status = A
Last Result = 400
1.3.3. View trail file size information at the source
GGSCI (cndba) 14> info exttrail *
Extract Trail: ./dirdat/et
Extract: EXT1
Seqno: 8
RBA: 1075
File Size: 100M
Extract Trail: ./dirdat/et
Extract: PUMP1
Seqno: 6
RBA: 1314
File Size: 100M
1.3.4. Delivery Process
GGSCI (cndba) 13> stop pump1
Sending STOP request to EXTRACT PUMP1 ...
Request processed.
1.3.5. Stop the replication process target end
GGSCI (cndba) 10> stop rep1
Sending STOP request to REPLICAT REP1 ...
Request processed.
GGSCI (cndba) 11> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT STOPPED REP1 00:00:00 00:00:01
1.3.6 Modify local and remote trail file size
修改本地文件需要重启抽取进程
GGSCI (cndba) 19> alter exttrail ./dirdat/et,extract ext1,megabytes 200
EXTTRAIL altered.
如果只修改远端trail文件大小的话不需要重启进程,直接修改。
GGSCI (cndba) 18> alter rmttrail ./dirdat/et, extract pump1, megabytes 200
RMTTRAIL altered.
1.3.7. Start the source process
GGSCI (cndba) 21> start ext1
Sending START request to MANAGER ...
EXTRACT EXT1 starting
GGSCI (cndba) 22> start pump1
Sending START request to MANAGER ...
EXTRACT PUMP1 starting
1.3.8 Generating the new trail local and remote file
GGSCI (cndba) 23> SEND extract ext1, ROLLOVER
Sending ROLLOVER request to EXTRACT EXT1 ...
Request processed.
GGSCI (cndba) 24> SEND extract pump1, ROLLOVER
Sending ROLLOVER request to EXTRACT PUMP1 ...
Request processed.
查看修改后的trail文件大小
GGSCI (cndba) 25> info exttrail *
Extract Trail: ./dirdat/et
Extract: EXT1
Seqno: 10
RBA: 1016
File Size: 200M
Extract Trail: ./dirdat/et
Extract: PUMP1
Seqno: 8
RBA: 1265
File Size: 200M
1.3.9. Start the target end process
GGSCI (cndba) 12> start rep1
Sending START request to MANAGER ...
REPLICAT REP1 starting
GGSCI (cndba) 13> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:02