[20130123]歸檔引數log_archive_dest_1問題.txt
[20130123]歸檔引數log_archive_dest_1問題.txt
SQL> select * from v$version where rownum<=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ---------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle11g/archivelog
--如果歸檔目錄不存在會有什麼問題呢?
$ mv /u01/app/oracle11g/archivelog /u01/app/oracle11g/archivelog1
$ ll -d /u01/app/oracle11g/archi*
drwxr-xr-x 2 oracle11g oinstall 4096 Jan 23 08:38 /u01/app/oracle11g/archivelog1
--可以發現我已經修改了目錄。關閉資料庫重新啟動。
SQL> alter system archive log current ;
System altered.
SQL> alter system archive log current ;
System altered.
SQL> alter system archive log current ;
System altered.
SQL> alter system archive log current ;
System altered.
--可以發現歸檔放在了/u01/app/oracle11g目錄,並且以archivelog開頭。
SQL> select name from v$archived_log where sequence#>=123;
--從檢視顯示也可以確定情況確實向上面一樣。
--當然這並不影響使用,只不過不好。
2.再做一些補充:
--如果執行如下:(注意後面有一個/)
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog/';
alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog/'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16032: parameter LOG_ARCHIVE_DEST_1 destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory
--可以發現目錄/u01/app/oracle11g/archivelog/不存在,報錯。
--執行如下,OK!
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog1/';
System altered.
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- -----------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle11g/archivelog1/
SQL> alter system archive log current ;
System altered.
--確實這樣。
$ mv archivelog1 archivelog
SQL> alter system archive log current ;
alter system archive log current
*
ERROR at line 1:
ORA-16038: log 2 sequence# 128 cannot be archived
ORA-00312: online log 2 thread 1: '/u01/app/oracle11g/oradata/test/redo02.log'
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory
--這時log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog1/',轉換無法實現。
--這也是我今天幫別人解決的問題。
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog';
System altered.
SQL> alter system archive log current ;
System altered.
--正常!
3.如果想把歸檔移動到/u01/app/oracle11g/archivelog目錄,僅僅需要rman下catalog就可以了。
$ mv archivelog1* archivelog
RMAN> crosscheck copy ;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 device type=DISK
specification does not match any datafile copy in the repository
specification does not match any control file copy in the repository
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_123_798551880.dbf RECID=61 STAMP=805476069
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_124_798551880.dbf RECID=62 STAMP=805476070
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_125_798551880.dbf RECID=63 STAMP=805476072
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_126_798551880.dbf RECID=64 STAMP=805476073
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1/1_127_798551880.dbf RECID=65 STAMP=805476599
validation succeeded for archived log
archived log file name=/u01/app/oracle11g/archivelog/1_128_798551880.dbf RECID=66 STAMP=805476917
validation succeeded for archived log
archived log file name=/u01/app/oracle11g/archivelog/1_129_798551880.dbf RECID=67 STAMP=805476917
Crosschecked 7 objects
RMAN> delete expired archivelog all ;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 device type=DISK
List of Archived Log Copies for database with db_unique_name TEST
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - -------------------
61 1 123 X 2013-01-23 08:36:17
Name: /u01/app/oracle11g/archivelog1_123_798551880.dbf
62 1 124 X 2013-01-23 15:21:08
Name: /u01/app/oracle11g/archivelog1_124_798551880.dbf
63 1 125 X 2013-01-23 15:21:09
Name: /u01/app/oracle11g/archivelog1_125_798551880.dbf
64 1 126 X 2013-01-23 15:21:12
Name: /u01/app/oracle11g/archivelog1_126_798551880.dbf
65 1 127 X 2013-01-23 15:21:13
Name: /u01/app/oracle11g/archivelog1/1_127_798551880.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_123_798551880.dbf RECID=61 STAMP=805476069
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_124_798551880.dbf RECID=62 STAMP=805476070
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_125_798551880.dbf RECID=63 STAMP=805476072
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_126_798551880.dbf RECID=64 STAMP=805476073
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1/1_127_798551880.dbf RECID=65 STAMP=805476599
Deleted 5 EXPIRED objects
RMAN> catalog start with '/u01/app/oracle11g/archivelog/';
searching for all files that match the pattern /u01/app/oracle11g/archivelog/
List of Files Unknown to the Database
=====================================
File Name: /u01/app/oracle11g/archivelog/1_127_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_126_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_124_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_125_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_123_798551880.dbf
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle11g/archivelog/1_127_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_126_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_124_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_125_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_123_798551880.dbf
SQL> select * from v$version where rownum<=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ---------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle11g/archivelog
--如果歸檔目錄不存在會有什麼問題呢?
$ mv /u01/app/oracle11g/archivelog /u01/app/oracle11g/archivelog1
$ ll -d /u01/app/oracle11g/archi*
drwxr-xr-x 2 oracle11g oinstall 4096 Jan 23 08:38 /u01/app/oracle11g/archivelog1
--可以發現我已經修改了目錄。關閉資料庫重新啟動。
SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1258293360 bytes
Database Buffers 335544320 bytes
Redo Buffers 7360512 bytes
Database mounted.
Database opened.
SQL> archive log list ;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle11g/archivelog
Oldest online log sequence 121
Next log sequence to archive 123
Current log sequence 123
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- --------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle11g/archivelog
SQL> alter system archive log current ;
System altered.
SQL> alter system archive log current ;
System altered.
SQL> alter system archive log current ;
System altered.
SQL> alter system archive log current ;
System altered.
$ ll -d /u01/app/oracle11g/archi*
drwxr-xr-x 2 oracle11g oinstall 4096 Jan 23 08:38 /u01/app/oracle11g/archivelog1
-rw-r----- 1 oracle11g oinstall 15728128 Jan 23 15:21 /u01/app/oracle11g/archivelog1_123_798551880.dbf
-rw-r----- 1 oracle11g oinstall 1024 Jan 23 15:21 /u01/app/oracle11g/archivelog1_124_798551880.dbf
-rw-r----- 1 oracle11g oinstall 2048 Jan 23 15:21 /u01/app/oracle11g/archivelog1_125_798551880.dbf
-rw-r----- 1 oracle11g oinstall 1024 Jan 23 15:21 /u01/app/oracle11g/archivelog1_126_798551880.dbf
--可以發現歸檔放在了/u01/app/oracle11g目錄,並且以archivelog開頭。
SQL> select name from v$archived_log where sequence#>=123;
NAME
--------------------------------------------------
/u01/app/oracle11g/archivelog1_123_798551880.dbf
/u01/app/oracle11g/archivelog1_124_798551880.dbf
/u01/app/oracle11g/archivelog1_125_798551880.dbf
/u01/app/oracle11g/archivelog1_126_798551880.dbf
--從檢視顯示也可以確定情況確實向上面一樣。
--當然這並不影響使用,只不過不好。
2.再做一些補充:
--如果執行如下:(注意後面有一個/)
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog/';
alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog/'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16032: parameter LOG_ARCHIVE_DEST_1 destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory
--可以發現目錄/u01/app/oracle11g/archivelog/不存在,報錯。
--執行如下,OK!
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog1/';
System altered.
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- -----------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle11g/archivelog1/
SQL> alter system archive log current ;
System altered.
$ ll -R /u01/app/oracle11g/archiv*
-rw-r----- 1 oracle11g oinstall 15728128 Jan 23 15:21 /u01/app/oracle11g/archivelog1_123_798551880.dbf
-rw-r----- 1 oracle11g oinstall 1024 Jan 23 15:21 /u01/app/oracle11g/archivelog1_124_798551880.dbf
-rw-r----- 1 oracle11g oinstall 2048 Jan 23 15:21 /u01/app/oracle11g/archivelog1_125_798551880.dbf
-rw-r----- 1 oracle11g oinstall 1024 Jan 23 15:21 /u01/app/oracle11g/archivelog1_126_798551880.dbf
/u01/app/oracle11g/archivelog1:
total 40
-rw-r----- 1 oracle11g oinstall 40960 Jan 23 15:29 1_127_798551880.dbf
--確實這樣。
$ mv archivelog1 archivelog
SQL> alter system archive log current ;
alter system archive log current
*
ERROR at line 1:
ORA-16038: log 2 sequence# 128 cannot be archived
ORA-00312: online log 2 thread 1: '/u01/app/oracle11g/oradata/test/redo02.log'
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory
--這時log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog1/',轉換無法實現。
--這也是我今天幫別人解決的問題。
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle11g/archivelog';
System altered.
SQL> alter system archive log current ;
System altered.
--正常!
3.如果想把歸檔移動到/u01/app/oracle11g/archivelog目錄,僅僅需要rman下catalog就可以了。
$ mv archivelog1* archivelog
RMAN> crosscheck copy ;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 device type=DISK
specification does not match any datafile copy in the repository
specification does not match any control file copy in the repository
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_123_798551880.dbf RECID=61 STAMP=805476069
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_124_798551880.dbf RECID=62 STAMP=805476070
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_125_798551880.dbf RECID=63 STAMP=805476072
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1_126_798551880.dbf RECID=64 STAMP=805476073
validation failed for archived log
archived log file name=/u01/app/oracle11g/archivelog1/1_127_798551880.dbf RECID=65 STAMP=805476599
validation succeeded for archived log
archived log file name=/u01/app/oracle11g/archivelog/1_128_798551880.dbf RECID=66 STAMP=805476917
validation succeeded for archived log
archived log file name=/u01/app/oracle11g/archivelog/1_129_798551880.dbf RECID=67 STAMP=805476917
Crosschecked 7 objects
RMAN> delete expired archivelog all ;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 device type=DISK
List of Archived Log Copies for database with db_unique_name TEST
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - -------------------
61 1 123 X 2013-01-23 08:36:17
Name: /u01/app/oracle11g/archivelog1_123_798551880.dbf
62 1 124 X 2013-01-23 15:21:08
Name: /u01/app/oracle11g/archivelog1_124_798551880.dbf
63 1 125 X 2013-01-23 15:21:09
Name: /u01/app/oracle11g/archivelog1_125_798551880.dbf
64 1 126 X 2013-01-23 15:21:12
Name: /u01/app/oracle11g/archivelog1_126_798551880.dbf
65 1 127 X 2013-01-23 15:21:13
Name: /u01/app/oracle11g/archivelog1/1_127_798551880.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_123_798551880.dbf RECID=61 STAMP=805476069
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_124_798551880.dbf RECID=62 STAMP=805476070
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_125_798551880.dbf RECID=63 STAMP=805476072
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1_126_798551880.dbf RECID=64 STAMP=805476073
deleted archived log
archived log file name=/u01/app/oracle11g/archivelog1/1_127_798551880.dbf RECID=65 STAMP=805476599
Deleted 5 EXPIRED objects
RMAN> catalog start with '/u01/app/oracle11g/archivelog/';
searching for all files that match the pattern /u01/app/oracle11g/archivelog/
List of Files Unknown to the Database
=====================================
File Name: /u01/app/oracle11g/archivelog/1_127_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_126_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_124_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_125_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_123_798551880.dbf
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle11g/archivelog/1_127_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_126_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_124_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_125_798551880.dbf
File Name: /u01/app/oracle11g/archivelog/archivelog1_123_798551880.dbf
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-753131/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle歸檔引數設定問題Oracle
- Oracle 10G RAC歸檔引數格式問題導致歸檔至ASM時出錯Oracle 10gASM
- 歸檔相關引數
- oracle控制檔案及引數檔案問題Oracle
- Oracle10g歸檔引數研究Oracle
- 閃回與歸檔引數的設定
- 歸檔日誌命令及引數總結
- 開啟歸檔模式及其相關引數模式
- Oracle歸檔模式、引數意義、設定Oracle模式
- 強制歸檔引數ARCHIVE_LAG_TARGETHive
- [20221121]rman刪除歸檔日誌問題.txt
- mybatis中mapper.xml檔案引數問題MyBatisAPPXML
- Oracle Extent引數問題Oracle
- 關於一個歸檔問題?
- dataguard歸檔路徑的問題
- oracle歸檔切換以及歸檔日誌滿報錯問題Oracle
- [20231109]bbed p命令dba引數問題.txt
- 測試log_archive_dest_1與log_archive_format對生成的歸檔檔名的影響HiveORM
- Oracle11g版本中未歸檔隱藏引數Oracle
- Oracle12c版本中未歸檔隱藏引數Oracle
- 關於歸檔日誌的幾個引數選項
- 【archive_dest】歸檔的路徑問題Hive
- 【機器學習】--迴歸問題的數值優化機器學習優化
- [20120120]startup nomount訪問引數檔案的順序.txt
- java 讀取.txt檔案時,注意的問題Java
- Oracle歸檔模式的命令及引數(摘錄自網路)Oracle模式
- Standby OS i/o問題導致Primary 庫不能正常歸檔問題
- Oracle_dg歸檔丟失問題處理Oracle
- 使用nfs作為歸檔目錄的問題NFS
- 歸檔放在閃回區帶來的問題
- rman刪除舊的歸檔日誌問題
- 歸檔目錄空間不足造成的問題
- 常見問題--oracle10g歸檔模式Oracle模式
- [20130207]tracefile_identifier引數設定的問題.txtIDE
- 使用歸檔日誌分析解決歸檔日誌迅速增長問題(logmnr)
- scala 呼叫 java 方法引數匹配問題Java
- [20170217]歸檔收集器.txt
- 【手摸手玩轉 OceanBase 159】如何檢視歸檔引數?