Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

What's new in Oracle 19c & 18c Recovery Manager (RMAN)

238 views

Published on

RMAN

  • Be the first to comment

  • Be the first to like this

What's new in Oracle 19c & 18c Recovery Manager (RMAN)

  1. 1. What’s New in Oracle 19c & 18c Recovery Manager (RMAN)? Satishbabu Gunukula, Oracle ACE • 20+ Years of Experience in Database Technologies and specialized in high availability solutions. • Masters Degree in Computer Applications • Written articles for major publications • Oracle Certified Professional Oracle 8i,9i,10g • Oracle Certified Expert Oracle 10g RAC http://www.oracleracexpert.com
  2. 2. Program Agenda • Overview of RMAN • PLUGGABLE DATABASE clause in GRANT and REVOKE commands • Recovery catalog support for PDBs • Duplicate PDBs to an existing CDB • Duplicate databases to Oracle Cloud • RMAN backups usable after migration • Demo • Q& A
  3. 3. Overview of RMAN • Oracle Recovery Manager (RMAN) is the most persistent demands of performant, manageable backup and recovery, for all Oracle data formats • Oracle RMAN provides a complete solution for efficient backup and recovery of Oracle database. It is designed to provide block-level corruption detection during backup and recovery. • Oracle RMAN optimizes space consumption using multiplexing and backup set compression. • Oracle RMAN provides common interface via Enterprise Manager, command line across different host operating systems and offers features like parallelization , backup retention policy, detailed history of al backups…etc. • Oracle RMAN integrates with Oracle secure backup as well as third party media management products such as Commvault, Rubriki, DD Boost…etc.
  4. 4. Oracle 19c New features New features in Oracle release 19c • PLUGGABLE DATABASE clause in GRANT and REVOKE commands – From 19c, you can grant and revoke privileges on a specific PDB to a database user. RMAN> GRANT CATALOG FOR PLUGGABLE DATABASE emp_pdb TO usr_bkp; RMAN> REVOKE CATALOG FOR PLUGGABLE DATABASE emp_pdb FROM usr_bkp; • Recovery catalog support for PDBs – When you are connected to target PDB you can connect to recovery catalog . RMAN> CONNECT TARGET “usr_bkp@emp_pdb AS SYSBACKUP";
  5. 5. Oracle 18c New features New features in Oracle release 18c, Version 18.1 • Duplicate PDBs to an existing CDB – The DUPLICATE PLUGGABLE DATEBASE command is used to duplicate PDB to an existing CDB. • Duplicate database to Oracle Cloud – Using this feature you can duplicate on premise database to Oracle Cloud • RMAN backups usable after migration – RMAN backups created before the non-CDB or PDB was migrated into a different target CDB can be used for recovery operations.
  6. 6. Oracle 18c New features Duplicate PDB’s to an existing CDB Duplicate PDBs to an existing CDB – To perform duplicate of CDB or PDB the source instance must have the below COMPATIBLE initialization parameter. • To duplicate CDB, the source CDB instance must be 12.2.0 or higher. • To duplicate PDB to a new CDB, the database instance must be 12.2.0 or higher • To duplicate a PDB to an existing CDB, the source CDB and the destination CDB must 18.0.0 or higher
  7. 7. Oracle 18c New features Duplicate PDB’s to an existing CDB Prerequisites for Duplicating a PDB to an Existing CDB: The following prerequisites are applicable – On the source and destination CDB the COMPATIBLE initialization parameter must set to 18.0.0 or higher – The source CDB and the auxiliary CDB (duplicate) must use local undo – The PDB that user duplicating must be in read-only or read-write mode – The destination CDB to which the PDB is being duplicated must be open in read-write mode – On the destination CDB, the initialization parameter REMOTE_RECOVERY_FILE_DEST must be set – The RMAN must connect to the root of the auxiliary (duplicate) CDB – The destination CDB must use a spfile
  8. 8. Oracle 18c New features Duplicate PDB’s to an existing CDB Prerequisites for Performing Duplication with Encryption: The following prerequisites are applicable when using the AS ENCRYPTED or AS DECRYPTED clauses. – To make use of these new features, the COMPATIBLE initialization parameter must be set to 18.0.0 or higher – The master key must be set at least once using the ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY command. – Oracle keystore used to encrypt databases, CDBs, or tablespaces on the source database must be copied to the duplicate/auxiliary database and then opened.
  9. 9. Oracle 18c New features Duplicate PDB’s to an existing CDB To duplicate PDB to an existing CDB using RMAN DUPLICATE command using the PLUGGABLE DATABASE clause. RMAN> DUPLICATE PLUGGABLE DATABASE src-pdb1 TO dest_pdb1 FROM ACTIVE DATABASE; RMAN> DUPLICATE PLUGGABLE DATABASE src_pdb1 AS dest_pdb1 TO dest_cdb1 FROM ACTIVE DATABASE; If you do not use Oracle Managed files the you need to use DB_FLE_NAME_CONVERT in the DUPLICATE command.
  10. 10. Oracle 18c New features Duplicate Databases to Oracle Cloud • Use the DUPLICATE command to duplicate an on-premise database to Oracle Cloud. Both active duplication and backup-based methods are supported. • Oracle databases on Oracle Cloud are always encrypted even if no encryption clause is specified during duplication. • The COMPATIBLE parameter of the source and Oracle Cloud must be set to 18.0.0 or higher
  11. 11. Oracle 18c New features Duplicate Databases to Oracle Cloud Follow the steps to successfully migrate database to Cloud: 1. Ensure the prerequisites for the DUPLICATION technique are met, see Prerequisites for Duplicating a Database". 2. Configure the Oracle Database cloud backup module, See Oracle Cloud Using Oracle Database Backup Service 3. Complete the planning tasks, as described in "Planning to Duplicate a Database" 4. Prepare the auxiliary instance, as described in "Preparing the Auxiliary Instance" • You must create auxiliary instance as CDB and start instance with enable_pluggable_database=TRUE in the initialization parameter file • When instructed to create an initialization parameter file for the auxiliary instance, user must copy the file from the source database. This ensures that the auxiliary instance is also a CDB. After you copy the file you need to perform the following steps: – Modify the DB_NAME parameter – Modify the various destination/location parameters • Start the auxiliary instance in NOMOUNT mode.
  12. 12. Oracle 18c New features Duplicate Databases to Oracle Cloud 5. Start RMAN and connect to the root as a common user with the SYSBACKUP privilege or SYSDBA. 6. If the source CDB uses encryption, then open the Oracle keystore that contains the master key on the source CDB. 7. Configure RMAN channels, if necessary, as described in "Configuring RMAN Channels for Use in Duplication". 8. On the destination CDB, open the Oracle keystore from the source CDB. If the destination CDB uses a password-based software keystore, then you must specify the password used to open this keystore SET DECRYPTION WALLET OPEN IDENTIFIED BY 'password'; 9. Use the DUPLICATE command to duplicate the source CDB. Note that Using duplication to create a standby database to Oracle Cloud is not supported
  13. 13. Oracle 18c New features Duplicate an Oracle Cloud database as an On-premise Database Follow the steps to duplicate an Oracle Cloud database as an On-prem 1. Ensure that the prerequisites for the selected duplication technique are met, as described in "Prerequisites for Duplicating a Database“ 2. Configure the Oracle Database Cloud Backup Module, see Oracle Cloud Using Oracle Database Backup Service 3. Complete the planning tasks described in "Planning to Duplicate a Database" 4. Prepare the auxiliary instance, as described in "Preparing the Auxiliary Instance“ • You must create auxiliary instance as CDB and start instance with enable_pluggable_database=TRUE in the initialization parameter file • When instructed to create an initialization parameter file for the auxiliary instance, user must copy the file from the source database. This ensures that the auxiliary instance is also a CDB. After you copy the file you need to perform the following steps: – Modify the DB_NAME parameter – Modify the various destination/location parameters • When instructed to connect to the necessary instances, start RMAN and connect to the root as a common user with SYSDBA or SYSBACKUP privilege. On both instances, the password for the user performing the duplication operation must be the same.
  14. 14. Oracle 18c New features Duplicate an Oracle Cloud database as an On-premise Database 5. Copy oracle keystore from Oracle Cloud to the auxiliary instance. The auxiliary instance needs to decrypt the data files from Oracle Cloud before encrypting them again by using the Oracle keystore in the Oracle Cloud database. 6. Configure RMAN channels, if necessary, as described in "Configuring RMAN Channels for Use in Duplication“ 7. On the auxiliary instance, open the Oracle keystore that was copied from the source Oracle Cloud database. – If the destination CDB use a password-based software keystore then you must specify the password used to open the keystore. The following command sets the password used to open a password-based software keystore. SET DECRYPTION WALLET OPEN IDENTIFIED BY 'password'; 8. Use the DUPLICATE command to duplicate the source CDB. – To create a duplicate database that does not use encryption, use the AS DECRYPTED option in the DUPLICATE command. For example: DUPLICATE DATABASE TO my_cdb FROM ACTIVE DATABASE AS DECRYPTED;
  15. 15. Oracle 18c New features RMAN backups usable after migration • The RMAN commands used to backup and recover CDBs and PDBs are the same as those used for non-CDBs, with minor variations in the syntax. • The backup and recovery operations performed on non-CDBs can also be performed on CDBs and PDBs. This includes the following: – Full and incremental backups – Complete and point-in-time recovery (PITR) – Reporting operations (such as listing and cross-checking backups) – Flashback Database
  16. 16. Oracle 18c New features RMAN backups usable after migration • Connecting to CDBs and PDBs To connect to CDBs and PDBs in one of the following ways – Connect using operating system authentication . You are connected to the root as the SYS user with the SYSDBA privilege $ rman target / – Connect locally as a common user $rman target sys – Connect as a common user through Oracle Net Services $rman target usr_bkp@my_cdb
  17. 17. Oracle 18c New features RMAN backups usable after migration • To connect as TARGET to a PDB, use one of the following techniques: – Connect with a net service name that resolves to a service for that PDB rman target usr_bkp@emp_pdb – Connect locally as a common user or user with the SYSDBA or SYSBACKUP privilege $ rman target “usr_bkp@emp_pdb as sysdba"
  18. 18. Oracle 18c New features RMAN backups usable after migration Backup and Complete Recovery of CDBs • To perform backup and complete recovery operations on a whole multitenant container database (CDB), user needs to connect as TARGET to the root. • The connection must be established as a common user with the SYSBACKUP or SYSDBA privilege. • After you connect to the root, the same commands used to perform operations on non-CDBs are used to perform backup and complete recovery on the entire CDB.
  19. 19. Oracle 18c New features RMAN backups usable after migration When relocating a PDB or cloning a non-CDB as a PDB, user may want to retain the use of preplugin backups. In order to preplugin backups to be usable in the destination CDB, the metadata about the preplugin backups must be exported to the RMAN repository of the destination CDB. Please find the technique for making the backups usable: • Creating a PDB by cloning a non-CDB When the non-CDB is opened in read/write mode, user must execute the DBMS_PDB.EXPORTRMANBACKUP procedure as the last step before cloning. When user plugging in the non-CDB as a PDB to a destination CDB, the operation copies the backup metadata of the source non-CDB into the data dictionary of the destination CDB. • Relocating a PDB to another CDB When user unplug the source PDB, the backup metadata is automatically exported. Therefore, you do not need to execute DBMS_PDB.EXPORTRMANBACKUP. Preplugin backups are usable only on the destination CDB into which you plug in the source non-CDB or PDB.
  20. 20. Reference • Oracle 19c & 18c Backup and Recovery Reference • https://docs.oracle.com/en/database/oracle/oracle-database/19/rcmrf/ • https://docs.oracle.com/en/database/oracle/oracle-database/18/bradv/ • Oracle 19C & 18c Documentation https://docs.oracle.com/en/database/oracle/oracle-database/19/index.html • https://docs.oracle.com/en/database/oracle/oracle-database/18/index.html
  21. 21. Summary • Each Oracle database release comes with enhancements to Oracle Recovery Manager (RMAN) and make use of these new features for pressing demands for backup and recovery operations.
  22. 22. Questions & Answers

×