Oracle rman backup and ORA-19504&ORA-27040&RMAN-030009
Today, a buddy wants to do an important operation on the database. He has to do a full rman backup before the operation, but due to carelessness, he wrote the backup path incorrectly, resulting in an error report of rman backup as shown in the following figure:
The rman backup program is prompted by the error to write the backup file to: / Oracle/app/oracle/product/11.2.0/dbhome_1/dbs/Oracle/backup/rman/full_0tsmout.bak "
But an error was reported because / Oracle/app/oracle/product/11.2.0/dbhome_1/dbs/Oracle/backup/rman does not exist: ORA-19504&ORA-27040&RMAN-03009
Judging from his backup script:
Run {
Backup increnmental level 0 database format 'Oracle/backup/rman/full_%u.bak'
Sql 'alter system archive log current'
Backup archivelog all format'/ Oracle/backup/rman/arch_%U.log'
Delete noprompt archivelog until time'{sysdate-1}'
}
It is found that the path written by the script path is missing the opening /, which can be found from RMAN > show all:
The database rman backup program placed the backup under $ORACLE_HOME/Oracle/backup/rman/, and the path did not exist and reported an error.
The solution is simple: change the backup script to:
Run {
Backup increnmental level 0 database format'/ Oracle/backup/rman/full_%u.bak'
Sql 'alter system archive log current'
Backup archivelog all format'/ Oracle/backup/rman/arch_%U.log'
Delete noprompt archivelog until time'{sysdate-1}'
}
Then the backup can proceed smoothly.