Professional Documents
Culture Documents
Updated: 4-APR-2014
$> whoami
6 years
RDBMS Core & MissionCirtical Support
6 years
Technology Presales for DataGuard, Upgrades
Mike Dietrich
6 years
ST Upgrade Development Team
50%
50%
Reference
Projects
+ x%
Workshops
Worldwide
Development
Work
Reference Involvement
>16000 Downloads
since June 2013
blogs.oracle.com/UPGRADE
MOS Note:1264715.1
For Compatibility and version changes:
MOS Note:553337.1
EXCLUDE=STATISTICS on export
EXCLUDE=INDEXES on import
1.
2.
3.
Split indexes.sql into multiple SQL files and run in multiple sessions
$ expdp ...
10
8 vs 16 CPU cores
10GBit connection leveraged up to 8 Gbit
1 TB table copied in ~15 min 4 TB/hour
Network bandwidth and CPU bound
11
12
Database Link
PDB$
SEED
Combining:
Transportable Tablespaces
Data Pump for manual steps
PDB1
impdp
CDB
Read Only
13
DB1
VIEWS
Read Only
APP
HUGO
14
SYSTEM
SYSAUX
UNDO
TEMP
CODE
APP
PRIVS
HUGO
SYSTEM
SYSAUX
UNDO
TEMP
CODE
PRIVS
VIEWS
VIEWS
Read Only
APP
HUGO
15
SYSTEM
SYSAUX
UNDO
CODE
PRIVS
Data Pump
HUGO
TEMP
APP
SYSTEM
SYSAUX
UNDO
TEMP
CODE
PRIVS
VIEWS
VIEWS
Read Only
APP
HUGO
16
SYSTEM
SYSAUX
UNDO
CODE
PRIVS
Data Pump
HUGO
TEMP
APP
SYSTEM
SYSAUX
UNDO
TEMP
CODE
PRIVS
PDB$
SEED
impdp oow/passwd@PDB1
NETWORK_LINK=DB1 VERSION=12 FULL=Y
TRANSPORTABLE=ALWAYS METRICS=Y
LOGFILE=oow_dir:src112fullimp.log
TRANSPORT_DATAFILE='/oradata/ts1.dbf'
17
PDB1
Database Link
impdp
CDB
Read Only
DB1
Incremental Backups
archive logging in source:
Enable
ALTER DATABASE ARCHIVELOG;
Enable block change tracking in source:
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '<name>' REUSE;
Recovery area should be accessible by target instance
Simple RMAN script:
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'xyz' DATABASE;
RECOVER COPY OF DATABASE WITH TAG 'xyz';
First execution creates level 0 copy of all datafiles
Subsequent invocations backup and apply only changed blocks to the datafiles since previous invocation
18
Incremental Backups
Setup steps in the new database/PDB
a directory object
Create
CREATE DIRECTORY xyz_dir AS '/reco/data';
GRANT READ, WRITE ON DIRECTORY xyz_dir TO mike;
a database link back into source instance
Create
CREATE PUBLIC DATABASE LINK v112 USING 'v112';
19
User who runs impdp on target must exist on source with DATAPUMP_EXP_FULL_DATABASE role
Incremental Backups
Setup steps in the new database/PDB
Transport Phase
all data tablespaces read-only on source
Set
ALTER TABLESPACE users READ ONLY;
>>>>> DOWNTIME <<<<<
20
Incremental Backups
Setup steps in the new database/PDB
Transport Phase
Data Pump at Work
mike/<passwd>@V112 NETWORK_LINK=v112
impdp
VERSION=12 FULL=Y TRANSPORTABLE=ALWAYS
METRICS=Y LOGFILE=xyz_dir:v112fullimp.log
TRANSPORT_DATAFILES='/reco/data/user1.dbf'
21
Incremental Backups
Setup steps in the new database/PDB
Transport Phase
Data Pump at Work
Clean Up
Check the logfile
22
23
expdp system/mgr
views_as_tables=scott.view1 ...
TABLE1
impdp system/mgr
remap_table=view1:scott.table1 ...
TABLE1
24
25
26
8.570 KB
106 rows
8.570 KB
106 rows
called my_view
remap_table:source_name:target_name remaps the name and
creates a table with the target name
27
28
LOGTIME Parameter
Include timestamps in the log file
LOGTIME = [ NONE | STATUS | LOGFILE | ALL ]
NONE:
STATUS:
29
LOGTIME Parameter
Without vs With LOGTIME=ALL
30
31
32
33
34
2x
35
36
or:
Precreate the tablespace with COMPRESS option
create tablespace ARCHIGH datafile 'archigh.ora' size 100G
37
38
39
40
41
Payback GmbH
Belongs to Loyalty Partner GmbH
Preparation
Upgrade
Success?
Remarks
42
Project
Constraints
Preparation
Upgrade
15-NOV-2009
Success?
Remarks
43
Constraints
~ 3GB/sec throughput!
Preparation
Upgrade
Success?
Remarks
44
Setup:
PROD
Restore
+
Upgrade
Constraints
Preparation
Upgrade
SWING
HP-UX PA-RISC
HP-UX PA-RISC
Success?
Remarks
Prod Load
45
OL 64bit
Data Pump on
NETWORK_LINK
Test migrations:
PROD
SWING
Constraints
Preparation
Upgrade
HP-UX PA-RISC
APPEND
HP-UX PA-RISCINSERT
on database links
for tables >100 GB
Success?
Remarks
Prod Load
46
OL 64bit
PROD
SWING
HP-UX PA-RISC
HP-UX PA-RISC
Constraints
Preparation
Upgrade
OL 64bit
Success?
Remarks
Prod Load
47
Prod Load
PROD
SWING
HP-UX PA-RISC
HP-UX PA-RISC
Constraints
Preparation
Upgrade
OL 64bit
Success?
Remarks
Prod Load
48
Project
Constraints
Preparation
Upgrade
Success?
Remarks
49
Constraints
Preparation
Upgrade
Success?
Remarks
50
Further information?
White Paper:
OTN Page:
Documentation:
http://otn.oracle.com/goto/datapump
Resources
Download slides as PDF from:
http://blogs.oracle.com/UPGRADE
Full Day Upgrade Workshop in Oslo:
Registration:
http://eventreg.oracle.com/profile/web/index.cfm?PKWebID=0x7
05481765&source=EMEAFM13033369MPP059
52
53
54