RAC环境创建本地数据文件的解决方法 您所在的位置:网站首页 rac数据文件建到本地 RAC环境创建本地数据文件的解决方法

RAC环境创建本地数据文件的解决方法

#RAC环境创建本地数据文件的解决方法| 来源: 网络整理| 查看: 265

RAC环境创建本地数据文件的解决方法:

思路如下:

1.数据文件 offline                                         

2.通过RMAN 将数据文件拷贝到存储

3.alter database  rename  file 将本地文件路径修改为存储路径

4.数据文件 online

操作如下:

SQL> select file_name,file_id,ONLINE_STATUS from dba_data_files;  --查询数据文件信息为27

SQL> alter database datafile 27 offline;   --数据文件脱机

RMAN> copy datafile 27 to '+DATADG';       --rman复制文件

Starting backup at 18-JUN-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=6446 instance=orcl1 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=6672 instance=orcl1 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=6783 instance=orcl1 device type=DISK

allocated channel: ORA_DISK_4

channel ORA_DISK_4: SID=7125 instance=orcl1 device type=DISK

channel ORA_DISK_1: starting datafile copy

input datafile file number=00027 name=/app/oracle/product/11.2.0/dbhome_1/dbs/11111.ora

output file name=+DATADG/orcl/datafile/mcc.291.850576959 tag=TAG20140618T152238 RECID=1 STAMP=850577020

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05

Finished backup at 18-JUN-14

SQL> alter database rename file '/app/oracle/product/11.2.0/dbhome_1/dbs/11111.ora' to '+DATADG/orcl/datafile/mcc.291.850576959';   --重命名文件

RMAN> switch datafile 27 to copy;    --rman更新控制文件

SQL> recover datafile 27;            --recover数据文件

SQL> alter database datafile 27 online;    --数据文件联机

SQL> select file_name,file_id,ONLINE_STATUS from dba_data_files;   --查询状态

SQL>select file_name,file_id,ONLINE_STATUS from dba_data_files;

参考:http://blog.itpub.net/501889/viewspace-1083311/



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有