database management for dba 2 - oracle · dba 1.0 dba 2.0 1. configure proxy and metalink...
Post on 14-Mar-2020
38 Views
Preview:
TRANSCRIPT
Database Management for DBA 2.0
蒋翔宇高级技术顾问Oracle Corporation
Top DBA Challenges
Performance ManagementSustain Optimal
Performance
Change Management Preserve Order Amid Change
Ongoing Administration Manage More with Less
Manageability Evolution
Adaptive
Auto-Tuning
Integrated
Advisory
Low-Impact
Instrumentation
Manageability EvolutionContinuous Improvement
26% Less Time 31% Fewer Steps
0%
25%
50%
75%
100%
Time
Oracle9i Database
Oracle Database 10g
Oracle Database 11g
Steps
Top DBA Challenges
Performance Management
Sustain Optimal Performance
Performance Diagnostics
Application Tuning
Change Management Preserve Order Amid Change
Ongoing Administration Manage More with Less
SQL
Advisor
High-load
SQL
IO / CPU
issues
RAC
Issues
Automatic Diagnostic Engine
Snapshots in
Automatic Workload
Repository
Self-Diagnostic Engine
System
Resource
Advice
Network +
DB config
Advice
• Top Down Analysis Using
AWR Snapshots
• Classification Tree - based on
decades of Oracle
performance tuning expertise
• Performance expert, now a
RAC Specialist too in 11g
• Real-time results
• Don’t need to wait hours to
see the results
• Pinpoints root cause
• Distinguishes symptoms
from the root cause
• Reports non-problem areas,
e.g., I/O is not a problem
Automatic Performance DiagnosticsAWR and ADDM
Detecting Performance
Problems & Identifying
Bottlenecks
Demo
Managing Hardware and
Software Configurations
Demo
DBA 1.0 DBA 2.0
1. Review ADDM recommendations
2. ADDM recommends use of cursor_sharing
1. Examine system utilization
2. Look at wait events
3. Observe latch contention
4. See wait on shared pool and library cache latch
5. Review v$sysstat
6. See “parse time elapsed” > “parse time cpu” and #hard parses greater than normal
7. Identify SQL by..
i. Identifying sessions with many hard parses and trace them, or
ii. Reviewing v$sql for many statements with same hash plan
8. Examine and review SQL
9. Identify “hard parse” issue by observing the SQL contains literals
10. Enable cursor sharing
Performance Diagnostics: DBA 1.0 vs. 2.0Scenario: Hard Parse Problems
Top DBA Challenges
Performance Management
Sustain Optimal Performance
Performance Diagnostics
Application Tuning
Change Management Preserve Order Amid Change
Ongoing Administration Manage More with Less
Automatic SQL Tuning
• Automatic SQL Tuning
• Captures high-load SQL
• Tunes SQL using SQL
Profiles
• Implements greatly improved
SQL plans (optional)
• Performance benefit of advice
provided
• SQL Profiling tunes execution
plan without changing SQL text
• Enables transparent tuning for
packaged applications
Well-Tuned SQL
High-Load SQL
CustomApps
PackagedApps
Auto SQL
Tuning
Automatic Tuning Optimizer
Auto SQL
Analysis
Access
Analysis
Packaged Apps + SQL Profile
Customizable Apps + SQL Advice
Customizable Apps + Indexes & MVs +
Partitions
Recommendations Include:New Indexes, Statistics Update,
SQL Restructuring and SQL Profiling
• Automatically monitors long running SQL
• Enabled out-of-the-box with no performance impact
• Monitors each SQL execution
• Exposes monitoring statistics
• Global execution level
• Plan operation level
• Parallel Execution level
• Guides tuning efforts
Real-Time SQL MonitoringLooking inside SQL Execution
Real-Time SQL Monitoring
Demo
Managing Hardware and
Software Configurations
Demo
1. Get explain plan
2. Examine query objects and their sizes
3. Review and compare explain plan statistics
with execution statistics (stored in V$SQL
view)
4. Identify the problem, e.g., “first rows” issue
because only recent data is ever displayed
despite large history being queried
5. Contact application vendor
6. Produce test case for vendor
7. Get a patch with appropriate code
modifications from the vendor
8. Install the patch in next maintenance cycle
DBA 1.0 DBA 2.0
Automatic (SQL is tuned
automatically by Automatic
SQL Tuning)
SQL Tuning: DBA 1.0 vs. 2.0 Scenario: Tuning Problem SQL
Top DBA Challenges
Performance ManagementSustain Optimal
Performance
Change Management
Preserve Order Amid Change
Change Detection
Change Testing
Change Automation
Ongoing Administration Manage More with Less
Detecting Configuration and
Application Changes
• Ensures system compliance with company
standards
• Detects unauthorized (malicious) changes
• Configuration changes
• ~ 300 out-of-box policies per Oracle “best practices”
• Monitor compliance continuously
• Compliance score reflecting degree of
compliance (0-100%)
• Notification based on non-compliance
• Application changes
• Schema compare capability help identify
• Malicious SQL
• Unauthorized access control changes
• Changes to tables, procedures, triggers, functions
• New/dropped indexes, etc.
Security
Monitor Policies
Reports
Compare
Dell Corporation
Change and Configuration
Management
Video
Dell Corporation
Compliance and
Configuration
Video
DBA 1.0 DBA 2.0
1. Identify databases, test and production
2. Get access to application schema
3. Write script to get table column parameters
4. Run script on first database
5. Run script on second database
6. Visually compare results
7. Write new script for indexes
8. Re-run script
9. Repeat for all other database objects
10. Generate a report listing changes
11. Write script to apply changes
12. Apply changes
13. Repeat above steps to verify changes
14. Re-run this for training and production
15. Re-run this for development and production
Change Detection: DBA 1.0 vs. 2.0Scenario: Compare Test and Production Schema
1. Run Dictionary Comparison job
2. Identify all schema and initialization parameters differences in report
Top DBA Challenges
Performance ManagementSustain Optimal
Performance
Change Management
Preserve Order Amid Change
Change Detection
Change Testing
Change Automation
Ongoing Administration Manage More with Less
Testing Change with Real Application Testing
Benefits
• Reduces risk of new technology adoption
• Reduces time for effective testing from weeks to days
Features
• Database Replay
• SQL Performance Analyzer
Change Assurance for
• Database and O/S upgrades
• Configuration changes, e.g., conversion from SI to RAC
• Storage changes
• O/S migrations, e.g., Windows to Linux
Now Supports Upgrades from Oracle 9iR2 to
10gR2 and 11g!
Database Replay
• Capture Workload in Production
• Capture full production workload with real load, timing & concurrency characteristics
• Move the captured workload to test system
• Replay Workload in Test
• Make the desired changes in test system
• Replay workload with full production characteristics
• Analyze & Report
• Errors
• Data divergence
• Performance divergence
Analysis & Reporting
1
2
3
Replay
Analyze & Remediate
Capture
Why SQL Performance Analyzer (SPA)?
• Businesses want systems that are performant and meet SLA’s
• SQL performance regressions are #1 cause of poor system performance
• Solution for proactively detecting all SQL regressions resulting from changes not available
• DBA’s use ineffective and time-consuming manual scripts to identify problems
SPA identifies all changes in SQL performance before impacting users
……
ClientClient
…Client
Capture SQL
• Test impact of change on SQL query performance
• Capture SQL workload in production including statistics & bind
variables
• Re-execute SQL queries in test environment
• Analyze performance changes – improvements and regressions
Middle Tier
Storage
Oracle DB
Re-execute SQL Queries
Production*
Test
Use SQL Tuning Advisor to tune regression
SQL Performance Analyzer
* Note SPA can also be run on production system for some changes
DBA 1.0 DBA 2.0
Change Testing: DBA 1.0 vs. 2.0Scenario: Testing Oracle E-Business Suite
Total Testing Time
Number of Steps LoadRunner (Days)
Install & Setup 24
Understand Application
Usage
20
Identify Key Transactions 20
Develop Test Scripts 80
Run Test 5
Total 149 Days
Total Testing Time
Number of Steps DB Replay (Days)
Install & Setup 4
Understand Application
Usage
0
Identify Key Transactions 0
Develop Test Scripts 2
Run Test 5
Total 11 Days
DBA 1.0
30 weeksDBA 2.0
2 weeks
Challenge Solution Approach Benefit
• Reduced testing time from
21 to 2 days for each
release
• Faster and higher quality
testing
• Faster adoption and
certification of newer
features
• Certify EBS release 11iR12 against Oracle Database 11g
• Complex & large workload: More than 650Kunique SQL statements need to be validated
• Ensure application optimized for Oracle Database 11g
• Difficult to perform realistic and efficient testing with previous (home-grown) tools
• SQL Performance
Analyzer to run regression
tests and identify
performance deviations
• Regressions reported to
base development for
fixes
Oracle E-Business Suite Certification
Top DBA Challenges
Performance ManagementSustain Optimal
Performance
Change Management
Preserve Order Amid Change
Change Detection
Change Testing
Change Automation
Ongoing Administration Manage More with Less
Metalink Analyze
Stage
Verify
Analyze
Corporate DMZ
Metalink
Analyze
Stage
Analyze
Promote
Patch
TestReport
Analyze
Corporate DMZ
Software Change Management: Patching
•Oracle Metalink connection
•Proactive advisories
•CPUs
•Feature based
•Patch downloads
•Patch Database
•Patch/CPU/Patchset
•Zero downtime patching for RAC
•Lights-out patching for Linux
•Automatic download from Oracle ULN
Enterprise Manager
Automated Patch Management
• Benefits
• Simple, Accurate, Reliable maintenance of Oracle systems
• Reduce possibility of errors and improve reliability
• Fewer errors and faster patching
• Patch and maintain systems while providing higher quality of service
• Functionality/Capability/What’s new
• Out-of-box best practice driven patching of single instance and RAC
databases, AS midtier and custom (BPEL and SOA Apps)
• Support for interim patches, patchsets and CPUs
• Metadata driven patch prerequisites
• Rolling support for RAC/ASM/Clusterware patching
• Continued Live update of best practices from Metalink
• Support for sudo and PAM based authentication
Simple, Accurate, Reliable Maintenance of Distributed Systems
Database Patching: DBA 1.0 vs. 2.0 Scenario: Applying Critical Patch to all Enterprise Databases
DBA 1.0 DBA 2.0
1. Configure Proxy and Metalink
credentials (also possible
during installation)
2. Go to deployments page
3. Select DB Patching procedure
4. Select patch
5. Select target(s) from a list of
candidate targets
6. Schedule
1. Download patch from Metalink
2. Logon as the OS user
3. For every ORACLE_HOME
i. Stage patch
ii. Set environment variables recursively (ORACLE_HOME, ORACLE_SID, etc)
iii. Shutdown listener
iv. Shutdown database
v. Run opatch
vi. For every database
a) Startup database in upgrade mode
b) Apply dictionary changes
c) Compile database objects
d) Validate existence of no invalid objects
e) Shutdown instance
f) Startup database in normal mode
vii. Startup listener
viii. Verify patch
4. Repeat process for each server
Top DBA Challenges
Performance ManagementSustain Optimal
Performance
Change Management Preserve Order Amid Change
Ongoing Administration
Manage More with Less
Installation and Configuration
Routine Maintenance
Deployment Automation
• Gold image based provisioning
• Greatly simplify RAC provisioning
with automation
• Single click RAC scale-out and
scale-back
• Provision full RAC and
Clusterware systems
• Configures entire stack
• Pre-requisite checks &
automatic fix-upsCreate Production
RAC System
21
Scale-Out RAC
Create Reference RAC System
1
Stage Gold Image
4 3
LAST_NAME SSN SALARY
AGUILAR 203-33-3234 40,000
BENSON 323-22-2943 60,000
D’SOUZA 989-22-2403 80,000
FIORANO 093-44-3823 45,000
LAST_NAME SSN SALARYANSKEKSL 111—23-1111 40,000
BKJHHEIEDK 111-34-1345 60,000
KDDEHLHESA 111-97-2749 80,000
FPENZXIEK 111-49-3849 45,000
Production
CloneClone Test
Mask
Staging
Benefits
Deploy secure test system by masking sensitive data
Eliminate risk of moving sensitive data to dev & test environments
No impact on production database
Leverage masking templates for common data types
Mask related columns in the same way
Secure Test System Deployment
Top DBA Challenges
Performance ManagementSustain Optimal
Performance
Change Management Preserve Order Amid Change
Ongoing Administration
Manage More with Less
Installation and Configuration
Routine Maintenance
Routine Maintenance
Locally Managed Tablespace
Automatic Segment Space Management
Online Segment Shrink
Automatic Memory Management
Automatic Storage Management
Resource Management
Automatic Statistics Collection
Automatic SQL Tuning
SQL Plan Management
Statistics Versioning
SQL Optimization
Automated Backups
Flash Recovery Area
Data Recovery Advisor
Fast Incremental Backups
Flashback Transaction
Flashback Query
Flashback Database
Backup & Recovery
Support Workbench
Automatic Diagnostic Repository
Incident PackagingService
Test Case Builder
Automated Health Checks
Fault Diagnostics
Nokia:
Saving Time and Effort
Video
Nokia:
Saving Time and Effort
Video
Database Management for DBA 2.0
Maintain Service Levels by Optimizing
Performance
Reduce Outages While Managing Change
Reducing Administration Costs Through
Self-Management and Automation
Oracle Helps You Maximize Customer Value
Avoids online revenue losses up to 25%
Cuts configuration management effort by 90%
Saves weeks on application testing time
Replaces manual tools with automation; saves time by 50%
Deploys SOA infrastructure 92% faster
Saves 80% time and effort for managing Databases
Improves IT productivity by 25%
Drives asset utilization up by 70%
Reduces Database testing time by 90%
Reduces provisioning effort by 75%
Saves $1.9 millionwith Oracle Enterprise Manager
Saves $170,000 per year with Oracle Enterprise Manager
Delivers 24/7 uptime with Oracle Enterprise Manager
Cuts application testing from weeks tohours
Reduces critical patching time by 80%
•Try Oracle Enterprise Manager
• Order DVD online at www.oracle.com/enterprisemanager/
•Download products, read technical information
• http://www.oracle.com/technology/software/products/oem/
Next Steps
top related