Oracle Database 10g  Automation Features <ul><li>Dallas Oracle Users Group - Oct. 2005  </li></ul><ul><li>Arun Kumar R. </...
Oracle Database 10g  Automation Features <ul><li>Speaker Bio </li></ul><ul><ul><li>Over a decade of database administratio...
Agenda <ul><ul><li>Introduction </li></ul></ul><ul><ul><li>Oracle Database 10g </li></ul></ul><ul><ul><li>Automation Featu...
Introduction <ul><ul><li>Until Oracle 9i, DBAs spent a lot of time on database monitoring, identifying problem areas and p...
Oracle Database 10g <ul><ul><li>Oracle Database 10g is more sophisticated and powerful, suitable for even small businesses...
Manageability Features- Overview <ul><ul><li>Automatic diagnosis of performance problems, potential or real, and subsequen...
What is Automatic Workload Repository? <ul><li>AWR, a built-in repository in every database is the central component of Or...
AWR (Continued..) <ul><li>Repository data used for analysis and as statistics for problem detection and self-tuning.  </li...
Architecture of AWR <ul><ul><li>AWR in Oracle Database 10g collects-  </li></ul></ul><ul><ul><ul><li>Time model statistics...
Active Session History  <ul><ul><li>Active Session History (ASH) contains recent session activity.  </li></ul></ul><ul><ul...
AWR Snapshots <ul><ul><li>AWR stored in Workload Repository (WR) schema.  </li></ul></ul><ul><ul><li>WR schema resides in ...
Metrics and Thresholds <ul><ul><ul><li>Metrics are a set of statistics for certain system attributes.  </li></ul></ul></ul...
Statistics Collection Process <ul><ul><ul><li>Oracle Database 10g metrics can be tracked using AWR.  </li></ul></ul></ul><...
How to use AWR reports? <ul><li>AWR reports are generated using  awrrpt.sql ,  awrrpti.sql ,  awrddrpt.sql , and  awrddrpi...
Using AWR reports -1
Using AWR reports -2
AWR reports for Comparisons
Advisory Framework <ul><ul><ul><li>Oracle Database 10g has server components called advisors to provide feedback about res...
Database Advisors <ul><ul><ul><li>Above database advisors have certain attributes in common.  </li></ul></ul></ul><ul><ul>...
Automatic Database  Diagnostic Monitor (ADDM) <ul><ul><ul><li>ADDM provides proactive and reactive features for monitoring...
ADDM Performance Monitoring  <ul><ul><ul><li>ADDM initiates the MMON process to run automatically on every database instan...
Automatic Shared Memory Management (ASMM) <ul><ul><ul><li>Commonly tuned System Global Area (SGA) components are - databas...
How does ASMM work? <ul><ul><ul><ul><li>With Automatic SGA memory management enabled, the sizes of different components ar...
Enable ASMM - EM
Memory Advisor through EM -1 <ul><ul><ul><li>Memory Advisor can be used only when the ASMM is  disabled .  </li></ul></ul>...
Memory Advisor through EM -2
Automatic Storage Management <ul><ul><ul><li>Automatic Storage Management (ASM) for efficient management of disk drives wi...
ASM Advantages <ul><ul><ul><li>In a nutshell, we can have a mixture of ASM files; Oracle managed files and manually manage...
ASM vs. Oracle 9i Storage
Automatic SQL Tuning Features <ul><ul><ul><li>SQL Tuning Advisor and SQLAccess Advisor </li></ul></ul></ul><ul><ul><ul><ul...
Using Automatic SQL Tuning tools <ul><ul><ul><li>For both tuning tools- create a task, run the Advisor, generate the recom...
SQLAccess Advisor   <ul><ul><ul><li>Used for applications with complex queries on large sets of data. </li></ul></ul></ul>...
SQL Tuning Advisor <ul><ul><ul><li>SQL Tuning Advisor provides automatic tuning advice for SQL statements.  </li></ul></ul...
SQL Tuning Advisor - STS <ul><ul><ul><li>For tuning multiple SQL statements, a SQL Tuning Set (STS) is created.  </li></ul...
Controlling a Tuning Task   <ul><ul><ul><li>Control the scope and duration of a tuning task  </li></ul></ul></ul><ul><ul><...
Deploying SQL Tuning Advisor
SQL Tuning Advisor from EM <ul><ul><li>In EM, using  Advisor Central -  SQL Tuning Advisor  link. </li></ul></ul><ul><ul><...
SQL Tuning Advisor using EM-1 <ul><ul><li>In EM,  SQL Tuning Advisor-> Top SQL  link. </li></ul></ul>
SQL Tuning Advisor using EM- 2 <ul><ul><li>Choose the SQL &  click  Run SQL Tuning Advisor </li></ul></ul>
SQL Tuning Advisor using EM-3 <ul><ul><li>Select  Scope </li></ul></ul><ul><ul><li>Choose  </li></ul></ul><ul><ul><li>Sche...
SQL Tuning Advisor using EM-4 <ul><ul><li>When the SQL Tuning task’s status is  COMPLETED,  select the task and click  Vie...
SQLAccess Advisor   <ul><ul><ul><li>SQLAccess Advisor  </li></ul></ul></ul><ul><ul><ul><ul><li>Will recommend a combinatio...
Executing the Task  <ul><ul><ul><li>Create a task and link to a workload. </li></ul></ul></ul><ul><ul><ul><li>Use the DBMS...
Implementing SQLAccess Advisor Recommendations <ul><ul><ul><li>SQL Access Advisor creates a set of recommendations. </li><...
Advisor Task Implementation-EM-1
Advisor Task Implementation-EM-2
Advisor Task Implementation-EM-3
Advisor Task Implementation-EM-4
Deploying SQLAccess Advisor
Uses for SQLAccess Advisor <ul><ul><ul><li>Generally used in large database/data warehouse environments.  </li></ul></ul><...
Server Generated Alerts <ul><ul><ul><li>A server-generated alert is a notification message from the server of an impending...
Server Generated Alerts <ul><ul><ul><li>Threshold levels can be internally set, customer defined, or customer altered from...
When you get an alert ! <ul><li>Follow the recommendations it provides. </li></ul><ul><li>Run ADDM or another advisor as n...
Alerts Management Using EM <ul><ul><ul><li>Alerts can be managed using Oracle Enterprise Manager console.  </li></ul></ul>...
Alerts Management Using EM -1
Alerts Management Using EM -2
Alerts Management Using EM -3
Alerts Management Using EM -4
Clearing of Alerts <ul><ul><ul><li>Oracle clears most of the alerts automatically when the cause of the alert disappears. ...
Data Pump <ul><li>New high-speed infrastructure for data and metadata movement called Data Pump a.k.a.  DBMS_DATAPUMP .  <...
Data Pump Architecture
Data Pump Benefits <ul><li>Detach from a long running job and reattach with out affecting the job.  </li></ul><ul><ul><li>...
Grid Control <ul><li>A web-based system for managing Oracle products, host systems, and applications. </li></ul><ul><li>Un...
Grid Control & Schematic
Security Features - Overview <ul><li>Oracle Security features include </li></ul><ul><ul><li>Virtual Private Database (VPD)...
Security Features (continued..)  <ul><li>Transparent Data Encryption </li></ul><ul><ul><li>Encrypts data.  </li></ul></ul>...
Recoverability Features <ul><li>Flashback features for quick and efficient recovery from human errors </li></ul><ul><ul><l...
Recovery Manager (RMAN) <ul><li>RMAN available as command-line and EM for backups and recovery. </li></ul><ul><li>Flash Re...
Wrapping it up -1 <ul><ul><ul><li>A quick overview of the automatic manageability features of  Oracle Database 10g. </li><...
Wrapping it up -2 <ul><ul><ul><li>Use the security features of  Oracle Database 10g along with proper planning to make you...
Better Life with Oracle 10g Manageability features <ul><ul><li>Improve the performance of mission critical applications </...
Thank you   <ul><li>References  </li></ul><ul><ul><li>Oracle Database 10g Insider Solutions,  Sams Publishing, Sep. 2005 <...
Upcoming SlideShare
Loading in …5
×

DOUG_10g_Auto_v11.ppt

683 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
683
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
27
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

DOUG_10g_Auto_v11.ppt

  1. 1. Oracle Database 10g Automation Features <ul><li>Dallas Oracle Users Group - Oct. 2005 </li></ul><ul><li>Arun Kumar R. </li></ul><ul><li>Cingular Wireless </li></ul>
  2. 2. Oracle Database 10g Automation Features <ul><li>Speaker Bio </li></ul><ul><ul><li>Over a decade of database administration and architecture experience in Oracle technologies. </li></ul></ul><ul><ul><li>Author of Oracle Database 10g Insider Solutions , Sams Publishing, Aug. 2005 and Easy Oracle Automation , Rampant TechPress, Dec. 2004. </li></ul></ul><ul><ul><li>Columnist on Oracle Data Strategies in Database Trends and Applications Journal (www.dbta.com) </li></ul></ul><ul><ul><li>Executive Editor, IOUG Select Journal (www.ioug.org/select) </li></ul></ul>
  3. 3. Agenda <ul><ul><li>Introduction </li></ul></ul><ul><ul><li>Oracle Database 10g </li></ul></ul><ul><ul><li>Automation Features </li></ul></ul><ul><ul><li>Grid Control </li></ul></ul><ul><ul><li>Security & Recoverability </li></ul></ul><ul><ul><li>Wrapping it up </li></ul></ul><ul><ul><li>Q & A </li></ul></ul>
  4. 4. Introduction <ul><ul><li>Until Oracle 9i, DBAs spent a lot of time on database monitoring, identifying problem areas and performance bottlenecks </li></ul></ul><ul><ul><li>DBA tasks focused on </li></ul></ul><ul><ul><ul><li>System Resources </li></ul></ul></ul><ul><ul><ul><li>Storage management </li></ul></ul></ul><ul><ul><ul><li>Space Management </li></ul></ul></ul><ul><ul><ul><li>Application and SQL tuning </li></ul></ul></ul><ul><ul><ul><li>Fixing Security Issues </li></ul></ul></ul><ul><ul><ul><li>Backup and Recovery Management. </li></ul></ul></ul>
  5. 5. Oracle Database 10g <ul><ul><li>Oracle Database 10g is more sophisticated and powerful, suitable for even small businesses. </li></ul></ul><ul><ul><li>Get an overview of all the major automatic features of Oracle Database 10g. </li></ul></ul><ul><ul><li>Review improved Enterprise Manager and Grid Control. </li></ul></ul><ul><ul><li>Learn how Database Administrators can easily automate many administrative routines. </li></ul></ul><ul><ul><li>Let us dive into the details. </li></ul></ul>
  6. 6. Manageability Features- Overview <ul><ul><li>Automatic diagnosis of performance problems, potential or real, and subsequent correction </li></ul></ul><ul><ul><ul><li>by Automatic Statistics Collection and Retention using the new Automatic Workload Repository. </li></ul></ul></ul><ul><ul><li>Automatic Database Diagnostic Monitor (ADDM) </li></ul></ul><ul><ul><li>Automatic Shared Memory Management (ASMM) </li></ul></ul><ul><ul><li>Automatic Storage Management (ASM) </li></ul></ul><ul><ul><ul><li>helps to add and remove storage as needed and improve the I/O on various disks </li></ul></ul></ul><ul><ul><li>Automatic SQL Tuning features. </li></ul></ul><ul><ul><li>Better Data Movement, Security, Backup & Recoverability features </li></ul></ul>
  7. 7. What is Automatic Workload Repository? <ul><li>AWR, a built-in repository in every database is the central component of Oracle Database 10g manageability infrastructure. </li></ul><ul><li>Provides services to the database to access, collect, process, and maintain performance statistics on various functionalities within the database. </li></ul><ul><li>At regular intervals (60 minutes), Oracle Database 10g takes snapshots of all vital statistics and workload data </li></ul><ul><li>Stores them in the repository for a period of seven days. </li></ul>
  8. 8. AWR (Continued..) <ul><li>Repository data used for analysis and as statistics for problem detection and self-tuning. </li></ul><ul><li>Used for system level and user level analysis. </li></ul><ul><li>AWR is the basis for all self-management functionalities of the database. </li></ul><ul><li>Gives the Oracle Database with the historical perspective on its usage. </li></ul><ul><li>AWR has report generation mechanism to produce summary reports based on database statistics. </li></ul><ul><li>Very similar to STATSPACK in previous database versions, but a lot convenient to use ! </li></ul>
  9. 9. Architecture of AWR <ul><ul><li>AWR in Oracle Database 10g collects- </li></ul></ul><ul><ul><ul><li>Time model statistics </li></ul></ul></ul><ul><ul><ul><li>Object statistics </li></ul></ul></ul><ul><ul><ul><li>Session and system statistics in v$sesstat and v$sysstat </li></ul></ul></ul><ul><ul><ul><li>Optimizer statistics </li></ul></ul></ul>
  10. 10. Active Session History <ul><ul><li>Active Session History (ASH) contains recent session activity. </li></ul></ul><ul><ul><li>Memory for ASH comes from the SGA, fixed for the instance lifetime. </li></ul></ul><ul><ul><li>ASH samples the v$session view every second and records the events the active sessions are waiting for. </li></ul></ul><ul><ul><li>ASH statistics can be viewed from v$active_session_history, o ne row for each active session per sample with the latest session rows first. </li></ul></ul><ul><ul><li>Contents of v$active_session_history flushed to disk as part of the AWR snapshot process. </li></ul></ul>
  11. 11. AWR Snapshots <ul><ul><li>AWR stored in Workload Repository (WR) schema. </li></ul></ul><ul><ul><li>WR schema resides in the SYSAUX tablespace. </li></ul></ul><ul><ul><li>A snapshot is a set of performance statistics captured at a certain time in the database. </li></ul></ul><ul><ul><ul><li>Used for computing the rate of change of a statistic. </li></ul></ul></ul><ul><ul><ul><li>Identified by unique snapshot sequence # (snap_id). </li></ul></ul></ul><ul><ul><ul><li>Generated every 60 minutes by default. </li></ul></ul></ul><ul><ul><ul><li>interval parameter to change snapshot frequency. </li></ul></ul></ul><ul><ul><li>Manual snapshots can be taken using the database control or a PL/SQL procedure. </li></ul></ul>
  12. 12. Metrics and Thresholds <ul><ul><ul><li>Metrics are a set of statistics for certain system attributes. </li></ul></ul></ul><ul><ul><ul><ul><li>Calculated and stored by the Automatic Workload Repository (AWR). </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Results displayed in Enterprise Manager through the All Metrics page under Related Links on the Database Home page. </li></ul></ul></ul></ul><ul><ul><ul><li>Thresholds are the boundary values against which the metric values are compared. </li></ul></ul></ul>
  13. 13. Statistics Collection Process <ul><ul><ul><li>Oracle Database 10g metrics can be tracked using AWR. </li></ul></ul></ul><ul><ul><ul><li>Two categories of Usage metrics- Database feature usage and High water mark (HWM) value of certain database attributes. </li></ul></ul></ul><ul><ul><ul><li>MMON tracks and records the database feature usage and HWM statistics on a weekly basis. </li></ul></ul></ul><ul><ul><ul><li>Statistics are recorded in AWR snapshots. </li></ul></ul></ul><ul><ul><ul><li>To review statistics, dba_feature_usage_statistics view and dba_high_water_mark_statistics view or Enterprise Manager. </li></ul></ul></ul>
  14. 14. How to use AWR reports? <ul><li>AWR reports are generated using awrrpt.sql , awrrpti.sql , awrddrpt.sql , and awrddrpi.sql in $ORACLE_HOME/rdbms/admin directory. </li></ul><ul><li>Reports as html pages or text reports. </li></ul><ul><ul><li>awrrpt.sql - all available AWR snapshots. </li></ul></ul><ul><ul><li>awrrpti.sql - statistics for a range of snapshot ids on a specified database and instance </li></ul></ul><ul><ul><li>awrddrpt.sql - statistics of a particular SQL statement for a range of snapshot ids. </li></ul></ul><ul><ul><li>awrddrpi.sql - statistics of a SQL statement for a range of snapshot ids on a specified database and instance. </li></ul></ul>
  15. 15. Using AWR reports -1
  16. 16. Using AWR reports -2
  17. 17. AWR reports for Comparisons
  18. 18. Advisory Framework <ul><ul><ul><li>Oracle Database 10g has server components called advisors to provide feedback about resource utilization and performance. </li></ul></ul></ul><ul><ul><ul><ul><li>Automatic Database Diagnostic Monitor (ADDM) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>SQL Tuning Advisor, SQL Access Advisor </li></ul></ul></ul></ul><ul><ul><ul><ul><li>SGA Advisor, PGA Advisor </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Buffer Cache Advisor, Library Cache Advisor </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Segment Advisor </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Undo Advisor </li></ul></ul></ul></ul>
  19. 19. Database Advisors <ul><ul><ul><li>Above database advisors have certain attributes in common. </li></ul></ul></ul><ul><ul><ul><ul><li>An advisor can be launched in one of two modes depending on time available for completing the advisory task. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Limited Mode or Comprehensive Mode </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>Some advisors support both modes. </li></ul></ul></ul></ul>
  20. 20. Automatic Database Diagnostic Monitor (ADDM) <ul><ul><ul><li>ADDM provides proactive and reactive features for monitoring </li></ul></ul></ul><ul><ul><ul><li>Statistical information is automatically captured from the SGA </li></ul></ul></ul><ul><ul><ul><li>Stored inside the workload repository in the form of snapshots in sixty (60) minute intervals. </li></ul></ul></ul><ul><ul><ul><li>Snapshots are then written to disk </li></ul></ul></ul><ul><ul><ul><li>Similar to STATSPACK snapshots, but are more detailed. </li></ul></ul></ul>
  21. 21. ADDM Performance Monitoring <ul><ul><ul><li>ADDM initiates the MMON process to run automatically on every database instance </li></ul></ul></ul><ul><ul><ul><ul><li>For every snapshot taken, ADDM triggers an analysis of the period corresponding to the last two snapshots. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Helps the ADDM to proactively monitor the instance and detect bottlenecks before they become catastrophic. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Analysis results are stored inside the workload repository. </li></ul></ul></ul></ul><ul><ul><ul><li>Accessible through the EM console. </li></ul></ul></ul><ul><ul><ul><li>ADDM can be manually invoked using the runad PL/SQL procedure and by the $ORACLE_HOME/rdbms/admin/addmrpt.sql procedure. </li></ul></ul></ul>
  22. 22. Automatic Shared Memory Management (ASMM) <ul><ul><ul><li>Commonly tuned System Global Area (SGA) components are - database buffer cache, the shared pool, the large pool, and the Java pool. </li></ul></ul></ul><ul><ul><ul><ul><li>ASMM enables Oracle Database 10g to automatically determine appropriate values within total SGA limits. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>DBA can simply mention the total amount of SGA memory to an instance using the sga_target . </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Oracle database will automatically distribute this memory among various sub-components. </li></ul></ul></ul></ul>
  23. 23. How does ASMM work? <ul><ul><ul><ul><li>With Automatic SGA memory management enabled, the sizes of different components are flexible to resize to the needs of the workload without additional intervention. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>The internal tuning algorithm monitors the workload performance & increases the shared pool as needed to reduce the number of parses. </li></ul></ul></ul></ul><ul><ul><ul><li>ASMM uses a new Memory Manager (MMAN) background process. </li></ul></ul></ul><ul><ul><ul><ul><li>Coordinates the sizing of the memory components, acts as a memory broker. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Tracks all memory components & pending resize operations. </li></ul></ul></ul></ul>
  24. 24. Enable ASMM - EM
  25. 25. Memory Advisor through EM -1 <ul><ul><ul><li>Memory Advisor can be used only when the ASMM is disabled . </li></ul></ul></ul><ul><ul><ul><li>Three advisors - for Shared pool in SGA, Buffer Cache in SGA, and PGA. </li></ul></ul></ul>
  26. 26. Memory Advisor through EM -2
  27. 27. Automatic Storage Management <ul><ul><ul><li>Automatic Storage Management (ASM) for efficient management of disk drives with 24/7 availability. </li></ul></ul></ul><ul><ul><ul><ul><li>Helps the DBA from potentially managing thousands of database files across multiple database instances by creating disk groups. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Disk groups are comprised of disks and files on them. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ASM will not eliminate any existing database functionalities </li></ul></ul></ul></ul><ul><ul><ul><ul><li>With ASM, the DBA only needs to manage a smaller number of disk groups. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ASM also serves as a cluster file system for RAC configurations. </li></ul></ul></ul></ul>
  28. 28. ASM Advantages <ul><ul><ul><li>In a nutshell, we can have a mixture of ASM files; Oracle managed files and manually managed files </li></ul></ul></ul><ul><ul><ul><ul><li>Existing files can be migrated to ASM if needed. </li></ul></ul></ul></ul><ul><ul><ul><li>ASM prevents accidental file deletion by eliminating the file system interface. </li></ul></ul></ul><ul><ul><ul><li>Provides raw disk I/O performance for all files, striping them across multiple storage arrays. </li></ul></ul></ul><ul><ul><ul><li>Reduces the cost of managing storage with a clustered volume manager and integrated file system functionality. </li></ul></ul></ul>
  29. 29. ASM vs. Oracle 9i Storage
  30. 30. Automatic SQL Tuning Features <ul><ul><ul><li>SQL Tuning Advisor and SQLAccess Advisor </li></ul></ul></ul><ul><ul><ul><ul><li>SQL Tuning Advisor provides tuning advice for SQL statements with out modifying any statement. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>For complex applications and large databases, use SQLAccess Advisor. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Provides advice on indexes, materialized views and materialized view logs for a given work load. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Provides advice on database schema issues and determines optimal data access paths . </li></ul></ul></ul></ul></ul>
  31. 31. Using Automatic SQL Tuning tools <ul><ul><ul><li>For both tuning tools- create a task, run the Advisor, generate the recommendations and implement them. </li></ul></ul></ul><ul><ul><ul><ul><li>The user can accept or reject the recommendations. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Advisor tools available through Oracle Enterprise Manager 10g (OEM) and from SQL command prompt. </li></ul></ul></ul></ul><ul><ul><ul><li>Helps the DBA to save time in application SQL tuning efforts over methods used with Oracle 9i and prior. </li></ul></ul></ul>
  32. 32. SQLAccess Advisor <ul><ul><ul><li>Used for applications with complex queries on large sets of data. </li></ul></ul></ul><ul><ul><ul><li>Recommend a combination of indexes, materialized views, and materialized view logs. </li></ul></ul></ul><ul><ul><ul><li>Recommends how to optimize materialized views to be refreshable and benefit from general query rewrites. </li></ul></ul></ul><ul><ul><ul><li>Recommends the use of bitmap and B-tree indexes. </li></ul></ul></ul><ul><ul><ul><ul><li>B-tree indexes are used mainly in data warehouses or large databases to index unique or near-unique keys. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Bitmap indexes improve response time for adhoc queries. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Very little space compared to conventional indexes. </li></ul></ul></ul></ul>
  33. 33. SQL Tuning Advisor <ul><ul><ul><li>SQL Tuning Advisor provides automatic tuning advice for SQL statements. </li></ul></ul></ul><ul><ul><ul><li>Takes one or more SQL statements as input and invokes the automatic tuning optimizer to perform SQL tuning with out actually modifying any statement. </li></ul></ul></ul><ul><ul><ul><li>Output is a series of advice or recommendations along with the rationale behind each recommendation and its expected benefits. </li></ul></ul></ul><ul><ul><ul><li>The user can accept the recommendations or reject them. </li></ul></ul></ul>
  34. 34. SQL Tuning Advisor - STS <ul><ul><ul><li>For tuning multiple SQL statements, a SQL Tuning Set (STS) is created. </li></ul></ul></ul><ul><ul><ul><li>STS can be created from command line or Oracle Enterprise Manager 10g. </li></ul></ul></ul><ul><ul><ul><li>SQL Tuning Sets can be handled through EM or managed with DBMS_SQLTUNE package procedures. </li></ul></ul></ul><ul><ul><ul><li>For using SQL Tuning Set APIs, the developer needs ADMINISTER ANY SQL TUNING SET system privilege. </li></ul></ul></ul>
  35. 35. Controlling a Tuning Task <ul><ul><ul><li>Control the scope and duration of a tuning task </li></ul></ul></ul><ul><ul><ul><ul><li>Scope of the task -limited or comprehensive. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>With the limited option, the SQL Tuning Advisor produces recommendations based on analysis of statistics, access paths, and SQL structure. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>SQL Profile recommendations are not generated. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>With comprehensive option, the SQL Tuning Advisor does everything under limited scope and SQL profiling. User can also set the time limit of a tuning task (default value 30 minutes). </li></ul></ul></ul></ul>
  36. 36. Deploying SQL Tuning Advisor
  37. 37. SQL Tuning Advisor from EM <ul><ul><li>In EM, using Advisor Central - SQL Tuning Advisor link. </li></ul></ul><ul><ul><li>DBMS_SQLTUNE package by anyone with DBA role and ADVISOR privilege. </li></ul></ul>
  38. 38. SQL Tuning Advisor using EM-1 <ul><ul><li>In EM, SQL Tuning Advisor-> Top SQL link. </li></ul></ul>
  39. 39. SQL Tuning Advisor using EM- 2 <ul><ul><li>Choose the SQL & click Run SQL Tuning Advisor </li></ul></ul>
  40. 40. SQL Tuning Advisor using EM-3 <ul><ul><li>Select Scope </li></ul></ul><ul><ul><li>Choose </li></ul></ul><ul><ul><li>Schedule </li></ul></ul>
  41. 41. SQL Tuning Advisor using EM-4 <ul><ul><li>When the SQL Tuning task’s status is COMPLETED, select the task and click View Recommendations. </li></ul></ul>
  42. 42. SQLAccess Advisor <ul><ul><ul><li>SQLAccess Advisor </li></ul></ul></ul><ul><ul><ul><ul><li>Will recommend a combination of indexes, materialized views, and materialized view logs. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Can be run from EM using the SQLAccess Advisor Wizard or by invoking the DBMS_ADVISOR package. </li></ul></ul></ul></ul><ul><ul><ul><li>SQL Tuning with SQLAccess Advisor </li></ul></ul></ul><ul><ul><ul><ul><li>4 steps->create a task, define workload, generate recommendations, & implement them. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>A task has all the information relating to the recommendation process and its results. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>To create a task, use the wizard in EM or the DBMS_ADVISOR.QUICK_TUNE . </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>For hands-on approach, use DBMS_ADVISOR.CREATE_TASK procedure. </li></ul></ul></ul></ul></ul>
  43. 43. Executing the Task <ul><ul><ul><li>Create a task and link to a workload. </li></ul></ul></ul><ul><ul><ul><li>Use the DBMS_ADVISOR.EXECUTE_TASK procedure to generate the recommendations. </li></ul></ul></ul><ul><ul><ul><li>To view the recommendations, use </li></ul></ul></ul><ul><ul><ul><ul><li>DBA_ ADVISOR_RECOMMENDATIONS </li></ul></ul></ul></ul><ul><ul><ul><ul><li>USER_ADVISOR_RECOMMENDATIONS </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Get a script using DBMS_ADVISOR.GET_TASK_SCRIPT </li></ul></ul></ul></ul><ul><ul><ul><ul><li>EM to get recommendations. </li></ul></ul></ul></ul><ul><ul><ul><li>Recommendations are stored in the SQLAccess Advisor repository. </li></ul></ul></ul><ul><ul><ul><ul><li>Repository has benefits being managed by the server, support of historical data etc. </li></ul></ul></ul></ul>
  44. 44. Implementing SQLAccess Advisor Recommendations <ul><ul><ul><li>SQL Access Advisor creates a set of recommendations. </li></ul></ul></ul><ul><ul><ul><ul><li>Lets the user decide whether to implement all of its recommendations, or some, or none. </li></ul></ul></ul></ul><ul><ul><ul><li>In EM - Select the required recommendations. </li></ul></ul></ul><ul><ul><ul><ul><li>You are given a choice on how to implement the recommendations. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Schedule a job in the EM to execute the script and implement the recommendations. </li></ul></ul></ul></ul><ul><ul><ul><li>For do-it-yourself DBAs </li></ul></ul></ul><ul><ul><ul><ul><li>SQLAccess Advisor generates a SQL script to be used any time. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>DBA can edit SQL, naming conventions etc. </li></ul></ul></ul></ul>
  45. 45. Advisor Task Implementation-EM-1
  46. 46. Advisor Task Implementation-EM-2
  47. 47. Advisor Task Implementation-EM-3
  48. 48. Advisor Task Implementation-EM-4
  49. 49. Deploying SQLAccess Advisor
  50. 50. Uses for SQLAccess Advisor <ul><ul><ul><li>Generally used in large database/data warehouse environments. </li></ul></ul></ul><ul><ul><ul><li>Advantages </li></ul></ul></ul><ul><ul><ul><ul><li>DBA can tune parts of the database using selective workloads. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Quick and easy to use tool, which helps to build a pattern of usage over a time frame. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>DBA gets to decide and select the recommendations to be implemented. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Identify parts of the system which needs tuning, that would have been left out by ordinary tuning procedures. </li></ul></ul></ul></ul>
  51. 51. Server Generated Alerts <ul><ul><ul><li>A server-generated alert is a notification message from the server of an impending problem. </li></ul></ul></ul><ul><ul><ul><ul><li>Generated whenever a database metric does not match expected values </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Or thresholds levels (warning / critical levels) on different metrics are reached </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Or when the problem condition has been cleared </li></ul></ul></ul></ul><ul><ul><ul><li>Notification has error/alert condition, and may contain suggestions for correcting the problem. </li></ul></ul></ul><ul><ul><ul><li>MMON regularly schedules monitoring actions. </li></ul></ul></ul>
  52. 52. Server Generated Alerts <ul><ul><ul><li>Threshold levels can be internally set, customer defined, or customer altered from preset values. </li></ul></ul></ul><ul><ul><ul><li>Threshold alerts ( stateful alerts) automatically cleared on fixing the alert condition. </li></ul></ul></ul><ul><ul><ul><li>Stateful alerts stored in dba_outstanding_alerts and moved to dba_alert_history when cleared. </li></ul></ul></ul><ul><ul><ul><li>EM can be customized to send these messages to pager or email addresses. </li></ul></ul></ul><ul><ul><ul><li>A message about the alert written to Oracle Database alert log. </li></ul></ul></ul>
  53. 53. When you get an alert ! <ul><li>Follow the recommendations it provides. </li></ul><ul><li>Run ADDM or another advisor as needed to get a more detailed diagnostics of system or object behavior. </li></ul><ul><li>You can run a corrective script on receiving an alert. </li></ul><ul><li>Clear the alerts as a part of alert management. </li></ul>
  54. 54. Alerts Management Using EM <ul><ul><ul><li>Alerts can be managed using Oracle Enterprise Manager console. </li></ul></ul></ul><ul><ul><ul><li>EM can be invoked from a Web browser, from client installation or from the database server itself. </li></ul></ul></ul><ul><ul><ul><li>Using EM, you can schedule different monitoring jobs to be run on the database or have the database send you an alert for the specified events. </li></ul></ul></ul>
  55. 55. Alerts Management Using EM -1
  56. 56. Alerts Management Using EM -2
  57. 57. Alerts Management Using EM -3
  58. 58. Alerts Management Using EM -4
  59. 59. Clearing of Alerts <ul><ul><ul><li>Oracle clears most of the alerts automatically when the cause of the alert disappears. </li></ul></ul></ul><ul><ul><ul><li>Certain alerts need to be acknowledged by the DBA and require corrective measures. </li></ul></ul></ul><ul><ul><ul><li>After taking the necessary corrective actions, acknowledge the alert by clearing it or purging it. </li></ul></ul></ul><ul><ul><ul><li>Clearing an alert sends it to the Alert History; purging an alert removes it from the Alert History. </li></ul></ul></ul><ul><ul><ul><li>Viewable from the home page of EM under Related Links . </li></ul></ul></ul>
  60. 60. Data Pump <ul><li>New high-speed infrastructure for data and metadata movement called Data Pump a.k.a. DBMS_DATAPUMP . </li></ul><ul><li>Provides high-speed data load and unload capability to existing tables. </li></ul><ul><li>Platform independent flat files can be moved between multiple servers. </li></ul><ul><li>Use the new network mode to transfer data using database links. </li></ul><ul><li>Parallelism for Data Pump in the Enterprise Edition. </li></ul>
  61. 61. Data Pump Architecture
  62. 62. Data Pump Benefits <ul><li>Detach from a long running job and reattach with out affecting the job. </li></ul><ul><ul><li>Enables the DBA to monitor jobs from multiple locations, stop the jobs and restart them later . </li></ul></ul><ul><li>Space needed for an export job can be estimated using the ESTIMATE ONLY parameter. </li></ul><ul><ul><li>Prevents the destination directory from running out of space. </li></ul></ul><ul><li>Data Pump also supports fine-grained object selection using the EXCLUDE, INCLUDE and CONTENT parameters. </li></ul><ul><li>Remapping of data during export and import processes. </li></ul><ul><ul><li>Names of source data files, source schema names, and source tablespaces can be changed to different names at the target system . </li></ul></ul>
  63. 63. Grid Control <ul><li>A web-based system for managing Oracle products, host systems, and applications. </li></ul><ul><li>Unified console for monitoring distributed application servers. </li></ul><ul><li>Application server administrators can use Grid Control to </li></ul><ul><ul><li>Check the status and performance of servers. </li></ul></ul><ul><ul><li>Manage system and software configurations. </li></ul></ul><ul><ul><li>Manage application servers, and availability of applications. </li></ul></ul>
  64. 64. Grid Control & Schematic
  65. 65. Security Features - Overview <ul><li>Oracle Security features include </li></ul><ul><ul><li>Virtual Private Database (VPD) </li></ul></ul><ul><ul><li>Fine Grained Auditing (FGA) </li></ul></ul><ul><ul><li>Database encryption/decryption </li></ul></ul><ul><ul><li>Oracle Label Security & Oracle Identity Management </li></ul></ul><ul><li>Oracle Advanced Security in Oracle Database 10g Release 2. </li></ul><ul><ul><li>Combination of network encryption, database encryption and strong authentication </li></ul></ul>
  66. 66. Security Features (continued..) <ul><li>Transparent Data Encryption </li></ul><ul><ul><li>Encrypts data. </li></ul></ul><ul><ul><li>Uses DES, AES etc. </li></ul></ul><ul><ul><li>Backward compatibility with DBMS_OBFUSCATION_TOOLKIT and DBMS_CRYPTO </li></ul></ul><ul><li>Network Encryption </li></ul><ul><ul><li>Support for RC4, DES, 3DES , AES </li></ul></ul><ul><li>Data Integrity </li></ul><ul><ul><li>Using MD5 , SHA-1 Algorithms </li></ul></ul><ul><li>Data Authentication </li></ul><ul><ul><li>PKI, Kerberos, RADIUS (Remote Authentication Dial-In User Service) , Secure Sockets Layer (SSL with digital certificates) </li></ul></ul>
  67. 67. Recoverability Features <ul><li>Flashback features for quick and efficient recovery from human errors </li></ul><ul><ul><li>Flashback Query, Flashback Versions Query – row level </li></ul></ul><ul><ul><li>Flashback Transaction Query – transaction level </li></ul></ul><ul><ul><li>Flashback Drop, Flashback Table – table level </li></ul></ul><ul><ul><li>Flashback Database – database level </li></ul></ul><ul><ul><li>Restore Points to guarantee database can be recovered to any pre-set point in time </li></ul></ul>
  68. 68. Recovery Manager (RMAN) <ul><li>RMAN available as command-line and EM for backups and recovery. </li></ul><ul><li>Flash Recovery Area </li></ul><ul><ul><li>A single directory on disk or ASM disk group to keep all recovery-related files. (control, data, archive log, RMAN backup set files etc.) </li></ul></ul><ul><li>Automatic channel failover </li></ul><ul><ul><li>When faced with errors during disk backup or restore, RMAN will try to complete as much job as possible </li></ul></ul><ul><li>Block Media Recovery </li></ul><ul><ul><li>Allows RMAN to fix a corrupted block on backup </li></ul></ul><ul><ul><li>Keeps the data file online </li></ul></ul><ul><ul><li>Keeps non-affected data available for read/update. </li></ul></ul>
  69. 69. Wrapping it up -1 <ul><ul><ul><li>A quick overview of the automatic manageability features of Oracle Database 10g. </li></ul></ul></ul><ul><ul><ul><li>Review of Grid Control, Enterprise Manager etc. </li></ul></ul></ul><ul><ul><ul><li>These automatic database management features of Oracle Database 10g are </li></ul></ul></ul><ul><ul><ul><ul><li>Meant to reduce the time spent on routine DBA tasks. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Focus on more challenging issues for the enterprise. </li></ul></ul></ul></ul><ul><ul><ul><li>Oracle Database 10g replaces the tedious system and database administration tasks with a few simple steps from the EM or command line interface. </li></ul></ul></ul>
  70. 70. Wrapping it up -2 <ul><ul><ul><li>Use the security features of Oracle Database 10g along with proper planning to make your databases compliant with regulatory requirements. </li></ul></ul></ul><ul><ul><ul><li>Improved recoverability features with Flashback and RMAN. </li></ul></ul></ul><ul><ul><ul><li>Detailed explanation given in Oracle Documentations, related Oracle Database 10g books, and references given here. </li></ul></ul></ul>
  71. 71. Better Life with Oracle 10g Manageability features <ul><ul><li>Improve the performance of mission critical applications </li></ul></ul><ul><ul><ul><li>Manage more databases and applications </li></ul></ul></ul><ul><ul><ul><li>Be more valuable to the organization </li></ul></ul></ul><ul><ul><ul><li>Get more sleeping time. </li></ul></ul></ul><ul><ul><li>For your business, it will result in </li></ul></ul><ul><ul><ul><li>Fewer failures & Faster response times </li></ul></ul></ul><ul><ul><ul><li>Lower development cost </li></ul></ul></ul><ul><ul><li>By judicious utilization of automatic management features of Oracle Database 10g, a DBA can drastically reduce the time spent on routine administrative tasks. </li></ul></ul>
  72. 72. Thank you <ul><li>References </li></ul><ul><ul><li>Oracle Database 10g Insider Solutions, Sams Publishing, Sep. 2005 </li></ul></ul><ul><ul><li>Oracle Database 10g Documentation (online). </li></ul></ul><ul><ul><li>Oracle Technology Network. </li></ul></ul><ul><ul><li>Easy Oracle Automation, Rampant TechPress, Dec. 2004. </li></ul></ul><ul><li>Get this presentation and similar articles at http://www.dbatrends.com/Downloads.htm </li></ul><ul><li>Contact Info: </li></ul><ul><ul><li>Personal website: http://www.dbatrends.com </li></ul></ul><ul><ul><li>Email arunioug at dbatrends dot com </li></ul></ul><ul><ul><li>===================================== </li></ul></ul><ul><li>Questions & Answers </li></ul>

×