DG備援資料檔案重新命名

aishu521發表於2012-11-30
SQL>  alter database recover managed standby database cancel;
Database altered.
SQL> shutdown immediate;
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 4294967296 bytes
Fixed Size                  2026256 bytes
Variable Size             788530416 bytes
Database Buffers         3489660928 bytes
Redo Buffers               14749696 bytes
Database mounted.
SQL> alter database rename file '/u02/oradata/sfcdb/tbs_sfcdata01.dbf' to
'/u03/oradata/sfcdb/tbs_sfcdata01.dbf';
alter database rename file '/u02/oradata/sfcdb/tbs_sfcdata01.dbf' to
'/u03/oradata/sfcdb/tbs_sfcdata01.dbf'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is
automatic.
檢視
sql> show parameter standby
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest string %ORACLE_HOME%RDBMS
standby_file_management string AUTO
改為手動
SQL> alter system set standby_file_management = MANUAL;
重新命名
SQL> alter database rename file '/u02/oradata/sfcdb/tbs_sfcdata01.dbf' to
'/u03/oradata/sfcdb/tbs_sfcdata01.dbf';
SQL> alter database rename file '/u02/oradata/sfcdb/tbs_sfcdata02.dbf' to
'/u03/oradata/sfcdb/tbs_sfcdata02.dbf';
Database altered.
SQL> alter database rename file '/u02/oradata/sfcdb/tbs_sfcdata03.dbf' to
'/u03/oradata/sfcdb/tbs_sfcdata03.dbf';

SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select process,status from v$managed_standby;
PROCESS   STATUS
--------- ------------
ARCH      CONNECTED
ARCH      CONNECTED
RFS       IDLE
MRP0      WAIT_FOR_LOG

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15187685/viewspace-750309/,如需轉載,請註明出處,否則將追究法律責任。

相關文章