【基本操作】快速恢復區存在時修改歸檔路徑
情況描述
在開啟flashback情況下,預設歸檔路徑為快速恢復區,嘗試修改歸檔路徑為指定路徑。
初始化環境
SYS@PROD>show parameter recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
recovery_parallelism integer 0
SYS@PROD>alter system set db_recovery_file_dest_size=4g;
System altered.
SYS@PROD>alter system set db_recovery_file_dest='/home/oracle/flash';
System altered.
LOG_ARCHIVE_DEST_n
Property Description
Parameter type String
Syntax LOG_ARCHIVE_DEST_[1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10] =
{ null_string |
{ LOCATION=path_name | SERVICE=service_name }
[ { MANDATORY | OPTIONAL } ]
[ REOPEN[=seconds] ]
[ DELAY[=minutes] ]
[ NOREGISTER ]
[ TEMPLATE=template] ]
[ ALTERNATE=destination ]
[ DEPENDENCY=destination ]
[ MAX_FAILURE=count ]
[ ARCH | LGWR ]
[ SYNC | ASYNC ]
[ AFFIRM | NOAFFIRM ]
[ NET_TIMEOUT=seconds ]
[ VALID_FOR=(redo_log_type,database_role) ]
[ DB_UNIQUE_NAME ]
[ VERIFY ]
}
#
LOCATION=local_disk_directory or USE_DB_RECOVERY_FILE_DEST
Specifies either a local file system destination or the directory, file system, or Oracle Storage Manager disk group that will serve as the flash recovery area. You must specify this attribute for at least one destination. You can specify either a local disk directory or flash recovery area with the LOCATION attribute. You must include either the LOCATION or the SERVICE attribute for each destination to specify where to archive the redo data.
依照官方文件描述,修改sql語句為:
SYS@PROD>alter system set log_archive_dest_1='location=/home/oracle/archive';
System altered.
SYS@PROD>archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/archive
Oldest online log sequence 9
Next log sequence to archive 12
Current log sequence 12
在開啟flashback情況下,預設歸檔路徑為快速恢復區,嘗試修改歸檔路徑為指定路徑。
初始化環境
SYS@PROD>show parameter recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
recovery_parallelism integer 0
SYS@PROD>alter system set db_recovery_file_dest_size=4g;
System altered.
SYS@PROD>alter system set db_recovery_file_dest='/home/oracle/flash';
System altered.
SYS@PROD>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD>startup mount
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219784 bytes
Variable Size 138412856 bytes
Database Buffers 276824064 bytes
Redo Buffers 2973696 bytes
Database mounted.
SYS@PROD>alter database flashback on;
Database altered.
SYS@PROD>alter database open;
Database altered.
檢視歸檔路徑
SYS@PROD>archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 12
Current log sequence 12
操作失敗,檢視官方文件中的描述:Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD>startup mount
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219784 bytes
Variable Size 138412856 bytes
Database Buffers 276824064 bytes
Redo Buffers 2973696 bytes
Database mounted.
SYS@PROD>alter database flashback on;
Database altered.
SYS@PROD>alter database open;
Database altered.
檢視歸檔路徑
SYS@PROD>archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 12
Current log sequence 12
我們看到預設歸檔路徑為快速恢復區;現在欲將歸檔路徑改為指定路徑:/home/oracle/archive
SYS@PROD>alter system set log_archive_dest_1='/home/oracle/archive';
alter system set log_archive_dest_1='/home/oracle/archive'
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
SYS@PROD>alter system set log_archive_dest_1='/home/oracle/archive' scope=spfile;
alter system set log_archive_dest_1='/home/oracle/archive' scope=spfile
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
SYS@PROD>alter system set log_archive_dest_1='/home/oracle/archive';
alter system set log_archive_dest_1='/home/oracle/archive'
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
SYS@PROD>alter system set log_archive_dest_1='/home/oracle/archive' scope=spfile;
alter system set log_archive_dest_1='/home/oracle/archive' scope=spfile
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
LOG_ARCHIVE_DEST_n
Property Description
Parameter type String
Syntax LOG_ARCHIVE_DEST_[1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10] =
{ null_string |
{ LOCATION=path_name | SERVICE=service_name }
[ { MANDATORY | OPTIONAL } ]
[ REOPEN[=seconds] ]
[ DELAY[=minutes] ]
[ NOREGISTER ]
[ TEMPLATE=template] ]
[ ALTERNATE=destination ]
[ DEPENDENCY=destination ]
[ MAX_FAILURE=count ]
[ ARCH | LGWR ]
[ SYNC | ASYNC ]
[ AFFIRM | NOAFFIRM ]
[ NET_TIMEOUT=seconds ]
[ VALID_FOR=(redo_log_type,database_role) ]
[ DB_UNIQUE_NAME ]
[ VERIFY ]
}
LOCATION=local_disk_directory or USE_DB_RECOVERY_FILE_DEST
Specifies either a local file system destination or the directory, file system, or Oracle Storage Manager disk group that will serve as the flash recovery area. You must specify this attribute for at least one destination. You can specify either a local disk directory or flash recovery area with the LOCATION attribute. You must include either the LOCATION or the SERVICE attribute for each destination to specify where to archive the redo data.
SYS@PROD>alter system set log_archive_dest_1='location=/home/oracle/archive';
System altered.
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/archive
Oldest online log sequence 9
Next log sequence to archive 12
Current log sequence 12
修改完畢;
總結:基本命令不熟悉的話,多看oracle官方文件中的解釋是有效的學習方法。
2014-9-16
ocm訓練進行時
總結:基本命令不熟悉的話,多看oracle官方文件中的解釋是有效的學習方法。
2014-9-16
ocm訓練進行時
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29319205/viewspace-1270801/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 修改歸檔日誌路徑
- 【歸檔日誌路徑】之引數 log_archive_dest、LOG_ARCHIVE_DEST_n及快速恢復區路徑關係Hive
- 修改db2的歸檔路徑DB2
- Oracle資料庫的閃回恢復區及多歸檔路徑的設定Oracle資料庫
- Oracle的閃回恢復區和歸檔日誌多路徑設定Oracle
- Rman在run命令塊裡臨時設定歸檔目錄,歸檔日誌能否恢復主要看預設的歸檔路徑
- 歸檔路徑更改後,如何對資料庫進行恢復(轉)資料庫
- 非歸檔模式下的資料檔案路徑修改模式
- 設定並修改快速恢復區的引數
- 歸檔資料庫中的不可恢復操作資料庫
- 【備份恢復】非歸檔模式下丟失任意資料檔案 恢復操作模式
- 10g關閉歸檔/啟用閃回恢復區歸檔
- oracle快速恢復區Oracle
- python基本操作-檔案、目錄及路徑Python
- 歸檔日誌多歸檔路徑 duplex
- 更改ORACLE歸檔路徑及歸檔模式Oracle模式
- 10g修改歸檔日誌路徑的問題
- 沒備份,歸檔日誌存在,丟失資料檔案的恢復
- 恢復之非歸檔模式下的恢復模式
- 改變歸檔檔案路徑
- office for mac的自動恢復檔案的路徑Mac
- rman datafile恢復(歸檔模式)模式
- 更改archive log 歸檔路徑和歸檔檔名稱Hive
- rman給歸檔指定備份位置;庫先備份盤同時到帶庫;更改控制檔案自備路徑;時間點的恢復
- 12C grid CDB異機恢復+歸檔(DDL操作)
- Production DB expdp 導致standby歸檔恢復時混亂
- ORACLE設定 快速恢復區Oracle
- 修改資料檔案路徑
- 恢復測試:擁有當時的全部歸檔,控制檔案,恢復丟失的資料檔案。
- DG歸檔日誌缺失恢復
- 無備份恢復(歸檔模式)模式
- ORACLE非歸檔下的恢復Oracle
- dataguard歸檔路徑的問題
- 【備份恢復】恢復 丟失已歸檔重做日誌檔案
- 恢復案例:無歸檔,掉電,控制檔案全部丟失恢復
- 【備份恢復】 控制檔案多路徑
- 恢復案例:歸檔模式下丟失全部資料檔案的恢復模式
- 更改oracle10g的歸檔模式和歸檔路徑Oracle模式