25896654 Basic Rman Tutorial

of 42
9 views
PDF
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Document Description
1 |Page (786) Basic RMAN Tutorial Oracle provide a tool for Database backup and restore operation is called RMAN. Recovery Manager is a client/server application that uses database server sessions to perform backup and recovery. It stores metadata about its operations in the control file of the target database and, optionally, in a recovery catalog schema in an Oracle database. Difference between RMAN and Traditional backup methods RMAN is Oracle's backup and recovery utility. With RMAN, backup
Document Share
Document Tags
Document Transcript
  1 | P a g e (786)Basic RMAN Tutorial  Oracle provide a tool for Database backup and restore operation is called RMAN.Recovery Manager is a client/server application that uses database server sessions to perform backup and recovery. It stores metadata about its operations in the control file of the targetdatabase and, optionally, in a recovery catalog schema in an Oracle database.  Difference between RMAN and Traditional backup methods RMAN is Oracle's backup and recovery utility. With RMAN, backups become as easy as:BACKUP DATABASE;RMAN reduces the complexity of backup and recovery. RMAN can determine what needs to be backed up or restored. Why Should we use RMAN   Ability to perform incremental backups.Ability to recover one block of a datafile.Ability to perform the backup and restore with parallelization.Ability to automatically delete archived redo logs after they are backed up.Ability to automatically backup the control file and the SPFILE.Ability to restart a failed backup without having to start from the beginning.Ability to verify the integrity of the backup.Ability to test the restore process without having to actually perform the restore.Comparison of RMAN Automated and User-Managed ProceduresBy using operating system commands for User-Managed Backup and Recovery , a DBAmanually keeps track of all database files and backups. But RMAN performs these sametasks automatically. Understanding the RMAN Architecture An oracle RMAN comprises of RMAN EXECUTABLE This could be present and firedeven through client side, TARGET DATABASE (This is the database which needs to be backed up) and RECOVERY CATALOG (Recovery catalog is optional otherwise backupdetails are stored in target database controlfile .)  About the RMAN Repository The RMAN repository is a set of metadata that RMAN uses to store information about thetarget database and its backup and recovery operations. RMAN stores information about:Backup sets and piecesImage copies (including archived redo logs)Proxy copiesThe target database schema  2 | P a g e Persistent configuration settingsIf you start RMAN without specifying either CATALOG or NOCATALOG on the commandline, then RMAN makes no connection to a repository. If you run a command that requiresthe repository, and if no CONNECT CATALOG command has been issued yet, then RMANautomatically connects in the default NOCATALOG mode. After that point, the CONNECTCATALOG command is not valid in the session. Types of Database Connections You can connect to the following types of databases.Target databaseRMAN connects you to the target database with the SYSDBA privilege. If you do not havethis privilege, then the connection fails.Recovery catalog databaseThis database is optional: you can also use RMAN with the default NOCATALOG option.Auxiliary databaseYou can connect to a standby database, duplicate database, or auxiliary instance (standbyinstance or tablespace point-in-time recovery instance  Note: That a SYSDBA privilege is not required when connecting to the recovery catalog. Theonly requirement is that the RECOVERY_CATALOG_OWNER role be granted to theschema owner. Using Basic RMAN Commands After you have learned how to connect to a target database, you can immediately begin performing backup and recovery operations. Use the examples in this section to go through a basic backup and restore scenario using a test database. These examples assume thefollowing:The test database is in ARCHIVELOG mode.You are running in the default NOCATALOG mode.The RMAN executable is running on the same host as the test database.Connecting to the Target Databaserman TARGET /If the database is already mounted or open, then RMAN displays output similar to thefollowing:Recovery Manager: Release 9.2.0.0.0connected to target database: RMAN (DBID=1237603294)  Reporting the Current Schema of the Target Database In this example, you generate a report describing the target datafiles. Run the report schemacommand as follows:  3 | P a g e RMAN> REPORT SCHEMA; (RMAN displays the datafiles currently in the targetdatabase.)  Backing Up the Database In this task, you back up the database to the default disk location. Because you do not specifythe format parameter in this example, RMAN assigns the backup a unique filename.You can make two basic types of backups: full and incremental.  Making a Full Backup Run the backup command at the RMAN prompt as follows to make a full backup of thedatafiles, control file, and current server parameter file (if the instance is started with a server  parameter file) to the default device type:RMAN> BACKUP DATABASE;  Making an Incremental Backup Incremental backups are a convenient way to conserve storage space because they back uponly database blocks that have changed. RMAN compares the current datafiles to a base backup, also called a level 0 backup, to determine which blocks to back up.RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;  Backing Up Archived Logs Typically, database administrators back up archived logs on disk to a third-party storagemedium such as tape. You can also back up archived logs to disk. In either case, you candelete the input logs automatically after the backup completes.To back up all archived logsand delete the input logs (from the primary archiving destination only), run the backupcommand at the RMAN prompt as follows:RMAN> BACKUP ARCHIVELOG ALL DELETE INPUT;  Listing Backups and Copies To list the backup sets and image copies that you have created, run the list command asfollows:RMAN> LIST BACKUP;To list image copies, run the following command:RMAN> LIST COPY; Validating the Restore of a Backup Check that you are able to restore the backups that you created without actually restoringthem. Run the RESTORE ... VALIDATE command as follows:  4 | P a g e RMAN> RESTORE DATABASE VALIDAT; Type of RMAN Backup Tutorial Full Backups A full backup reads the entire file and copies all blocks into the backup set, only skipping datafileblocks that have never been used.  About Incremental Backups Rman create backup only changed block since a previous backup. You can use RMAN to createincremental backups of datafiles, tablespaces, or the whole database. How Incremental Backups Work    Each data block in a datafile contains a system change number (SCN), which is the SCN atwhich the most recent change was made to the block. During an incremental backup, RMANreads the SCN of each data block in the input file and compares it to the checkpoint SCN of theparent incremental backup. RMAN reads the entire file every time whether or not the blocks havebeen used.The parent backup is the backup that RMAN uses for comparing the SCNs. If the currentincremental is a differential backup at level n, then the parent is the most recent incremental of level n or less. If the current incremental is a cumulative backup at level n, then the parent is themost recent incremental of level n-1 or less. If the SCN in the input data block is greater than or equal to the checkpoint SCN of the parent, then RMAN copies the block. Multilevel Incremental Backups RMAN can create multilevel incremental backups. Each incremental level is denoted by aninteger, for example, 0, 1, 2, and so forth. A level 0 incremental backup, which is the base for subsequent incremental backups, copies all blocks containing data. The only differencebetween a level 0 backup and a full backup is that a full backup is never included in anincremental strategy  .If no level 0 backup exists when you run a level 1 or higher backup, RMAN makes alevel 0 backup automatically to serve as the base.The benefit of performing multilevel incremental backups is that RMAN does notback up all blocks all of the time. Differential Incremental BackupsHostModo In a differential level n incremental backup, RMAN backs up all blocks that have changed sincethe most recent backup at level n or lower.For example, in a differential level 2 backups, RMAN determines which level 2 or level 1 backupoccurred most recently and backs up all blocks modified after that backup. If no level 1 isavailable, RMAN copies all blocks changed since the base level 0 backup. If no level 0 backup isavailable, RMAN makes a new base level 0 backup for this file.  
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x