RAC环境数据文件误建到本地文件系统处理



转到底部转到底部

2014-3-26PROBLEM
为此文档评级通过电子邮件发送此文档的链接在新窗口中打开文档可打印页

In this Document

Symptoms
 Changes
 Cause
 Solution

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.

SYMPTOMS

 user add datafile for RAC DataBase in the local node

 SQL> alter tablespace system add datafile 'FRA' SIZE 250M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED;

then when he query DBA_DATA_FILES
ORA-01157: cannot identify/lock data file 66 - see DBWR trace file
ORA-01110: data file 66: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/FRA'

CHANGES

 datafiles add to system Tablespace by mistake on the local Node instead of shared diskgroup

CAUSE

 This is expected as it is RAC DB and it suppose to create the new Datafile on the shared disk no on the local node

when user  add data file using SQL> alter tablespace system add datafile 'FRA' SIZE 250M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED;

its add the datafile in the default OMG location db_create_file_dest

SQL> show parameter db_create_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest                  string

and when it is Null the default locaion $OH/dbs

 

SOLUTION

- Open the DB in Mount state

- copy the created Datafile to the shared Disk Group

please note that the DB must be in the archive mode .

RMAN> copy datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/FRA' to '+FRA';

Starting backup at 06-JAN-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=8 instance=TESTDB12 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00066 name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/FRA
output file name=+FRA/testdb1/datafile/system.284.836141149 tag=TAG20140106T132548 RECID=1 STAMP=836141162
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 06-JAN-14

  
- using SQL PLUS rename the Datafile to the New location

SQL>alter database rename file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/FRA' to '+FRA/TESTDB1/DATAFILE/SYSTEM.284.836141149';

 - open the DB

SQL> alter Databse open;

 - remove the old file

 $ rm /u01/app/oracle/product/11.2.0/dbhome_1/dbs/FRA

  

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值