2024年11月Linux使用rm删除了数据库文件如何恢复?(2)

发布时间:

  ⑴Oracle Database g Enterprise Edition Release .... - Production

  ⑵With the Partitioning, OLAP, Data Mining and Real Application Testing options

  ⑶SQL》 alter database datafile offline;

  ⑷Database altered.

  ⑸SQL》 recover datafile ;

  ⑹Media recovery plete.

  ⑺SQL》 alter database datafile online;

  ⑻Database altered.

  ⑼SQL》 shutdown immediate;

  ⑽Database closed.

  ⑾Database dismounted.

  ⑿ORACLE instance shut down.

  ⒀SQL》 startup

  ⒁ORACLE instance started.

  ⒂Total System Global Area bytes

  ⒃Fixed Size bytes

  ⒄Variable Size bytes

  ⒅Database Buffers bytes

  ⒆Redo Buffers bytes

  ⒇Database mounted.

  ⒈Database opened.

  ⒉注:如果数据库重启之后,还能恢复吗,测试一下:

  ⒊[oracleprimary dbwdn]$ rm users.dbf[oracleprimary dbwdn]$ ps -ef |grep dbw

  ⒋oracle : ? :: ora_dbw_dbwdn

  ⒌oracle : pts/ :: grep dbw

  ⒍[oracleprimary dbwdn]$ ll /proc//fd

  ⒎lr-x------ oracle oinstall Nov : -》 /dev/null

  ⒏lr-x------ oracle oinstall Nov : -》 /dev/null

  ⒐lr-x------ oracle oinstall Nov : -》 /dev/zero

  ⒑lr-x------ oracle oinstall Nov : -》 /dev/zero

  ⒒lr-x------ oracle oinstall Nov : -》 /u/app/oracle/product/../db_/rdbms/mesg/oraus.msb

  ⒓lrwx------ oracle oinstall Nov : -》 /u/app/oracle/product/../db_/dbs/hc_dbwdn.dat

  ⒔lrwx------ oracle oinstall Nov : -》 /u/app/oracle/product/../db_/dbs/lkDBWDN

  ⒕lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/control.ctl

  ⒖lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/control.ctl

  ⒗lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/control.ctl

  ⒘lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/system.dbf

  ⒙lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/undotbs.dbf

  ⒚lr-x------ oracle oinstall Nov : -》 /dev/null

  ⒛lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/sysaux.dbf

  ①lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/users.dbf (deletedlrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/test.dbf

  ②lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/ggs.dbf

  ③lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/perfstat.dbf

  ④lrwx------ oracle oinstall Nov : -》 /u/app/oracle/oradata/dbwdn/shkz_data_.dbf

  ⑤数据库没有重启,这个数据文件还能恢复,如果我重启数据库之后,还能看见这个数据文件吗?

  ⑥[oracleprimary dbwdn]$ sqlplus “/as sysdba”

  ⑦SQL*Plus: Release .... - Production on Tue Nov ::

  ⑧Copyright (c , , Oracle. All Rights Reserved.

  ⑨Connected to:

  ⑩Oracle Database g Enterprise Edition Release .... - Production

  ⅠWith the Partitioning, OLAP, Data Mining and Real Application Testing options

  ⅡSQL》 shutdown immediate;

  ⅢORA-: error in opening database file

  ⅣORA-: data file : ‘/u/app/oracle/oradata/dbwdn/users.dbf’

  ⅤORA-: unable to open file

  ⅥLinux Error: : No such file or directory

  ⅦAdditional information:

  ⅧSQL》 shutdown abort;ORACLE instance shut down.

  ⅨSQL》 exit

  ⅩDisconnected from Oracle Database g Enterprise Edition Release .... - Production

  ㈠With the Partitioning, OLAP, Data Mining and Real Application Testing options

  ㈡[oracleprimary dbwdn]$ sqlplus “/as sysdba”

  ㈢SQL*Plus: Release .... - Production on Tue Nov ::

  ㈣Copyright (c , , Oracle. All Rights Reserved.

  ㈤Connected to an idle instance.

  ㈥SQL》 startup

  ㈦ORACLE instance started.

  ㈧Total System Global Area bytes

  ㈨Fixed Size bytes

  ㈩Variable Size bytes

  Database Buffers bytes

  Redo Buffers bytes

  Database mounted.

  ORA-: cannot identify/lock data file - see DBWR trace file

  ORA-: data file : ‘/u/app/oracle/oradata/dbwdn/users.dbf’

  SQL》 exit