ASMCMD> ls --absolutepath
+DG_DAT/ZXNORA/DATAFILE/pandy_dat_01.dbf => PANDY.309.933774621
+DG_DAT/ZXNORA/DATAFILE/pandy_dat_02.dbf => PANDY.311.933778649
none => SYSAUX.257.933178281
none => SYSTEM.256.933178281
none => UNDOTBS1.258.933178281
none => UNDOTBS2.271.933178505
none => USERS.259.933178281
pandy_dat_01.dbf
pandy_dat_02.dbf
七:将不规则的single-file文件进行规则rename操作。
SQL> alter database rename file '+DG_DAT/zxnora/datafile/pandy_dat_02.db' to '+DG_DAT/zxnora/datafile/pandy_dat_02.dbf';
Database altered.
八、在变更了数据文件之后需要对操作文件进行recover操作。
SQL> recover datafile 7;
Media recovery complete.
九、将操作文件置为online.
SQL> alter database datafile 7 online;
Database altered.
SQL> select file_name,tablespace_name,file_id,online_status from dba_data_files where tablespace_name='PANDY';
FILE_NAME TABLESPACE_NAME FILE_ID ONLINE_
--------------------------------------------- ------------------------------ ---------- -------
+DG_DAT/zxnora/datafile/pandy_dat_01.dbf PANDY 6 ONLINE
+DG_DAT/zxnora/datafile/pandy_dat_02.dbf PANDY 7 ONLINE
十、删除测试表空间及asm磁盘组的底层文件。
SQL> drop tablespace pandy;
Tablespace dropped.
ASMCMD> ls --absolutepath
+DG_DAT/ZXNORA/DATAFILE/pandy_dat_01.dbf => PANDY.309.933774621
+DG_DAT/ZXNORA/DATAFILE/pandy_dat_02.dbf => PANDY.311.933778649
none => SYSAUX.257.933178281
none => SYSTEM.256.933178281
none => UNDOTBS1.258.933178281
none => UNDOTBS2.271.933178505
none => USERS.259.933178281
pandy_dat_01.dbf
pandy_dat_02.dbf
ASMCMD> rm pandy_dat_01.dbf
ASMCMD> rm pandy_dat_02.dbf
提示:在对于有业务运行时段需要将业务暂停,在有ogg实时同步时,需要将ogg 暂停。