You are on page 1of 20

14/05/1440

1
14/05/1440

Lecture Contents

Objectives
After completing this lesson, you should be able to do the following:

Explain the export and import Modes.

Compare between the Conventional and direct path.

Explain the export and import options.

2
14/05/1440

Database Backup
Generate SQL
Generate SQL commands
commands
Two-Task
Two-Task
Different Different common
SQL common
versions OSs processing
Buffer cache
manager Write &
Write & Read
Read

Archive DB
historical data objects Cold Hot
Tablespaces Full DB
Direct
Transport Save table Conventional
tablespaces definitions Table User

Utilities Modes Type Options

Export & Import

3
14/05/1440

Export and Import Utility


• provides a simple way for you to transfer data objects between
Oracle databases
• Even if they reside on platforms with different hardware and
software configurations.
DB object

database

Export
Import

database

4
14/05/1440

Export and Import Utility


• You can use these utilities to do the following:

database
database database
DB object

database

Export and Import


Archive historical data database objects

Export and Import Utility


• You can use these utilities to do the following:

database database
DB object
ORACLE 8i

user error
failure

Schema ORACLE 12g


structure database

Move data between machines and databases


Save table definitions Or between different versions of the Oracle server

5
14/05/1440

Export and Import Utility


• You can use these utilities to do the following:
Tablespace

database

database

Transport tablespaces between databases

6
14/05/1440

Export and Import Modes


Modes

Export Modes Import Modes

Table Mode

User Mode

Tablespace Mode

Full Database Mode

Table Mode

Table definitions
database

Table data
(all or selected rows)
Schema
structure

Owner’s table grants

database

7
14/05/1440

Table Mode

Owner’s table indexes


database

Schema
structure
Table constraints
PK
FK
UK
database Default value
Not null
Check the value

User Mode
Owner’s grants
DB object database

DB object

Tables Indexes procedures view ………….

database

8
14/05/1440

Tablespace Mode

database

Owner Triggers
Tablespace

Update
Delete
Schema
structure

DML
Insert
triggers

database

Full Database Mode

database

database

9
14/05/1440

Use Export and Import Utilities


• There are two type for Backup:
Backup

Cold Backup Hot Backup

Use Export Utilities to Export Data


• Use export utilities to export data

database DB object database database


DB object
ORACLE 8i

database

ORACLE 12g
database

Database to Database DB object to anther user DB version to


anther version

10
14/05/1440

Use Export Utilities to Export Data


• Export the whole database with not exporting the following:

Dictionary Tables

Base Tables Temporary Tablespace Undo Segment

Password file Redo log file


Parameter file Control file

Physical File

11
14/05/1440

Utilities options

Utilities options

Rows Yes No

Indexes

Grants

Utilities options

Export Utilities options Define the path

File

Log

Buffer 256k

12
14/05/1440

Utilities options

Export Utilities options

Constraints Yes No

Triggers Update

Delete

Insert

Compress

Utilities options

Export Utilities options

Tables

Query

DB object

Owner

13
14/05/1440

Utilities options

Export Utilities options

Statistics

Ignore

Filesize Only EXP

Utilities options

Export Utilities options

Inctype

Complete

Incremental

Cumulative

14
14/05/1440

Conventional-Path Export

Export Oracle Server


Two-Task SQL Buffer Write blocks
Generate SQL common command cache
commands (TTC) processing manager Read blocks

TTC Evaluating Buffer


buffer buffer cache

Direct-Path Export

Export Oracle Server


Two-Task SQL Buffer Write blocks
Generate SQL common command cache
commands (TTC) processing manager Read blocks

TTC Evaluating Buffer


buffer buffer cache

Dirct=y
Dump file

15
14/05/1440

Use Import Utilities to Import Data


• The Import process steps Consists of :

Export
file

Create table Extracting data Create indexes


definitions from a export file

Use Import Utilities to Import Data


• The Import process steps Consists of :

Update

Delete

Insert

Create triggers Create Constraints Create functions

16
14/05/1440

General Architecture
Automatic
migration

SQL*Loader expdp impdp Other clients

Data Pump

DBMS_DATAPUMP Data/Metadata

Data/Metadata Movement Engine

Data/Metadata

Oracle Oracle
Loader DataPump Direct Path API Metadata API

External Table API

platform-independent files

17
14/05/1440

Database Backup
Generate SQL
Generate SQL commands
commands
Two-Task
Two-Task
Different Different common
SQL common
versions OSs processing
Buffer cache
manager Write &
Write & Read
Read

Archive DB
historical data objects Cold Hot
Tablespaces Full DB
Direct
Transport Save table Conventional
tablespaces definitions Table User

Utilities Modes Type Options

Export & Import

18
14/05/1440

Assignment

• You can download assignment about this lesson from the


course's page (http://clms.ust.edu)

19
14/05/1440

References
• Bryla, Bob. Oracle Database 12c DBA Handbook. McGraw Hill
Professional, 2015.

20

You might also like