Solution to delete Oracle's dbf file by mistake

1. Problem description: 

     If the dbf file of the Oracle database is deleted by mistake, an error will be prompted when the database is started and closed.

     The startup prompts when starting the database:

     ORA-01157: unable to identify/lock data file

     ORA-01110: data file:'....../data_01.dbf' not found

 

2. Solution:

     1、sql>alter system set "_ALLOW_RESETLOGS_CORRUPTION"=true scope=spfile;

          System altered.

     2、sql>shutdown immediate

          ORA-01109: database is not open

          Database has been uninstalled

          ORACLE routine has been closed

     3、sql>startup mount

          ORACLE routine has been started

          ....

          ....

          The database is loaded

     4、alter database datafile '.../data_01.dbf' offline drop;

          Database has changed

     5、alter database open;

          Database has changed

     6. Connect to the database

          sql>conn  sys/oracle1 

          connected

Guess you like

Origin blog.csdn.net/qq_37823979/article/details/105579638