您好,登錄后才能下訂單哦!
Oracle GoldenGate學習之--GoldenGate的監控
1、使用GGSCI命令監控
(1)進入GoldenGate安裝目錄,運行GGSCI,然后使用info all查看整體的運行狀況
GGSCI (aix212) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING EORA_1 00:00:00 00:00:03 EXTRACT RUNNING PORA_1 00:00:00 00:00:00 GGSCI (aix211) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING RORA_1 00:00:00 00:00:09
Group表示進程的名稱(MGR進程不顯示名字);
Lag表示進程的延時;Status表示進程的狀態,有4種狀態。
STARTING 表示正在啟動過程中。
RUNNING 表示進程正常運行。
STOPPED 表示進程被正常關閉。
ABENDED 表示進程非正常關閉,需要進一步調查原因。
正常情況下,所有進程的狀態應該為RUNNING,且Lag應該在一個合理的范圍內。
(2)使用view params <進程名> 可以查看進程的參數設置,該命令支持通配符*
源端: GGSCI (aix212) 4> view param mgr dynamicportlist 7800-8000 autorestart extract *,waitminutes 2,resetminutes 5 GGSCI (aix212) 7> view param eini_1 EXTRACT EINI_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) USERID ogg,PASSWORD ogg RMTHOST 192.168.8.211,MGRPORT 7809 RMTTASK REPLICAT, GROUP RINI_1 TABLE scott.EMP_OGG; GGSCI (aix212) 5> view param eora_1 EXTRACT EORA_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) USERID ogg,PASSWORD ogg EXTTRAIL ./dirdat/aa TABLE scott.emp_ogg; GGSCI (aix212) 6> view param pora_1 EXTRACT PORA_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) PASSTHRU RMTHOST 192.168.8.211,MGRPORT 7809 RMTTRAIL ./dirdat/pa TABLE scott.emp_ogg; 目標端: GGSCI (aix211) 4> view param mgr port 7809 dynamicportlist 7800-8000 autorestart extract *,waitminutes 2,resetminutes 5 GGSCI (aix211) 3> view param rini_1 REPLICAT RINI_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) ASSUMETARGETDEFS USERID ogg,PASSWORD ogg DISCARDFILE ./dirrpt/RINIaa.dsc,PURGE MAP scott.emp_ogg, TARGET scott.emp_ogg; GGSCI (aix211) 2> view param rora_1 REPLICAT RORA_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) USERID ogg,PASSWORD ogg HANDLECOLLISIONS ASSUMETARGETDEFS DISCARDFILE ./dirrpt/RORA_aa.DSC,PURGE MAP scott.oem_ogg, TARGET scott.emp_ogg;
(3)使用info <進程名稱> 命令可以查看進程信息,可以查看到的信息包括進程狀態、checkpoint信息、延時等
GGSCI (aix212) 8> info eora_1 EXTRACT EORA_1 Last Started 2014-09-25 16:09 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:04 ago) Log Read Checkpoint Oracle Redo Logs 2014-09-25 17:00:16 Seqno 5, RBA 21645824 SCN 0.658565 (658565) GGSCI (aix212) 9> info pora_1 EXTRACT PORA_1 Last Started 2014-09-25 16:09 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:05 ago) Log Read Checkpoint File ./dirdat/pa000000 First Record RBA 0 GGSCI (aix211) 5> info rora_1 REPLICAT RORA_1 Last Started 2014-09-25 16:25 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:04 ago) Log Read Checkpoint File ./dirdat/pa000000 First Record RBA 0
(4)還可以使用info <進程名稱> detail 命令查看更詳細的信息,包括所使用的trail文件、參數文件、報告文件、警告日志的位置等
GGSCI (aix212) 10> info eora_1 detail EXTRACT EORA_1 Last Started 2014-09-25 16:09 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:02 ago) Log Read Checkpoint Oracle Redo Logs 2014-09-25 17:01:58 Seqno 5, RBA 21770240 SCN 0.658666 (658666) Target Extract Trails: Remote Trail Name Seqno RBA Max MB ./dirdat/aa 2 2354 5 Extract Source Begin End /u01/app/oracle/oradata/orcl/redo01.log 2014-09-25 16:07 2014-09-25 17:01 /u01/app/oracle/oradata/orcl/redo01.log 2014-09-23 20:34 2014-09-25 16:08 /u01/app/oracle/oradata/orcl/redo03.log 2014-09-23 15:17 2014-09-23 20:35 Not Available * Initialized * 2014-09-23 15:17 Current directory /ogg Report file /ogg/dirrpt/EORA_1.rpt Parameter file /ogg/dirprm/eora_1.prm Checkpoint file /ogg/dirchk/EORA_1.cpe Process file /ogg/dirpcs/EORA_1.pce Stdout file /ogg/dirout/EORA_1.out Error log /ogg/ggserr.log GGSCI (aix211) 6> info rora_1 detail REPLICAT RORA_1 Last Started 2014-09-25 16:25 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:04 ago) Log Read Checkpoint File ./dirdat/pa000000 First Record RBA 0 Extract Source Begin End ./dirdat/pa000000 * Initialized * First Record ./dirdat/pa000000 * Initialized * First Record Current directory /ogg Report file /ogg/dirrpt/RORA_1.rpt Parameter file /ogg/dirprm/rora_1.prm Checkpoint file /ogg/dirchk/RORA_1.cpr Checkpoint table ogg.checkpoint Process file /ogg/dirpcs/RORA_1.pcr Stdout file /ogg/dirout/RORA_1.out Error log /ogg/ggserr.log
(5)使用info <進程名稱> showch 命令可以查看到詳細的關于checkpoint的信息,用于查看GoldenGate進程處理過的事務記錄
GGSCI (aix212) 11> info eora_1 showch EXTRACT EORA_1 Last Started 2014-09-25 16:09 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:03 ago) Log Read Checkpoint Oracle Redo Logs 2014-09-25 17:04:50 Seqno 5, RBA 21797888 SCN 0.658739 (658739) Current Checkpoint Detail: Read Checkpoint #1 Oracle Redo Log Startup Checkpoint (starting position in the data source): Thread #: 1 Sequence #: 5 RBA: 19244560 Timestamp: 2014-09-25 16:07:15.000000 SCN: 0.656759 (656759) Redo File: /u01/app/oracle/oradata/orcl/redo01.log Recovery Checkpoint (position of oldest unprocessed transaction in the data source): Thread #: 1 Sequence #: 5 RBA: 21795856 Timestamp: 2014-09-25 17:04:43.000000 SCN: 0.658736 (658736) Redo File: /u01/app/oracle/oradata/orcl/redo01.log Current Checkpoint (position of last record read in the data source): Thread #: 1 Sequence #: 5 RBA: 21797888 Timestamp: 2014-09-25 17:04:50.000000 SCN: 0.658739 (658739) Redo File: /u01/app/oracle/oradata/orcl/redo01.log BR Previous Recovery Checkpoint: Thread #: 0 Sequence #: 0 RBA: 0 Timestamp: 2014-09-23 15:22:40.485502 SCN: Not available Redo File: BR Begin Recovery Checkpoint: Thread #: 1 Sequence #: 4 RBA: 10054144 Timestamp: 2014-09-23 19:22:47.000000 SCN: 0.629912 (629912) Redo File: BR End Recovery Checkpoint: Thread #: 1 Sequence #: 4 RBA: 10054144 Timestamp: 2014-09-23 19:22:47.000000 SCN: 0.629912 (629912) Redo File: Write Checkpoint #1 GGS Log Trail Current Checkpoint (current write position): Sequence #: 2 RBA: 2354 Timestamp: 2014-09-25 17:04:54.617925 Extract Trail: ./dirdat/aa CSN state information: CRC: B9-8B-16-BD Latest CSN: 658581 Latest TXN: 3.47.317 Latest CSN of finished TXNs: 658581 Completed TXNs: 3.47.317 Header: Version = 2 Record Source = A Type = 10 # Input Checkpoints = 1 # Output Checkpoints = 1 File Information: Block Size = 2048 Max Blocks = 100 Record Length = 2048 Current Offset = 0 Configuration: Data Source = 3 Transaction Integrity = 1 Task Type = 0 Status: Start Time = 2014-09-25 16:09:02 Last Update Time = 2014-09-25 17:04:54 Stop Status = A Last Result = 400
其中比較重要的是Extract進程的recovery checkpoint,它表示源數據中最早的未被處理的事務;通過recovery checkpoint可以查看到該事務的redo log位于哪個日志文件以及該日志文件的序列號。
所有序列號比它大的日志文件,均需要保留。
(6)lag <進程名稱> 可以查看詳細的延時信息
GGSCI (aix212) 12> lag eora_1 Sending GETLAG request to EXTRACT EORA_1 ... Last record lag: 2 seconds. At EOF, no more records to process.
(7)stats可以查看進程處理的記錄數:
該報告會詳細地列出處理的類型和記錄數,例如:
stats <進程名稱>,<時間頻度>,table <owner name>.<table name>
GGSCI (aix212) 13> stats eora_1, total Sending STATS request to EXTRACT EORA_1 ... Start of Statistics at 2014-09-25 17:08:54. Output to ./dirdat/aa: Extracting from SCOTT.EMP_OGG to SCOTT.EMP_OGG: *** Total statistics since 2014-09-25 16:11:23 *** Total inserts 3.00 Total updates 0.00 Total deletes 6.00 Total discards 0.00 Total operations 9.00 End of Statistics.
列出自進程啟動以來處理的所有記錄數,如圖11-8所示。
GGSCI (aix212) 15> stats eora_1,daily, table scott.emp_ogg Sending STATS request to EXTRACT EORA_1 ... Start of Statistics at 2014-09-25 17:11:16. Output to ./dirdat/aa: Extracting from SCOTT.EMP_OGG to SCOTT.EMP_OGG: *** Daily statistics since 2014-09-25 16:11:23 *** Total inserts 3.00 Total updates 0.00 Total deletes 6.00 Total discards 0.00 Total operations 9.00 End of Statistics.
列出當天以來處理的有關scott.emp_ogg表的所有記錄數。
(8)view report <進程名稱> 可以查看運行報告
GGSCI (aix212) 16> view report eora_1 *********************************************************************** Oracle GoldenGate Capture for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230 AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:57:02 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. Starting at 2014-09-25 16:09:01 *********************************************************************** Operating System Version: AIX Version 5, Release 3 Node: aix212 Machine: 0009746A4C00 soft limit hard limit Address Space Size : unlimited unlimited Heap Size : unlimited unlimited File Size : unlimited unlimited CPU Time : unlimited unlimited Process id: 229538 Description: *********************************************************************** ** Running with the following parameters ** *********************************************************************** 2014-09-25 16:09:01 INFO OGG-03035 Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:. EXTRACT EORA_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) USERID ogg,PASSWORD *** EXTTRAIL ./dirdat/aa TABLE scott.emp_ogg; 2014-09-25 16:09:01 INFO OGG-01815 Virtual Memory Facilities for: BR anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /ogg/BR/EORA_1. Bounded Recovery Parameter: BRINTERVAL = 4HOURS BRDIR = /ogg 2014-09-25 16:09:02 INFO OGG-01815 Virtual Memory Facilities for: COM anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /ogg/dirtmp. CACHEMGR virtual memory values (may have been adjusted) CACHESIZE: 64G CACHEPAGEOUTSIZE (normal): 8M PROCESS VM AVAIL FROM OS (min): 128G CACHESIZEMAX (strict force to disk): 96G 2014-09-25 16:09:02 INFO OGG-01639 BOUNDED RECOVERY: ACTIVE: for object pool 1: p536622_extr. 2014-09-25 16:09:02 INFO OGG-01640 BOUNDED RECOVERY: recovery start XID: 0.0.0. 2014-09-25 16:09:02 INFO OGG-01641 BOUNDED RECOVERY: recovery start position: SeqNo: 4, RBA: 10053648, SCN: 0.629912 (629912), Timestamp: 201 4-09-23 19:22:47.000000, Thread: 1. 2014-09-25 16:09:02 INFO OGG-01642 BOUNDED RECOVERY: recovery end position: SeqNo: 4, RBA: 10054144, SCN: 0.629912 (629912), Timestamp: 2014- 09-23 19:22:47.000000, Thread: 1. 2014-09-25 16:09:02 INFO OGG-01643 BOUNDED RECOVERY: CANCELED: for object pool 1: p536622_extr. 2014-09-25 16:09:02 INFO OGG-01579 BOUNDED RECOVERY: VALID BCP: CP.EORA_1.000000001. 2014-09-25 16:09:02 INFO OGG-01629 BOUNDED RECOVERY: PERSISTED OBJECTS RECOVERED: <<NONE TO RECOVER>>. Database Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Productio NLSRTL Version 10.2.0.1.0 - Production Database Language and Character Set: NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK" NLS_LANGUAGE = "AMERICAN" NLS_TERRITORY = "AMERICA" NLS_CHARACTERSET = "ZHS16GBK" 2014-09-25 16:09:02 INFO OGG-01513 Positioning to Sequence 5, RBA 19244560, SCN 0.656759. 2014-09-25 16:09:02 INFO OGG-01516 Positioned to Sequence 5, RBA 19244560, SCN 0.656759, Sep 25, 2014 3:07:15 PM. 2014-09-25 16:09:02 INFO OGG-01055 Recovery initialization completed for target file ./dirdat/aa000001, at RBA 1007. 2014-09-25 16:09:02 INFO OGG-01478 Output file ./dirdat/aa is using format RELEASE 11.2. 2014-09-25 16:09:02 INFO OGG-01026 Rolling over remote file ./dirdat/aa000001. 2014-09-25 16:09:02 INFO OGG-01053 Recovery completed for target file ./dirdat/aa000002, at RBA 1007. 2014-09-25 16:09:02 INFO OGG-01057 Recovery completed for all targets. *********************************************************************** ** Run Time Messages ** *********************************************************************** 2014-09-25 16:09:02 INFO OGG-01517 Position of first record processed Sequence 5, RBA 19244560, SCN 0.656759, Sep 25, 2014 3:07:15 PM. TABLE resolved (entry scott.emp_ogg): TABLE "SCOTT"."EMP_OGG"; Using the following key columns for source table SCOTT.EMP_OGG: EMPNO. 2014-09-25 17:07:03 INFO OGG-01021 Command received from GGSCI: GETLAG. 2014-09-25 17:08:54 INFO OGG-01021 Command received from GGSCI: STATS total. 2014-09-25 17:10:43 INFO OGG-01021 Command received from GGSCI: STATS daily,scott.emp_ogg. 2014-09-25 17:11:16 INFO OGG-01021 Command received from GGSCI: STATS daily, table scott.emp_ogg.
(9)也可以進入到 <GoldenGate安裝目錄>/dirrpt/目錄下,查看對應的報告文件。
最新的報告總是以<進程名稱>.rpt命名的。加后綴數字的報告是歷史報告,數字越大對應的時間越久
[oracle@aix212@ ogg]$cd dirrpt [oracle@aix212@ dirrpt]$ls -lt total 248 -rw-rw-rw- 1 oracle oinstall 4962 Sep 25 17:11 EORA_1.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 25 16:32 EINI_1.rpt -rw-rw-rw- 1 oracle oinstall 2252 Sep 25 16:32 MGR.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 25 16:27 EINI_10.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 25 16:09 EINI_11.rpt -rw-rw-rw- 1 oracle oinstall 2377 Sep 25 16:09 PORA_1.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 25 16:08 EINI_12.rpt -rw-rw-rw- 1 oracle oinstall 1897 Sep 25 16:08 MGR0.rpt -rw-rw-rw- 1 oracle oinstall 20631 Sep 25 16:08 EORA_10.rpt -rw-rw-rw- 1 oracle oinstall 11416 Sep 25 16:07 PORA_10.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 25 15:35 EINI_13.rpt -rw-rw-rw- 1 oracle oinstall 3899 Sep 23 19:22 EORA_11.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 23 16:27 EINI_14.rpt -rw-rw-rw- 1 oracle oinstall 3078 Sep 23 16:27 MGR1.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 23 16:24 EINI_15.rpt -rw-rw-rw- 1 oracle oinstall 3124 Sep 23 16:23 EINI_16.rpt -rw-rw-rw- 1 oracle oinstall 3031 Sep 23 16:20 EINI_17.rpt -rw-rw-rw- 1 oracle oinstall 3031 Sep 23 16:18 EINI_18.rpt -rw-rw-rw- 1 oracle oinstall 3031 Sep 23 16:13 EINI_19.rpt -rw-rw-rw- 1 oracle oinstall 1897 Sep 23 15:49 MGR2.rpt -rw-rw-rw- 1 oracle oinstall 2377 Sep 23 15:25 PORA_11.rpt -rw-rw-rw- 1 oracle oinstall 1372 Sep 23 15:15 MGR3.rpt -rw-rw-rw- 1 oracle oinstall 1547 Sep 23 15:09 MGR4.rpt
[oracle@aix212@ dirrpt]$cat EORA_1.rpt
*********************************************************************** Oracle GoldenGate Capture for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230 AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:57:02 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. Starting at 2014-09-25 16:09:01 *********************************************************************** Operating System Version: AIX Version 5, Release 3 Node: aix212 Machine: 0009746A4C00 soft limit hard limit Address Space Size : unlimited unlimited Heap Size : unlimited unlimited File Size : unlimited unlimited CPU Time : unlimited unlimited Process id: 229538 Description: *********************************************************************** ** Running with the following parameters ** *********************************************************************** 2014-09-25 16:09:01 INFO OGG-03035 Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:. EXTRACT EORA_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) USERID ogg,PASSWORD *** EXTTRAIL ./dirdat/aa TABLE scott.emp_ogg; 2014-09-25 16:09:01 INFO OGG-01815 Virtual Memory Facilities for: BR anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /ogg/BR/EORA_1. ......
如果進程運行時有錯誤,則報告文件中會包括錯誤代碼和詳細的錯誤診斷信息。通過查找錯誤代碼,可以幫助定位錯誤原因,解決問題。
2、ggserr.log日志監控
(1)可以用以下方法查看日志文件。
可以通過操作系統命令直接查看ggserr.log文件。
使用GoldenGate Director。
在GGSCI中運行命令view ggsevt。
(2)在日志文件中可以查看到的內容如下。
GGSCI命令的歷史記錄。
GoldenGate進程的啟動與停止。
已執行的處理。
發生的錯誤。
信息和警告消息。
(3)日志文件的部分內容
GGSCI (aix212) 1> view ggsevt 2014-09-23 15:02:08 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): edit param mg. 2014-09-23 15:02:16 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): edit param mgr. 2014-09-23 15:04:37 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): edit param mgr. 2014-09-23 15:04:57 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start mgr. 2014-09-23 15:04:58 INFO OGG-00983 Oracle GoldenGate Manager for Oracle, mgr.prm: Manager started (port 7809). 2014-09-23 15:06:09 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): add extract eini_1 sourceistable ......
案例分析1:
目標端replicat進程啟動異常
GGSCI (aix211) 16> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT ABENDED RORA_1 00:00:00 43:38:02
查看日志:
日志1:
2014-09-25 16:03:42 INFO OGG-01815 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Virtual Memory Facilities for: COM anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /ogg/dirtmp. 2014-09-25 16:03:42 ERROR OGG-00446 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Checkpoint table ogg.checkpoint does not exist. Pleas e create the table or recreate the RORA_1 group using the correct table. 2014-09-25 16:03:42 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rora_1.prm: PROCESS ABENDING.
無法找到checkpint table !
GGSCI (aix211) 2> delete checkpointtable GGSCI (aix211) 3> edit param ./GLOBALS CHECKPOINTTABLE ogg.checkpoint GGSCI (aix211) 3>exit 必須退出ggsci,checkpoint table 才會生效 [oracle@rh7 ogg]$ ./ggsci GGSCI (aix211) 1> dblogin userid ogg,password ogg Successfully logged into database. GGSCI (aix211) 2> add checkpointtable No checkpoint table specified, using GLOBALS specification (ogg.checkpoint)... Successfully created checkpoint table ogg.checkpoint.
重新啟動replicat進程:
GGSCI (aix211) 16> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT ABENDED RORA_1 00:00:00 43:38:02
啟動失敗,查看日志!
日志2:
[oracle@aix211 ogg]$tail ggserr.log 2014-09-25 16:11:47 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: REPLICAT RORA_1 starting. 2014-09-25 16:11:48 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rora_1.prm: REPLICAT RORA_1 starting. 2014-09-25 16:11:48 INFO OGG-03035 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:. 2014-09-25 16:11:48 INFO OGG-01815 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Virtual Memory Facilities for: COM anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /ogg/dirtmp. 2014-09-25 16:11:48 ERROR OGG-00446 Oracle GoldenGate Delivery for Oracle, rora_1.prm: No data selecting position from checkpoint table ogg.checkpoint for group 'RORA_1', key 1056363220 (0x3ef6d2d4), SQL <SELECT a.current_dir, a.seqno, a.rba, a.audit_ts, a.log_csn, a.log_xid, a.log_cmplt_csn, a.log_cmplt_xids, b.log_cmplt_xids FROM ogg.checkpoint a LEFT JOIN ogg.checkpoint_lox b ON a.group_name = b.group_name AND a.group_key = b.group_key AND a.log_cmplt_csn = b.log_cmplt_csn WHERE a.group_name = 'RORA_1' AND a.group_key = 1056363220>. 2014-09-25 16:11:48 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rora_1.prm: PROCESS ABENDING.
checkpointtable 錯誤 !
處理方法:
刪除replicat進程: GGSCI (aix211) 7> delete replicat rora_1 Deleted REPLICAT RORA_1. 添加新的replicat進程: GGSCI (aix211) 8> add replicat rora_1,exttrail ./dirdat/pa,checkpointtable ogg.checkpoint REPLICAT added. GGSCI (aix211) 9> edit param rora_1 "/ogg/dirprm/rora_1.prm" 7 lines, 198 characters REPLICAT RORA_1 SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) USERID ogg,PASSWORD ogg HANDLECOLLISIONS ASSUMETARGETDEFS DISCARDFILE ./dirrpt/RORA_aa.DSC,PURGE MAP scott.oem_ogg, TARGET scott.emp_ogg; ~ 重新啟動replicat進程 GGSCI (aix211) 10> start replicat rora_1 Sending START request to MANAGER ... REPLICAT RORA_1 starting GGSCI (aix211) 11> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING RORA_1 00:00:00 00:00:03 啟動成功!
查看ogg日志:
GGSCI (aix211) 12> view ggsevt
2014-09-25 16:25:13 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: REPLICAT RORA_1 starting. 2014-09-25 16:25:13 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rora_1.prm: REPLICAT RORA_1 starting. 2014-09-25 16:25:13 INFO OGG-03035 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Operating system characte r set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:. 2014-09-25 16:25:13 INFO OGG-01815 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Virtual Memory Facilities for: COM anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /ogg/dirtmp. 2014-09-25 16:25:13 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rora_1.prm: REPLICAT RORA_1 started.
案例分析2:
源端初始化進程(eini_1)和目標端初始化進程(rini_1)
目標端初始化進程rini_1:
GGSCI (aix211) 13> info rini_1 REPLICAT RINI_1 Initialized 2014-09-23 15:40 Status STOPPED Checkpoint Lag 00:00:00 (updated 48:46:37 ago) Log Read Checkpoint Not Available Task SPECIALRUN
源端初始化進程eini_1:
GGSCI (aix212) 21> info eini_1 EXTRACT EINI_1 Last Started 2014-09-25 16:09 Status STOPPED Checkpoint Lag Not Available Log Read Checkpoint Table SCOTT.EMP_OGG 2014-09-25 16:09:35 Record 14 Task SOURCEISTABLE
啟動源端初始化進程:
GGSCI (aix212) 22> start eini_1 Sending START request to MANAGER ... EXTRACT EINI_1 starting GGSCI (aix212) 23> info eini_1 EXTRACT EINI_1 Last Started 2014-09-25 16:09 Status RUNNING Checkpoint Lag Not Available Log Read Checkpoint Table SCOTT.EMP_OGG 2014-09-25 16:09:35 Record 14 Task SOURCEISTAB
進程啟動后,目標端初始化進程自動啟動!
GGSCI (aix211) 14> info rini_1 REPLICAT RINI_1 Initialized 2014-09-23 15:40 Status RUNNING Checkpoint Lag 00:00:00 (updated 48:47:03 ago) Log Read Checkpoint Not Available Task SPECIALRUN
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。