Bootstrap

ORA-01119:创建数据库文件‘+DBFILE1\orcl\datafile\app_data.dbf'时出错

rac数据库重装之后创建表空间报错,查看最后说是这个路径已经被存在的别名使用过了 ,相关是改路径下还有这个文件,然后想到冲装之前没有删除表空间和用户

冲装之前要执行如下操作删除用户和表空间

--删除表空间:
DROP TABLESPACE car_nfo_data INCLUDING CONTENTS  AND DATAFILES CASCADE CONSTRAINTS;

删除用户:

--drop user jdic cascade;

现在因为没有删除报了如下错误,我们怎么来更改,通过错误提示可以看出是共享存储的ASM共享磁盘上的有一样的文件

那么以grid用户身份进入

[grid@rac1 ~]$ asmcmd
ASMCMD> ls -l
State    Type    Rebal  Name
MOUNTED  NORMAL  N      DATA/
MOUNTED  EXTERN  N      DBFILE1/
MOUNTED  EXTERN  N      FRA/
ASMCMD> cd /DBFILE1/orcl/datafile/

ASMCMD> ls
APP_DATA.271.879520669
APP_IDX.270.879521267
CHECK_RECORDDATA_2013.259.879521959
CHECK_RECORDDATA_2014.258.879522163
CHECK_RECORDDATA_2015.257.879522439
CHECK_RECORDDATA_2016.256.879522797
EXAMPLE.277.879518831
EXAMPLE.288.880628263
STATISTICS_DATA.269.879521397
SYSAUX.260.879518581
SYSAUX.281.880628013
SYSTEM.268.879518581
SYSTEM.280.880628013
UNDOTBS1.273.879518581
UNDOTBS1.282.880628015
UNDOTBS2.276.879519137
UNDOTBS2.289.880628567
USERS.263.879518581
USERS.283.880628015
USER_DATA.265.879521745
app_data.dbf
app_idx.dbf
check_recorddata_2013.dbf
check_recorddata_2014.dbf
check_recorddata_2015.dbf
check_recorddata_2016.dbf
statistics_data.dbf
user_data.dbf
user_temp.dbf
ASMCMD> rm -rf app_data.dbf
ASMCMD> ls
APP_IDX.270.879521267
CHECK_RECORDDATA_2013.259.879521959
CHECK_RECORDDATA_2014.258.879522163
CHECK_RECORDDATA_2015.257.879522439
CHECK_RECORDDATA_2016.256.879522797
EXAMPLE.277.879518831
EXAMPLE.288.880628263
STATISTICS_DATA.269.879521397
SYSAUX.260.879518581
SYSAUX.281.880628013
SYSTEM.268.879518581
SYSTEM.280.880628013
UNDOTBS1.273.879518581
UNDOTBS1.282.880628015
UNDOTBS2.276.879519137
UNDOTBS2.289.880628567
USERS.263.879518581
USERS.283.880628015
USER_DATA.265.879521745
app_idx.dbf
check_recorddata_2013.dbf
check_recorddata_2014.dbf
check_recorddata_2015.dbf
check_recorddata_2016.dbf
statistics_data.dbf
user_data.dbf
user_temp.dbf

可以看到确实是物理路径没有删除

那么使用rm -rf   删除这些.dbf的文件即可

;