新增、刪除日誌檔案
今天,在給rac資料庫做例行檢查時發現日誌組中有一個日誌檔案無效:
SQL> col member for a50
SQL> select group#,status,member from v$logfile;
GROUP# STATUS MEMBER
---------- ------- --------------------------------------------------
2 +DATA/oralnx/onlinelog/group_2.log
2 INVALID +BACKUP/oralnx/onlinelog/group_2.log
1 +DATA/oralnx/onlinelog/group_1.log
1 INVALID +BACKUP/oralnx/onlinelog/group_1.log
3 +DATA/oralnx/onlinelog/group_3.log
3 INVALID +BACKUP/oralnx/onlinelog/group_3.log
4 +DATA/oralnx/onlinelog/group_4.log
4 INVALID +BACKUP/oralnx/onlinelog/group_4.log
5 +DATA/oralnx/onlinelog/group_5.log
5 INVALID +BACKUP/oralnx/onlinelog/group_5.log
6 +DATA/oralnx/onlinelog/group_6.log
6 INVALID +BACKUP/oralnx/onlinelog/group_6.log
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 2 CURRENT
2 2 INACTIVE
3 2 CURRENT
4 2 INACTIVE
5 2 INACTIVE
6 2 INACTIVE
6 rows selected.
將狀態為inactive組的日誌成員刪除,重新新增。
SQL> alter database drop logfile member '+BACKUP/oralnx/onlinelog/group_4.log';
Database altered.
SQL> alter database add logfile member '+BACKUP/oralnx/onlinelog/group_4.log' to group 4;
Database altered.
SQL> alter database drop logfile member '+BACKUP/oralnx/onlinelog/group_5.log';
Database altered.
SQL> alter database add logfile member '+BACKUP/oralnx/onlinelog/group_5.log' to group 5;
Database altered.
SQL> alter database drop logfile member '+BACKUP/oralnx/onlinelog/group_6.log';
Database altered.
SQL> alter database add logfile member '+BACKUP/oralnx/onlinelog/group_6.log' to group 6;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> select group#,status,member from v$logfile;
GROUP# STATUS MEMBER
---------- ------- --------------------------------------------------
2 +DATA/oralnx/onlinelog/group_2.log
2 +BACKUP/oralnx/onlinelog/group_2.log
1 +DATA/oralnx/onlinelog/group_1.log
1 +BACKUP/oralnx/onlinelog/group_1.log
3 +DATA/oralnx/onlinelog/group_3.log
3 +BACKUP/oralnx/onlinelog/group_3.log
4 +DATA/oralnx/onlinelog/group_4.log
4 +BACKUP/oralnx/onlinelog/group_4.log
5 +DATA/oralnx/onlinelog/group_5.log
5 +BACKUP/oralnx/onlinelog/group_5.log
6 +DATA/oralnx/onlinelog/group_6.log
6 +BACKUP/oralnx/onlinelog/group_6.log
12 rows selected.
SQL> col member for a50
SQL> select group#,status,member from v$logfile;
GROUP# STATUS MEMBER
---------- ------- --------------------------------------------------
2 +DATA/oralnx/onlinelog/group_2.log
2 INVALID +BACKUP/oralnx/onlinelog/group_2.log
1 +DATA/oralnx/onlinelog/group_1.log
1 INVALID +BACKUP/oralnx/onlinelog/group_1.log
3 +DATA/oralnx/onlinelog/group_3.log
3 INVALID +BACKUP/oralnx/onlinelog/group_3.log
4 +DATA/oralnx/onlinelog/group_4.log
4 INVALID +BACKUP/oralnx/onlinelog/group_4.log
5 +DATA/oralnx/onlinelog/group_5.log
5 INVALID +BACKUP/oralnx/onlinelog/group_5.log
6 +DATA/oralnx/onlinelog/group_6.log
6 INVALID +BACKUP/oralnx/onlinelog/group_6.log
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 2 CURRENT
2 2 INACTIVE
3 2 CURRENT
4 2 INACTIVE
5 2 INACTIVE
6 2 INACTIVE
6 rows selected.
將狀態為inactive組的日誌成員刪除,重新新增。
SQL> alter database drop logfile member '+BACKUP/oralnx/onlinelog/group_4.log';
Database altered.
SQL> alter database add logfile member '+BACKUP/oralnx/onlinelog/group_4.log' to group 4;
Database altered.
SQL> alter database drop logfile member '+BACKUP/oralnx/onlinelog/group_5.log';
Database altered.
SQL> alter database add logfile member '+BACKUP/oralnx/onlinelog/group_5.log' to group 5;
Database altered.
SQL> alter database drop logfile member '+BACKUP/oralnx/onlinelog/group_6.log';
Database altered.
SQL> alter database add logfile member '+BACKUP/oralnx/onlinelog/group_6.log' to group 6;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> select group#,status,member from v$logfile;
GROUP# STATUS MEMBER
---------- ------- --------------------------------------------------
2 +DATA/oralnx/onlinelog/group_2.log
2 +BACKUP/oralnx/onlinelog/group_2.log
1 +DATA/oralnx/onlinelog/group_1.log
1 +BACKUP/oralnx/onlinelog/group_1.log
3 +DATA/oralnx/onlinelog/group_3.log
3 +BACKUP/oralnx/onlinelog/group_3.log
4 +DATA/oralnx/onlinelog/group_4.log
4 +BACKUP/oralnx/onlinelog/group_4.log
5 +DATA/oralnx/onlinelog/group_5.log
5 +BACKUP/oralnx/onlinelog/group_5.log
6 +DATA/oralnx/onlinelog/group_6.log
6 +BACKUP/oralnx/onlinelog/group_6.log
12 rows selected.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22969361/viewspace-1102920/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 刪除歸檔日誌檔案
- 刪除日誌檔案組與日誌檔案成員
- Oracle11g redo log 建立、新增、刪除(重做日誌組,重做日誌檔案)Oracle
- 刪除日誌檔案組或成員
- 如何正確刪除ORACLE歸檔日誌檔案Oracle
- oracle刪除歸檔日誌Oracle
- 歸檔日誌的刪除
- Oracle歸檔日誌刪除Oracle
- SQL Server 2005 日誌刪除和日誌檔案限制SQLServer
- 【REDO】刪除REDO LOG重做日誌組後需要手工刪除對應的日誌檔案
- 刪除data guard歸檔日誌
- 手動刪除歸檔日誌
- 作用RMAN 刪除歸檔日誌
- 在Oracle中,如何定時刪除歸檔日誌檔案?Oracle
- 如何在DATAGUARD中新增刪除聯機日誌
- 刪除事務日誌檔案並不安全WC
- 查詢一天前的日誌檔案刪除
- 新增日誌檔案組與日誌檔案成員
- 在Linux中,有一堆日誌檔案,如何刪除7天前的日誌檔案?Linux
- oracle刪除日誌Oracle
- window下刪除過舊的日誌檔案指令碼(如jboss的日誌檔案 資料庫的trace檔案)指令碼資料庫
- 一個刪除重做日誌檔案的參考指令碼指令碼
- 當ORACLE歸檔日誌滿後如何正確刪除歸檔日誌Oracle
- 誤刪歸檔日誌除導致備份歸檔日誌失敗
- oracle 刪除過期的歸檔日誌Oracle
- rman刪除歸檔日誌命令集
- crontab不能自動刪除歸檔日誌
- oracle dataguard 自動刪除歸檔日誌Oracle
- 歸檔日誌刪除的五種方法
- 如何定期自動刪除歸檔日誌
- 【Oracle】 rman 刪除歸檔日誌的命令Oracle
- 【警鐘】謹慎刪除歸檔日誌
- Oracle日誌組新增冗餘檔案和日誌組Oracle
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- RMAN delete archivelog命令刪除歸檔日誌及歸檔日誌拷貝deleteHive
- elasticsearch日誌刪除命令Elasticsearch
- 日誌刪除指令碼指令碼