By default RMAN takes the backup as BACKUPSETS i.e. it combines of multiple datafiles into one or more backupsets.
If you want to take the backup of datafiles as it is then you can take IMAGE backups. To take image backups you have to mention 'AS COPY' option in backup command.
Let us take full database image backup using RMAN.
Start RMAN by typing the following command
$ export ORACLE_SID=test
$ rman target system/manager nocatalog
Then RMAN will get connected to the database and it will show the following messages
Now to take Full database IMAGE backup give the following command.
rman> backup as copy database tag 'MyFullImageBackup';
The above command will take full database backup and it will store the backup in the directory mentioned in the DB_RECOVERY_FILE_DEST parameter
When we take backup using RMAN and didn't mention the FORMAT clause RMAN will take the backup in the default location which is specified by the DB_RECOVERY_FILE_DEST parameter
In my database the DB_RECOVERY_FILE_DEST is set to '/u02/oracle/testdb/flash'
So when we take image backup RMAN will automatically create two folders i.e. datafile and controlfile and will store the image backups in these directories.
The screenshot shown below shows the contents of the these directories after giving the above command
In the same way you can also take image backup of particular tablespaces or datafiles by mentioning 'as copy' option in backup command
For example to take image backup of USERS tablespace datafiles give the following command
RMAN> backup as copy tablespace users;
You can also take the image backup of particular datafile by giving the following command
RMAN> backup as copy datafile 2,6;
You can specify datafile id / number or full name of datafile. You can view the file id /number and datafile path by querying the data dictionary V$DATAFILE
Interface Computers Academy © 2007-2017 All Rights Reserved