【基本操作】快速恢復區存在時修改歸檔路徑
情況描述
在開啟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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Rman在run命令塊裡臨時設定歸檔目錄,歸檔日誌能否恢復主要看預設的歸檔路徑
- 歸檔路徑更改後,如何對資料庫進行恢復(轉)資料庫
- Python科研武器庫 - 檔案/路徑操作 - 判斷路徑是否存在Python
- python基本操作-檔案、目錄及路徑Python
- 12C grid CDB異機恢復+歸檔(DDL操作)
- office for mac的自動恢復檔案的路徑Mac
- DG歸檔日誌缺失恢復
- win10 onenote如何修改檔案路徑_win10 onenote怎麼修改檔案路徑Win10
- 【BBED】丟失歸檔檔案情況下的恢復
- oracle dg 歸檔日誌恢復情況Oracle
- PbootCMS後臺檔案修改路徑位置boot
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- Git操作檔案的時候手賤了,怎麼恢復?Git
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- DM7使用DMRAMN執行歸檔恢復
- 快速理解Android檔案儲存路徑Android
- oracle11g修改控制檔案路徑Oracle
- 修改桌面路徑
- 被誤刪的檔案快速恢復方法
- dg丟失歸檔,使用rman增量備份恢復
- win10修改文件路徑怎麼操作 win10怎麼更改文件路徑Win10
- oracle11g修改資料檔案路徑Oracle
- oracle 修改資料檔案位置(路徑)(移動)Oracle
- oracle 修改資料檔案路徑(四種方式)Oracle
- Python內建庫:pathlib(檔案路徑操作)Python
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- 修改Oracle資料檔名及資料檔案存放路徑Oracle
- RMAN備份恢復典型案例——資料檔案存在壞快
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- 微信資料夾儲存在什麼位置?如何修改儲存路徑
- CentOS修改Mariadb資料庫檔案儲存路徑CentOS資料庫
- 檔案的基本管理和XFS檔案系統備份恢復
- pt-archiver工具歸檔和恢復資料一例Hive
- 【Oracle】如何修改資料檔案和日誌檔案的路徑Oracle
- 從備份片中恢復某個指定得歸檔或者資料檔案
- jenkins 修改訪問路徑Jenkins
- Redis當機 快速恢復Redis
- 【Django】檔案讀取時路徑問題Django
- 基於 Vuex 的時移操作(撤回/恢復)實現Vue