1
votes

I want to change to another drive due to lack of disk space.

How can I change the default location of backup files used by oracle to another drive using RMAN?

By default it's in the folder ORACLE_HOME from variables.

edit:

Found some links with problems like mine here, but they didn't help.

My script looks like this one:

run {
allocate channel d1 type disk;
allocate channel d2 type disk;
backup
format 'd:/backups/%U.bkp'
database plus archivelog;
release channel d1;
release channel d2;
}

Edit : By running the above scripts the backup will never finish

2
This is a DBA question, not a programming one.Adam Musch
You can't - enough people with reputation can.Adam Musch

2 Answers

3
votes

If performing a BACKUP operation with RMAN, the location of backupsets / backup pieces / image copies / etc is determined by the ALLOCATE CHANNEL command.

run 
{
  allocate channel d1 device type disk format 'd:/backups/%U.bkp';
  backup database include current controlfile;
  release channel d1;
}

If not specifying a location for a disk channel, Oracle defaults the location to $ORACLE_HOME, as that's a path Oracle knows exists.

0
votes

Using Oracle RMAN you can now back up to Cloud/Amazon S3, check this out:

"Using Oracle Database with Amazon Web Services"