更改archive log 歸檔路徑和歸檔檔名稱
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/oracle/product/dbs/arch
Oldest online log sequence 749
Next log sequence to archive 751
Current log sequence 751
SQL> show parameter archive
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
archive_lag_target integer
0
log_archive_config string
log_archive_dest string
log_archive_dest_1 string
log_archive_dest_10 string
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
enable
log_archive_dest_state_10 string
enable
log_archive_dest_state_2 string
enable
log_archive_dest_state_3 string
enable
log_archive_dest_state_4 string
enable
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_dest_state_5 string
enable
log_archive_dest_state_6 string
enable
log_archive_dest_state_7 string
enable
log_archive_dest_state_8 string
enable
log_archive_dest_state_9 string
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
enable
log_archive_duplex_dest string
log_archive_format string
ora_%t_%s_%r.arc
log_archive_local_first boolean
TRUE
log_archive_max_processes integer
2
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_min_succeed_dest integer
1
log_archive_start boolean
FALSE
log_archive_trace integer
0
remote_archive_enable string
true
standby_archive_dest string
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
?/dbs/arch
SQL> alter system set log_archive_dest_1="location=/oratest/arch" scope=both;
System altered.
SQL> show parameter log_archive_dest_1
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_dest_1 string
location=/oratest/arch
log_archive_dest_10 string
SQL> alter system set log_archive_format="oratest_%t_%S_%r.arc" scope=both;
alter system set log_archive_format="oratest_%t_%S_%r.arc" scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
//不可修改記憶體中的引數,只可修改spfile中的,重啟資料庫生效
SQL> alter system set log_archive_format="oratest_%t_%S_%r.arc" scope=spfile;
System altered.
SQL> show parameter log_archive_format
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_format string
ora_%t_%s_%r.arc
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 591396864 bytes
Fixed Size 2022536 bytes
Variable Size 159384440 bytes
Database Buffers 423624704 bytes
Redo Buffers 6365184 bytes
Database mounted.
Database opened.
SQL> show parameter log_archive_format
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_format string
oratest_%t_%S_%r.arc
// t 是thread 的意思,通常單例項模式的為 1 ,RAC模式的會有多個情況
// S 指序列號,有固定長度的,不足的將前補0,s沒有固定長度,按順序顯示
SQL> alter system switch logfile;
System altered.
//切換redo log 從一個組到另一個組,這時將觸發checkpoint,歸檔
SQL> alter system switch logfile;
System altered.
SQL> !ls -l /oratest/arch
SQL> archive log list
Database log mode Archive Mode //歸檔和非歸檔模式
Automatic archival Enabled //顯示是自動還是手動
Archive destination /oratest/arch //歸檔目錄,已修改。有多個時只顯示一個,dest_1的
Oldest online log sequence 751 //已經歸檔的sequence 號
Next log sequence to archive 753 // 即將要歸檔的sequence 號
Current log sequence 753 // 當前的sequence 號
SQL> spool off
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24558279/viewspace-701139/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [Archive]更改ORACLE預設歸檔路徑HiveOracle
- 更改ORACLE歸檔路徑及歸檔模式Oracle模式
- 更改oracle10g的歸檔模式和歸檔路徑Oracle模式
- archive log 歸檔日誌Hive
- 【archive_dest】歸檔的路徑問題Hive
- oracle資料庫更改歸檔路徑Oracle資料庫
- ORA-00257 (線上更改歸檔路徑,刪除歸檔日誌)
- oracle archive log 歸檔日誌OracleHive
- 歸檔日誌多歸檔路徑 duplex
- 【實驗】【Archived Log】歸檔日誌格式和歸檔路徑之change趣談Hive
- 缺少log_archive_config導致歸檔路徑被禁用Hive
- Oracle archive log 歸檔日誌管理OracleHive
- 改變歸檔檔案路徑
- 測試log_archive_dest_1與log_archive_format對生成的歸檔檔名的影響HiveORM
- oracle archive歸檔初步OracleHive
- archive log 歸檔模式 啟動關閉Hive模式
- Oracle 歸檔與非歸檔模式的更改Oracle模式
- 歸檔日誌路徑三個引數DB_RECOVERY_FILE_DEST和LOG_ARCHIVE_DEST和LOG_ARCHIVE_DEST_nHive
- 歸檔日誌名稱為空
- 【歸檔日誌路徑】之引數 log_archive_dest、LOG_ARCHIVE_DEST_n及快速恢復區路徑關係Hive
- redolog檔案更改路徑
- 修改歸檔日誌路徑
- archive啟用歸檔模式Hive模式
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- rac更改歸檔模式模式
- dataguard歸檔路徑的問題
- LINUX所有配置檔案的路徑和檔名稱(收藏)Linux
- Oracle歸檔模式和非歸檔模式Oracle模式
- oracle單機改變歸檔路徑Oracle
- 修改db2的歸檔路徑DB2
- oracle 歸檔/非歸檔Oracle
- 非歸檔模式下的資料檔案路徑修改模式
- 歸檔路徑更改後,如何對資料庫進行恢復(轉)資料庫
- standby庫歸檔日誌路徑小節
- 歸檔路徑與FRA實驗過程
- logmnr挖掘歸檔日誌檔案
- 閃回資料歸檔-- Flashback Data ArchiveHive
- Oracle Flashback Archive——Oracle閃迴歸檔(上)OracleHive