Oracle Goldengate并行复制进程状态查看没有transaction信息
Oracle Goldengate并行复制进程状态查看
在前面几期文章中,研究了针对大事务的优化应用处理,比如在前期规划的时候就要使用并行进程,将非并行进程转换为并行进程,提供性能。
在性能优化方面,Oracle Golden gate也在不断的迭代,从起初的经典复制模式,到集成模式,到并行模式,或者其他的进程拆分,进程合并的技术。
在经典模式中,我们常用 send replicat_name,status
查看进程同步信息,其中可以看到进程处理的transaction数量。
GGSCI (oggser) 1> send repep ,statusSending STATUS request to REPLICAT REPEP ...Current status: At EOFSequence #: 0RBA: 2,0580 records in current transaction.
但是在并行复制模式下,同样的命令不能看到当前处理的transaction数量了。输出的结果如下
GGSCI (oggser) 2> send rscms,statusSending STATUS request to REPLICAT RSCMS ...Current status: Processing data
Map Parallelism: 8
Min Apply Parallelism: 2
Current Apply Parallelism: 2
Max Apply Parallelism: 8
为此查询了MOS,有相关的ID说明。文章中并未提供新的查看命令。
SEND Command Output For Parallel Replicat (Doc ID 2793129.1)
Parallel Replicat - Send Status For Parallel Replicat Do Not Show Seqno And Rba (Doc ID 2856413.1)
另辟蹊径,无意中发现stats命令可以查看到事务数。
GGSCI (oggser) 2> stats rscms,dailySending STATS request to REPLICAT RSCMS ...Parallel Replicat Statistics:Total transactions 383500.00Large transactions 0.00Total metadata changes 0.00DDL operations 0.00Replicated procedures 0.00Event Actions 0.00Datatype functionality 0.00Store Procedures 0.00Checkpoint errors 0.00Transactions retried 0.00
拓展,stats命令的使用介绍
STATS REPLICAT
Use STATS REPLICAT to display statistics for one or more Replicat groups. Thread statistics for a coordinated Replicat group are provided as follows.
Thread Lag Gap
The difference between the maximum lag and the minimum lag among all threads.
Coordinated Total DDLs
The total number of coordinated DDL transactions.
Coordinated Total PK-Update Transactions
The total number of coordinated transactions that involved an update to a primary key.
Coordinated Total EMI Transactions
The total number of coordinated EVENTACTIONS events.
Total Transactions with User-Requested Coordination
The total number of coordination’s that were explicitly requested in the configuration by means of the COORDINATED option of the MAP parameter.
Average Coordination Time
The average time (in seconds) spent in coordination among all threads.
STATS REPLICAT group_name
[, statistic]
[, DDLSONLY]
[, TABLE [container. | catalog.]schema.table]
[, TOTALSONLY [container. | catalog.]schema.table]
[, REPORTCDR]
[, REPORTCHARCONV]
[, REPORTDETAIL | NOREPORTDETAIL]
[, REPORTRATE {HR | MIN | SEC}]
group_name
The name of a Replicat group or a wildcard (*) to specify multiple groups. For example, T* shows statistics for all Replicat groups whose names begin with T.statistic
The statistic to be displayed. More than one statistic can be specified by separating each with a comma, for example STATS REPLICAT finance, TOTAL, DAILY.TOTAL
Displays totals since process startup.DAILY
Displays totals since the start of the current day.HOURLY
Displays totals since the start of the current hour.LATEST
Displays totals since the last RESET command.RESET
Resets the counters in the LATEST statistical field.DDLSONLY
Displays the statistics for DDL statements including number of DDL statements in a readable format.TABLE [container. | catalog.]schema.table_name]
Displays statistics only for the specified table or a group of tables specified with a wildcard (*). The table name or wildcard specification must be fully qualified with the two-part or three-part name, for example hr.emp or *.*.*.TOTALSONLY [container. | catalog.]schema.table_name]
Summarizes the statistics for the specified table or a group of tables specified with a wildcard (*). The table name or wildcard specification must be fully qualified with the two-part or three-part name, for example hr.emp or *.*.*.REPORTCDR
Shows statistics for Conflict Detection and Resolution. Statistics include:Total CDR conflictsCDR resolutions succeededCDR resolutions failedCDR INSERTROWEXISTS conflictsCDR UPDATEROWEXISTS conflictsCDR UPDATEROWMISSING conflictsCDR DELETEROWEXISTS conflictsCDR DELETEROWMISSING conflictsREPORTCHARCONV
Reports statistics for character validation when character-set conversion is performed. The following statistics are added to the STATS output:Total column character set conversion failure: the number of validation or conversion failures in the current Replicat run.Total column data truncation: the number of times that column data was truncated in the current Replicat run as the result of character set conversionREPORTDETAIL | NOREPORTDETAIL
Controls whether or not the output includes operations that were not replicated as the result of collision errors. These operations are reported in the regular statistics (inserts, updates, and deletes performed) plus as statistics in the detail display, if enabled. For example, if 10 records were insert operations and they were all ignored due to duplicate keys, the report would indicate that there were 10 inserts and also 10 discards due to collisions. The default is REPORTDETAIL.REPORTRATE {HR | MIN | SEC}
Displays statistics in terms of processing rate rather than absolute values.HR
Sets the processing rate in terms of hours.MIN
Sets the processing rate in terms of minutes.SEC
Sets the processing rate in terms of seconds.
Examples
The following example displays total and hourly statistics per minute for a specific table, and it also resets the latest statistics. Statistics for discarded operations are not reported.
STATS REPLICAT finance, TOTAL, HOURLY, TABLE sales.acct, REPORTRATE MIN, RESET, NOREPORTDETAIL
The following example displays the same statistics as the previous example, but for thread 3 of a coordinated Replicat group.
STATS REPLICAT fin003, TOTAL, HOURLY, TABLE sales.acct, REPORTRATE MIN, RESET, NOREPORTDETAIL