檢查ORACLE的警告檔案的指令碼,oracle警告指令碼

來源:互聯網
上載者:User

檢查ORACLE的警告檔案的指令碼,oracle警告指令碼

檢查兩天內的需要重視的資訊:

vi   alter_error.sh

echo "Check Alter Error:"cat $TRACE/alert_$ORACLE_SID.log | grep -E  ^ORA-\|Reconfig\|abort\|Shut\|^Start\|error\|Instance\|Suspend\|Resuming\|Deadlock\|"`date "+%b %d"`"\|"`date -d last-day "+%b %d"`"

配置環境變數

vi /home/oracle/.bash_profile

export ORACLE_BASE=/u01/app

export ORACLE_HOME=$ORACLE_BASE/product/11gR2/db

 

export ORACLE_SID=shark

export SERVICE_NAMES=erp

export DBUNAME=sharkdb

export TRACE=$ORACLE_BASE/diag/rdbms/$DBUNAME/$ORACLE_SID/trace

壓縮警示檔案

mv_alterlog.sh

mv $TRACE/alert_$ORACLE_SID.log  $TRACE/bak_alter_$ORACLE_SID.`date +%F_%H`.log
gzip -1 $TRACE/bak_alter_$ORACLE_SID.`date +%F_%H`.log

ls -lh  $TRACE/bak_alter_$ORACLE_SID.`date +%F_%H`.log.gz


oracle警告記錄檔ALERTLOG的作用及其儲存位置等

記錄系統日誌,比如日誌切換的記錄,修改系統參數等系統事件。
位置在參數background_dump_dest指定的路徑下,一般為: %ORACLE_BASE%\admin\%ORACLE_SID%\bdump
 
oracle執行sql指令檔的問題

進入那個目錄下
使用@aa.sql;斷行符號
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.