RMAN: Cross-Platform Backup & Restore Oracle Database 12c for SAP

Similar documents
Migrate +230 TB databases in less than 1 day

Roy F Swonger Vice President Database Upgrades & Utilities Oracle Corporation

Oracle Database Upgrade, Migration & Transformation Tips & Techniques Chapter 5

Oracle Database 12c. Boeblingen Bootcamp February 2014 SIG Washington DC April 2014

Reducing Downtime. Using incremental backups and x- platform TTS Martin Bach, Enkitec

ASM BASED TABLESPACES BACKUP WITH RMAN FOR LONG TERM OFFLINE STORING

Oracle Database 12c for SAP

ORACLE 11gR2 DBA. by Mr. Akal Singh ( Oracle Certified Master ) COURSE CONTENT. INTRODUCTION to ORACLE

What s New with Oracle Data Pump in Oracle Database 12c. Dean Gagne Consulting Member of Technical Staff

Tablespace Usage By Schema In Oracle 11g Rac

Explore the Oracle 10g database architecture. Install software with the Oracle Universal Installer (OUI)

DOAG 2013 Oracle 12c Backup & Recovery

ORACLE DBA TRAINING IN BANGALORE

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Steps Create Physical Standby Database Oracle 9i

Exam 1Z0-061 Oracle Database 12c: SQL Fundamentals

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

An Oracle White Paper September Methods for Upgrading to Oracle Database 11g Release 2

Chapter One. Concepts BACKUP CONCEPTS

Oracle Database 12C: Advanced Administration - 1Z0-063

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Re-platforming the E-Business Suite Database

Oracle Database 11g: New Features for Oracle 9i DBAs

Oracle RMAN for Absolute Beginners

What was new in 11g for Backup and Recovery? Contents

Oracle Database 11g Data Guard

Oracle Database 10g : Administration Workshop II (Release 2) Course 36 Contact Hours

An Oracle White Paper September Upgrade Methods for Upgrading to Oracle Database 11g Release 2

Oracle Database Migrating and Converting Non-CDBs to a PDB with a Different Endian Operating System. 18c

Oracle 10g Move Table To Another Schema

What is new on 12c For Backup and Recovery. By: Francisco Munoz Alvarez

Einfache SAP-Migrationen mit Cross-Platform Transportable Tablespaces

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Oracle Database 10g: New Features for Administrators Release 2

Oracle Database Migrating Non-CDBs to New Hardware with a Different Endian Operating System and for a New Release. 18c

How To Apply Archive Logs Manually In Standby Database Using Rman

1Z Upgrade Oracle9i/10g to Oracle Database 11g OCP Exam Summary Syllabus Questions

Technical White Paper August Migrating to Oracle 11g Using Data Replicator Software with Transportable Tablespaces

Steps To Create Database Manually In Oracle 10g In Windows

Oracle Database 10g Migration to Automatic Storage Management. An Oracle White Paper August 2005

Installing the Oracle Database Softwar

Incrementally Updating Backups Tips and Tricks

Dr. Stephan Bühne Senior Principal Technical Consultant. SAP Solution Center Walldorf

Expdp Multiple Job Modes Requested Schema And Tables

Data Protector. Software Version: Zero Downtime Backup Integration Guide

COMPRESS TEST FOR HISTORIC DATABASES

Oracle 11g Data Guard Manual Failover Steps

Oracle Database 12c R2: Managing Multitenant Architecture Ed 2

LOSS OF FULL DATABASE AND DATABASE RECOVERY ORACLE 11g

Veritas NetBackup Copilot for Oracle Configuration Guide. Release 3.1 and 3.1.1

TestsDumps. Latest Test Dumps for IT Exam Certification

What s New in 12c for Backup & Recovery? By: Francisco Munoz Alvarez

Recovery Manager Concepts

<Insert Picture Here> Exadata MAA Best Practices Series Session 6: Migrating to Exadata

OCP Oracle Database 12c: Advanced Administration Exam Guide

Veritas NetBackup Copilot for Oracle Configuration Guide. Release 2.7.3

B. Enable secure access to the DBaaS instance VM and database instance from remote hosts by using SSH.

Oracle Database 12c R2: New Features for 12c R1 Administrators Ed 1

Oracle Database 11g for Experienced 9i Database Administrators

Oracle 10g on Solaris to Oracle RAC 11gR2 on Linux Upgrade

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 12c: Advanced Administration. Question Question 90

Oracle Database 11g: SQL Fundamentals I

Oracle Database 12c: New Features for Administrators NEW

A. connecting to the target database and a recovery catalog to execute the duplicate command

Blink and You ll Miss It: Migrating, Cloning and Recovering Oracle 12c Databases At Warp Speed

Index. ALLOCATE AUXILIARY CHANNEL command, Page numbers ending in f refer to figures. Page numbers ending in t refer to tables.

Oracle Secure Backup 12.1 Technical Overview

1z z0-060 Upgrade to Oracle Database 12c

Oracle Database 12c Release 2

Protecting Oracle databases with HPE StoreOnce Catalyst and RMAN

CHAPTER. Overview of Migration, Transformation, and Upgrade Methodologies

Eliminating Downtime When Migrating or Upgrading to Oracle 10g

Enterprise Manager: Scalable Oracle Management

Oracle 1Z Oracle Database 10g: Administration II. Download Full Version :

Check Table Oracle Database Status Windows Script

RMAN CHEAT SHEET 1 TECHGOEASY.COM. the version required by the RMAN executable. RMAN> UPGRADE CATALOG; Start command

Veritas NetBackup 6.5 Clients and Agents

Steps how to duplicate a database to a new machine. Version 10gR2

CHAPTER. Oracle Database 11g Architecture Options

TestsDumps. Latest Test Dumps for IT Exam Certification

Exam Prep Seminar Package: Oracle Database 12c Administrator Certified Associate

Oracle Database 11g: Administration I

Oracle Database 18c and Autonomous Database

Veritas NetBackup Copilot for Oracle Configuration Guide. Release 2.7.2

Oracle Copy Entire Schema Within Database Another

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

HP 3PAR Recovery Manager Software for Oracle

Oracle Recovery Manager Tips and Tricks for On-Premises and Cloud Databases

NetBackup Copilot for Oracle Configuration Guide. Release 2.7.1

Oracle Database 12c: New Features for Administrators Duration: 5 Days

Oracle Advanced Compression Helps Global Fortune 500 Company Meet Storage Savings Initiative O R A C L E W H I T E P A P E R F E B R U A R Y

Data Migration Customer Experiences

Oracle Database 10g Migration to Automatic Storage Management. An Oracle White Paper August 2004

1Z Upgrade to Oracle Database 12cm Exam Summary Syllabus Questions

Disaster Recovery Strategies for RAC on Oracle SE Arjen Visser Dbvisit Software Limited

How to Recover the lost current control file, or the current control file is inconsistent with files that you need to recover??

supporting Oracle products. An OCA credential is available for several of today s most in -demand technology job roles. OCA & OCP Requirement

Oracle Database 12c R1: New Features for Administrators Ed 2

A. Automatic memory management is disabled because PGA_AGGREGATE_TARGET and SGA_TARGET are not set.

ORANET- Course Contents

Transcription:

RMAN: Cross-Platform Backup & Restore Oracle Database 12c for SAP Abdel Boukachabine Oracle/SAP Global Technology Center Walldorf, Germany June 2017 abdelrhani.boukachabine@oracle.com Copyright 2017 Oracle and/or its affiliates. All rights reserved.

Oracle Database Online or offline migration Software Provisioning Manager (SWPM) - formerly SAPinst (offline) ACS Lifecycle Migration Services (offline and online) Data Guard Duplicate from Active Database RMAN (online) Cross-Platform Transportable Tablespace (offline) 12c: Cross-Platform backup and restore 2

Migration on same Endian RMAN duplicate from Active Database Supported for source databases in mount or open state Can be applied if source and target run on the same platform: Solaris-x64/Windows/linux-x64 to/from Solaris-x64/Windows/linux-x64 HP-UX, AIX, SPARC to/from HP-UX, AIX, SPARC Data Guard Same Operating System Does not affect the source system Can be used for migration tests 3

Traditional Cross Platform Transportable Tablespaces The high-level steps in a typical XTTS scenario are the following: Make tablespaces in source database READ ONLY Transfer datafiles to destination system Convert datafiles to destination system Endian format Export metadata of objects in the tablespaces from source database using Data Pump Import metadata of objects in the tablespaces into destination database using Data Pump Make tablespaces in destination database READ WRITE 4

RMAN 12c: XTTS Overall Improvements Applicable to Both Regular XTTS and Using Incremental Backups Now supports backup sets Unused block compression, smaller transport size, multi-section New Keyword: FOR TRANSPORT New Keywords: TO PLATFORM (at source) and FROM PLATFORM (destination) No longer require CONVERT TABLESPACE or CONVERT DATAFILE Can include tablespace metadata if that tablespace is read-only (final step) Preferred to perform the conversion at the destination using FROM PLATFORM New Keyword: ALLOW INCONSISTENT to backup tablespaces that are not in read-only mode. XTTS with incremental backups reduces downtime up to 8X Backups from 10g, 11g can be restored to a 12c destination 5

0 0 1 0 1 0 0 0 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 Cross-Platform Backup & Restore Simplified Platform Migration Source Database (AIX) Destination Database (Linux) Backup User Tablespaces & DataPump Metadata Export to Disk/Tape 1 Copy Backup To Destination 2 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 0 0 1 3 Restore Backup & Plugin Tablespaces (includes platform conversion) Simplifies procedure for platform migration Cross-platform Transportable Database : Same Endian, Tablespaces : Same or across Endians Minimize read-only impact using incremental-based approach New 12c Syntax: FOR TRANSPORT / TO PLATFORM

Reduce Downtime using Cross Platform Incremental Backup Part I Prepare phase (source data remains online) Backup (level=0) of tablespaces to be transported Transfer backup and other necessary setup files to destination system Restore datafiles on destination system Endian format Roll Forward phase (source data remains online - Repeat x times) Create incremental backup on source system, Transfer, convert Endian (implicit), and apply Repeat steps until ready to transport the tablespace. 7

Reduce Downtime using Cross Platform Incremental Backup Part II Transport phase (source data is READ ONLY) Make tablespaces in source database READ ONLY Repeat the Roll Forward phase one final time This step makes destination datafile copies consistent with source database and generates necessary export. Time for this step is significantly shorter than traditional XTTS method when dealing with large data because the incremental backup size is smaller. Import metadata of objects in the tablespaces into destination database using Data Pump Make tablespaces in destination database READ WRITE 8

Cross-Platform Backup & Restore Prepare target platform Create database (SYSTEM, SYSAUX, PSAPUNDO, PSAPTEMP) For sample script see Best Practices for Migration of an SAP Database to Oracle ASM Run Post-DB-createion scripts Create Database Roles 'SAPCONN' and 'SAPDBA' Import all metadata (except tables of schema SAPSR3) Grant 'SAPCONN' and 'SAPDBA' roles 9

Example: Minimize Read-Only Downtime AIX to Linux Step (1) Database in R/W: Incremental Backups On destination Linux host: Create shell database (SYSTEM, SYSAUX, UNDO) On source AIX database (while tablespaces are in read-write mode): 1. Check that tablespaces are self-contained using DBMS_TTS.TRANSPORT_SET_CHECK 2. Day 1: BACKUP FOR TRANSPORT ALLOW INCONSISTENT INCREMENTAL LEVEL 0 TABLESPACE PSAPSR3, PSAPSR3740, PSAPSR3USR FORMAT '/<NFS-mount>/xplat_backups/X11_tbs_incon.bck'; 3. Day 2..N: BACKUP FOR TRANSPORT ALLOW INCONSISTENT INCREMENTAL LEVEL 1 TABLESPACE PSAPSR3, PSAPSR3740, PSAPSR3USR FORMAT '/<NFS-mount>/xplat_backups/X11_tbs_inconn.bck'; 4. Copy backups to destination server 5. Repeat INCREMENTAL LEVEL 1 backup + copy to destination server, as desired

Example: Minimize Read-Only Downtime AIX to Linux Step (2) Restore and Recover the Incrementals On destination Linux database (as and when backups copied from source): Level 0:Restores and converts incremental blocks, then applies blocks to the restored data files RESTORE FROM PLATFORM 'AIX-Based Systems (64-bit) FOREIGN DATAFILE 6 FORMAT '/<target-filesystem>/<datafile_6>.df' 10 FORMAT /<target-filesystem>/<datafile_10>.df' FROM BACKUPSET '/<NFS-mount>/xplat_backups/X11_tbs_incon.bck'; DATAFILE <#> is the <#> used in source AIX database Level 1:Run RECOVER command for each new incremental taken on source RECOVER FROM PLATFORM 'AIX-Based Systems (64-bit) FOREIGN DATAFILECOPY '/<target-filesystem>/<datafile_6>.df,'/<target-filesystem>/<datafile_10>.df FROM BACKUPSET '/<NFS-mount>/xplat_backups/X11_tbs_inconn.bck';

Example: Minimize Read-Only Downtime AIX to Linux Step (3) Database in R/O : Final Backup & Recovery On source AIX database: Place user tablespaces in read-only mode, prior to final incremental and Data Pump dump file backups BACKUP FOR TRANSPORT INCREMENTAL LEVEL 1 TABLESPACE PSAPSR3,PSAPSR3USR,PSAPSR3730 FORMAT /<NFS-mount>/xplat_backups/X11_tbs_ro_incr.bck' DATAPUMP FORMAT <NFS-mount>/xplat_backups/X11_tbs_dp.bck ; Copy incremental and Data Pump metadata dump file backups to destination Linux host On destination Linux database: Recover the last incremental level 1 datafiles RECOVER FROM PLATFORM 'AIX-Based Systems (64-bit) FOREIGN DATAFILECOPY '/<target-filesystem>/<datafile_6>.df,'/<target-filesystem>/<datafile_10>.df FROM BACKUPSET '/tmp/xplat_restores/x11_tbs_ro_incr.bck'; Extract dumpfile data (Data Pump format) from the backupset RESTORE FROM PLATFORM AIX-Based Systems (64-bit)' DUMP FILE X11_tbs_dp.dmp' DATAPUMP DESTINATION '/tmp/dump' FROM BACKUPSET '/tmp/xplat_restores/x11_tbs_dp.bck';

Example: Minimize Read-Only Downtime AIX to Linux Step (4) Import Metadata & Plug-in Tablespaces On destination Linux database: 1. Create tablespace users as they exist on source database 2. Run CREATE DIRECTORY to create DP_DIR directory object, mapped to the dump file directory (/tmp/dump) 3. Import Data Pump metadata dump file to plug in new user tablespaces IMPDP DIRECTORY=DP_DIR DUMPFILE=X11_tbs_dp.dmp TRANSPORT_DATAFILES '/<target-filesystem>/<datafile_6>.df, '/<target-filesystem>/<datafile_10>.dff NOLOGFILE=Y 4. Tablespaces are made read-write SQL> ALTER TABLESPACE PSAPSR3,PSAPSR3USR, PSAPSR730 READ WRITE;

Backup Level 0 backup for transport allow inconsistent incremental level 0 datafile 24 format '/oracle/mxl/rman-bck/%n_%f_%u.bkp'; PSAPSR3USR backup for transport allow inconsistent incremental level 0 datafile 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 format '/oracle/mxl/rmanbck/%n_%f_%u.bkp'; PSAPSR3 backup for transport allow inconsistent incremental level 0 datafile 19,20,21,22,23 format '/oracle/mxl/rman-bck/%n_%f_%u.bkp'; PSAPSR730

Restore the datafiles restore from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILE 13 format '/oracle/mxl/sapdata2/sr3_10/sr3.data10' from backupset '/oracle/mxl/rmanbck/psapsr3_13_4ds237cr_1_1.bkp'; restore from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILE 10 format '/oracle/mxl/sapdata2/sr3_7/sr3.data7',15 format '/oracle/mxl/sapdata2/sr3_12/sr3.data12' from backupset '/oracle/mxl/rmanbck/psapsr3_15_47s237ck_1_1.bkp'; restore from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILE 9 format '/oracle/mxl/sapdata2/sr3_6/sr3.data6',17 format '/oracle/mxl/sapdata2/sr3_14/sr3.data14' from backupset '/oracle/mxl/rmanbck/psapsr3_17_4bs237cn_1_1.bkp'; 15

Incremental backup backup for transport allow INCONSISTENT incremental from scn 139479375 tablespace 'PSAPSR3' format '/oracle/mxl/rman-bck/%u'; backup for transport allow INCONSISTENT incremental from scn 139479375 tablespace 'PSAPSR3730' format '/oracle/mxl/rman-bck/%u'; backup for transport allow INCONSISTENT incremental from scn 139479375 tablespace 'PSAPSR3USR' format '/oracle/mxl/rman-bck/%u'; 16

Apply incremental backup recover from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILECOPY '/oracle/mxl/sapdata4/sr3usr_1/sr3usr.data1' from backupset '/oracle/mxl/rman-bck/51s25j1k_1_1'; recover from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILECOPY '/oracle/mxl/sapdata2/sr3_6/sr3.data6','/oracle/mxl/sapdata2/sr3_14/sr 3.data14' from backupset '/oracle/mxl/rman-bck/4ps25ia3_1_1'; recover from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILECOPY '/oracle/mxl/sapdata2/sr3_2/sr3.data2','/oracle/mxl/sapdata2/sr3_5/sr3. data5' from backupset '/oracle/mxl/rman-bck/4ks25ia2_1_1'; 17

Create and recover the final incremental Backup BACKUP FOR TRANSPORT INCREMENTAL from scn 153438311 TABLESPACE PSAPSR3,PSAPSR3730,PSAPSR3USR FORMAT '/oracle/mxl/rman-bck/%u' DATAPUMP FORMAT '/oracle/mxl/rman-bck/%u'; recover from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILECOPY '/oracle/mxl/sapdata2/sr3_6/sr3.data6','/oracle/mxl/sapdata2/sr3_13/sr 3.data13','/oracle/MXL/sapdata3/sr3730_3/sr3730.data3' from backupset '/oracle/mxl/rman-bck/3vrajves_1_1'; recover from platform 'Solaris[tm] OE (64-bit)' FOREIGN DATAFILECOPY '/oracle/mxl/sapdata2/sr3_6/sr3.data6','/oracle/mxl/sapdata2/sr3_14/sr 3.data14' from backupset '/oracle/mxl/rman-bck/7ns2kta0_1_1'; 18

Apply metadata directory=dpump_tts logfile=tts_imp.log network_link=ttslink transport_full_check=no transport_tablespaces=psapsr3,psapsr3730,psapsr3usr transport_datafiles='/oracle/mxl/sapdata2/sr3_1/sr3.data1','/oracle/mxl/sapdata2/sr 3_2/sr3.data2','/oracle/MXL/sapdata2/sr3_3/sr3.data3','/oracle/MXL/sapdata2/sr3_4/sr 3.data4','/oracle/MXL/sapdata2/sr3_5/sr3.data5','/oracle/MXL/sapdata2/sr3_6/sr3.data 6','/oracle/MXL/sapdata2/sr3_7/sr3.data7','/oracle/MXL/sapdata2/sr3_8/sr3.data8','/or acle/mxl/sapdata2/sr3_9/sr3.data9','/oracle/mxl/sapdata2/sr3_10/sr3.data10','/oracl e/mxl/sapdata2/sr3_11/sr3.data11','/oracle/mxl/sapdata2/sr3_12/sr3.data12','/oracle /MXL/sapdata2/sr3_13/sr3.data13','/oracle/MXL/sapdata2/sr3_14/sr3.data14','/oracle/ MXL/sapdata2/sr3_15/sr3.data15','/oracle/MXL/sapdata3/sr3730_1/sr3730.data1','/ora cle/mxl/sapdata3/sr3730_2/sr3730.data2','/oracle/mxl/sapdata3/sr3730_3/sr3730.da ta3','/oracle/mxl/sapdata3/sr3730_4/sr3730.data4','/oracle/mxl/sapdata3/sr3730_5/s r3730.data5','/oracle/mxl/sapdata4/sr3usr_1/sr3usr.data1' 19

Final steps RMAN> validate tablespace PSAPSR3, PSAPSR3USR, PSAPSR3730 SQL>alter tablespace PSAPSR3 read write; Same for PSAPSR3USR, PSAPSR3730 SQL> select tablespace_name,status from dba_tablespaces; Set default tablespace and temporary tablespace 20

Cross Platform Incremental Backup Supporting Scripts (I) MOS 2005729.1 Run the backup on the source system [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl backup Restore the datafiles on the destination system [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl restore Create an incremental backup of the tablespaces being transported on the source system [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl bkpinc Apply the incremental backup to the datafile copies on the destination system [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl recover 21

Cross Platform Incremental Backup Supporting Scripts (II) MOS 2005729.1 Determine the FROM_SCN for the next incremental backup [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -s Final Incremental Backup Alter source tablespace(s) READ ONLY in the source database Create the final incremental backup and transfer necessary files to the destination datafiles [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl bkpexport Apply last incremental backup to destination datafiles [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl --resincrdmp 22

Cross Platform Incremental Backup Supporting Scripts (III) MOS 2005729.1 Modify and execute Impdp command: impdp directory=data_pump_dir logfile=tts_imp.log network_link=ttslink transport_full_check=no transport_tablespaces=psapsr3,psapsr3730,psapsr3usr transport_datafiles='/oracle/mxl/sapdata2/sr3_1/sr3.data1','/oracle/mxl/sapdata2/s r3_2/sr3.data2','/oracle/mxl/sapdata2/sr3_3/sr3.data3','/oracle/mxl/sapdata2/sr3_4 /sr3.data4 etc.. RMAN>validate tablespace PSAPSR3,PSAPSR3730,PSAPSR3USR check logical; SQL>alter tablespace SAPSR3 read write; Same for SAPSR3USR, SAPSR3730 startsap 23

Information sources Best Practices for Migration of an SAP Database to Oracle ASM 12c Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup (Doc ID 2005729.1) Best Practices for Migrating SAP Systems to Oracle Infrastructure--Part 4: SAP Database Migration Method 2--Transportable Tablespaces Email: abdelrhani.boukachabine@oracle.com 24

25