环境:
OS:Red Hat Linux As 5
DB:10.2.0.4
DG:物理DG
1. 备库是在mount状态
SQL> select status from v$instance;
STATUS
------------
MOUNTED
2.操作系统上迁移数据文件
[oracle@hxlbak oracl]$ mv '/u02/app/oracle/oradata/oracl/hxl06.dbf' '/u02/app/oracle/oradata/oraclbak/hxl06.dbf'
3.迁移数据文件
SQL> alter database rename file '/u02/app/oracle/oradata/oracl/hxl06.dbf' to
'/u02/app/oracle/oradata/oraclbak/hxl06.dbf'; 2
alter database rename file '/u02/app/oracle/oradata/oracl/hxl06.dbf' to
*
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.
4. 查看standby_file_management的模式
SQL> show parameters standby
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest string ?/dbs/arch
standby_file_management string AUTO
5.修改为手工模式
SQL> alter system set standby_file_management=manual scope=both;
System altered.
6. 迁移成功
SQL> alter database rename file '/u02/app/oracle/oradata/oracl/hxl06.dbf' to
'/u02/app/oracle/oradata/oraclbak/hxl06.dbf';
Database altered.
7.数据库可以打开
SQL> alter database open read only;
Database altered.
注意迁移完成后需要将备库管理模式修改为自动模式.
-- The End --
阅读(3469) | 评论(0) | 转发(0) |