configure controlfile autobackup format


CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

The first channel allocated during the backup job creates the autobackup and places it into its own backup set. All other files are transient, because Oracle will generally eventually delete these files, at some point after they become obsolete under the retention policy or have been backed up to tape. RMAN does not consider any full or level 0 incremental backup as obsolete if it falls within the recovery window. backup datafile 1 format 'c:\rman\datafile_1_%D%M%Y%U'; You can return any setting you change with the CONFIGURE command to its default value by running the CONFIGURE command with the CLEAR option, as in: By default, RMAN sends all backups to an operating system specific directory on disk. If a server parameter file is used, it is backed up in the same backup set as the control file during a control file autobackup.

The following commands let you set the default backup type to compressed backup sets for different device types: To disable compression, use the CONFIGURE DEVICE TYPE command with arguments specifying your other desired settings, but omitting the COMPRESSED keyword. There are also restrictions on some other initialization parameters when using a flash recovery area. This variable format translates into c-IIIIIIIIII-YYYYMMDD-QQ, where: You can change the default format by using the following command, where deviceSpecifier is any valid device such as DISK or sbt, and 'string' must contain the substitution variable %F (and no other substitution variables) and is a valid handle for the specified device: For example, you can run the following command: The following example configures the autobackup to write to an Automatic Storage Management disk group: To clear control file autobackup formats for a device, use the following commands: If you have set up a flash recovery area for your database, you can direct control file autobackups to the flash recovery area by clearing the control file autobackup format for disk. Allrightsreserved. Ideally, the flash recovery area should be large enough to contain all of the following files: If providing this much space is impractical, it is best to create an area large enough to keep a backup of the most important tablespaces and all the archived logs not yet copied to tape. Because the filename for the autobackup uses a well-known format, RMAN can search for it without access to a repository, and then restore the server parameter file. By default, RMAN allocates one disk channel for all operations. You now have four backups of the datafile. Note that there is no analogous option for media manager devices, because RMAN can only write backups to media manager devices as backup sets. I edited the above setting as follows,

The DB_CREATE_ONLINE_LOG_DEST_n parameter sets the default file system directories for the online redo logs and control files. After creating the file rename it as rman_backup.bat and executes the batch file. 24-12-2012 18:59

.. Volume Serial Number is E258-0ED0 You can paste the output of SHOW ALL into a command file so that you can later re-create the entire configuration. 24-12-2012 18:59 . On a Solaris system, the filenames might look like the following: The archived redo log files in the flash recovery area are given Oracle-managed filenames that are not based on the LOG_ARCHIVE_FORMAT parameter. The order of precedence is: You can configure the autobackup format even when CONFIGURE CONTROLFILE AUTOBACKUP is set to OFF, but RMAN does not generate autobackups in this case. You can also configure RMAN to make backups to media such as tape. You can turn the autobackup feature on or off by running the following commands: Oracle recommends that CONFIGURE CONTROLFILE AUTOBACKUP be set to ON. If files are never considered obsolete, then a file can only be deleted from the flash recovery area if it has been backed up to some other disk location or to a tertiary storage device such as tape. The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many backups of each datafile and control file that RMAN should keep.

If you start RMAN without connecting to the target database, then you must issue CONNECT TARGET command at the RMAN prompt.

Your long-term backup and recovery administration can be greatly simplified by using a flash recovery area. You can specify a different format with the CONFIGURE CONTROLFILE AUTOBACKUP FORMAT command.

You do not need to specify the SYSDBA option because RMAN uses this option implicitly and automatically. This section outlines the functions of the flash recovery area, identifies the files stored there, explains the rules for how files are managed there, and introduces the most important configuration options. The location and disk quota must be the same on all instances. By default, control file autobackups are turned off, and no control file autobackups are performed. The flash recovery area is closely related to and can be used in conjunction with two other Oracle features: Oracle Managed Files and Automatic Storage Management. Often, the result is an database hang, but not always. The flash recovery area cannot be stored on a raw file system. You can also create a new recovery catalog and register the target database. The RMAN repository records in the control file will be copied to the new recovery catalog. Next create a file named rman_backup.txt , and insert the following contents ,set the PATH and ORACLE_SID accordingly .

You can connect as SYSDBA with a password file or with operating system authentication. I name it as bkp.rcv and kept in d: drive. Oracle Database Backup and Recovery Basics, Oracle Database Backup and Recovery Reference. At an absolute minimum, the flash recovery area must be large enough to contain the archived logs that have not been copied to tape. CONFIGURE CONTROLFILE AUTOBACKUP ON; "Scripting Disk-Only Backups" for examples of backup jobs you could run in this environment. The control file autobackup may be written to disk or tape. Note:- There are special considerations for choosing a location for the flash recovery area in a RAC environment. In this example the database is configured to store archived logs and RMAN backups to the flash recovery area. Use the CONFIGURE command to set the retention policy.

If the target database uses password files, then you can connect using a password. The RMAN behavior when the BACKUP command includes datafile 1 depends on the CONFIGURE CONTROLFILE AUTOBACKUP setting. The contents of my bkp.rcv is given below XXXXXXXXX DBID As explained in "Automatic Disk-Based Backup and Recovery: The Flash Recovery Area", the flash recovery area feature lets you set up a location on disk where the database can create and manage a variety of backup and recovery-related files on your behalf. See Oracle Database Backup and Recovery Advanced User's Guide for more details about Oracle Flashback Database. With a control file autobackup, RMAN can recover the database even if the current control file, recovery catalog, and server parameter file are inaccessible. When connecting to a target or auxiliary database, you must have the SYSDBA privilege.

A control file autobackup lets you restore the RMAN repository contained in the control file when the control file is lost and you have no recovery catalog.

BY enabling few default parameters of RMAN it will save the life of dba significantly. When the recovery area is completely full, the error you will receive is: where nnnnn is the number of bytes required and mmmm is the disk quota for the flash recovery area. Note, however, that this value does not include certain kinds of disk overhead: This parameter specifies a valid disk location for file creation, which can be a directory on a file system, or Automatic Storage Management disk group. After you mount the control file, use the RMAN repository in the mounted control file to restore the datafiles. The files will still be known to the RMAN repository, however, and available for backup and restore activities. Once the flash recovery area is full, Oracle automatically deletes eligible files to reclaim space in the flash recovery area as needed. The following command configures RMAN to write disk backups to the /backup directory (refer to "Backing Up Database Files and Archived Logs with RMAN"). Each log group has two members, with one member in DB_CREATE_FILE_DEST and another in DB_RECOVERY_FILE_DEST. You must also determine a disk quota for the flash recovery area, the maximum space to be used for all files stored there. You can configure RMAN to use compressed backupsets by default on a particular device type, by using the CONFIGURE DEVICE TYPE command with the BACKUP TYPE TO COMPRESSED BACKUPSET option, as shown in the following examples. For example, generate an archived log: On Solaris, the preceding statement creates an archived log in the primary archiving location as well as the following flash recovery area subdirectory: /u01/oradata/rcv_area/SAMPLE/archivelog/YYYY_MM_DD. Using a flash recovery area simplifies the ongoing administration of your database by automatically naming files, retaining them as long as they are needed for restore and recovery activities, and deleting them when they are no longer needed to restore your database and space is needed for some other backup and recovery-related purpose. set PATH=C:\oracle\product\10.2.0\Asm_1\bin;%PATH% By default CONTROLFILE AUTOBACKUP is OFF. These two databases will have the same DB_NAME but one of them must have a DB_UNIQUE_NAME different from DB_NAME. If you wish to increase the likelihood that files moved to tape are also still on disk, increase the flash recovery area quota. The database handles a flash recovery area with insufficient reclaimable space just as it handles a disk full condition. After you mount the control file, the RMAN repository is available and RMAN can restore the datafiles and find the archived redo log. Assume that you want to create a database in which the control files, datafiles, and online redo logs are Oracle managed files in a single file system directory. You do not need a recovery catalog or target database control file to restore the control file autobackup. The SET CONTROLFILE AUTOBACKUP FORMAT command, which you can specify either within a RUN block or at the RMAN prompt, overrides the configured autobackup format in the session only. This chapter describes how to start RMAN and prepare the RMAN environment for implementation of your backup and recovery strategy.