oracle sql and dba tutorial logo

 

Oracle DBA

Learn Oracle 11g / 12c Database Admin step by step



Oracle SQL

Tutorial for Oracle SQL


Oracle DBA Interview Questions

Most asked Oracle DBA Interview Questions.

60 Technical Questions
42 Backup & Recovery Questions

Unix For Oracle DBA 20 Questions



Download Oracle 11g / 12 c Software

Links to Download Oracle 12c / 11g for Linux, Windows etc.


MySQL Tutorial

Learn MySQL step by step


 

 

 

 

 

 

 

 

 

Taking IMAGE backups using RMAN

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.

Step 1

 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

RMAN connect to database

Step 2

Now to take Full database IMAGE backup give the following command.

rman> backup as copy database tag 'MyFullImageBackup';

rman image backup of full database 

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

view rman backup files command prompt

Taking image backup of particular tablespaces or datafiles using RMAN

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;

tablespace image backup

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

 

 


HomeContact Us

Data Loader

Data Loader is a simple yet powerful tool to
export and import Data between many common database formats


Forms Data Loader

Tool to load data into Oracle E-Business Suite R12 / Oracle Apps using Macros and Forms Record and Playback

Interface Computers Academy © 2007-2017 All Rights Reserved