The cause and solution for ORA-01157: cannot identify/lock data file 1 error in oracle.
Ezana Answered question 28/11/2022
The data file is missing or corrupt.
Solution: Restore from backup but if you don’t have a backup, you can’t restore and recover it and of course you can’t restart your database. So, you have take the data file offline before starting the database.
Example :
SQL> alter database datafile '/u01/data/19c/data01.dbf' offline for drop;
And open the database:
SQL> alter database open;
And when you run RMAN backup job:
SQL> alter database open; RMAN-03002: failure of backup command at .. RMAN-06056: could not access datafile 1
The solution for the above RMAN error is to exclude the offline data file from the backup.
RMAN> backup database skip offline;
Ezana Answered question 28/11/2022