Introduction to Recovery Manager (RMAN)

Ahmed Baraka
A free video tutorial from Ahmed Baraka
Snr. Database Administrator
4.5 instructor rating • 8 courses • 5,103 students

Lecture description

In this lecture, you will learn how to perform the following:

  • Describe the advantages of using RMAN

  • Describe the terms used with explaining RMAN operations

  • Describe RMAN components

  • Start RMAN with connecting to target database

  • Use SYSBACKUP privilege

  • Use RMAN command-line arguments

  • Manage RMAN persistent settings

Learn more from the full course

Oracle Database 12c Backup and Recovery using RMAN

Master using RMAN in performing backup and recovery activities on Oracle Databases. No course covers the same topics!

20:05:00 of on-demand video • Updated February 2021

  • Perform complete/incomplete, full/incremental and whole/partial backups using RMAN
  • Perform all common recovery scenarios
  • Use RMAN with Oracle Database Backup Cloud Service
  • Report and Monitor RMAN Backups and Jobs
  • Use RMAN backup advanced options
  • Perform all supported cross-platform transportation techniques
  • Perform all supported database duplication techniques
  • Manage RMAN Recovery Catalog
  • Produce encrypted backups
  • Use RMAN in a multitenant environment
  • Use RMAN in a RAC environment
  • Handle corrupted blocks
  • Use Data Recovery Advisor
English [Auto] Hi everybody in this lecture I'll talk about Introduction to recovery manager Armen in this lecture you will learn how to perform the following describe the advantages of using ottoman. Describe the terms used with explaining Ottoman operations. Describe Ottoman components start Ottoman with connecting to target databases use CIS backup privilege use Ottoman command line arguments that finally manage Ottoman pit assistant sittings recovery manager or Ottoman is a utility that is used to perform database backup and recovery operations. It is designed to have the capabilities to perform all the possible database backup strategies and types I will demonstrate the backup strategies in the next lecture. You normally issue commands to the utility via its command prompt interface. It has its own commands and the scripts to execute Amen man has also abolished API that interfaces Ottoman with many third party popular backup software. So you Eugene's Ottoman is tightly integrated with Oracle secure backup and Oracle Enterprise Manager Rick Cloud Control as well Oracle enterprise manager provides agua interface to the most commonly used automate operations automation can store its backups on the desk and it also kind of place them on a tape in order for our man to store backups on tapes and interface to the tape must be configured at this interface is called Media Management liability or in an El in Oracle new documentation. It is called Media Management Software. It doesn't really make any difference there are terms for the same component ottoman and provides several powerful database backup and recovery features. This line is listing the most important item and features with Ottoman. You can backup the databases including data finds control files part of matter file and archive the Rideau logs Ottoman is capable of performing incremental backups. There are a few incremental backup options and amen that enables you to tune the backup according to your needs with Arman. You can restore a single block if you have to. This is called block level media recovery Amen. Also detects the corrupted the blocks during backup helping you to have a valid database backup. You can also use binary compression when creating backups to reduce the size of the generated backup files you have the options to encrypt the data in the backup files using Oracle transparent data encryption or TDD. This complies with the information security standards especially for CDC databases. Our man is capable of taking a copy of that running database without having to shut it down. This is very useful to create a testing environment out of a production system and to create a stand by database from a primary running database Ottoman is one hundred isn't it it's in a way whether your database is using is in or normal file system. The same automatic commands are done seamlessly in either way actually Ottoman has many more features than the listed ones as you progress in the course you will learn how to practically take advantage of those features in this light. I am listing some common terms used when discussing about Ottoman target databases target database is a database that ottoman is connected to for the purpose of performing backup or recovery operations or in that database Ottoman client Ottoman client is the executable that you invoke to start Ottoman it is automatically and is told with every Oracle database software installation. It is typically located in the same directory as the other database executable once which is Oracle home slash been directory. It is not necessary to invoke our man from the same database home as the target database. You kind of start man in a machine and get it connected to a remote database as target database media management software is required by Ottoman to interact with tapes and media manager interfaces Ottoman with tape devices during backup and recovery managing the loading labeling and unloading over the media media management devices are sometimes called system backup to tape devices or it's B T recovery catalogue by default when Ottoman performs its operations it keeps history of its operations in the control file over the target database. The Blues where our man has taught us its operations history is called our man and it was a theory. You can't configure our man to store it's a repository in a database schema. Normally this is done in a separate database from the target database is the database that hosts the optional automatic budgetary is called a recovery catalogue. We will cover this topic in a separate lecture. They are going to depict the components that are involved in our man operations. The core component is the amen executable. The Ottoman command line interface is invoked through the Ottoman client application Ottoman can connect to three types of databases target database represents the database. Our man is taking backup of or restoring when our man is connecting to target databases server processes are created in the database server to set of the Ottoman session auxiliary databases are temporary instances used to create permanent databases. Auxiliary instances are created when Ottoman is used to clone a running database or when performing some special recovery tasks like table a space point in time recovery recovery catalogue database is used by our man to store its repository that it was a tree contains history of our man operations and the Save the scripts Ottoman saves its data files either on disk storage or in tape devices usually you configure that if you are a disk storage and make our man tick its backup files in it. This is optional though you can configure Armand to save its backup files in any add to the into this storage. As far as the permissions on the dead of tree are granted to the software on. As I said earlier in order for automatic its backup directly to tape device the M A library should be stored automation can be integrated with other products. It is well integrated with Oracle secure backup. The Enterprise Manager to Cloud Control. Third party backup software through a public API and Oracle database backup iCloud. Would you like to see if it's backup files into a cloud service. Starting automat is quite easy. You just log in as the Oracle database software owner then type out a man in the command prompt you can not perform any of the automatic backup and recovery commands without connecting to a target database connecting to a target database could be done when you invoke Amen. Or it could be done after starting Amen. The first examine in the slide is demonstrating how to connect to a no contact database. When you invoke automatic you just pass that target parameter followed by forward slash. This way you are connecting assist the B A to the local database instance the local database instance that man gets connected to. Using this method is the instance that is appointed by the environment variable Oracle as idc. Therefore if you have two database instances that I think in the same set of a you have to sit this valuable to the database instance name that you want to deal with before invoking automatic example in this light is connecting to a local instance named o r c 0 0. In this example that you are using the operating system authentication method to connect to the local instance no password as you provided. The second example in this slide is demonstrating how to connect to a local target database in instance after invoking automatic after you invoke automation you will be taken to the automatic command to prompt in the item and command to prompt you is that connect command to connect to a local database instance just type connect target followed by the forward slash simple if you want to connect to a remote target database you have to configure a connection descriptor to that database in the teen is names that are off i.e. the third example in the slide is demonstrating how to connect to a remote database pointed by the conviction descriptor or IDB. This example doesn't provide the system a password. You will be asked to enter it after you are the command. The fourth example is demonstrating how to connect to the same database. But this time this is user password this is provided. It is recommended to avoid this method because the password is exposed which is considered to be a security issue. The last example in this light is demonstrating how to achieve the same task but this time it uses that connect command after invoking automatic although collecting SS DB a to a target database provides you all the automatic capabilities. This may lead to serious issue in some business environment. Sometimes it is required to have an individual who has the backup and recovery privileges but without having the power of the system to be a privilege. I will explain in the next slide how this all separation requirement has been implemented. Oracle Oracle it will have C. introduced a new privilege called sis backup. I use it with this privilege can beat horn with the backup or recover actions on the database including connecting to it when it is a closed in Ottoman when conducting to a target database it is recommended to you is this a privilege rather than using. This has been a privilege since backup a privilege does not include data access a privilege such as select any table of privilege. This is light is demonstrating examples of how to connect to a target database using CIS backup a privilege. The first example is using the operating system authentication and the second example is using a password file authentication. Neither of these methods require the database to be open observe that you need to include the single quotation marks within the double quotation marks the Ottoman command line supports more arguments the look argument specifies the file where Ottoman output will be recorded if you don't use this argument Ottoman writes its message to the standard output if you use it you won't see Ahmet out with messages on the standard output there will be forwarded to the defined look file if the look file already exists its contents will be overwritten to add Amen message to the existing look file contents use the append keyword just as shown in the exam but in the slight Ottoman supports executing script files that contain automatic comments to execute an item Armenian a script file use that D file argument after Ottoman finishes running the script file it automatically that minutes the second example in the slide is demonstrating using this argument you can also execute Ottoman script files from within the Ottoman command line you is that at simple to do that. Followed by the script name that you want to execute just as demonstrated by the theft code to block Amen has a command language that is independent of the operating system automatic commands could be of one of two types stand alone or group command or they could be of both types a stand alone command is executed individually add the automatic prompt you will just type the command in it with a semicolon and that's it Ottoman will just execute it with the other hand your comments are usually grouped in a block the commands within the block are executed sequentially if any command within the block fails Ottoman stops the processing no further commands within the block are executed but the effects of any already executed commands still remain they are not undone in any way some commands are a stand alone only they can not appear and unblock some commands are a commands only they cannot run as a stand alone commands. An example is that looking at Channel command it can only be issued within around a block there are some commands that can be issued either at the prompt or within unknown command block such as backup database I will demonstrate examples of those command types in the incoming slides this light is demonstrating examples of Ottoman stand alone comments in all the examples. The commander starts with a keyword corresponding to one of the Ottoman commands as you will progress in the course. You will learn more automatic commands an ottoman command is followed by one or more arguments. In the first example backup is the command and database is the argument finally to execute the command. It must end with a semicolon a command Canis pen multiple lines consider the second examine in this light backup command has been typed in the first line database has been typed in the second line and the ending semicolon has been typed in the third line. You can add comments to the comments using the hash character any character that comes after the hash character is ignored. The third example in this light is demonstrating this concept. Unlike a stand alone commands Dube commands must appear within the premises of command commands placed inside out on the block as shown in the slide are one as a single unit of commands any configurations made by the commands in the block take effect only within the scope of the block. They override any previously made settings the commands are executed within the block sequentially if any command within the block fails R2 minus stops processing the block it doesn't try to execute the next command in the block the example in this light is an automatic one to block example of three commands. Don't worry about the meaning of those commands. If you do understand it we will discuss them later in the course of man behavior is controlled by a group of settings you are set values to those settings to make our man operate according to your plan. If you don't set those settings they have default values. And in this case our man will run according to those default values typically as you develop a backup and recovery strategy. You would change a few of the amen settings to implement your strategy those configuration settings are persistent they are saved in the control file and if you have a recovery catalog database they will be saved over there as well. For this reason they apply to all subsequent operations on target databases. Even if you exist and restart automatic those settings define things like channel parameters parallelism default device type in the automatic budgetary backup retention policy and many other settings. As you will own with the course you will learn more. Amen. Persistence sittings and their influence you can view with the automatic assistance settings using either that automatic command prompt or using secret language the commands in the code block are examples of using the automatic chore command. All disciplines all the other man persistent settings you can use that shore command followed by a specific configuration to display that value set for that a specific configuration setting that's a good example in the code the block in the slide is the one estimating how to display the value of the control file or to backup format. The third example shows the table spaces that are excluded from the whole database backups using that outer man show command is usually fair enough for you to discipline and configure the amen settings. However if you have to query the automatic settings from secret language then query the view vehicular side are man configuration to change the values of automatic settings use the Ottoman command configure the format of using this command as symbol you would just type configure followed by the setting that you want to change followed by then you value that you want to assign to the setting the first example in the slide is something that channel parallelism for that type devices 2 3. Don't worry if you don't understand what this thing means now we will cover it later in the course if you want to reset a value of setting you is that clear option of the configure command. The second example in the slide is that easy thing the value of that backup optimization city there are three ways of entering commands for our man using the command line interface interactive mode batch mode and using pipe interface to run item on commands interactively start our man and then enter commands into the command line interface. This mode is good for performing one time operations like performing any leases or running reports make a specific backup and recovery or running restore the scripts in batch mode do you enter automatic commands into a fight and then run the command file by specifying its name when the command line the contents of the file should be identical to commands that would be entered at the command line. When running in batch mode Ottoman reads input from a command file and writes out what message to look quite if you specified one Ottoman passes all the comments in the file before compiling it or executing any comment in it there is no need to place an exit command in the file Ottoman automatically terminates when the end of the file is reached this mode is best used in automated jobs with Ottoman pipe interface Ottoman obtains commands and since output by using the DPM s under a score pipe peels sequel package this is normally used by external application that wants to communicate with Arman normally D.B. is don't need to use this ah man operational mode this is normally used by external application that wants to communicate with Arma in this lecture you should have learned how to get home the following describe the advantages of using Ottoman describe the terms used with explaining automatic operations. This gripe automatic components stopped our man with connecting to target database you assist backup privilege use automatic command line arguments and manage our man persistent settings you will gain some experience on performing those tasks in the next lecture then seeing you over there. Thank you very much.