Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Sun Oracle Database Machine Oracle Database 11g Release 2 Migration Maximum Availability Architecture Best Practices
Name:
Agenda
Database Machine Software Considerations Migration Strategy Migration Methods Scenarios
Migrating from HP v1 DBM Migrating from Oracle Database 10g Release 2 / Oracle Database 11g Release 1 On big endian platform On little endian platform
Operating system
Oracle Enterprise Linux (OEL5) Linux x86_64 Little endian format
Migration strategy
Migration strategy
Choose the right migration method Determine what to migrate
Because of Exadata unique features (e.g. smart scan) expect differences between source and Exadata warehouse databases Fewer indexes, fewer materialized views, different partitioning strategy, compression Avoid methods that migrate what you will discard
Migration strategy
Choose the right migration method Implement Best Practices
Will the migration method accommodate best practices? Examples ASM disk group 4MB AU size at disk group creation Large extents (8MB) for large segments at extent allocation Avoid methods that prevent proper best practices
Minimize downtime
Yes, but implementing best practices is more important (your future performance depends on it)
Migration methods
Methods overview Physical migration
Data remains in datafiles (block-for-block) Most methods are whole database migration Generally more restrictive
Logical migration
Data unloaded from source, loaded into Exadata database w/ SQL Easier to migrate subset Easier to implement structural best practices Generally less restrictive
Migration methods
Strategy for database types No single best method for all cases, but in general Data Warehouse (DW)
Typical strategy
Change structure
Reduce / remove indexes, MVs
OLTP
Typical strategy
Structure intact
Change storage
Use new compression (EHCC) Optimize extent sizing
Migration method
1st: Physical 2nd: Logical
Change platform
Source big endian
Migration method
1st: Logical 2nd: Physical
2009 Oracle Corporation
Migration methods
10
Physical migration
Data remains in datafiles (block-for-block)
Database extent sizes remain the same
Stricter requirements
Platform and version changes restricted
11
Physical migration
Best practice challenged
Suboptimal sizing Migrate unnecessary objects
12
Physical migration
Methods at a glance ASM rebalance Partition roll-in/out Data Guard Physical Standby Transportable database (TDB) Transportable tablespaces (TTS) Review logical migration methods if best practices not already implemented on source database
13
Physical migration
Method
ASM rebalance Partition roll-in/out Data Guard Physical Standby Transportable database
When to use
Add Exadata storage to existing 11.2 Linux x86-64 database that uses ASM w/ 4MB AU Add Exadata storage to existing 11.2 Linux x86-64 database Linux source on 11.2, archiving and LOGGING Little endian source on 11.2
Transportable tablespaces Big endian source >= 10.1 Little endian source >=10.1, <11.2
14
Physical migration
ASM rebalance to Exadata storage Overview - Let ASM rebalance move the data
Connect Exadata storage to existing database nodes ADD grid disks to existing ASM disk groups, DROP legacy storage from existing ASM disk groups
Outage time
None
Consider
Must already use 4MB ASM AU in existing disk groups
15
Physical migration
Partition roll-in, roll-out to Exadata storage Overview Load new partitions into Exadata storage
Connect Exadata storage to existing database nodes Only load into newly created partitions on Exadata storage Drop old partitions from traditional storage
Outage time
None
Consider
Set 4MB ASM AU for new disk groups on Exadata storage If source using ASM, should already have 4MB ASM AU
16
Physical migration
Data Guard Physical standby Overview (Note 1055938.1)
Create Physical Standby on Sun Oracle Database Machine Data Guard switchover
MAA on OTN
Outage time
Data Guard switchover
Consider
Archivelog mode and LOGGING required New DB_UNIQUE_NAME needed
2009 Oracle Corporation
17
Physical migration
Physical standby plus database upgrade Overview (Note 1055938.1)
Create Physical Standby on Sun Oracle Database Machine Apply archives Activate standby database Run database upgrade scripts
Outage time
Time to apply archives + run database upgrade scripts
Consider
Archivelog mode and LOGGING required New DB_UNIQUE_NAME needed
18
Physical migration
Transportable database (TDB)
Overview
RMAN CONVERT DATABASE Transfer datafiles to Exadata storage CONVERT subset of datafiles, as required (up to 2GB/s) (Note:732053.1) Run transport script
MAA on OTN
Outage time
Transfer all datafiles + partial CONVERT + transport script
Consider
Do not use source system conversion Staging space requirement size of files that need CONVERT OLAP AWs need special consideration (Note 352306.1)
19
Physical migration
Transportable tablespace (TTS)
Overview
Build empty 11.2 Exadata database TTS export source system metadata Transfer files to Exadata (CONVERT if source system big endian) TTS import metadata into Exadata database
MAA on OTN
Outage time
TTS export + Transfer files + CONVERT (if necessary) + TTS import
Consider
If source system big endian, CONVERT on source system Staging space requirement - size of files that need CONVERT OLAP AWs need special consideration (Note 352306.1)
20
Migration methods
Logical migration Data unloaded from source, loaded into Exadata database w/ SQL Move only the user data Best practices can be added
4MB ASM AU size set for new disk groups Large extents (8MB) for large database segments Table compression, if desired Partitioning (added or changed), if desired
21
Logical migration
Methods at a glance Data Guard Logical Standby GoldenGate / Streams Data Pump Create Table As Select (CTAS) or Insert As Select (IAS)
22
Logical migration
Method
Data Guard Logical Standby
When to use
Rolling database upgrade requirement Table storage characteristics will be changed
Oracle GoldenGate* Minimal downtime requirement Streams Different source platform Data Pump CTAS / IAS Data type restriction with other methods Initial bulk load
23
Logical migration
Data Guard Logical standby
Overview
Steps depend on starting point - See following slides 1. Source database 11.2 2. Source database < 11.2 (including HP Oracle Database Machine)
Outage time
Typically Data Guard switchover + application failover
Consider
Archivelog mode, LOGGING, and supplemental logging required Data type support Can apply catch up?
24
Logical migration
Logical standby source system 11.2 Overview
Create logical standby on 11.2 Sun Oracle Database Machine Change table storage characteristics, as desired (Note:737460.1) Data Guard switchover
MAA on OTN
25
Logical migration
Logical standby source system < 11.2
Overview (Note 1055938.1)
Create Data Guard Logical Standby on source system (e.g. 11.1 HP Oracle Database Machine) Shutdown and copy Logical Standby + controlfile to 11.2 Sun Oracle Database Machine
duplicate target database for standby from active database
Upgrade Data Guard logical standby to 11.2 (run upgrade scripts manually) Enable redo transport and standby apply to catch up Change table storage characteristics, as desired (Note:737460.1) Data Guard switchover
When to use
Table storage characteristics will be changed, or Rolling database upgrade
26
Logical migration
GoldenGate / Streams
Overview
Create and upgrade replica on Sun Oracle Database Machine Stop apply Implement best practices on replica (e.g. unload, recreate, reload) Start apply to catch up Disconnect users from primary, reconnect to Sun Oracle Database Machine
MAA on OTN
Outage time
Application reconnection
Consider
Archivelog mode, LOGGING, and supplemental logging required Data type support Can apply catch up?
27
Logical migration
Data Pump Overview
Create Exadata database Import user data into Exadata using Data Pump Network mode - Direct import from source via dblink File mode - Export to dump file(s), transfer file(s), Import
Outage time
Network mode - 1x data movement File mode - 3x data movement and 2x staging space
28
Logical migration
CTAS / IAS
Overview
Create Exadata database CTAS or IAS From external tables in DBFS staging area From dblink to source database
Outage time
Significant (3x) variation depending on partitioning (and what scheme), compression, target data type
Consider
Use DBFS for staging external tables, not local filesystem Dblink - Manually parallelize
29
Migration methods
In practice Current DWs usually not on Linux x86-64 and not running 11g, so most physical methods eliminated
Most DWs replaced by Exadata are running either Oracle on bigendian UNIX, or competitor (e.g. DB2, Netezza, Teradata)
Customers only want tables with user data in order to implement new database configuration determined during testing
30
Migration methods
In practice Most common methods used thus far
Combination for staged migration CTAS/IAS or Data Pump for the initial bulk load into Exadata while source remains in use Perform daily loads (external tables) into both source and Exadata Initially users serviced by source database Move users over to Exadata Stop daily load into source
31
Migration Scenario
From 11.1 HP DBM Restriction
RDBMS 11.1 cannot use Exadata 11.2 RDBMS 11.2 cannot use Exadata 11.1
Option #1 Data Guard Physical Standby + Database Upgrade Option #2 Data Guard Logical Standby source system < 11.2
Reduce downtime rolling database upgrade
32
Migration Scenario
From 10gR2 / 11gR1 on Big Endian Option #1 Transportable Tablespaces Option #2 Data Pump
Implement best practices not in source database
33
Migration Scenario
From 10gR2 / 11gR1 on Little Endian (non-DBM) Option #1 Physical Standby + Database Upgrade
Check Note 413484.1 for cross platform standby support
34
35
Note: Bulk data movement to the database servers you do NOT move data directly to the storage it always goes through an instance on a database server first.
36
Use IB network
37
RDS - only used by Oracle for RAC and storage traffic SDP - stick w/ TCP
38
39
40
41
42
Summary
Best practices leads to the best performance
Make sure migration doesnt break them
Use the InfiniBand network for the fastest network performance For more information
Maximum Availability Architecture http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm Sun Oracle Database Machine and Exadata Storage Server http://www.oracle.com/technology/products/bi/db/exadata/index.html
43