Home » RDBMS Server » Backup & Recovery » ORA-19504 - "failed to create file"
icon5.gif  ORA-19504 - "failed to create file" [message #667065] Wed, 06 December 2017 04:19 Go to previous message
davebyrne
Messages: 4
Registered: December 2017
Location: UK
Junior Member
Hi All,

I'm fairly new to RMAN, so please bear with me.. I have the following bash script:

#!/bin/bash
mkdir /u02/rman/<REDACTED>/full`date +%Y%m%d`
source /home/oracle/.bash_profile
rman cmdfile /u02/rman/scripts/<REDACTED>_lev0.cmd log=/u02/rman/scripts/lev0.log

This script is called when a full backups is required, it creates a time/date stamped folder within the /u02 mount to store the full backup within. That's all fine, lets say it creates one on the 25th December 2017, so it would create "/u02/rman/<REDACTED>/full20171225"

The RMAN command file that is run from this is:
connect target sys/<REDACTED>;
RUN {
ALLOCATE CHANNEL <REDACTED> TYPE DISK FORMAT '/u02/rman/<REDACTED>/full%Y%M%D/%U';
set controlfile autobackup format for device type disk to '/u02/rman/<REDACTED>/full%Y%M%D/cf_%F';
backup incremental level 0 as compressed backupset database plus archivelog;
delete force noprompt obsolete;
RELEASE CHANNEL <REDACTED>;
}

In here is where I'm having a problem, a full backup of our 750Gb+ dataset takes around 36hours, and there is no way at the moment for us to speed that up. The issue that results in is that at around 1minute past midnight, the RMAN operation fails because it attempts to write to "/u02/rman/<REDACTED>/full20171226/%U" (note the 26th, because we've gone past midnight). Now, of course that directory doesn't exist, it was never created, we only created the 25th directory in the bash script.

We (wrongly) assumed that the directories would be "set" when the RMAN cmd file is first run, but clearly this is not the case, and those dynamic directories are referenced and "calculated" several times over during the course of the full backup.

What is the preferred method (or indeed just the easiest method) to resolve this? Can we somehow pass the DIR made in the bash script to RMAN as a static string rather than letting RMAN calculate its own DIR's? Can we give RMAN some kind of command that makes it only set its target folder once?

Here is the resulting ORA and RMAN errors for what its worth (not a lot):
RMAN-03002: failure of backup plus archivelog command at 12/03/2017 05:25:03
ORA-19504: failed to create file "/u02/rman/<REDACTED>/full20171203/arsl5t5d_1_1"
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory

[Updated on: Wed, 06 December 2017 04:31]

Report message to a moderator

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: RMAN Another Processing Is Running
Next Topic: RMAN on ORA11gR2 - CONFIGURE RETENTION POLICY TO REDUNDANCY 1
Goto Forum:
  


Current Time: Wed Apr 24 21:06:26 CDT 2024