使用goldengate error log檢視錯誤資訊

zhangsharp20發表於2014-12-30
我們可以使用oracle goldengate error log去檢視:

● GGSCI的歷史命令
● oracle goldengate程式的啟動和停止
● 執行的過程
● 發生的錯誤
● 資訊和提醒條目

因為the error log顯示了序列裡發生的事件,所以這是一個好的工具去探測錯誤發生的原因。例如,你可能會發現:

● 某些人停止了程式
● TCP/IP或是資料庫連線的錯誤
● 程式打不開檔案

Figure 3 oracle goldengate錯誤日誌(ggserr.log file)

2011-01-08 11:20:56 GGS INFO 301 GoldenGate Manager for Oracle, 
mgr.prm: Command received from GUI (START GGSCI ).
2011-01-08 11:20:56 GGS INFO 302 GoldenGate Manager for Oracle, 
mgr.prm: Manager started GGSCI process on port 7840.
2011-01-08 11:21:31 GGS INFO 301 GoldenGate Manager for Oracle, 
mgr.prm: Command received from GUI (START GGSCI ).
2011-01-08 11:21:31 GGS INFO 302 GoldenGate Manager for Oracle, 
mgr.prm: Manager started GGSCI process on port 7841.
2011-01-08 11:24:15 GGS INFO 301 GoldenGate Manager for Oracle, 
mgr.prm: Command received from GUI (START GGSCI ).
2011-01-08 11:24:15 GGS INFO 302 GoldenGate Manager for Oracle, 
mgr.prm: Manager started GGSCI process on port 7842.
2011-01-08 11:24:16 GGS INFO 399 GoldenGate Command Interpreter for 
Oracle: GGSCI command (ggs): add extract extcust tranlog, begin now.
2011-01-08 11:30:19 GGS INFO 399 GoldenGate Command Interpreter for 
Oracle: GGSCI command (ggs): add rmttrail /home/ggs, extract ggs

檢視錯誤日誌

使用下列任何一種方式:

● 在ogg的根目錄下使用標準的shell命令的方式去檢視ggserr.log檔案
● oracle goldengate的助理
● GGSCI下的VIEW GGSEVT命令

語法 VIEW GGSEVT

       過濾錯誤日誌
錯誤日誌會變得比較大,但是能夠對期進行過濾,例如,僅過濾含有error的日誌:

在OGG目錄下執行
$ more ggserr.log | grep ERROR
因為the error log會一直隨著你使用OGG而增加,因此必須考慮歸檔和刪除檔案中
老舊的條目

注意:在UNIX系統中,日誌被清理後,collector程式會停止記錄日誌到ggserr.log檔案中,因此在清理過日誌之後必須重啟一下collector程式

-------------以下為官方文件參考--------------------------------------------------

Using the error log
Use the Oracle GoldenGate error log to view:
● a history of GGSCI commands
● Oracle GoldenGate processes that started and stopped
● processing that was performed
● errors that occurred
● informational and warning messages
Because the error log shows events as they occurred in sequence, it is a good tool for 
detecting the cause (or causes) of an error. For example, you might discover that:
● someone stopped a process
● a process failed to make a TCP/IP or database connection
● a process could not open a file
Figure 3 The Oracle GoldenGate Error Log (ggserr.log file)
2011-01-08 11:20:56 GGS INFO 301 GoldenGate Manager for Oracle, 
mgr.prm: Command received from GUI (START GGSCI ).
2011-01-08 11:20:56 GGS INFO 302 GoldenGate Manager for Oracle, 
mgr.prm: Manager started GGSCI process on port 7840.
2011-01-08 11:21:31 GGS INFO 301 GoldenGate Manager for Oracle, 
mgr.prm: Command received from GUI (START GGSCI ).
2011-01-08 11:21:31 GGS INFO 302 GoldenGate Manager for Oracle, 
mgr.prm: Manager started GGSCI process on port 7841.
2011-01-08 11:24:15 GGS INFO 301 GoldenGate Manager for Oracle, 
mgr.prm: Command received from GUI (START GGSCI ).
2011-01-08 11:24:15 GGS INFO 302 GoldenGate Manager for Oracle, 
mgr.prm: Manager started GGSCI process on port 7842.
2011-01-08 11:24:16 GGS INFO 399 GoldenGate Command Interpreter for 
Oracle: GGSCI command (ggs): add extract extcust tranlog, begin now.
2011-01-08 11:30:19 GGS INFO 399 GoldenGate Command Interpreter for 
Oracle: GGSCI command (ggs): add rmttrail /home/ggs, extract ggs
To view the error log
Use any of the following:
● Standard shell command to view the ggserr.log file within the root Oracle GoldenGate 
directory
● Oracle GoldenGate Director
● VIEW GGSEVT command in GGSCI
Syntax VIEW GGSEVT
To filter the error log
The error log can become very large, but you can filter it based on a keyword. For example, 
this filter show only errors:
$ more ggserr.log | grep ERROR
Because the error log will continue to grow as you use Oracle GoldenGate, consider 
archiving and deleting the oldest entries in the file.
NOTE The Collector process might stop reporting to the log on UNIX systems after the log 
has been cleaned up. To get reporting started again, restart the Collector process 
after the cleanup.



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-1384591/,如需轉載,請註明出處,否則將追究法律責任。

相關文章