Oracle Database Cross Platform Migration Lucy Feng, DBAK



Similar documents
Cross Platform Transportable Tablespaces Migration in Oracle 11g

Database Recovery For Newbies

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

An Oracle White Paper January Oracle Database 12c: Full Transportable Export/Import

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

ORACLE CORE DBA ONLINE TRAINING

Oracle Database 10g: Administration Workshop II Release 2

A Complete Cross Platform Database Migration Guide Using Import and Export Utility

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

Cross-Platform Oracle Database Migration Using Transportable Tablespaces and EMC Open Replicator for Symmetrix

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

12. User-managed and RMAN-based backups.

Oracle Database 10g & Multi-Terabyte Database Migration By: Saravanan Shanmugam and James Madison, The Hartford (

Oracle DBA Course Contents

Oracle 11g Database Administration

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo tao_zuo@npd.com NPD Inc. 9/2011

Using RMAN to restore a database to another server in an ASM environment

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

Reducing downtime using incremental backups and X-Platform TTS

If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows:

Safeguard Sensitive Data in EBS: A Look at Oracle Database Vault, Transparent Data Encryption, and Data Masking. Lucy Feng

Oracle Database 10g: New Features for Administrators

Backup/Restore Oracle 8i/9i/10g

Oracle Database 12c Recovery Manager New Features

Recreate Physical Standby Database after Recovery of Primary Database

DOCUMENTATION ORACLE BACKUP & RESTORE OPERATIONS

Oracle Backup and Recover 101. Osborne Press ISBN

BrightStor ARCserve Backup

Oracle 11g DBA Training Course Content

Roy F. Swonger Senior Director, Database Upgrade & Utilities Oracle Corporation. Updated: 08-DEC-2014

Oracle Data Guard for High Availability and Disaster Recovery

Clonación de una Base de Datos Oracle 11gR2 Activa usando RMAN. CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Oracle 9i Database Release 2 Enterprise Edition

Oracle Database 11g: Administration Workshop II DBA Release 2

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

HOW TO. RMAN Restore for Standby 10gR2

Oracle Database 11g: Administration Workshop II DBA Release 2

Database Disaster Recovery using only RMAN Backups

Oracle Database 11g: Administration And Backup & Recover

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue:

D78850GC10. Oracle Database 12c Backup and Recovery Workshop. Summary. Introduction. Prerequisites

Oracle Database 11g: Administration Workshop II Release 2

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Administration Workshop II - LVC. 5 Jours [35 Heures]

Maximize Availability With Oracle Database 12c

Restoring To A Different Location With EBU And RMAN An AppsDBA Consulting White Paper

Oracle Database 11g: Administration Workshop II

Oracle Recovery Manager 10g. An Oracle White Paper November 2003

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices

D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW

SQL Server to Oracle A Database Migration Roadmap

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

Oracle Backup & Recovery

REDCENTRIC SOFTWARE ORACLE PLUG-IN FOR SOLARIS AGENT X86 VERSION

Getting all the pieces: Reliable Backup/Recovery

Oracle Database 11g: New Features for Administrators DBA Release 2

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Why Not Oracle Standard Edition? A Dbvisit White Paper By Anton Els

Oracle Database: SQL and PL/SQL Fundamentals NEW

Many DBA s are being required to support multiple DBMS s on multiple platforms. Many IT shops today are running a combination of Oracle and DB2 which

Using Recovery Manager with Oracle Data Guard in Oracle Database 10g. An Oracle White Paper April 2009

Oracle 10g Feature: RMAN Incrementally Updated Backups

COURCE TITLE DURATION. Oracle Database 11g: Administration Workshop I

SharePlex for Oracle How to replicate databases. Jeffrey Surretsky Solutions Architect

Simplifying Online Backup Operations for Microsoft Exchange, SQL and Oracle with Hitachi Protection Manager Software

ORACLE DATABASE ADMINISTRATOR RESUME

How to Migrate your Database to Oracle Exadata. Noam Cohen, Oracle DB Consultant, E&M Computing

Oracle Database 12c: New Features for Administrators

Oracle 11g New Features - OCP Upgrade Exam

ORACLE DATABASE 12C: NEW FEATURES FOR ADMINISTRATORS GRADE CURRICULAR. Enterprise Manager Express home page versus Enterprise Manager Database Control

Pass4Sure.1z0-034_120.Q&A

ORACLE DATABASE 11G: COMPLETE

SAP with Oracle Real Application Clusters 11g Release 2 and Oracle Automatic Storage Management 11g Release 2

Oracle Architecture, Concepts & Facilities

Maximum Availability Architecture. Oracle Best Practices For High Availability

The safer, easier way to help you pass any IT exams. Exam : 1Z Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP.

PRM For Oracle Database 3.1 GUI:

Oracle Database 10g: Backup and Recovery 1-2

Oracle Cloud Storage and File system

Using Physical Replication and Oracle Database Standard Edition for Disaster Recovery. A Dbvisit White Paper

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Rob Zoeteweij Zoeteweij Consulting

EMC Replication Manager Integration with Oracle Database Server

ArcSDE Configuration and Tuning Guide for Oracle. ArcGIS 8.3

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - New Features for Administrators Release 2. 5 Jours [35 Heures]

Configuring Backup Settings. Copyright 2009, Oracle. All rights reserved.

Using HP StoreOnce Backup systems for Oracle database backups

Oracle vs. SQL Server. Simon Pane & Steve Recsky First4 Database Partners Inc. September 20, 2012

SnapManager for Oracle 2.2. Anand Ranganathan Product & Partner Engineer (PPE)

High Availability for Oracle 10g Using Double-Take

Oracle Database B

Oracle Database 10g: Backup and Recovery

Transcription:

Delivering Oracle Success Oracle Database Cross Platform Migration Lucy Feng, DBAK RMOUG QEW November 19, 2010

Business Requirements Migrate all Oracle databases to IBM zseries based Linux The database servers were on Sun SPARC, Linux or Solaris x86 Databases are on 10gR2: 10.2.0.4 or 10.2.0.3 Multiple databases need to be migrated within 4-hour window Database sizes range from 200 GB to 1.2 TB DBAK 2010 2

Options Data Guard Standby is not an option because of the platform difference Export/Import or data pump take too long Oracle Streams is discarded because of the risk of data divergence The methods chosen are: Cross Platform Transportable Tablespace Transportable Database DBAK 2010 3

Cross Platform Transportable Tablespace Transportable Tablespace is a feature introduced in 8i It allows nonsystem tablespaces to be moved from one database to another by physically grafting the tablespace datafiles into the control files on the target database, and then importing object metadata into the target database s dictionary DBAK 2010 4

Cross Platform Transportable Tablespace Transportable tablespace (TTS) in 8i works between the same block size Oracle 9i removed the block size restriction, but still required homogeneous operating systems Oracle 10g introduced Cross Platform TTS (XTTS) which allows TTS to function across different platforms DBAK 2010 5

How XTTS Works DBAK 2010 6

Endian Format Endianness how multi-byte data is stored in computer memory Two formats Little Endian and Big Endian Dictated by the CPU architecture Linux, Windows use Little Endian byte order Sun Sparc, HPUX use Big Endian byte order Join V$DATABASE and V$TRANSPORTABLE_PLATFORM RMAN Convert performs endian conversion DBAK 2010 7

RMAN Convert Convert datafile, convert tablespace and convert database Convert tablespace must be run from the source database Convert database can only be used when the source and target platforms share the same endian format. It creates a convert script and a transport script DBAK 2010 8

RMAN Convert In addition to convert endian format, RMAN convert also: Reformats blocks of undo segments. It is required for transporting datafiles containing undo segments between platforms, regardless of endian format. Transports datafiles stored in ASM DBAK 2010 9

RMAN Convert prerequisite Both the source and destination platforms must be supported by the convert command. Query V$TRANSPORTABLE_PLATFORM. Both source and destination databases must have COMPATIBLE set to 10.0.0 or higher. Read-only tablespaces must be made read/write at least once. DBAK 2010 10

RMAN Convert Datafile Syntax RMAN connect to destination database as target: CONVERT DATAFILE '/u01/oradata/datafile/undo.dbf' FROM PLATFORM ''Linux x86 64-bit'' FORMAT '+OCDPRD_DATA'; DBAK 2010 11

How XTTS Works DBAK 2010 12

Incrementally updated image copy backup An image copy is identical to the original file RMAN prefers to use an image copy over a backup set if you have both. There is more overhead in sorting through a backup set. Use switch command to point the database to the image copy datafile no need to restore RMAN takes an image copy of database as a base backup, and as subsequent incremental backups are taken, they are applied (recovered) on the image copies. DBAK 2010 13

Incrementally updated image copy backup rman>backup incremental level 1 for recover of copy with tag 'ROLLING_BAKCUP' database; rman>recover copy of database with tag 'ROLLING_BACKUP'; Point in time recovery of the database cannot be performed before the last application of the incremental backup. Delayed merge is common. rman>run { recover copy of database with tag 'ROLLING_BACKUP'; backup incremental level 1 for recover of copy with tag 'ROLLING_BAKCUP' database;} DBAK 2010 14

Servers and data movement Source server NFS server Target server Gigabit connection Hyper socket NFS Data store NFS Rman convert Data store DBAK 2010 15

XTTS - Preparation Create the Destination Database STARTUP NOMOUNT CREATE DATABASE "CDSPRD" LOGFILE GROUP 1 ('+CDSPRD_ORADATA','+CDSPRD_ARCH') SIZE 500M, GROUP 2 ('+CDSPRD_ORADATA','+CDSPRD_ARCH') SIZE 500M, GROUP 3 ('+CDSPRD_ORADATA','+CDSPRD_ARCH') SIZE 500M, GROUP 4 ('+CDSPRD_ORADATA','+CDSPRD_ARCH') SIZE 500M DATAFILE '+CDSPRD_ORADATA' SIZE 501m autoextend on next 50m maxsize 20001m SYSAUX DATAFILE '+CDSPRD_ORADATA' SIZE 501m autoextend on next 50m maxsize 20001m UNDO TABLESPACE UNDO DATAFILE '+CDSPRD_ORADATA' SIZE 501m autoextend on next 50m maxsize 20001m DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '+CDSPRD_ORADATA' SIZE 501m autoextend on next 50m maxsize 20001m MAXLOGFILES 20 MAXLOGMEMBERS 5 MAXDATAFILES 1000 MAXINSTANCES 5 MAXLOGHISTORY 2696 CHARACTER SET WE8ISO8859P1 ; DBAK 2010 16

XTTS - Preparation Create the Destination Database @@$ORACLE_HOME/rdbms/admin/catalog.sql @@$ORACLE_HOME/rdbms/admin/catexp.sql @@$ORACLE_HOME/rdbms/admin/catproc.sql @@$ORACLE_HOME/rdbms/admin/utltkprf.sql @@$ORACLE_HOME/rdbms/admin/catsvrmg.sql @@$ORACLE_HOME/rdbms/admin/catblock.sql @@$ORACLE_HOME/rdbms/admin/catio.sql @@$ORACLE_HOME/rdbms/admin/dbmspool.sql @@$ORACLE_HOME/rdbms/admin/prvtpool.plb connect system/manager @@$ORACLE_HOME/rdbms/admin/catdbsyn.sql @@$ORACLE_HOME/sqlplus/admin/pupbld.sql select comp_name,version,status from dba_registry; DBAK 2010 17

XTTS Preparation Generate the Conversion Script Run from the source database spool convert.rman prompt run { select 'CONVERT DATAFILE ''' file_name ''' FROM PLATFORM ''Linux x86 64-bit'' FORMAT ''+CDSPRD_ORADATA'';' from dba_tablespaces a, dba_data_files b where a.tablespace_name = b.tablespace_name and a.tablespace_name not in ('SYSTEM','SYSAUX') and contents = 'PERMANENT'; prompt } spool off DBAK 2010 18

XTTS - Preparation Generate User Creation Script From Source and Run in Target spool gen_cre_user.sql select 'create user ' username ' identified by values ''' password ''';' from dba_users; spool off spool gen_alt_user.sql select 'alter user ' username ' identified by values ''' password ''';' from dba_users; spool off DBAK 2010 19

XTTS - Steps Convert to Read Only spool tts_ro.sql select 'ALTER TABLESPACE ' tablespace_name ' READ ONLY;' from dba_tablespaces where tablespace_name not in ('SYSTEM','SYSAUX') and contents = 'PERMANENT'; spool off set heading on feedback on @tts_ro DBAK 2010 20

XTTS - Steps Export Metadata from the Source Database expdp userid=\'/ as sysdba\' parfile=tbs_exp.par cat tbs_exp.par directory=tbsdir dumpfile=tbs.dmp logfile=tbsexp.log transport_full_check=no transport_tablespaces=userdata,userindexes,users expdp userid=\'/ as sysdba\' directory=tbsdir \ dumpfile=full.dmp logfile=full.log \ content=metadata_only full=y DBAK 2010 21

XTTS - Steps Execute the Convert Datafile Script in the Target Database Import Metadata in Target Database impdp userid=\'/ as sysdba\' parfile=tbs_imp.par cat tbs_imp.par directory=tbsdir dumpfile=tbs.dmp logfile=tbsimp.log transport_datafiles= '+CDSPRD_ORADATA/CDSPRD/DATAFILE/USERINDEXES.273.7 22726321', '+CDSPRD_ORADATA/CDSPRD/DATAFILE/USERINDEXES.275.7 22726931', DBAK 2010 22

XTTS - Steps Import Metadata impdp userid=\'/ as sysdba\' directory=tbsdir dumpfile=full.dmp logfile=full.log DBAK 2010 23

XTTS - Steps Set Tablespaces to Read/Write in Destination Database Run Post Conversion steps SHUTDOWN IMMEDIATE STARTUP UPGRADE @?/rdbms/admin/utlirp.sql @?/rdbms/admin/catupgrd @?/rdbms/admin/utlrp.sql Restart database and validate DBAK 2010 24

XTTS Check Self Containment Tablespaces transported must be self-contained Examples of object relationships that may cause containment violations: A table and its index An IOT and its overflow segment Table partitions and subpartitions A referential integrity DBAK 2010 25

XTTS Check Self Containment for ts in (select tablespace_name from dba_tablespaces where tablespace_name not in ('SYSTEM','SYSAUX') and contents = 'PERMANENT') loop dbms_tts.transport_set_check(checklist,true,true); select * from transport_set_violations; DBAK 2010 26

Transportable Database (TDB) TDB introduced in 10gR2. It is used to automate the movement of an entire database from one platform to another. The key is the source and the destination platforms must have the same endian format From the Source Database, query v$db_transportable_platform. If the target platform is in the output, using TDB is supported. DBAK 2010 27

Transportable Database Process Check prerequisites dbms_tdb.check_external: external tables, directories or BFILES must be recreated on the target dbms_tdb.check_db: database read-only, active or in-doubt transactions, compatibility 10 or higher, etc. Transport the data files Run convert database command. Convert database generates a convert script and a transport script. Transport environment Copy the initialization parameters (pfile or spfile), listener.ora and tnsnames.ora to the target server. Start the target database Start the new database on the target system. Control file and redo logs will be recreated. DBAK 2010 28

Transportable Database In a Nutshell Datafiles containing undo information need to be reformated to fit the target platform. Use RMAN convert datafile to convert them. Ensure datafiles are ready for conversion. Prepare the target database as if you are doing a database clone. Prepare pfile or spfile and password file. Prepare listener.ora and tnsnames.ora Recreate control file and redo logs. Open resetlogs DBAK 2010 29

Transportable Database Steps Step 1 -- Restore Control File, mount and rename datafiles rman>startup nomount; rman>restore controlfile from '/zdb_nfs/atdprd/c- 162931418-20090905-01'; rman>alter database mount; rman>switch database to copy; DBAK 2010 30

Transportable Database Steps Step 2 Create the RMAN Conversion Script Sql> spool convert.rman prompt run { select 'CONVERT DATAFILE ''' f.name ''' FROM PLATFORM ''Solaris[tm] OE (64-bit)'' FORMAT ''+' d.name '_ORADATA'';' from v$dbfile f, v$database d; prompt } spool off DBAK 2010 31

Transportable Database Steps Step 3 Startup Nomount and run the Conversion Script from Step 2 Step 4 Create a new Control File. Get new Datafile names from ASMCMD. Open Resetlogs Step 5 Run Post Conversion Steps Recreate TEMP Recompile PL/SQL Packages Step 6 Ensure Control File and Redo Logs are moved to ASM DBAK 2010 32

Plan for downtime Plan for Downtime Outage Start Database is up Full backup, Daily incremental and merge Shutdown Startup mount Incremental backup and merge Convert and transfer Post steps DBAK 2010 33

Speed it up Block change tracking 10g and up CTWR backgroup process tracks changed blocks as redo is generated and writes to a binary file. Sql>alter database enable block change tracking using file +ATDPROD_DATA ; Sql>select status, filename, bytes from v$block_change_tracking DBAK 2010 34

Speed it up Allocate multiple channels for incremental backup Convert in parallel RUN { CONVERT DATAFILE '/cds_mnt/cdsprd/audit_data01.dbf', '/cds_mnt/cdsprd/index_data01.dbf',... '/cds_mnt/cdsprd/user_data01.dbf', '/cds_mnt/cdsprd/user_data02.dbf' FROM PLATFORM 'Linux x86 64-bit' PARALLELISM 3 DB_FILE_NAME_CONVERT '/cds_mnt/cdsprd/','+cdsprd_oradata/' ;} DBAK 2010 35

Speed it up Convert datafiles of read-only tablespaces in advance Ensure NFS mount optimization 397194.1 How to optimize NFS Performance with NFS option DBAK 2010 36

Recap When the source and the destination platforms are different and the endian formats are different create a receiving database, import metadata and use RMAN convert to convert datafiles of the transported tablespaces When the source and destination endian formats are the same use RMAN convert to convert datafiles with undo information and recreate the control file and redo logs. DBAK 2010 37

Benefits of XTTS and TDB Reduced complexity and errors A high-level copy of data It moves objects as a unit, unlike table-by-table methods that could miss objects or rows of data No need to create or rebuild indexes Reduced downtime DBAK 2010 38

E-Business Suite Database 454574.1 Cross Platform Transportable Tablespaces on 11i with 10gR2 729309.1 Using Transportable Database to migrate Oracle E-Business Suite Release 11i using Oracle Database 10g Release 2 or 11g Enterprise Edition 734763.1 Using Transportable Database to migrate E-Business Suite R12 using Oracle Database 10gR2 or 11g DBAK 2010 39

Contact Lucy Feng lfeng@dbaknow.com www.dbaknow.com DBAK 2010 40

About DBAK Oracle solution provider Co-founded in 2005 Based in Englewood, CO 2008 Emerging Business of the Year South Metro Denver Chamber of Commerce More than 130 implementations, upgrades, conversions, and support projects for 80+ clients Average 15 years of Oracle expertise Oracle Gold Partner DBAK 2010 41