How do you recover a damaged datafile when the database is running in ARCHIVELOG MODE?

@ : Home > > Interview Room

if you have lost one datafile. Then follow the steps shown below.

STEP 1. Shutdown the Database if it is running.

STEP 2. Restore the datafile from most recent backup.

STEP 3. Then Start sqlplus and connect as SYSDBA.

sqlplus / as sysdba
SQL> Startup mount;
SQL> Set autorecovery on;
SQL> alter database recover;

If all archive log files are available then recovery should go on smoothly. After you get the "Media Recovery Completely" statement. Go on to next step.

STEP 4. Now open the database

SQL>alter database open;
Alert me