RAC 開啟歸檔日誌
1:先調整
sql>alter system set log_archive_dest_1='LOCATION=/arch' scope=spfile sid='lcamDB1';
sql>alter system set log_archive_dest_1='LOCATION=/arch' scope=spfile sid='lcamDB2';
sql>alter system set log_archive_format ='arch1_%s_%R_%T.arc' scope=spfile sid='lcamdb1';
sql>alter system set log_archive_format ='arch2_%s_%R_%T.arc' scope=spfile sid='lcamdb2';
srvctl stop database -d lcamdb -o immediate
-- startup database in mount mode
srvctl start database -d lcamdb -o mount
-- enable archvive logging
4:$ sqlplus / as sysdba
sql> alter database archivelog;
5:-- stop database
$ srvctl stop database -d lcamdb -o immediate
6:-- restart all database instances
$ srvctl start database -d lcamdb
7:調整歸檔空間
alter system set DB_RECOVERY_FILE_DEST_SIZE=500g
[oracle@lcamdb1 archive_lcamdb1]$ srvctl status database -d lcamdb
Instance lcamdb1 is running on node lcamdb1
Instance lcamdb2 is running on node lcamdb2
配置自動清理腳步
arch_space_usage=`df -m|grep /arch | grep -v /arch01 |awk '{if($4/1>80)print $NF" Filesystem space usage ."$4}'`
if test -z "$arch_space_usage"; then
echo " `date`:Archive space not greater than 80 %" >> /tmp/arch_dir.log
else
echo " `date`:Archive space greater than 80%" >> /tmp/arch_dir.log
rm -rf /arch/*.arc >> /tmp/arch_dir.log
fi
刪除5天前的資料Vi del_lcam_data.sh
#bin/sh
filename=`find /tmp01/archive_lcamdb1/*.arc -mtime +5`
rm -rf $filename
一般需要把歸檔日誌放到儲存上,所以需要進一步的做調整! 還有接入磁帶庫!以及備份等工作!
sql>alter system set log_archive_dest_1='LOCATION=/arch' scope=spfile sid='lcamDB1';
sql>alter system set log_archive_dest_1='LOCATION=/arch' scope=spfile sid='lcamDB2';
sql>alter system set log_archive_format ='arch1_%s_%R_%T.arc' scope=spfile sid='lcamdb1';
sql>alter system set log_archive_format ='arch2_%s_%R_%T.arc' scope=spfile sid='lcamdb2';
srvctl stop database -d lcamdb -o immediate
-- startup database in mount mode
srvctl start database -d lcamdb -o mount
-- enable archvive logging
4:$ sqlplus / as sysdba
sql> alter database archivelog;
5:-- stop database
$ srvctl stop database -d lcamdb -o immediate
6:-- restart all database instances
$ srvctl start database -d lcamdb
7:調整歸檔空間
alter system set DB_RECOVERY_FILE_DEST_SIZE=500g
[oracle@lcamdb1 archive_lcamdb1]$ srvctl status database -d lcamdb
Instance lcamdb1 is running on node lcamdb1
Instance lcamdb2 is running on node lcamdb2
配置自動清理腳步
arch_space_usage=`df -m|grep /arch | grep -v /arch01 |awk '{if($4/1>80)print $NF" Filesystem space usage ."$4}'`
if test -z "$arch_space_usage"; then
echo " `date`:Archive space not greater than 80 %" >> /tmp/arch_dir.log
else
echo " `date`:Archive space greater than 80%" >> /tmp/arch_dir.log
rm -rf /arch/*.arc >> /tmp/arch_dir.log
fi
刪除5天前的資料Vi del_lcam_data.sh
#bin/sh
filename=`find /tmp01/archive_lcamdb1/*.arc -mtime +5`
rm -rf $filename
一般需要把歸檔日誌放到儲存上,所以需要進一步的做調整! 還有接入磁帶庫!以及備份等工作!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28869493/viewspace-2121559/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC--歸檔日誌的開啟方法
- RAC下啟動日誌歸檔模式模式
- postgresql開啟歸檔日誌SQL
- oracle 歸檔日誌開啟,關閉Oracle
- 關閉和開啟歸檔日誌
- ORACLE 歸檔日誌開啟關閉方法Oracle
- RAC中歸檔日誌得命名格式
- 【RAC】RAC環境下歸檔日誌格式約定
- RAC歸檔日誌還原一例
- Oracle RAC中使用RMAN管理歸檔日誌Oracle
- oracle RAC開啟歸檔模式Oracle模式
- 歸檔日誌
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- rac+dg環境刪除歸檔日誌
- RAC開啟資料庫歸檔資料庫
- oracle歸檔日誌Oracle
- Oracle 歸檔日誌Oracle
- 歸檔日誌挖掘
- PostgreSQL 歸檔日誌SQL
- Oracle RAC 10gR2 環境下開啟歸檔日誌的步驟(八一原創)Oracle
- RAC環境備份歸檔日誌和RMAN恢復啟動資料庫資料庫
- 控制檔案/歸檔日誌
- 歸檔日誌多歸檔路徑 duplex
- 歸檔oracle alert日誌Oracle
- 14. 日誌歸檔
- PostgreSQL歸檔日誌配置SQL
- rman清理歸檔日誌
- archive log 歸檔日誌Hive
- 備份歸檔日誌
- 歸檔日誌 現象
- Oracle歸檔日誌清理Oracle
- ORACLE RAC 啟用歸檔Oracle
- 當ORACLE歸檔日誌滿後如何正確刪除歸檔日誌Oracle
- 用RMAN備份歸檔日誌時檢查歸檔日誌是否存在
- 誤刪歸檔日誌除導致備份歸檔日誌失敗
- Oracle RAC 11gR2開啟歸檔Oracle
- oracle rac及單例項開啟歸檔Oracle單例
- 聯機重做日誌、歸檔日誌、備用重做日誌