- Community Home
- >
- HPE Community, Taiwan
- >
- HP-UX
- >
- 系統管理
- >
- 請高手幫一下忙!(SOS)
系統管理
1753679
會員
5784
線上
108799
解決方案
論壇
類別
Company
Local Language
返回
論壇
討論平台
返回
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
部落格
信息
社區語言
語言
論壇
部落格
文章選項
- 訂閱此主題的RSS 提要
- 將此主題標記為未讀
- 將主題標記為已讀
- 將主題在本帳號置頂
- 標示為書籤
- 訂閱此主題
- 列印此頁
- 將文章標記為未讀
- 標示為書籤
- 訂閱此主題
- 靜音
- 訂閱此主題的RSS 提要
- 高亮顯示此文章
- 列印此文章
- 提報不當內容
在 02-17-2006 04:39 PM
在 02-17-2006 04:39 PM
請高手幫一下忙!(SOS)
下列內容是 database 的alert.log 請問有高手可以寫成script 將 每天檢查 並將有error 的部分send mail 給我
例如:
Mon Feb 13 18:06:06 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7396.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from WKS_PROD
ORA-03113: end-of-file on communication channel
ORA-06512: at line 30
Mon Feb 13 18:06:49 2006
Thread 1 advanced to log sequence 34390
Current log# 1 seq# 34390 mem# 0: /pdmcorp/datafile/redo/redocorpora01.log
Mon Feb 13 18:06:56 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7464.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from AIZ
ORA-03113: end-of-file on communication channel
ORA-06512: at line 85
Mon Feb 13 19:00:14 2006
Thread 1 advanced to log sequence 34391
Current log# 2 seq# 34391 mem# 0: /pdmcorp/datafile/redo/redocorpora02.log
Mon Feb 13 19:00:41 2006
Thread 1 advanced to log sequence 34392
Current log# 3 seq# 34392 mem# 0: /pdmcorp/datafile/redo/redocorpora03.log
希望send mail的結果是:
Mon Feb 13 18:06:06 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7396.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from WKS_PROD
ORA-03113: end-of-file on communication channel
ORA-06512: at line 30
Mon Feb 13 18:06:56 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7464.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback requ
例如:
Mon Feb 13 18:06:06 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7396.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from WKS_PROD
ORA-03113: end-of-file on communication channel
ORA-06512: at line 30
Mon Feb 13 18:06:49 2006
Thread 1 advanced to log sequence 34390
Current log# 1 seq# 34390 mem# 0: /pdmcorp/datafile/redo/redocorpora01.log
Mon Feb 13 18:06:56 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7464.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from AIZ
ORA-03113: end-of-file on communication channel
ORA-06512: at line 85
Mon Feb 13 19:00:14 2006
Thread 1 advanced to log sequence 34391
Current log# 2 seq# 34391 mem# 0: /pdmcorp/datafile/redo/redocorpora02.log
Mon Feb 13 19:00:41 2006
Thread 1 advanced to log sequence 34392
Current log# 3 seq# 34392 mem# 0: /pdmcorp/datafile/redo/redocorpora03.log
希望send mail的結果是:
Mon Feb 13 18:06:06 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7396.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from WKS_PROD
ORA-03113: end-of-file on communication channel
ORA-06512: at line 30
Mon Feb 13 18:06:56 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7464.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback requ
3則回覆 3
- 將文章標記為未讀
- 標示為書籤
- 訂閱此主題
- 靜音
- 訂閱此主題的RSS 提要
- 高亮顯示此文章
- 列印此文章
- 提報不當內容
在 02-17-2006 04:43 PM
在 02-17-2006 04:43 PM
請高手幫一下忙!(SOS)
抱歉有點打錯:
我希望的可以只得到Error message就好 如下:
Mon Feb 13 18:06:06 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7396.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from WKS_PROD
ORA-03113: end-of-file on communication channel
ORA-06512: at line 30
Mon Feb 13 18:06:56 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7464.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from AIZ
ORA-03113: end-of-file on communication channel
ORA-06512: at line 85
請高手幫忙 thanks
我希望的可以只得到Error message就好 如下:
Mon Feb 13 18:06:06 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7396.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from WKS_PROD
ORA-03113: end-of-file on communication channel
ORA-06512: at line 30
Mon Feb 13 18:06:56 2006
Errors in file /opt/oracle/admin/corpora/udump/ora_7464.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02067: transaction or savepoint rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02055: distributed update operation failed; rollback required
ORA-02068: following severe error from AIZ
ORA-03113: end-of-file on communication channel
ORA-06512: at line 85
請高手幫忙 thanks
- 將文章標記為未讀
- 標示為書籤
- 訂閱此主題
- 靜音
- 訂閱此主題的RSS 提要
- 高亮顯示此文章
- 列印此文章
- 提報不當內容
在 02-18-2006 09:44 AM
在 02-18-2006 09:44 AM
請高手幫一下忙!(SOS)
Hi, for your reference
(vpar2)hputainw:/tmp/ora#cat ora_alert.sh
#!/usr/bin/sh
tmpfile=/tmp/alert$$
alertlog=/tmp/ora/alert.log
mailto="To: oracle_dba@hp.com"
TOD=`date +%m/%d/%Y`
subject="Subject: $TOD Alertlog"
echo "From: oracle_dba@hp.com" > $tmpfile
echo $mailto >> $tmpfile
echo $subject >> $tmpfile
echo "Precedence: bulk" >> $tmpfile
echo >> $tmpfile
echo "$TOD Alertlog" >>$tmpfile
echo "==========================" >> $tmpfile
grep -E "^ORA-|^Error|2006$" $alertlog >> $tmpfile
/usr/sbin/sendmail -t < $tmpfile
rm -f $tmpfile
======== end script =========
crontab -l
1 1 * * * /tmp/ora/ora_alert.sh > /dev/null 2>&1
(vpar2)hputainw:/tmp/ora#cat ora_alert.sh
#!/usr/bin/sh
tmpfile=/tmp/alert$$
alertlog=/tmp/ora/alert.log
mailto="To: oracle_dba@hp.com"
TOD=`date +%m/%d/%Y`
subject="Subject: $TOD Alertlog"
echo "From: oracle_dba@hp.com" > $tmpfile
echo $mailto >> $tmpfile
echo $subject >> $tmpfile
echo "Precedence: bulk" >> $tmpfile
echo >> $tmpfile
echo "$TOD Alertlog" >>$tmpfile
echo "==========================" >> $tmpfile
grep -E "^ORA-|^Error|2006$" $alertlog >> $tmpfile
/usr/sbin/sendmail -t < $tmpfile
rm -f $tmpfile
======== end script =========
crontab -l
1 1 * * * /tmp/ora/ora_alert.sh > /dev/null 2>&1
- 將文章標記為未讀
- 標示為書籤
- 訂閱此主題
- 靜音
- 訂閱此主題的RSS 提要
- 高亮顯示此文章
- 列印此文章
- 提報不當內容
在 03-07-2006 05:11 PM
在 03-07-2006 05:11 PM
請高手幫一下忙!(SOS)
可以安裝 OEM, 然後設定 event, 只要 Oracle DB 遇到 ora- 的錯誤訊息, 它就會自動發 mail 給你
以上表述為作者個人觀點,不代表惠普公司,使用本網站,請遵守網站使用規則和條款
© 版权所有 2024 慧与发展有限责任合伙企业