Backup of an Oracle database fails with the error "The Database script returned an error. Refer to the Database script output section in job logs for more details"
Problem
Backup of an Oracle database fails with the error "The Database script returned an error. Refer to the Database script output section in job logs for more details"
Error Message
Error A 1. The RMAN output reports the following:
RMAN-03002: failure of backup plus archivelog commandat <Date> <Time>
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file D:\ORA90\Archive1.ARC
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Error B. The RMAN output reports the following:
ORA-19566: exceeded limit of 0 corrupt blocks for file E:\ORA90\Database\tablespace.dbf
The Database script returned an error. Refer to the Database script output section in job logs for more details.
Cause
Solution
Error A1 can be fixed by solution A1 and A2. Follow A1 and if not resolved, Follow A2.
Error A1 indicates that there are some Archive logs missing from the expected sequence of logs. To fix the discrepancy execute the following steps:
Solution A 1:
1. Go to the Oracle server. Launch the command prompt.
2. Type:
RMAN
3. Type:
connect target sys@SIDname
4. Once connected to RMAN prompt, run the following command:
RMAN> crosscheck archivelog all;
5. Then have RMAN run this:
RMAN> delete expired archivelog all;
6. Exit the command prompt.
7. Now run the backup job and verify that it is successful.
Solution A 2:
Follow this step only if the oracle database is configured to use the recovery catalog.
RMAN or the Oracle instance must be modified to agree on the validity of the archived log file listed in the output file. This can be accomplished by using either the Oracle catalog command or the RMAN resync command.
To update RMAN with the list of currently available archived log files.
1. Go to the Oracle server. Launch the command prompt.
2. Type RMAN
3. Type connect target sys@SIDname
4. Once connected to RMAN prompt, run command:
RMAN> resync catalog;
Please contact Oracle support for assistance in using the catalog and resync commands
Solution B
1. Go to the Oracle server. Launch the command prompt
2. Type RMAN
3. Type connect target sys@SIDname
4. Once connected to RMAN prompt, run command:
run {
backup tablespace tablespacename;
}
If the above command returns the same error, it indicates an issue with Oracle. Contact Oracle Support to resolve the corruption in the tablespace. The resolution for this issue depends on the error logged in the RMAN output. Please refer to the RMAN output section in the failed backup job log for an error.