当前位置:  数据库>oracle

RAC本地数据文件迁移至ASM的方法--非归档模式

    来源: 互联网  发布时间:2017-06-23

    本文导语: 参考:RAC本地数据文件迁移至ASM的方法  系统环境:rhel6.2_x64+Oracle RAC11g 操作过程:1.非归档模式SQL> archive log list;Database log mode              No Archive ModeAutomatic archival            DisabledArchive destination            /u01/oracle/ap...

参考: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

RMAN> copy datafile '/u01/oracle/app/oracle/11.2.0/db/dbs/data0401.ora' to '+DATA';
Starting backup at 13-MAY-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00012 name=/u01/oracle/app/oracle/11.2.0/db/dbs/data0401.ora
output file name=+DATA/sdgdorcl/datafile/data01.279.911710969 tag=TAG20160513T050248 RECID=2 STAMP=911711045
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25
Finished backup at 13-MAY-16
RMAN>

6.在sqlplus中将数据库启动到mount状态,rename数据文件,并查看信息
SQL> alter database rename file '/u01/oracle/app/oracle/11.2.0/db/dbs/data0328.ora' to '+DATA/sdgdorcl/datafile/data01.278.911710731';
SQL> alter database rename file '/u01/oracle/app/oracle/11.2.0/db/dbs/data0401.ora' to '+DATA/sdgdorcl/datafile/data01.279.911710969';


7.将rac1,rac2启动
#RAC1
SQL> alter database open;
Database altered.
SQL>

#RAC2
SQL> startup
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.
Database opened.
SQL>

附:SYSTEM数据文件移植步骤(过程说明):
1. Stop DB.
2. Move the datafile using asmcmd.
3. Mount the DB.
4. Rename the datafile.
5. Open the DB.
6. On other RAC nodes you still need to bounce the database because it is SYSTEM tablespace, otherwise you will keep getting errors ORA-01516 or original error ORA-01157: cannot identify/lock data file.

如何将ASM中的数据文件复制到操作系统中

Oracle 11g RAC ASM磁盘全部丢失后的恢复

Oracle 11g从入门到精通 PDF+光盘源代码

RHEL6 ASM方式安装Oracle 11g R2

Oracle 10g 手工创建ASM数据库

Oracle 10g R2创建ASM实例Step By Step


    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • RAC +GPFS添加节点的问题~~~~~~~~~~~~·
  • 配置Oracle RAC需要注意的问题
  • Linux Oracle RAC内核参数
  • Linux下Oracle RAC一个节点宕机导致共享存储无法挂载的故障排除
  • Oracle RAC 10.2.0.1升级到10.2.0.4
  • Oracle10201 RAC升级到10204后导出数据时报EXP-00056错误
  • 与Oracle RAC相关的连接配置写法实例
  • [Oracle] RAC 之 - 负载均衡深入解析
  • RAC cache fusion机制实现原理分析
  • 基于Linux平台的Oracle RAC 10g集群教程:删除节点所需要的步骤
  • 如何在RAC环境下修改Oracle字符集
  • Oracle RAC 状态检查
  • 操作系统 iis7站长之家
  • redhat 5.5全新安装oracle rac的问题[1000分]
  • oracle 11g RAC 常用命令整理分享
  • Oracle 10201 RAC升级到10204
  • Redflag Linux安装Oracle 10gR2 RAC记事
  • 基于Linux平台的Oracle RAC 10g集群教程:添加节点所需要的步骤
  • Oracle10g RAC for Linux配置全过程


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3