rman backup and recovery scenarios pdf

Rman Backup And Recovery Scenarios Pdf

File Name: rman backup and recovery scenarios .zip
Size: 1631Kb
Published: 25.05.2021

By Priya Pedamkar. It is an Oracle Database client that is used for the backup and recovery tasks on our databases, and it can also automate the administration of our backup strategies.

The student begins by gaining a deeper understanding of possibly the most important job of a DBA - backup and recovery.

This chapter describes several common media failure scenarios. It shows how to recover from each failure when using a user-managed backup and recovery strategy, that is, a strategy that does not depend on Recovery Manager. This chapter contains the following topics:. Use the following procedures to recover a database if a permanent media failure has damaged one or more control files of a database and at least one current control file has not been damaged by the media failure.

RMAN Interview Questions

The preceding chapters in Part V, "Diagnosing and Responding to Failures" cover the most basic recovery scenarios and are intended to be as generic as possible. The scenarios in this chapter are advanced in the sense that they are not as common or are more complicated than the basic scenarios.

The main differences are:. Otherwise, RMAN returns an error. After connecting to trgt and the catalog database, place the database in a mounted state:. If you lose the server parameter file, then RMAN can restore it to its default location or to a location of your choice. Unlike the loss of the control file, the loss of the server parameter file does not cause the instance to immediately stop. The instance may continue operating, although you will have to shut it down and restart it after restoring the server parameter file.

If the instance is already started with the server parameter file, then you cannot overwrite the existing server parameter file. When the instance is started with a client-side initialization parameter file, RMAN restores the server parameter file to the default location if the TO clause is not used. The default location is platform-specific, for example,? A recovery catalog simplifies the recovery procedure because you can avoid recording and remembering the DBID.

This procedure assumes that you are not using a recovery catalog. If the database instance is started at the time of the loss of the server parameter file, then connect to the target database. When the server parameter file is not available, RMAN starts the instance with a dummy parameter file. For example, enter the following command:. Depending on the situation, you may need to execute multiple commands in the RUN command. Note the following considerations:.

If restoring from disk, then RMAN uses the default disk channel. The following example illustrates a RUN command that restores a server parameter file from an autobackup on tape:.

Then, restart the instance with the client-side initialization parameter file. You can use the following RMAN command to restart the instance with the restored server parameter file:.

If you have configured control file autobackups, then the server parameter file is backed up with the control file whenever an autobackup is taken. Example sets the DBID and restores the server parameter file from a control file autobackup in a nondefault location. If a control file autobackup is found, then RMAN restores the server parameter file from that backup to its default location.

The filename you specify should be on a file system accessible from the host where the RMAN client is running. This file need not be accessible directly from the host running the instance. To restart the instance with the initialization parameter file, use the following command, again running RMAN on the same client host:. This section explains what to do when all current control files are lost and you must restore a control file backup. If all copies of the current control file are lost or damaged, then you must restore and mount a backup control file.

RMAN attempts to find a valid archived redo log in any current archiving destination with the current log format. The current format is specified in the initialization parameter file used to start the instance or all instances in an Oracle RAC configuration. Similarly, RMAN attempts to find the online redo logs by using the filenames listed in the control file. If you changed the archiving destination or format during recovery, or if you added new online log members after the backup of the control file, then RMAN may not be able to automatically catalog a needed online or archived log.

Any existing file named ' filename ' is overwritten. When RMAN is connected to a recovery catalog, the recovery procedure with a backup control file is identical to recovery with a current control file. The RMAN metadata missing from the backup control file is available from the recovery catalog. The only exception is if the database name is not unique in the catalog, in which case you must use SET DBID command before restoring the control file.

If you are not using a recovery catalog, then you must restore your control file from an autobackup. The commands for restoring a control file are the same whether or not the database uses a fast recovery area. If the database uses a recovery area, then RMAN updates a control file restored from backup by crosschecking all disk-based backups and image copies recorded in the control file. RMAN catalogs any backups in the recovery area that are not recorded.

As a result, the restored control file has a complete and accurate record of all backups in the recovery area and any other backups known to the control file at the time of the backup.

RMAN does not automatically crosscheck tape backups after restoring a control file. If you are using tape backups, then you can restore and mount the control file, and optionally crosscheck the backups on tape, as shown in the following example:. This section assumes that you have RMAN backups of the control file, but do not use a recovery catalog.

It also assumes that you enabled the control file autobackup feature for the target database and can restore an autobackup of the control file. Because the autobackup uses a well-known format, RMAN can restore it even though it does not have a repository available that lists the available backups. You can restore the autobackup to the default or a new location. Because you are not connected to a recovery catalog, the RMAN repository contains only information about available backups at the time of the control file backup.

You can also obtain it by inspecting saved RMAN log files, querying the catalog, or looking at the filenames of control file autobackup. For example, run:. Optionally, specify the most recent backup time stamp that RMAN can use when searching for a control file autobackup to restore. If you know that a different control file autobackup format was in effect when the control file autobackup was created, then specify a nondefault format for the restore of the control file.

Because no recovery catalog is available, you cannot use preconfigured channels. Restore the autobackup of the control file, optionally setting the maximum number of days backward that RMAN can search and the initial sequence number that it should use in its search for the first day. If you know that the control file contained information about configured channels that will be useful to you in the rest of the restore process, then you can exit RMAN to clear manually allocated channels from step c.

If you restart the RMAN client and mount the database, then these configured channels are available for your use. If you do not care about using configured channels from your control file, then you can simply mount the database.

This step depends on whether the online redo logs are available. If the online redo logs are usable, then RMAN can find and apply these logs. Perform a complete restore and recovery as described in "Performing Complete Database Recovery". In the following example, the online redo log files have been lost, and the most recent archived redo log sequence number is This example shows how to restore the control file autobackup and recover through the latest log.

Disaster recovery includes the restore of and recovery of the target database after the loss of the entire target database, the recovery catalog database, all current control files, all online redo log files, and all parameter files. All archived redo logs generated after the creation time of the oldest backup that you intend to restore. If you are restoring the database to a new host, then you should also review the considerations described in "Restoring a Database on a New Host".

This scenario assumes that the Linux server on which your database was running has been damaged beyond repair. Fortunately, you backed up the database to Oracle Secure Backup and have the tapes available. The scenario assumes the following:. You are restoring the database to a new Linux host with the same directory structure as the old host. You have one tape drive containing backups of all the datafiles and archived redo logs through log , as well as autobackups of the control file and server parameter file.

If possible, restore or re-create all relevant network files such as tnsnames. At this stage, no initialization parameter file exists. For example, start RMAN as follows:. When the server parameter file is not available, RMAN attempts to start the instance with a dummy server parameter file. Allocate a channel to the media manager and then restore the server parameter file from autobackup.

For example, enter the following command to restore the server parameter file from Oracle Secure Backup:. Write the a command file to perform the restore and recovery, and then execute the command file.

The command file should do the following:. Restore the datafiles to their original locations. If volume names have changed, then run SET NEWNAME commands before the restore and perform a switch after the restore to update the control file with the new locations for the datafiles, as shown in the following example.

The following example of the RUN command shows the same scenario except with new filenames for the restored datafiles:.

If your goal is to perform a test run of your disaster recovery procedures, or to permanently move a database to a new host, then you can use the procedure in this section. You should not register a test database created in this way in the same recovery catalog as the source database. Because the DBID of the two databases is the same, the metadata for the test database can interfere with RMAN's ability to restore and recover the source database. Record the DBID for your source database.

Make the source database initialization parameter file accessible on the new host. Copy the file from the old host to a new host by using an operating system utility. If you perform a test restore only, then make sure that RMAN is not connected to the recovery catalog. Otherwise, RMAN records metadata about the restored datafiles in the recovery catalog.

This metadata interferes with future attempts to restore and recover the primary database. If you must use a recovery catalog because the control file is not large enough to contain the RMAN repository data on all of the backups that you need to restore, then use Oracle Data Pump to export the catalog and import it into a different schema or database.

Afterward, use the copied recovery catalog for the test restore. Otherwise, the recovery catalog considers the restored database as the current target database. Make sure backups used for the restore are accessible on the restore host.

For example, if the backups were made with a media manager, then make sure the tape device is connected to the new host. If you are using disk copies, then use the procedure in the following section. If you are performing a trial restore of the production database, then perform either of the following actions before restoring the database in the test environment:.

Oracle Database: Backup and Recovery Workshop (D105920)

Really interesting and real time scenarios Thank you for sharing any good knowledge and thanks for fantastic efforts afssac fire fighting academy Fire fighter I Arsisc. I hope i see you always righteous and guided and after all become happy Jobs nasihnetwork advertise for free. I really appreciate information shared above. We have industry expert trainer.

Cold backup can be taken after you shutdown the database, now database is unavailable for database users. Hot backup is active backup, it can be done when the database is running and data is being updated or read by database users. Once put your database in backup mode, Oracle only freezes the datafile headers, but it keep updating the blocks inside the datafile. So their headers are at the same SCN, but the database blocks are not. The database writer DBWR is updating the file.

Assumption: you have good backups of your database you have access to all redo archive files generated after the backup was taken. you have.

RMAN Recovery Scenarios: Case Studies. (A practical approach)

It can be done on any platform. So 1st opened the database in nomount state without spfile and then restored spfile from backup. Step 3: Once the spfile is restored, started the database in nomount state with spfile, Now I have to restore the controlfiles and restored successfully. Performed cancel based recovery.

The preceding chapters in Part V, "Diagnosing and Responding to Failures" cover the most basic recovery scenarios and are intended to be as generic as possible. The scenarios in this chapter are advanced in the sense that they are not as common or are more complicated than the basic scenarios. The main differences are:. Otherwise, RMAN returns an error.

For example, after allocating the sbt channel, you receive an error stack similar to the following:. The most important line of the error output is the ORA error. It indicates the basic problem, that the media management library could not be loaded.


Но Стратмор не дал ей договорить. - Сьюзан, это же абсолютно ясно. Танкадо выгравировал ключ Цифровой крепости на кольце.

Танкадо посмотрел на женщину, поднеся исковерканные пальцы прямо к ее лицу, как бы умоляя понять. Кольцо снова блеснуло на солнце. Женщина отвернулась.


Leave a comment

it’s easy to post a comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>