RAC本地数据文件迁移至ASM的方法

参考:RAC本地数据文件迁移至ASM的方法 

系统环境:rhel6.2_x64+Oracle RAC11g
 
操作过程:
1.非归档模式
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival            Disabled
Archive destination            /u01/oracle/app/oracle/11.2.0/db/dbs/arch
Oldest online log sequence    303086
Current log sequence          303087
SQL>

2.非系统表空间(当前为生产环境,节点RAC1可识别本地文件)
SQL> set line 180
SQL> col file_name for a60
SQL> col tablespace_name for a15
SQL> select file_name,file_id,online_status,tablespace_name from dba_data_files;
FILE_NAME                                                      FILE_ID ONLINE_ TABLESPACE_NAME
------------------------------------------------------------ ---------- ------- ---------------
+DATA/sdgdorcl/datafile/system.259.848099691                          1 SYSTEM  SYSTEM
+DATA/sdgdorcl/datafile/sysaux.260.848099695                          2 ONLINE  SYSAUX
+DATA/sdgdorcl/datafile/undotbs1.261.848099697                        3 ONLINE  UNDOTBS1
+DATA/sdgdorcl/datafile/undotbs2.263.848099707                        4 ONLINE  UNDOTBS2
+DATA/sdgdorcl/datafile/users.264.848099707                          5 ONLINE  USERS
+DATA/sdgdorcl/datafile/data01.268.848183595                          6 ONLINE  data01
+DATA/sdgdorcl/datafile/nnc_index01.269.848183657                    7 ONLINE  INDEX01
+DATA/sdgdorcl/datafile/data0101.268.8481835951.ora                  8 ONLINE  data01
+DATA/sdgdorcl/datafile/data01.271.854940577                          9 ONLINE  data01
+DATA/sdgdorcl/datafile/data0102.268.8481835951.ora                  10 ONLINE  data01
+DATA/sdgdorcl/datafile/nnc_index01.20160308.ora                    11 ONLINE  INDEX01

FILE_NAME                                                      FILE_ID ONLINE_ TABLESPACE_NAME
------------------------------------------------------------ ---------- ------- ---------------
/u01/oracle/app/oracle/11.2.0/db/dbs/data0401.ora                    12 ONLINE  data01
/u01/oracle/app/oracle/11.2.0/db/dbs/data0328.ora                    13 ONLINE  data01
+DATA/sdgdorcl/datafile/data01.274.911612215                        14 ONLINE  data01
+DATA/sdgdorcl/datafile/data01.275.911612497                        15 ONLINE  data01
+DATA/sdgdorcl/datafile/nnc_index01.276.911612519                    16 ONLINE  INDEX01
+DATA/sdgdorcl/datafile/nnc_index01.277.911612529                    17 ONLINE  INDEX01
SQL>

3.干净关闭RAC2,RAC1
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

4.将RAC1启动mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 1.7103E+10 bytes
Fixed Size                  2245480 bytes
Variable Size            7381978264 bytes
Database Buffers        9663676416 bytes
Redo Buffers              55263232 bytes
Database mounted.
SQL>


5.通过RMAN CP命令拷贝数据文件
[oracle@sdgddb1 ora_data]$ rman target /
RMAN> copy datafile '/u01/oracle/app/oracle/11.2.0/db/dbs/data0328.ora' to '+DATA';
Starting backup at 13-MAY-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=433 instance=sdgdorcl1 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00013 name=/u01/oracle/app/oracle/11.2.0/db/dbs/data0328.ora
output file name=+DATA/sdgdorcl/datafile/data01.278.911710731 tag=TAG20160513T045849 RECID=1 STAMP=911710866
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25
Finished backup at 13-MAY-16

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/1f6fcdd10e7e18aaa6da2e796d08333e.html