oracle9204(9i)_dg(data guard)_重新命名主庫資料檔案_指南_轉摘官檔
When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database. If you do not want the standby database to have the same physical structure as the primary database, then these steps are not required.
- To rename the datafile in the primary database, take the tablespace offline:
SQL> ALTER TABLESPACE tbs_4 OFFLINE;
- Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
% mv tbs_4.dbf tbs_x.dbf
- Rename the datafile in the primary database and bring the tablespace back online:
SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE 'tbs_4.dbf'
2> TO 'tbs_x.dbf';
SQL> ALTER TABLESPACE tbs_4 ONLINE; - Connect to the standby database and make sure that all the logs are applied; then stop managed recovery operations:
SQL> SELECT NAME, SEQUENCE#, ARCHIVED, APPLIED
2> FROM V$ARCHIVED_LOG;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; - Shut down the standby database:
SQL> SHUTDOWN;
- Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
% mv tbs_4.dbf tbs_x.dbf
- Start and mount the standby database with the new control file:
SQL> STARTUP NOMOUNT;
SQL> ALTER DATABASE MOUNT STANDBY DATABASE; - Rename the datafile in the standby controlfile. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
SQL> ALTER DATABASE RENAME FILE 'tbs_4.dbf'
2> TO 'tbs_x.dbf'; - On the standby database, restart managed recovery operations:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
2> DISCONNECT FROM SESSION;
If you do not rename the corresponding datafile at the standby site, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/disk1/oracle/dbs/tbs_x.dbf'
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-628161/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DATA GUARD主庫丟失資料檔案的恢復(3)
- DATA GUARD主庫丟失資料檔案的恢復(1)
- DATA GUARD主庫丟失資料檔案的恢復(2)
- 【DG】Data Guard主備庫Failove切換AI
- 【DG】Data Guard主備庫Switchover切換
- oracle dg庫資料檔案空間不足Oracle
- [20180718]拷貝資料檔案從dg庫.txt
- DG備庫手動管理 新增資料檔案
- 【DG】Data Guard搭建(physical standby)
- dg主庫建立檔案備庫未同步解決方法
- Oracle DG備庫手動管理新增資料檔案Oracle
- [20190410]dg建立臨時表檔案資料檔案.txt
- oracle dg庫資料檔案建立失敗ORA-01111Oracle
- 12c pdb線上移動資料檔案或者重新命名資料檔案
- 【ASK_ORACLE】Oracle Data Guard(一)DG架構Oracle架構
- 織夢資料庫配置檔案-DedeCMS織夢資料庫檔案在哪裡資料庫
- Oracle 11g Data Guard 增加資料檔案報錯:ORA-01111、ORA-01110、ORA-01157Oracle
- dedecms資料庫配置檔案所在路徑為:/data/common.inc.php資料庫PHP
- 遷移資料庫的檔案到不同路徑(轉)資料庫
- Oracle DG資料庫狀態轉換Oracle資料庫
- 不能重新命名檔案及不能刪除檔案和資料夾許可權設定
- 重新命名一千個檔案要多久? Name Mangler 快速為大量檔案重新命名
- oracle資料庫的配置檔案Oracle資料庫
- 帝國CMS資料庫配置檔案是哪個檔案?資料庫
- 織夢CMS(dedecms)的資料庫連線檔案_織夢連線資料庫檔案資料庫
- Sqlserver資料庫使用 .bak 檔案還原資料庫SQLServer資料庫
- 批次檔案重新命名的方法
- MySQL8.0.18資料庫新增資料檔案MySql資料庫
- 網站檔案修改資料庫,安全高效地修改網站資料庫中的檔案資訊網站資料庫
- 2.5.10.3 指定資料庫時區檔案資料庫
- 織夢CMS資料庫配置檔案資料庫
- 織夢php資料庫配置檔案PHP資料庫
- oracle uncatalog資料庫備份檔案Oracle資料庫
- 12c DG新特性 - Active Data Guard Far Sync (Doc ID 2179719.1)
- G008-ORACLE-DG ORACLE 19C Active Data Guard DML RedirectionOracle
- 【ASM】ASM資料檔案和OS檔案(FILESYSTEM)轉移方法總結ASM
- 12C關於CDB、PDB線上移動資料檔案、線上重新命名資料檔案的操作說明
- 織夢資料庫配置檔案修改資料庫配置方法資料庫
- 使用Data Guard Broker進行Data Guard物理備用庫配置(Oracle 19c)Oracle