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

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

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

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

ORACLE DBA TRAINING IN BANGALORE

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

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

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

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

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

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

"Charting the Course... Oracle 18c DBA I (5 Day) Course Summary

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

Oracle Database 12c: New Features for Administrators (40 hrs.) Prerequisites: Oracle Database 11g: Administration Workshop l

Oracle RMAN for Absolute Beginners

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

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

DumpsKing. Latest exam dumps & reliable dumps VCE & valid certification king

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

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

Oracle Database 11g for Experienced 9i Database Administrators

Tablespace Usage By Schema In Oracle 11g Rac

Oracle Database 12c R2: Administration Workshop Ed 3 NEW

Oracle Database 12c R2: Administration Workshop Ed 3

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

DOAG 2013 Oracle 12c Backup & Recovery

Oracle12c Release 1 New Features for Administrators (5 Days)

TestsDumps. Latest Test Dumps for IT Exam Certification

Oracle Database 12c: New Features for Administrators NEW

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

Installing the Oracle Database Softwar

Course: Oracle Database 12c R2: Administration Workshop Ed 3

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

Chapter One. Concepts BACKUP CONCEPTS

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

1z0-063.exam. Number: 1z0-063 Passing Score: 800 Time Limit: 120 min File Version: 3.0. Oracle. 1z Oracle Database 12c: Advanced Administration

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

ASM BASED TABLESPACES BACKUP WITH RMAN FOR LONG TERM OFFLINE STORING

Oracle - Oracle Database 12c R2: Administration Workshop Ed 3

Oracle DBA Course Content

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

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

Oracle Advanced Compression: Reduce Storage, Reduce Costs, Increase Performance Bill Hodak Principal Product Manager

ORACLE DBA I. Exploring Oracle Database Architecture

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

Oracle Database 10g: New Features for Administrators Release 2

"Charting the Course... Oracle 18c DBA I (3 Day) Course Summary

Default Password For Hr Schema In Oracle 10g

Expdp Multiple Job Modes Requested Schema And Tables

ORANET- Course Contents

Oracle Database 11g Data Guard

Recovering Oracle Databases

Exam Questions 1Z0-062

Oracle Copy Entire Schema Within Database Another

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Course Outline. [ORACLE PRESS] All-in-One Course for the OCA/OCP Oracle Database 12c Exams 1Z0-061, 1Z0-062, & 1Z

Course Outline. [ORACLE PRESS] All-in-One Course for the OCA/OCP Oracle Database 12c Exams 1Z0-061, 1Z0-062, & 1Z

Tablespace Usage By Schema In Oracle 11g Query To Check Temp

Steps Create Physical Standby Database Oracle 9i

Oracle Database 11g: Administration Workshop I DBA Release 2

"Charting the Course... Oracle 12c New Features for Administrators. Course Summary

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

COURSE CONTENT. ORACLE 10g/11g DBA. web: call: (+91) / 400,

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

Oracle DBA workshop I

Oracle Data Pump Internals

Oracle Database 12c Multitenant Administration Scenarios Presented to UPNYOUG June 10, 2016 Kevin Gilpin, Advizex

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

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

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

Oracle 12C Administration Course Content:

CHAPTER. Upgrading to Oracle Database 11g

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

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

Question No : 1 Which three statements are true regarding persistent lightweight jobs? (Choose three.)

Projects. Corporate Trainer s Profile. CMM (Capability Maturity Model) level Project Standard:- TECHNOLOGIES

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

Under the Hood of Oracle Database Cloud Service for Oracle DBAs 2017 ANZ Webinar Tour by

Question No : 1 Which three statements are true regarding the use of the Database Migration Assistant for Unicode (DMU)?

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database 11g: Administration I

Oracle Exam 1z0-034 Upgrade Oracle9i/10g OCA to Oracle Database 11g OCP Version: 6.0 [ Total Questions: 148 ]

Oracle EXAM - 1Z Upgrade Oracle9i/10g OCA to Oracle Database 11g OCP. Buy Full Product.

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

Managing Oracle Real Application Clusters. An Oracle White Paper January 2002

Oracle Database 11g: SQL Fundamentals I

Oracle 1Z0-053 Exam Questions and Answers (PDF) Oracle 1Z0-053 Exam Questions 1Z0-053 BrainDumps

Oracle Database 12c R2: Backup and Recovery Workshop Ed 3

Lab4 - Managing Database Storage Structures Using Enterprise Manager Database Express

Oracle Database 11g Administration Workshop II

Oracle 12C DBA Online Training. Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL:

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

Oracle Database 12c: Backup and Recovery Workshop Ed 2 NEW

Create A Private Database Link In Another Schema In Oracle 11g Drop >>>CLICK HERE<<<

Oracle Database 12c R2: Backup and Recovery Workshop Ed 3

Oracle Database Server 12c Pros and Cons

Exploring Oracle Database 12c Multitenant Best Practices for your Cloud Ami Aharonovich

ORACLE 12C - M-IV - DBA - ADMINISTRADOR DE BANCO DE DADOS II

TestsDumps. Latest Test Dumps for IT Exam Certification

Transcription:

1

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

Program Agenda Full Transportable Export/Import Exporting Views as Tables Detailed Timestamps for Data Pump Operations Improved Security Enhanced Compression Options Additional TRANSFORM Options 3

Full Transportable Export/Import 4

Transportable Tablespaces Background Available starting with Oracle Database 8i Can go cross-platform starting with 10g Simple, elegant concept Create empty database on destination Copy tablespace files from source, plug into target Can be very fast if not going cross-endian Can quickly get very complex Movement of metadata is often the biggest issue 5

Transportable Tablespaces Steps for a Transportable Tablespace Migration 1. Network mode import to get user metadata for TTS import (e.g. user definitions for table owners) 2. Full non-tts metadata-only export on source to capture definitions of all non-tts objects (packages, views, triggers, user-defined objects, etc.) 3. TTS export on source to capture tablespace object definitions 4. Copy tablespaces to target 5. TTS import on target to create user tablespaces and TTS objects 6. Non-TTS import from metadata-only export to create non-tts objects 7. Other actions to get user data stored in SYSTEM/SYSAUX, etc. 6

Full Transportable Export/Import What it is Combines usability of Data Pump with speed of Transportable Tablespaces Full Transportable Export already exists in 11.2.0.3! Initiated by expdp FULL=Y TRANSPORTABLE=ALWAYS VERSION=12 No need for VERSION=12 when exporting from 12.1 or later releases Full Transportable Import starting with 12.1.0.1 Cross-platform, cross-endian (with RMAN CONVERT of data files) Works with dump files or over a NETWORK_LINK 7

Full Transportable Export/Import How it works Distinction between administrative and user tablespaces Administrative tablespaces are SYSTEM, SYSAUX, etc. Objects with storage in user tablespaces move transportably Objects with storage in administrative tablespaces move conventionally Supports transport of Encrypted tablespaces and tables with encrypted columns Timestamp-with-timezone data (TSTZ) across different timezone versions Oracle-supplied components such as MultiMedia, Auditing and Spatial register their metadata for export using internal APIs and callbacks 8

Full Transportable Export/Import SOURCE Database 11.2.0.3 APP HUGO INC BCK1 INC BCK0 USERS SYSTEM SYSAUX UNDO TEMP VIEWS CODE PRIVS Data Pump DESTINATION Database VIEWS 12.1.0.1 APP HUGO Convert and apply backups SYSTEM SYSAUX UNDO TEMP CODE PRIVS 9

Example: Full Transportable Network Import 11.2.0.3 12c PDB 10

Example: Migrate 11.2.0.3 12c PDB Scenario Source: 11.2.0.3 database instance (SID=V112) on Windows x86 Target: 12c PDB (SID=PDB12) on Oracle Exadata (OEL 6) Tablespace Name Encrypted? Datafile Name SYSTEM NO /data1/oracle/dbs/t_db1.f SYSAUX NO /data1/oracle/dbs/t_ax1.f UNDO NO /data2/oracle/dbs/t_undo1.f HR YES /data3/oracle/dbs/hr_1.f ENGTABLES NO /data4/oracle/dbs/eng_1.f ENGINDEXS NO /data5/oracle/dbs/eng_2.f 11

Example: Migrate 11.2.0.3 12c PDB Three Phases of Minimal Downtime Migration 1. Pre-transport datafile migration using incrementally-updated backups Source database remains in production 2. Transport using Data Pump import over NETWORK_LINK: Source unavailable Downtime occurs here 3. Post-transport cleanup Target database now in production 12

Example: Migrate 11.2.0.3 12c PDB Phase 1: Incrementally Updated Backup 1. Enable V112 for archive logging: ALTER DATABASE ARCHIVELOG; 2. Enable block change tracking: ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '<name>' REUSE; 3. Recovery area should be accessible by target instance 13

Example: Migrate 11.2.0.3 12c PDB Phase 1: Incrementally Updated Backup 4. Simple RMAN script: BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'oow' DATABASE; RECOVER COPY OF DATABASE WITH TAG 'oow'; 5. First execution creates level 0 copy of all datafiles Source remains available for production 6. Subsequent invocations backup and apply to the datafiles only changed blocks since previous invocation Block change tracking makes it fast 14

Example: Migrate 11.2.0.3 12c PDB Phase 1: Incrementally Updated Backup 7. Create the target CDB with target PDB Use DBCA to create the CDB CREATE PLUGGABLE DATABASE pdb12 ADMIN USER oow IDENTIFIED BY <password>; 8. Login to PDB then create database link back to 11.2.0.3 instance CREATE PUBLIC DATABASE LINK v112 USING v112 ; User who runs impdp on target must exist on source with DATAPUMP_EXP_FULL_DATABASE role. 9. In PDB12, create a directory object for the log file: CREATE DIRECTORY oow_dir AS '/recovery1/data'; GRANT READ, WRITE ON DIRECTORY oow_dir TO oow; 15

Example: Migrate 11.2.0.3 12c PDB Phase 2: Prepare and Transport the Tablespace Data Files 1. Set the transportable tablespaces read-only on V112: ALTER TABLESPACE hr READ ONLY; ALTER TABLESPACE engtables READ ONLY; ALTER TABLESPACE engindexs READ ONLY; 2. Execute the RMAN incremental backup and apply script one last time The backup copies are now consistent Assume backup copies are located in /recovery1/data 16

Example: Migrate 11.2.0.3 12c PDB Phase 2: Perform the Network Import 3. Run impdp on target as a user with DATAPUMP_IMP_FULL_DATABASE role impdp oow/<passwd>@pdb12 NETWORK_LINK=v112 VERSION=12 FULL=Y TRANSPORTABLE=ALWAYS ENCRYPTION_PASSWORD=<enc_passwd> METRICS=Y LOGFILE=oow_dir:v112fullimp.log TRANSPORT_DATAFILES= /recovery1/data/hr_1.f TRANSPORT_DATAFILES= /recovery1/data/eng_1.f TRANSPORT_DATAFILES= /recovery1/data/eng_2.f 17

Example: Migrate 11.2.0.3 12c PDB Phase 3: Validate and Clean Up Carefully review import log and resolve any errors Transported tablespaces on target are read / write at end of import Validate PDB contents against source Set source tablespaces back to read / write or not. Done! 18

Exporting and Importing Views as Tables 19

Exporting Views as Tables VIEWS_AS_TABLES=[schema_name.]view_name[:table_name],... Specifies that one or more views are to be exported as tables. Exports a table with the same columns as view Row data is fetched from the view Dependent objects also exported, such as grants and constraints Improves performance of QUERY over dblink TABLE_NAME: Template table serves as source of metadata Required if the database is read-only 20

Exporting Views as Tables Example: export SQL> create view hr.my_view (first, last, dept) as select e.first_name, e.last_name, SQL> exit d.department_name from employees e, departments d where e.department_id = d.department_id; >$ expdp system/manager views_as_tables=hr.my_view Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE.. exported "HR"."MY_VIEW" 8.570 KB 106 rows 21

Exporting Views as Tables Example: import impdp system/manager remap_table=my_view:my_table Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA.. imported "HR"."MY_TABLE" 8.570 KB 106 rows Without the remap_table parameter, Data Pump creates a table called my_view remap_table:source_name:target_name remaps the name and creates a table with the target name 22

Detailed Timestamps for Data Pump Operations 23

Detailed Timestamps with LOGTIME LOGTIME=[ NONE STATUS LOGFILE ALL ] Messages displayed during Data Pump operations can include timestamps Information can be helpful in diagnosing performance problems and estimating the timing of future similar operations. Available options are defined as follows: NONE: (default) No timestamps on status or log file messages STATUS: Timestamps on status messages only LOGFILE: Timestamps on log file messages only ALL: Timestamps on both status and log file messages 24

Detailed Timestamps with LOGTIME Example > expdp hr DIRECTORY=dpump_dir1 DUMPFILE=expdat.dmp SCHEMAS=hr LOGTIME=ALL 10-JUL-12 10:12:22.300: Starting "HR"."SYS_EXPORT_SCH 10-JUL-12 10:12:22.915: Estimate in progress using BLOCKS method... 10-JUL-12 10:12:24.422: Processing object type SCHEMA_EXPORT 10-JUL-12 10:12:24.498: Total estimation using BLOCKS method: 10-JUL-12 10:13:06.824:.. exported "HR"."REGIONS" 5.515 KB 4 rows 10-JUL-12 10:13:07.500: Master table "HR"."SYS_EXPORT 25

Improved Security 26

No Echo of Encryption Password ENCRYPTION_PWD_PROMPT = [Y N] Option to indicate whether the Oracle Data Pump client should prompt for passwords Y: prompt for password N: (default) retrieve the value from the command line. Improves security Password no longer exposed to OS commands (e.g. ps) Remove plan text passwords from scripts 27

No Echo of Encryption Password Example >$ impdp hr ENCRYPTION_PWD_PROMPT=YES dumpfile=hr.dmp Password: <user password entered here> Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production With the Partitioning, Advanced Analytics and Real Application Testing options Encryption Password: <encryption password here> 28

Auditing for Data Pump Commands Oracle Data Pump commands can now be audited Syntax CREATE AUDIT POLICY policy_name ACTIONS COMPONENT=DATAPUMP { EXPORT IMPORT ALL }; See Oracle Database Security Guide for details 29

Enhanced Compression Options 30

Enhanced Compression Options COMPRESSION_ALGORITHM=[ BASIC LOW MEDIUM HIGH ] Trade off performance against the dump file size BASIC: (default) - good combination of compression ratio and speed same algorithm as in previous versions of Oracle Data Pump. LOW: Best for CPU-limited environments MEDIUM: Similar to BASIC, good compression ratios and speed Different algorithm than BASIC Recommended for most environments HIGH: Best for disk- or network-limited environments 31

Enhanced Compression Options Example >$ expdp hr DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp COMPRESSION=DATA_ONLY COMPRESSION_ALGORITHM=LOW Compresses only the data, leaving metadata uncompressed Fewer CPU resources used, at the expense of a less than optimal compression ratio >$ expdp hr DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp COMPRESSION=ALL COMPRESSION_ALGORITHM=BASIC >$ expdp hr DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp COMPRESSION=ALL Compresses both metadata and table data using the basic level of compression Omitting the COMPRESSION_ALGORITHM parameter altogether is equivalent to specifying BASIC as the value 32

Additional TRANSFORM Options 33

Background: TRANSFORM Options for 11.2 Alter object creation DDL during import SEGMENT_ATTRIBUTES: change physical storage, tablespace, logging STORAGE: keep or ignore storage clauses OID: create new OIDs on import PCTSPACE: alter extent allocations SEGMENT_CREATION: deferred or immediate Oracle Database 12c includes even more options for additional control! 34

Change Table Compression at Import Time TRANSFORM = TABLE_COMPRESSION_CLAUSE: [NONE <compression_clause>] Specify table compression on import, regardless of options used during export Affects all tables created by the import job Syntax: (default): no transform specified, compression clause from dumpfile NONE: Table compression clause from dumpfile is omitted, table is created using default for tablespace <compression_clause>: any valid table compression clause NOCOMPRESS, COMPRESS BASIC, and so on 35

No Logging Options for Import TRANSFORM = DISABLE_ARCHIVE_LOGGING:[Y N]:[object_type] Disable redo logging when loading tables and/or creating indexes Benefits: Reduced disk space for redo logs during import Reduced maintenance of redo logs by DBA Applies to both TABLES and INDEXES if not object type specifed Logging attributes restored to original settings after data is loaded 36

No Logging Options for Import Notes To ensure recovery from media failure, DBA should perform an RMAN backup after the import completes. Redo logging for other operations of Oracle Data Pump still happens. CREATE and ALTER statements, except CREATE INDEX All operations against the master table during the import. Valid for both file mode imports and network mode imports. Not valid for transportable tablespace imports. Note: If the database is in FORCE LOGGING mode, then DISABLE_ARCHIVE_LOGGING option will not disable any logging 37

Conclusion Information and Resources OTN Page: otn.oracle.com/goto/datapump White paper: Oracle Database 12c: Full Transportable Export/Import Oracle Database Utilities Guide THANK YOU!!! 38

39

40