oracle歸檔檔案管理

來源:互聯網
上載者:User

標籤:oracle   歸檔   

歸檔檔案管理

oracle歸檔檔案,常常出現爆滿或者掛載不上,這裡簡單介紹一例爆滿的案例。

備份歸檔檔案:Backup archivelog all;

備份歸檔日誌

1、sql>alter system archive logcurrent;   歸檔一下當前日誌

2、Sql>show parameter archive;          查看歸檔目錄

3、Rman>backup archivelog all;           備份歸檔

Rman>backup archivelog all delete allinput;    備份完刪除歸檔

Rman>backup database plus archivelog;  備份資料庫和歸檔日誌

歸檔檔案管理

SQL> select * from v$log;   歸檔狀態

   GROUP#    THREAD#  SEQUENCE#     BYTES    MEMBERS ARC STATUS

---------- ---------- ---------- -------------------- --- ----------------

FIRST_CHANGE# FIRST_TIME

 1       1    5638  52428800   1 NO INACTIVE  1.2895E+13 26-JUL-14

 2       1    5639   5242880  1 NO CURRENT  1.2895E+13 26-JUL-14

 4       1   5635  10485760  1 NO INACTIVE  1.2895E+13 25-JUL-14

SQL> select * from v$recovery_file_dest; 歸檔大小

NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES 

----------- ---------- --------------------------------

/home/oracle/flash_recovery_area   21474836482133713408                 0               23

SQL>select * from v$flash_recovery_area_usage; 空間使用,歸檔備份接近100% 

FILE_TYPE   PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES

------------ ------------------------------------------- ---------------

CONTROLFILE                 0                             0                0

ONLINELOG                  4.88                     0                1

ARCHIVELOG              27.62                     0             19

BACKUPPIECE             66.86                     0                3

IMAGECOPY                    0                             0                0

FLASHBACKLOG                       0                             0                0

6 rows selected.

SQL> alter system set db_recovery_file_dest_size=10g;

System altered.

SQL> select * from v$recovery_file_dest;

NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES

----------- ---------- --------------------------------

/home/oracle/flash_recovery_area  1.0737E+10 2234790400                    0              26

SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE   PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES

------------ ------------------------------------------- ---------------

CONTROLFILE                 0                             0                0

ONLINELOG                   .98                     0                1

ARCHIVELOG               6.47                     0             22

BACKUPPIECE             13.37                     0                3

IMAGECOPY                    0                             0                0

FLASHBACKLOG                       0                             0                0

6 rows selected.

Rman>backup database plus archivelogdelete input; 備份資料庫和歸檔日誌,同時刪除已備份的歸檔日誌

Rman>backup archivelog from sequence 79until sequance 82; 根據序號

Rman>backup archivelog from time “sysdate-15”until time “sysdate-7”;備份15天前到7天前歸檔日誌

4、sql>alter system archive logcurrent;  再次做日誌歸檔,歸檔期間日誌

 Rman>list archivelog all;


本文出自 “嘟嘟的成長日記” 部落格,請務必保留此出處http://3402313.blog.51cto.com/3392313/1537812

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.