Friday, August 1, 2025

Effortless Recovery with RMAN: What Happens When Datafiles Are Gone

 

Disclaimer: This content is provided for knowledge-sharing purposes only. The author assumes no responsibility for any outcomes resulting from its use.

Dated: 01-AUG-2025


Assumption:

Datafile lost, and instance in mount stage while starting.

SQL> startup;

....

.......

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

SQL> select status from v$instance;

STATUS

————

MOUNTED


rman target /

RMAN>list failure;

RMAN> advise failure;

RMAN> repair failure preview;  -- give command to repair

RMAN> repair failure; -- if you agree to the RMAN-suggested script, implement it (backup must exist)

Note: if during restore faced: ORA-28365: wallet is not open. Open your keystore using below command and try again to rrman>repair failure command.

ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "your_keystore_password";

 -- everything back to normal can be confirmed again

RMAN> advise failure;   -- this time no error

SQL> select status from v$instance;

STATUS

————

OPEN


Reference:

1.    https://taliphakanozturken.wordpress.com/2011/07/18/list-failure-advise-failure-and-repair-failure-with-oracle-11g-rman/

2. https://www.youtube.com/watch?v=hVedlNBpOo4