弄了快半年的時間,終於在最近因為硬碟空間大小的問題,再去翻網路

原來當資料庫處於Archive log Mode時,會產生二種Log
Online redo logfile寫滿了,就將Archive redo logfile歸檔到指定位置,然後再循環寫Online redo logfile。


好了~重點來了

Archive redo logfile 會是存放在指定的位置,現在有50G了吧! 所以要清除~
1.要先備份
2.在這份備份前的
Archive redo logfile都可以清掉
3.寫排程備份,然後去查能不能寫排程清
Archive redo logfile。


Step 1 檢查的語法,查看Online和Archive位置
SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- --------------
         1          1       3714   52428800          1 NO  CURRENT
     35496493 24-10月-07

         2          1       3712   52428800          1 YES INACTIVE
     35480748 24-10月-07

         3          1       3713   52428800          1 YES INACTIVE
     35489016 24-10月-07


SQL> alter database backup controlfile to trace;

Database altered.

SQL> conn / as sysdba
Connected.
SQL> show parameter recov

NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------------
db_recovery_file_dest                string
db_recovery_file_dest_size           big integer 2G   大小
recovery_parallelism                 integer     0
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            D:/oracle_log             
Archive redo logfile 存放的位置
Oldest online log sequence     3714
Next log sequence to archive   3716
Current log sequence           3716

Step 2 備份
要完整備份資料庫的話, 可以使用下列指令,
這是最簡單的完整備份語法, 所有其他參數都使用default,
主要的是 full=Y (表示要被份完整的資料庫)


SQL> exp system/manager full=Y file=xxxxx.dmp log=xxxxx.log
About to export the entire database ...
. exporting tablespace definitions
. exporting profiles
. exporting user definitions
......


Step 3 還沒敢刪東西

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 sunyo 的頭像
    sunyo

    路過MIS的睏貓

    sunyo 發表在 痞客邦 留言(0) 人氣()