Вы находитесь на странице: 1из 29

11g Database Manageability

Memory Management AWR Baselines Automatic SQL Tuning Advisors Upgrade Considerations

Memory Management in 10g/11g


11g Automatic Memory Management
MEMORY_TARGET MEMORY_MAX_TARGET Improves memory utilization Eases memory management

10g Automatic Shared Memory Management (ASMM)


SGA_TARGET Key shared memory components tuned automatically Single parameter controls all shared memory

10g Automatic PGA Memory Management


PGA_AGGREGATE_TARGET Various PGA sort areas tuned automatically Single parameter controls all PGA memory

Automatic Memory Management in 11g


O/S Memory O/S Memory SGA

Unifies system (SGA) and process (PGA) memory management Dynamic parameters for all database memory:
0(025<B7$5*(7 0(025<B0$;B7$5*(7

SGA

PGA PGA

Automatically adapts to workload changes Maximizes memory utilization Available on:


Linux Windows Solaris HPUX AIX

Memory Target Benefits


Balances dynamic memory needs of SGA and PGA
Previously either or both could end up undersized PGA can grow but not to the detriment of SGA performance Best-effort memory transfers Tunable PGA can help relieve 4031 from SGA

Built-in safety nets:


Decides victim components Paced memory donation avoids thrashing Run-away workload cannot starve resources Component-specific settings still honored

11g Database Manageability


AWR Baseline and Adaptive Thresholds

Performance Monitoring and Baselines


Performance Page shows certain metrics against 99th percentile over selected baseline Adaptive Thresholds over select system metrics
Enabled by System Moving Window baseline

AWR Compare Period Report


Use Baseline as one of the periods

Other Baselines Features


Baseline Templates enable future Baseline creation
Pre-specify known interesting times, e.g. Thanksgiving

System Moving Window Baseline


Always available Defined by AWR retention or user specified Adaptive thresholds computed over this baseline

Creating Single AWR Baseline

Quick Configure Adaptive Thresholds

Adaptive Thresholds

Adaptive threshold values follow baseline values

AWR Baseline

11g Database Manageability


Automatic SQL Tuning

Manual SQL Tuning Challenges


Complex - requires expertise in several domains
SQL optimization: adjust the execution plan Access design: provide fast data access SQL design: use appropriate SQL constructs

Time consuming
Each SQL statement is unique Potentially large number of statements to tune

Never ending task


SQL workload always evolving Plan regressions can happen

SQL Tuning in Oracle Database 10g


Implement Evaluate Recommendations

Workload

DBA

DBA Generate Recommendations

one hour

DBA

ADDM AWR
SQL Tuning Candidates

Invoke Advisor

SQL Tuning Advisor


Some meaningful automation, but the DBA is still required

SQL Tuning Automation in 11g


Fully automatic SQL Tuning task
Runs automatically under Autotask framework: Maintenance Window, CPU resource controlled, on/off switch Identifies, ranks and tunes candidate SQL Leverages SQL Tuning Advisor

Candidate SQL automatically chosen


Excluded: parallel queries, DML/DDL, recursive, ad-hoc (infrequent)

Tests and (optionally) implements SQL profiles


Only implements significantly improved plans (3x) Time budgeted to avoid run-away plans

Automatic SQL Tuning in Oracle Database 11g


Implement SQL Profiles Test SQL Profiles

Workload
Generate Recommendations

Choose Candidate SQL


one week

SQL Tuning Candidates

Its Automatic!

AWR
DBA

View Reports / Control Process

Result Summary

Result Details

Result Recommendations

11g Database Manageability


SQL Access Advisor

SQL Access Advisor: Partition Advice


SQL Access Advisor SQL cache Hypothetical STS Filter Options Complete Workload

Hash partitions? Interval partitions?

Indexes

Materialized views

Materialized Partitioned views log objects

10

SQL Access Advisor Results

Access Advisor Recommendations

11

Editable implementation script

11g Database Manageability


Fault Diagnostic Automation

12

Oracle Database 11g R1 Fault Diagnostic Automation


Goal: Reduce Time to Problem Resolution
Realistic Testing and Automatic Health Checks

Automatic Diagnostic Workflow

Intelligent Resolution

Proactive Patching

Diagnostic

Solution

Delivery

Prevention

Resolution

Automatic Diagnostic Workflow


Critical Error Automatic Diagnostic Repository

DBA
Auto incident creation First failure capture Alert DBA Targeted health checks Assisted SR filling

No

DBA

Known bug?
Yes

EM Support Workbench: Package incident info Data Repair

EM Support Workbench: Apply patch / Data Repair

DBA

13

Problems and Incidents


Problems are fundamental code or configuration issues that can cause execution failures
They exist until they are corrected, e.g by patch They are assigned a signature-based key value

An incident is a single occurrence of a problem


They happen at point(s) in time and thus have timestamps They induce diagnostic actions like dumps and traces They are managed by ADR and packaged by IPS

Automatic Diagnostic Repository


DIAGNOSTIC_DEST BACKGROUND_DUMP_DEST CORE_DUMP_DEST USER_DUMP_DEST $ORACLE_HOME/log ADR Base diag

Support Workbench

$ORACLE_BASE

rdbms DB Name ADR Home SID metadata

alert

cdump incpkg incident

hm

trace

(others)

incdir_1

incdir_n

ADRCI
log.xml alert_SID.log

V$DIAG_INFO

14

Important points about ADR


Location of traces and dumps has changed
See V$DIAG_INFO for new locations Symbolic links can provide work around for script compatibility

Format of alert.log is changed


New XML format more parse-able Old style still available for backward compatibility

Space management
Incident flood control minimizes number of traces ADR auto-purging reduces disk footprint

Incident Packaging Service (IPS)


IPS automates packaging of diagnostic data for given problem Creates zip files from incident package contents for sending to Oracle Support Intelligently correlates and includes dumps and traces from related incidents
Correlation rules based on time proximity, client id, error code

Recommends further diagnostic actions for DBA


For example build SQL test case

DBAs can explicitly add/edit or remove files before packaging


Including non-ADR managed files

15

EM Support Workbench Overview


Primary customer-facing interface into IPS and ADR Task-oriented interface over problems and incidents
View problem and incident details Create and manage IPS packages Run health checks or generate additional diagnostic data Run advisors to help resolve problems

Linkages to Oracle Support


Generate and send incident package files using OCM Create and track Metalink service requests from problem Close problem SR once resolved

EM Support Workbench

16

Package details and IPS in EM

EM Support Workbench Quick Package


Simple wizard workflow from problem through package and send to support
Single-problem package Good for rapid first fault reporting

Limitations
Package zip must be 2GB or less Cannot scrub traces or customize package

17

Prevention: Health Monitoring


Proactive Health Checks
E.g. Dictionary Validation

Reactive Checks
Trigger on error via Intelligent dumping Rules E.g. Checks blocks around corrupted block

All Checks can be Activated on Demand Incident Meter for EM

Intelligent Repair Advisors


Data Recovery Advisor
Guided expert data recovery system using diagnostic data and Health Check output

SQL Test Case Builder


Automatically retrieves exact environment information from ADR to build SQL test cases and replicate SQL issues

SQL Repair Advisor


Analyzes failing SQL statements to isolate bug May recommend SQL Patch as work around

18

Data Recovery Advisor

Data Recovery Advisor


Oracle Database tool that automatically diagnoses data failures, presents repair options, and executes repairs at the user's request Determines failures based on symptoms
E.g. an open failed because datafiles f045.dbf and f003.dbf are missing Failure Information recorded in diagnostic repository (ADR) Flags problems before user discovers them, via automated health monitoring

Intelligently determines recovery strategies


Aggregates failures for efficient recovery Presents only feasible recovery options Indicates any data loss for each option

Can automatically perform selected recovery steps Reduces downtime by eliminating confusion

19

Data Recovery Advisor Enterprise Manager Support

SQL Test Case Builder

20

SQL Test Case Builder


Business Requirement Bug resolution
Test case required for fast bug resolution

Not always easy to provide a test case


What information should be provided? How much data is need?

Getting the test case to Oracle can be tricky Solution Oracle automatically creates a test case Collects necessary information relating to a SQL incident Collected data is packaged to be sent to Oracle Collected data allows a developer to reproduce the problem

SQL Repair Advisor

21

SQL Repair Advisor


Business Requirement
y

y y

The most common types of SQL problems - exception, performance regression etc., are hard to diagnose A lot of time is spent trying to reproduce the problem If a workaround is found it has to be applied to entire system

Solution Advisor
Investigates the incident locally Automatically determines the root cause Provides a workaround (SQL Patch) for just the effected SQL If not, sends necessary diagnostic information to Oracle

SQL Repair Advisor Flow


SQL statement Execute Statement crashes Generate incident in ADR automatically

Trace files SQL Repair Advisor investigates DBA run SQL Repair Advisor DBA gets alerted Statement executes successfully again Execute

DBA
DBA accept SQL patch

SQL patch generated

SQL statement patched

22

DB Management Pack Enhancements


Diagnostic Pack
ADDM for RAC AWR Baselines and Adaptive Thresholds Transportable AWR

Tuning Pack
Automatic SQL Tuning Advisor Partition Advisor Real-time SQL Monitoring SQL Plan Management and Plan Evolution

Upgrade Considerations

23

New Background Processes in 11g


Process Name
ACMS

Description
In an RAC environment, this per-instance process (Atomic Controlfile to Memory Service) is an agent which contributes to ensuring a distributed SGA memory update is either globally committed on success or globally aborted in the event of a failure.

Found
RAC

DIA0

Responsible for hang detection and deadlock resolution.

ALL

DIAG DBRM

Performs diagnostic dumps and executes global oradebug commands.

ALL ALL ALL with any registered event activity (optional non-fatal)

The Resource Manager process is responsible for setting Resource Plans and other Resource Manager related tasks. The Event Monitor Coordinator coordinates the event management and notification activity in the database which includes Streams Event Notifications, Continuous Query Notifications and Fast Application Notifications.

EMNC / e0xx

FBDA

The process archives historical rows for tracked tables into flashback data archives and manages the flashback archives.

ALL.

GMON

Maintains disk membership in ASM disk groups

ASM

GTX0-j

Provides transparent support for XA global transactions in a RAC environment. The database autotunes the number of these processes based on the workload of XA global transactions.

RAC only

New Background Processes in 11g


Process Name
KATE

Description
Performs proxy I/O to an ASM metafile when a disk becomes offline.

Found
ASM, spawned on demand.

MARK

Marks ASM Allocation Units as stale following a missed write to an offline disk.

ASM, spawned on demand.

PSP0

Spawns Oracle processes.

ALL

RMSn

The RAC Management Processes perform manageability tasks for RAC, e.g. creation of RAC related resources when new instances are added to the clusters In a RACenvironment, this process manages background slave process creation and communication on remote instances. These background slave processes perform tasks on behalf of a coordinating process running in another instance. The space management coordinator process coordinates the execution of various space management related tasks, such as proactive space allocation and space reclamation. It dynamically spawns slave processes (Wnnn) to implement the task. The Virtual Keeper of TiMe is responsible for providing a Wall-Clock time (updated every second) and Reference-Time Counter (updated every 20ms and available only when running at elevated priority).
?

RAC only

RMSN

RAC only

SMCO / Wnnn

ALL (optional nonfatal)

VKTM

ALL

24

Oracle Database 11g Release 1 Upgrade Paths


Direct upgrade to 11g is supported from 9.2.0.4 or higher, 10.1.0.2 or higher, and 10.2.0.1 or higher. If you are not at one of these versions you need to perform a double-hop upgrade For example: 7.3.4 -> 9.2.0.8 -> 11.1 8.1.7.4->9.2.0.8->11.1

Choose an Upgrade Method


Database Upgrade Assistant (DBUA) Automated GUI tool that interactively steps the user through the upgrade process and configures the database to run with Oracle Database 11g Release 1 Manual Upgrade Use SQL*Plus to perform any necessary actions to prepare for the upgrade, run the upgrade scripts and analyze the upgrade results Export-Import Use Data Pump or original Export/Import CREATE TABLE AS SQL statement

25

Oracle Database 11g Installation Changes


Addition of new products to the install SQL Developer Movement of APEX from companion CD to main CD Warehouse Builder (server-side pieces) Oracle Configuration Management (OCM) New Transparent Gateways Removal of certain products and features from the installation: OEM Java Console Oracle Data Mining Scoring Engine Oracle Workflow iSQL*Plus

Fine Grained Access Control for Utl_TCP and its cousins


Challenge
Oracle Database provides packaged APIs for PL/SQL subprograms to access machines (specified by host and port) using bare TCP/IP and other protocols built on it (SMTP and HTTP) Utl_TCP, Utl_SMTP, Utl_HTTP If you have Execute on the package, you can access ANY host-port

Solution
an Access Control List (ACL) specifies a set of users and roles you assign an ACL to a host and port range you may need to explicitly grant this access in 11.1

26

Case Sensitive Password


By default:
Default password profile is enabled Account is locked after 10 failed login attempts

In upgrade:
Passwords are case insensitive until changed Passwords become case sensitive by ALTER USER

On creation:
Passwords are case sensitive

Review:
Scripts Database links with stored passwords Consider backward compatibility parameter, SEC_CASE_SENSITIVE_LOGON

Log files changes


Automatic Diagnostic Repository
$ORACLE_BASE/diag

alert.log
xml format $ORACLE_BASE/diag/rdbms/orcl/orcl/alert/log.xml adrci> show alert tail RP: $ORACLE_BASE/diag/rdbms/<dbname>/trace/alert_SID.log

27

Moving On
RBO Still there, same behavior as 10.2, but even move tools to ease the move
SQL performance analyzer SQL plan management

Moving On
These deprecated features / privileges are still available for backward compatibility but the recommendation is to move on
Stored Outline SQL Plan Management Ultrasearch Secure Enterprise Search CTXPath Index XML Index SYSDBA for ASM administration SYSASM

No longer supported Workflow

BPEL

28

Oracle Client / Server Interoperability


Server Client 11.1.0 10.2.0 10.1.0(#4) 9.2.0 9.0.1 8.1.7 8.1.6 8.1.5 8.0.6 8.0.5 7.3.4 Yes Yes Yes ES #5 No No No No No No No Yes Yes Yes ES #5 No Was No No No No No Yes Yes Yes ES Was Was No No No No No ES #5 ES #5 ES ES Was Was No No Was No Was No No Was Was Was Was Was No Was No Was No Was Was #2 Was Was Was Was Was Was Was Was No #3 No #3 No #3 No Was Was Was Was Was Was Was No #3 No #3 No #3 No No Was Was Was Was Was Was No #3 No #3 No #3 Was Was Was Was Was Was Was Was No #3 No #3 No #3 No No Was Was Was Was Was Was No #3 No #3 No #3 No #1 Was Was Was Was Was Was Was 11.1.0 10.2.0 10.1.0 9.2.0 9.0.1 8.1.7 8.1.6 8.1.5 8.0.6 8.0.5 7.3.4

Metalink #207303.1: Client / Server / Interoperability Support Between Different Oracle Versions

Lifetime Support Policy

Metalink #454507.1: ALERT: Oracle 11g Release 1 (11.1) Support Status and Alerts Metalink #454506.1: 11.1.0.6 Base Release - Availability and Known Issues

29

Вам также может понравиться