Академический Документы
Профессиональный Документы
Культура Документы
@matheusdba
linkedin.com/in/matheusboesing/
Pythian
11,800 400 2
Pythian experts Millennia of experience
Systems currently
in 35 countries gathered and shared
managed by Pythian
over 19 years
Database Management and Performance (15)
E-Book
12 authors| +400 posts | 15k mon/accesses | 184 countries
AGENDA
• Why to talk about it?
• Migration x Consolidation
• Planning Work: Lessons Learned
• Concepts and Strategies
• Useful Tools / Step
• Final notes...
@matheusdba matheus@boesing.com.br
Safe Harbour Statement
@matheusdba matheus@boesing.com.br
Migration & Consolidation
• Migration
• Migrate Application version -> Not discussing today
• Migrating Application Services on same Database -> Not discussing today
• Migrate Applications from 1 DB to another -> Not focus for today
• Migrate several databases to 1 -> Database Consolidation
• Migrate several servers to less -> Server Consolidation
• Migrate Database version -> Database Upgrade
• Migrate servers to new servers -> Server Upgrade/Downgrade
• Migrate Datacenter to new Datacenter -> Moving
• Migrate Application/Schema/Database to Cloud -> Moving to Cloud
@matheusdba matheus@boesing.com.br
Migration & Consolidation
• Migration
• Migrate Application version -> Not discussing today
• Migrating Application Services on same Database -> Not discussing today
• Migrate Applications from 1 DB to another -> Not focus for today
• Migrate several databases to 1 -> Database Consolidation
• Migrate several servers to less -> Server Consolidation
• Migrate Database version -> Database Upgrade
• Migrate servers to new servers -> Server Upgrade/Downgrade
• Migrate Datacenter to new Datacenter -> Moving
• Migrate Application/Schema/Database to Cloud -> Moving to Cloud
@matheusdba matheus@boesing.com.br
Migrations: Why to talk about?
• This time you can be the Villain!
• If it works: It’s expected.
• If not: You did everything wrong.
@matheusdba matheus@boesing.com.br
Migrations: WHY??
• Hardware Limitation
• What we have is not enough
• Support/Contract Expiring
• Our Product or Hardware is losing support
• Additional Solutions
• I need something from new version
• Internal Policy
• I’m following the Patching Policy
• Cost Saving
• Downgrade or consolidation
• Strategic/Architectural Decision
• We’ll work on OVM now on
• Application Decomissioning
• Migrate the left overs
@matheusdba matheus@boesing.com.br
What now?
Have a Checklist!
@matheusdba matheus@boesing.com.br
Checklist #1: Make sure you have a checklist
@matheusdba matheus@boesing.com.br
Checklist: Have a Scope
• Define scope of change and change it no more!
• Baby Steps
• Change only what needs to be changed
• Split work and have SMART* milestones
• Change one thing: Harware, OS, Database, ...
• But mostly: follow documentation/recommendations/best practices
• BE Smart
• New PSUs are being released everyday
@matheusdba matheus@boesing.com.br
Checklist: Engage People
• Have a kickoff!
• Keep people informed
• A weekly report about the advance and next steps should be enough...
• Let people know when, why and how they are needed
• Make clear the importance and timeline of each activity
@matheusdba matheus@boesing.com.br
Checklist: Winter is Coming
• Be prepared for everything.
• Community
• Google it! -> Blogs, Forums,...
@matheusdba matheus@boesing.com.br
Checklist: Winter is Coming
• Be prepared for everything.
• Community
• Google it! -> Blogs, Forums,...
Be aware
• MOS and Docs.Oracle
• Installation Guide / Upgrade Guide / MOS: ”Upgrade 12.2”
@matheusdba matheus@boesing.com.br
Checklist: Document Before x After
• Have outputs, scripts, connectivity info, privileges, ...
• Server
• crontab
• Scripts directory
• ssh keys
• Other things running
• Application Schemas/Databases
• Grants
• Database Links
• Application Servers
@matheusdba matheus@boesing.com.br
Checklist: Measure Before x After
@matheusdba matheus@boesing.com.br
Success doesn’t mean get better...
@matheusdba matheus@boesing.com.br
Let’s get practical?
Test
Test again
Test different
Wait if...
Sizing is adequate?
Simulate
@matheusdba matheus@boesing.com.br
Some concepts…
@matheusdba matheus@boesing.com.br
Availability / Transparency
• Automatic Storage Management (ASM)
• Disk replacement online Applications
• I/O Stripping
• Allocation Unit
• Skip OS cache
• Failgroups
• Online rebalance
• Shared on RAC
• Grid Infrastructure Managed
@matheusdba matheus@boesing.com.br
Availability / Transparency
• Real Aplication Cluster (RAC)
• Add/Remove nodes online
• Databases in RAC x RAC One Node
• Rolling Patch
• Service Names in RAC x Singleton
• Scan Listener
• DNS Alias
@matheusdba matheus@boesing.com.br
Availability / Transparency
• Data Guard (DG)
• Active DG
• DG in RAC
• DG Broker
• Data Guard First Upgrades
• Physical x Logical
• Far-Sync (Long Distance)
• Cascade
• Snapshot Standby
• Lag
• …
@matheusdba matheus@boesing.com.br
Availability / Transparency
• Transparent Application Failover (TAF)
• App Configuration (JDBC/OCI)
• Cluster Aware -> Notificationg to JDBC
• Transparent session migration
• Transaction integrity/retrying
@matheusdba matheus@boesing.com.br
Availability / Transparency
• Automatic Storage Management (ASM)
• Disk replacement online
@matheusdba matheus@boesing.com.br
Application Caging
• Multinenant Architecture
• Logical organization
• Pluggable Databases per Application
• Application Self Contained
• Unplug/Plug
• Better use of OS/Physical resources
@matheusdba matheus@boesing.com.br
Application Caging
• Resource Manager (RSMGR)
• Resource control
• Active Sessions, % CPU, Priority
• I/O Resource Manager (IORM)
• Exadata
@matheusdba matheus@boesing.com.br
Application Caging
• Instance Caging
• CPU Count
• Memory (ASMM, AMM)
@matheusdba matheus@boesing.com.br
Application Caging
• Database Services and Modules
• Services for Applications
• Modules for App Modules (Reports, Desktop, Internet, ..)
• Actions for Module options (Monthly Sales Report, Room Reservation, …)
• Singleton x RAC
• Tracing
• Resource Mapping
@matheusdba matheus@boesing.com.br
Application Caging
• Multinenant Architecture
• Logical organization
• Pluggable Databases per Application
• Instance Caging
• Parameters
@matheusdba matheus@boesing.com.br
Interesting, But...
@matheusdba matheus@boesing.com.br
Environment Tierization
@matheusdba matheus@boesing.com.br
@matheusdba matheus@boesing.com.br
Consolidation
@matheusdba matheus@boesing.com.br
Consolidation
@matheusdba matheus@boesing.com.br
For Consolidation...
• Automatic Storage Management (ASM)
• Real Aplication Cluster (RAC)
• Data Guard (DG)
• Multinenant Architecture
• Resource Manager (RSMGR)
• I/O Resource Manager (IORM)
• Database Services and Modules
• Transparent Application Failover (TAF)
@matheusdba matheus@boesing.com.br
Environment Tierization
@matheusdba matheus@boesing.com.br
@matheusdba matheus@boesing.com.br
Decisions...
@matheusdba matheus@boesing.com.br
We have tools for that...
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
• OEM Consolidation Workbench
• ADDM/AWR/AWRW + SPA
• 10gR2+
• Private/Public Cloud Support
• Plan, Migrate, Validate
• Ultra Conservative x Aggressive
• DB2DB, DB2Server, OPC Consolidations
• Storage/Platform Advise
• Rules & Metrics
• DB_CPU_BOUND
• OLTP_IOPS_RECOMMEND_EXADATA
@matheusdba matheus@boesing.com.br
Planning
$ sh run_esp_master_linux.sh
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Information from each DB
@matheusdba matheus@boesing.com.br
Planning
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Choose the shape/configuration
@matheusdba matheus@boesing.com.br
Planning
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Choose the shape/configuration
• Select DB Allocation
• Sample Resource Utilization Given
@matheusdba matheus@boesing.com.br
Planning
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Choose the shape/configuration
• Select DB Allocation
• Select Instance Allocation
• Detailed info per node
@matheusdba matheus@boesing.com.br
Planning
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Choose the shape/configuration
• Select DB Allocation
• Select Instance Allocation
• Simulate Failover!!
@matheusdba matheus@boesing.com.br
Planning
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Choose the shape/configuration
• Select DB Allocation
• Select Instance Allocation
• Simulate Failover!!
• Reports
@matheusdba matheus@boesing.com.br
Planning
• eSP (Carlos Sierra)
• APEX
• Run a Script on each server
• Import the generated file to eSP
• Choose the shape/configuration
• Select DB Allocation
• Select Instance Allocation
• Simulate Failover!!
• Reports
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Preparing
• Database Migration Assistant for Unicode (DMU)
@matheusdba matheus@boesing.com.br
Checking
Measuring Network Capacity using oratcptest (Doc ID 2064368.1)
• oractpcest
@matheusdba matheus@boesing.com.br
Testing
• Real Application Testing
RAT
• Database Replay
• Consolidated Database Replay
• Query Only Replay
@matheusdba matheus@boesing.com.br
Testing
• Real Application Testing
RAT
• Database Replay
• Consolidated Database Replay
• Query Only Replay
@matheusdba matheus@boesing.com.br
Testing
• Real Application Testing
RAT
• Database Replay
• Consolidated Database Replay
• Query Only Replay
@matheusdba matheus@boesing.com.br
Testing
• Real Application Testing
RAT
• Database Replay
• Consolidated Database Replay
• Query Only Replay
@matheusdba matheus@boesing.com.br
Testing
• Real Application Testing
RAT
• Database Replay
• Consolidated Database Replay
• Query Only Replay
@matheusdba matheus@boesing.com.br
Testing
• Real Application Testing
RAT
• Database Replay
• Consolidated Database Replay
• Query Only Replay
@matheusdba matheus@boesing.com.br
Free Benchmarking Tools
@matheusdba matheus@boesing.com.br
Migration!
• Data Guard
• Simulations (flashback restore point, snapshot standby)
• Migration (switchover -> allow rollback)
• Standby First (upgrade)
• RMAN
• Offline Migration
• Keep in restore mode, stop primary and start restored DB (minimum)
• Duplicate from Primary, Create a Standby and Switchover (minimum)
• ...
• Data Pump
• Logical dump with downtime (offline, modular)
• Combined with Golden Gate (online)
• Golden Gate
• Replicate to new DB and switchover
• Bidirectional (modular, allow rollback)
@matheusdba matheus@boesing.com.br
Migration... to Cloud!
• Oracle Services
• Oracle Database Backup to Cloud Service (10gR2+, physical)
• Oracle Golden Gate Cloud Service (8i+, logical, temporary usage)
• Oracle Cloud Infrastructure Data Transfer Service (Dec/2017)
• Appliances
• Oracle Cloud Infrastructure Data Transfer Appliance (Jul/2018)
• AWS Snowball
• 50TB/$200/10days + $15 per extra day
@matheusdba matheus@boesing.com.br
12C - Reduce Transportable Tablespace Downtime using Cross Platform
Incremental Backup (Doc ID 2005729.1) Roy F. Swonger
@matheusdba matheus@boesing.com.br
Conclusion
• Have Checklist
• Define scope of change and change it no more!
• Engage the right people and do it right
• Hope the best but prepare to worst
• Cover your back
• Document everything
• Measure as much as you can
• Know the strategy: What do you have? What do you want?
• Use Oracle features and products in your behalf
• Consider external tools and services
• Barely everything you need is possible, you just need the right tools and strategy.
• Any migration is unique and unrepeatable.
@matheusdba matheus@boesing.com.br
@matheusdba
linkedin.com/in/matheusboesing/
matheus@boesing.com.br