Following section explains how we can take full database backup using RMAN command line interface on windows.
Before taking backup, decide which type of backup you want to take. You can take online or offline backup using RMAN. For online backups, database archiving must be turned ON. If archiving of you database is not ON, database must be in MOUNT stage to take backup using RMAN. Oracle recommends you to turn ON archiving to protect your data. This example is tested with online backup option.
1-First step is to start RMAN, click Start->Run and type RMAN and press Enter key.
2-Second step is to connect RMAN to database. In this example, RMAN metadata will be saved in control file of target database. Now, issue following commands to connect database.
RMAN> Connect target /
Here note down DBID of database. This DBID will be used in recovery process
3-Create a directory name as “D:\RMANBACKUP”. Now type following script to take full database backup.
configure controlfile autobackup format for device type disk to 'd:/rmanbackup/%F';
3> configure controlfile autobackup on;
4> allocate channel d1 type disk;
5> backup tag FULL_DB format 'd:/rmanbackup/db_%t_%s.bk' (database);
6> release channel d1;
After the procedure is competed, you will find backupup files in “D:\RMANBACKUP” directory.These backup files can be used to recover any datafile or all datafiles, control file or SPFILE.
In production database, you will have several backups. What if you want to restore a particular backup? To handle this issue, RMAN supports a TAG with each backup. In above script tag FULL_DB is used at line 3. At the time of recovery this tag can be used to restore a particular backup.
Following is the snapshot of all above process.
Visit following link to find an example of database recovery using above backup