18 Copyright © 2005, Oracle. All rights reserved. Moving Data.

Slides:



Advertisements
Similar presentations
18 Copyright © Oracle Corporation, All rights reserved. Transporting Data Between Databases.
Advertisements

CHAPTER 13 Data Pump. Tool that replaces legacy exp/imp utilities Data Pump is a scalable, feature-rich utility that allows you to extract objects and.
2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
Loading & organising data. Objectives Loading data using direct-load insert Loading data into oracle tables using SQL*Loader conventional and direct paths.
18 Copyright © 2005, Oracle. All rights reserved. Moving Data.
9 Copyright © 2004, Oracle. All rights reserved. Managing Data.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
5 Copyright © 2005, Oracle. All rights reserved. Extraction, Transformation, and Loading (ETL) Loading.
17 Copyright © 2007, Oracle. All rights reserved. Moving Data.
The New Data Pump Caleb Small Next generation Import / Export New features Better performance Improved security Versatile interfaces.
Copyright © 2011 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. SQL Workshop Day 4.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
2 Copyright © 2009, Oracle. All rights reserved. Installing your Oracle Software.
Configuring Recovery Manager
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
Data Pump in Oracle Database 10 g : Foundation for Ultra-High Speed Data Movement Utilities Session id: George H. Claborn Data Pump Technical Project.
5 Copyright © 2009, Oracle. All rights reserved. Defining ETL Mappings for Staging Data.
IS 4510 – Database Administration Module – 2 Database Backup 10/24/20141Compiled by: Zafar Iqbal Khan.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
17 Copyright © 2004, Oracle. All rights reserved. Automating Tasks with the Scheduler.
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
5 Copyright © 2008, Oracle. All rights reserved. Configuring the Oracle Network Environment.
5 Copyright © 2007, Oracle. All rights reserved. Configuring the Oracle Network Environment.
CHAPTER 21 Automating Jobs. Introduction to Automating Jobs DBAs rely heavily on automating jobs. DBAs cannot be effective without automation. Listed.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
11 Copyright © 2005, Oracle. All rights reserved. Configuring the Oracle Network Environment.
5 Copyright © 2004, Oracle. All rights reserved. Using Recovery Manager.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
4 Copyright © 2009, Oracle. All rights reserved. Defining Source Metadata.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
13 Copyright © 2009, Oracle. All rights reserved. Integrating with Oracle Business Intelligence Enterprise Edition (OBI EE)
Transportation: Loading Warehouse Data Chapter 12.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
14 Copyright © 2006, Oracle. All rights reserved. Automating Tasks with the Scheduler.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
D Copyright © Oracle Corporation, All rights reserved. Loading Data into a Database.
6 Copyright © 2009, Oracle. All rights reserved. Using the Data Transformation Operators.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
9 Copyright © 2009, Oracle. All rights reserved. Deploying and Reporting on ETL Jobs.
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
 CONACT UC:  Magnific training   
19 Copyright © 2004, Oracle. All rights reserved. Database Backups.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
11 Copyright © 2004, Oracle. All rights reserved. Managing XML Data in an Oracle 10g Database.
11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
16 Copyright © 2004, Oracle. All rights reserved. Testing the Migrated Oracle Database.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
2 Copyright © 2009, Oracle. All rights reserved. Managing Schema Objects.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Presentation transcript:

18 Copyright © 2005, Oracle. All rights reserved. Moving Data

Copyright © 2005, Oracle. All rights reserved Objectives After completing this lesson, you should be able to do the following: Use SQL*Loader to load data from a non-Oracle database (or user files) Explain the general architecture of Data Pump Use Data Pump Export and Import Describe the use of external tables for data population Use the scheduler to automate tasks

Copyright © 2005, Oracle. All rights reserved SQL*Loader: Overview Input data files Loader control file SQL*Loader Log file Inserted Selected Parameter file (optional) Rejected Bad file Rejected Record selection Accepted Discard file (optional) Discarded Field processing Oracle server

Copyright © 2005, Oracle. All rights reserved SQL*Loader Overview Full Notes Page

Copyright © 2005, Oracle. All rights reserved SQL*Loader Control File The SQL*Loader control file instructs SQL*Loader about: Location of the data to be loaded The data format Configuration details: –Memory management –Record rejection –Interrupted load handling details Data manipulation details

Copyright © 2005, Oracle. All rights reserved SQL*Loader Control File Full Notes Page

Copyright © 2005, Oracle. All rights reserved Loading Methods

Copyright © 2005, Oracle. All rights reserved Loading Methods Table High-water mark Space used only by conventional load Conventional Array insert SGA Block writes Direct path

Copyright © 2005, Oracle. All rights reserved Comparing Direct and Conventional Path Loads Conventional Load Uses COMMIT to make changes permanent Redo entries always generated Enforces all constraints INSERT triggers fire Can load data into clustered tables Other users can make changes to tables Direct Path Load Uses data saves Generates redo only under specific conditions Enforces only PRIMARY KEY, UNIQUE, and NOT NULL INSERT triggers do not fire Cannot load data into clustered tables Other users cannot make changes to tables

Copyright © 2005, Oracle. All rights reserved Comparing Direct and Conventional Path Loads Full Notes Page

Copyright © 2005, Oracle. All rights reserved Loading Data with SQL*Loader

Copyright © 2005, Oracle. All rights reserved Where We Are Move data from non-Oracle sources into the Oracle database: –SQL*Loader Move data between Oracle databases: –Data Pump Export –Data Pump Import Move data via platform-independent files: –External table population Automate maintenance tasks: –Scheduler

Copyright © 2005, Oracle. All rights reserved Data Pump: Overview As a server-based facility for high-speed data and metadata movement, data pump: Is callable via DBMS_DATAPUMP Provides the following tools: – expdp – impdp –Web-based interface Provides data access methods: –Direct path –External tables Detaches from and reattaches to long-running jobs Restarts Data Pump jobs

Copyright © 2005, Oracle. All rights reserved Data Pump Export and Import: Benefits Fine-grained object and data selection Explicit specification of database version Parallel execution (Enterprise Edition only) Estimation of the export job space consumption Network mode in a distributed environment Remapping capabilities during import Data sampling and metadata compression

Copyright © 2005, Oracle. All rights reserved Data Pump Export and Import: Overview expdp client Dump file set Database Data Pump job Source Master table Server process Dump file set Server process Target Data Pump job impdp client Database Master table Database link “Network mode”

Copyright © 2005, Oracle. All rights reserved Data Pump Utility: Interfaces and Modes Data Pump Export and Import interfaces: –Command line –Parameter file –Interactive command line –Database Control Data Pump Export and Import modes: –Full –Schema –Table –Tablespace –Transportable tablespace

Copyright © 2005, Oracle. All rights reserved Data Pump Export

Copyright © 2005, Oracle. All rights reserved Export Options: Files

Copyright © 2005, Oracle. All rights reserved Data Pump File Locations The order of precedence of file locations: Per-file directory DIRECTORY parameter DATA_PUMP_DIR environment variable DATA_PUMP_DIR default directory object

Copyright © 2005, Oracle. All rights reserved Data Pump Files Location Full Notes Page

Copyright © 2005, Oracle. All rights reserved Advanced Export Options: Filtering

Copyright © 2005, Oracle. All rights reserved Scheduling and Running a Job

Copyright © 2005, Oracle. All rights reserved Export: Review Data Pump File Naming and Size

Copyright © 2005, Oracle. All rights reserved Data Pump: Importing from Files

Copyright © 2005, Oracle. All rights reserved Importing from the Database

Copyright © 2005, Oracle. All rights reserved Data Pump Import Transformations You can remap: Data files by using REMAP_DATAFILE Tablespaces by using REMAP_TABLESPACE Schemas by using REMAP_SCHEMA REMAP_DATAFILE = 'C:\oradata\tbs6.f':'/u1/tbs6.f'

Copyright © 2005, Oracle. All rights reserved Data Pump Import Transformations Using TRANSFORM, you can also : Exclude from tables and indexes: – STORAGE and TABLESPACE clauses – STORAGE clause only Re-create object identifiers of abstract data types Change extent allocations and file size TRANSFORM = SEGMENT_ATTRIBUTES | STORAGE | OID | PCTSPACE:{y|n| v } [ : object type ]

Copyright © 2005, Oracle. All rights reserved Using Enterprise Manager to Monitor Data Pump Jobs

Copyright © 2005, Oracle. All rights reserved Where We Are Move data from non-Oracle sources into the Oracle database: –SQL*Loader Move data between Oracle databases: –Data Pump Export –Data Pump Import Move data via platform-independent files: –External table population Automate maintenance tasks: –Scheduler

Copyright © 2005, Oracle. All rights reserved External Table Population: Overview Unloading data to external files Handling complex ETL situations External files (Proprietary format) CREATE TABLE … AS SELECT Tables Unloading Tables Loading INSERT … SELECT

Copyright © 2005, Oracle. All rights reserved External Table Population Operation It uses the ORACLE_DATAPUMP access driver. Data cannot be modified. Resulting files can be read only with the ORACLE_DATAPUMP access driver. You can combine generated files from different sources for loading purposes. ORACLE_DATAPUMP Oracle database DPAPI external files

Copyright © 2005, Oracle. All rights reserved External Table Parallel Population Multiple files can be created. There is exactly one parallel execution server per file. The PARALLEL and LOCATION clauses influence the degree of parallelism. Coordinator Parallel execution servers Generated files emp1.expemp2.expemp3.exp

Copyright © 2005, Oracle. All rights reserved External Table Population: Example CREATE TABLE emp_ext (first_name, last_name, department_name) ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY ext_dir LOCATION ('emp1.exp','emp2.exp','emp3.exp') ) PARALLEL AS SELECT e.first_name,e.last_name,d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id AND d.department_name in ('Marketing', 'Purchasing');

Copyright © 2005, Oracle. All rights reserved Where We Are Move data from non-Oracle sources into the Oracle database: –SQL*Loader Move data between Oracle databases: –Data Pump Export –Data Pump Import Move data via platform-independent files: –External table population Automate maintenance tasks: –Scheduler

Copyright © 2005, Oracle. All rights reserved Scheduler Components and Concepts JobProgram Arguments Schedule Job class Window group Resource plan Resource consumer group Job chain EventTime

Copyright © 2005, Oracle. All rights reserved Scheduler Components and Concepts Full Notes Page

Copyright © 2005, Oracle. All rights reserved Creating a Job Program Job attributes Schedule EventDate/Time Arguments Job

Copyright © 2005, Oracle. All rights reserved Creating a Time-Based Job Example: Create a job that calls a backup script every night at 11:00 p.m., starting tonight. BEGIN DBMS_SCHEDULER.CREATE_JOB( job_name=>'HR.DO_BACKUP', job_type => 'EXECUTABLE', job_action => '/home/usr/dba/rman/nightly_incr.sh', start_date=> SYSDATE, repeat_interval=>'FREQ=DAILY;BYHOUR=23', /* next night at 11:00 PM */ comments => 'Nightly incremental backups'); END; /

Copyright © 2005, Oracle. All rights reserved Setting the Repeat Interval for a Job

Copyright © 2005, Oracle. All rights reserved Managing Jobs DBMS_SCHEDULER COPY_JOB CREATE_JOB DISABLE DROP_JOB ENABLE RUN_JOB SET_ATTRIBUTE STOP_JOB

Copyright © 2005, Oracle. All rights reserved Summary In this lesson, you should have learned how to: Use SQL*Loader to load data from a non-Oracle database (or user files) Explain the general architecture of Data Pump Use Data Pump Export and Import Monitor a Data Pump job Describe the use of external tables for data population Use the scheduler to automate tasks

Copyright © 2005, Oracle. All rights reserved Practice Overview: Moving Data This practice covers the following topics: Using the Data Pump Export Wizard to select database objects to be exported Monitoring a Data Pump Export job Using the Data Pump Import Wizard to import tables in your database Using the Load Data Wizard to load data into your database Loading data by using the command line