Thursday, May 15, 2008

Backup Database control file -User Managed

Backup of controlfile is necessary if you make and modification to your database structure. For example if you add a a new tablespace or add a new datafile to an existing tablespace then backup the control file so that in the backup control file the database structure become up to date which will help you to perform database recovery in case of any problem.

If you configure the configuration parameter CONFIGURE CONTROLFILE AUTOBACKUP ON then control file is automatically backup after each database structural changes.

There are two user managed method to take control file backup.

1)Take control file Backup as a Binary File:
-----------------------------------------------

A binary backup is preferable to a trace file backup because it contains additional information such as
-the archived log history,
-offline range for read-only and offline tablespaces,
-and backup sets and copies (if you use RMAN).

But binary control file backups do not include tempfile entries.

To take control file backup as a binary file just issue,
SQL>ALTER DATABASE BACKUP CONTROLFILE TO '/oradata2/control.bak';

2)Backup control file as a Text file.
-------------------------------------------

To take backup control file as a text file simply issue,
SQL>ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/oradata2/control.bak';

If you specify neither the RESETLOGS nor NORESETLOGS option in the SQL statement, then the resulting trace file contains versions of the control file for both RESETLOGS and NORESETLOGS options.

Unlike binary backup of control file backup to trace tempfile entries are included- in the output using "ALTER TABLESPACE... ADD TEMPFILE" statements.

No comments:

Post a Comment