﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Johannes Ahrends' Blog</title>
    <description>&lt;table&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;&lt;img height="183" width="139" alt="" src="/Portals/0/Blog/blog-johannes-ahrends.png" /&gt;&lt;/td&gt;
            &lt;td valign="top"&gt;Johannes Ahrends is an Oracle database specialist at Quest Software and a recognized Oracle expert with more than 15 years of experience as an Oracle DBA and consultant. Together with former colleagues he has published two German Oracle books: Oracle9i für den DBA and Oracle 10g für den DBA. Both of them became the most popular Oracle Books in Germany. With this background Johannes has done a large variety of presentations at the German Oracle User Group (DOAG) conferences and local seminars.
            &lt;p&gt;&lt;font color="#003366" size="3"&gt;&lt;strong&gt;Recent postings:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;/table&gt;</description>
    <link>http://toadworld.com/BLOGS/tabid/67/BlogId/28/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>Johannes Ahrends</managingEditor>
    <webMaster>webmaster@toadworld.com</webMaster>
    <pubDate>Wed, 17 Mar 2010 19:29:13 GMT</pubDate>
    <lastBuildDate>Wed, 17 Mar 2010 19:29:13 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.2.0.15477</generator>
    <item>
      <title>Using Toad DBA Suite for Oracle with Oracle Enterprise Manager (Part 3)</title>
      <description>&lt;p&gt;&lt;font size="1"&gt;By Johannes Ahrends and John Pocknell&lt;/font&gt;&lt;/p&gt;
&lt;div&gt;In the &lt;a href="http://www.toadworld.com/Community/Blogs/tabid/67/EntryID/345/Default.aspx"&gt;previous blog&lt;/a&gt;, we compared and contrasted how database Performance Management operations are performed in Oracle’s Enterprise Manager (OEM) and Quest’s Toad DBA Suite for Oracle and how Toad is an excellent complement to OEM because it simplifies and automates many tasks which would take longer in OEM.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In the final blog, we contrast Change Management operations between OEM (including OEM Database Control for Oracle 10g and above) and Toad DBA Suite for Oracle.&lt;/div&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Change Management&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;For this particular comparison with Toad DBA Suite, you will need in addition to OEM:&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;&lt;strong&gt;Diagnostics Pack&lt;/strong&gt; – offers automatic performance diagnostics and monitoring. &lt;br /&gt;
    &lt;a href="http://www.oracle.com/technology/products/oem/pdf/diagnostic-pack-11g-datasheet.pdf"&gt;&lt;span&gt;http://www.oracle.com/technology/products/oem/pdf/diagnostic-pack-11g-datasheet.pdf&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Tuning Pack&lt;/strong&gt; – offers automatic SQL tuning for applications. &lt;br /&gt;
    &lt;a href="http://www.oracle.com/technology/products/oem/pdf/tuning-pack-11g-datasheet.pdf"&gt;&lt;span&gt;http://www.oracle.com/technology/products/oem/pdf/tuning-pack-11g-datasheet.pdf&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Change Management&lt;/strong&gt; &lt;strong&gt;Pack&lt;/strong&gt; – compare schema changes before and after an application upgrade.&lt;br /&gt;
    &lt;a href="http://www.oracle.com/technology/products/oem/pdf/change-management-pack-11g-datasheet.pdf"&gt;http://www.oracle.com/technology/products/oem/pdf/change-management-pack-11g-datasheet.pdf&lt;/a&gt;&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Real Application Testing &lt;/strong&gt;– workload capture/replay together with SQL performance analysis.&lt;br /&gt;
    &lt;a href="http://www.oracle.com/technology/products/database/oracle11g/pdf/real-application-testing-datasheet.pdf"&gt;http://www.oracle.com/technology/products/database/oracle11g/pdf/real-application-testing-datasheet.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;Toad DBA Suite already includes a number of features specifically targeted towards change management including: configuration changes, schema changes and database workload replay testing.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Example 1&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Let’s start with a simple example where you need to &lt;strong&gt;compare a development schema with a test schema&lt;/strong&gt; to see if they are synchronized.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Synchronizing schemas is essential when performing testing or when a new iteration of changes needs to be carried out by development, to ensure nothing gets lost and code continues to work as it was intended.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In &lt;strong&gt;Toad DBA Suite&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; Toad DBA Suite does not require the use of the OEM Change Management pack&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;a href="http://www.toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/237/cid/71/Default.aspx"&gt;&lt;strong&gt;Compare Schemas&lt;/strong&gt;&lt;/a&gt; (&lt;strong&gt;Select Database | Compare | Schemas&lt;/strong&gt; from Toad menu) is a built in task which enables selections of source and (multiple) target schemas all in the same window.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;There is an option to run the compare using the Oracle Data Dictionary or using “Def Files” (a Toad offline snapshot). Def files are encrypted and can be used as baselines since they will contain all the object definitions in the schema and will prevent unauthorized access to the underlying objects and dramatically reduce the time taken to run future comparisons. Def files can also be used as restore points to get you back to a point-in-time if something goes wrong.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The Schema Compare window contains multiple tabs which include the setup, object specific options, results and synchronization script. Everything is done from this one window.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;img height="407" alt="" width="695" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-1.gif" /&gt;&lt;br /&gt;
Compare Schemas showing a sync script for a selected object&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Compare Schemas will even report on two tables which are structurally the same but have a different number or rows of data.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Upon completion of the compare, if it’s realized that the source and target were inadvertently transposed, it’s a simple matter of a right click in the Schemas tab to switch the source and target and update the synchronization script dynamically.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-2.gif" /&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;Sync script is dynamically reversible without re-processing&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;An alternative method DBAs can use to deploy changes from development to production is where changes are driven through data models.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite includes a data modeling component called &lt;a href="http://modeling.inside.quest.com/kbcategory.jspa?categoryID=116"&gt;&lt;strong&gt;Toad Data Modeler&lt;/strong&gt;&lt;/a&gt; which can perform both conceptual and physical data modeling for most database platforms. One of its principal features is to compare two versions of the same physical data model – one with pending changes and the other a snapshot of production (after reverse engineering) and create an Alter script.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The DBA can review this script and apply the changes to production.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In &lt;strong&gt;OEM&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;OEM’s &lt;strong&gt;Change Management Pack&lt;/strong&gt; is designed to enable DBAs to compare databases (on the same or different servers). Performing a schema compare (especially if the schemas are on the same database), involves many steps.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You first need to create 2 baselines (called “Dictionary Baselines“) of each of the schemas to be compared on each database. This process uses a wizard and involves a number of steps which need to be repeated for each baseline created.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You then create a “Dictionary Comparison” and select each of the 2 “Dictionary Baselines” to compare. This process also uses a wizard to help simplify the steps.&lt;/div&gt;
&lt;p&gt;After completion, a comparison screen shows you the detailed differences between the 2 schemas.&lt;/p&gt;
&lt;p align="center"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-3.gif" /&gt;&lt;/p&gt;
&lt;div&gt;Change Management pack lets you synchronize a single object or the whole schema and changes can also be implemented to multiple targets.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;An alternative to using OEM to perform this task would be to use &lt;strong&gt;SQL Developer&lt;/strong&gt;. SQL Developer’s &lt;strong&gt;Database Diff&lt;/strong&gt; feature still uses the OEM Change Management pack, but the steps are fewer and easier to follow; especially for a simple schema compare operation.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Example 1 Summary:&lt;br /&gt;
 &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Toad DBA Suite&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Simple to use workflow with only one window.&lt;/li&gt;
    &lt;li&gt;Visibility of each step of the process at all times through tabular interface.&lt;/li&gt;
    &lt;li&gt;Enables optional encryption of schema information.&lt;/li&gt;
    &lt;li&gt;Fast processing (Definition Files make this even faster).&lt;/li&gt;
    &lt;li&gt;Source and target schemas are switchable.&lt;/li&gt;
    &lt;li&gt;Schema compare only (Database Compare and Data Compare are separate functions).&lt;/li&gt;
    &lt;li&gt;No integral impact analysis.&lt;/li&gt;
    &lt;li&gt;No integral data copy option.&lt;/li&gt;
    &lt;li&gt;Synchronization possible for schema or selected object.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Aimed for a full database compare (no compare data feature).&lt;/li&gt;
    &lt;li&gt;More steps required to perform the same compare.&lt;/li&gt;
    &lt;li&gt;Requires the DBA to be in multiple screens.&lt;/li&gt;
    &lt;li&gt;Slower processing.&lt;/li&gt;
    &lt;li&gt;Synchronization possible for schema or selected object.&lt;/li&gt;
    &lt;li&gt;Generates an impact report before deployment.&lt;/li&gt;
    &lt;li&gt;Data can be copied from source to target.&lt;/li&gt;
    &lt;li&gt;Requires the Change Management Pack.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;Example 2&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;For this example, we will look at something which is becoming of more interest to DBAs – &lt;strong&gt;Database Workload Replay testing&lt;/strong&gt;.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In order to assess the impact on a production database of impending or predicted changes in the future such as increased activity or workload (application changes or more end-users), patch releases, database upgrades, hardware upgrades, etc, the DBA has to be sure that the database can accommodate these planned changes in order to maintain application response times and possibly service levels.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In&lt;strong&gt; Toad DBA Suite:&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite uses a component called &lt;strong&gt;Benchmark Factory for Databases, &lt;/strong&gt;a database load-testing/scalability tool which can be used on Oracle 7.3.4 to 11g. Benchmark Factory for Databases can be used in one of 3 ways:&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;a href="http://www.toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/221/cid/71/Default.aspx"&gt;&lt;strong&gt;Database Workload Replay&lt;/strong&gt;&lt;/a&gt; – workload capture using a number of different methods including Oracle trace files and subsequent playback on a test database to replicate the execution of production transactions.&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Database Server benchmarking&lt;/strong&gt; - based on industry standards such as TPC-C, TPC-H, etc and is typically used to compare database platforms and plan for patch/database upgrades, hardware upgrades, etc.&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Application Scalability testing&lt;/strong&gt; – to help development predict likely performance in a production environment of PL/SQL code, SQL statements, scripts, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;p&gt;For the purposes of this comparison, we will look at method 1 and the use of Oracle Trace files as the capture mechanism.&lt;/p&gt;
&lt;p&gt;The generation of Oracle Trace files is initiated in Toad DBA Suite and can be specified to be generated in one of 4 ways:&lt;/p&gt;
&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;div&gt;&lt;span&gt;a.&lt;span&gt;      &lt;/span&gt;&lt;/span&gt;Basic&lt;/div&gt;
&lt;div&gt;&lt;span&gt;b.&lt;span&gt;      &lt;/span&gt;&lt;/span&gt;Waits&lt;/div&gt;
&lt;div&gt;&lt;span&gt;c.&lt;span&gt;       &lt;/span&gt;&lt;/span&gt;Binds&lt;/div&gt;
&lt;div&gt;&lt;span&gt;d.&lt;span&gt;      &lt;/span&gt;&lt;/span&gt;Waits + Binds&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;Trace files can also be created using command line (SQL*Plus) which offers additional options.&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Toad’s &lt;a href="http://www.toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/233/cid/71/Default.aspx"&gt;&lt;strong&gt;Trace File Browser&lt;/strong&gt;&lt;/a&gt; can then be used to evaluate each trace file down to SQL statement, execution plan level, waits, etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;From the Trace File Browser, it’s simply a matter of clicking the “send trace file to Benchmark Factory” button (&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-4.gif" /&gt;&lt;span&gt;) and clicking “Yes” to open.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The Benchmark Factory Workload Replay script is ready to run. This will simply replay the transactions recorded in the trace file for a single user. For scalability purposes, we can use Benchmark Factory to specify a number of “Virtual Users” all of which will make their own separate connection to the Test database and execute the transactions in the trace file. This can be done by clicking on “Oracle Workload Replay” in the navigator and entering the required number of users and the number of executions of each transaction.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-5.gif" /&gt;&lt;br /&gt;
Toad DBA Suite’s Workload Replay screen&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In order to determine thresholds (for SLA purposes for example), you can copy the transactions in the Workload Replay to an SLA (Goal) or Mixed Workload replay test (see right-click menu above). With these options, you can specify a required SLA such as SQL response time or (in the case of a Mix Test) you can use multiple trace files:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-6.gif" /&gt;&lt;br /&gt;
Workload Replay of a group of Oracle Trace files&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In an SLA test, workload replay will continue until the SLA requirement is “broken” (e.g. SQL response time is too low) whereupon the test will automatically stop and report what userload was achieved.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite’s Benchmark Factory component can also import Oracle trace files either as multiple session specific files or directly from the server and there are many filtering options available.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In &lt;strong&gt;OEM&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Oracle recently introduced a new Manageability option with their Database 11g called &lt;strong&gt;Real Application Testing&lt;/strong&gt; &lt;strong&gt;(RAT)&lt;/strong&gt; and is available only with Oracle Enterprise Edition. RAT can be used to capture, analyze and replay database transactions. During replay, RAT can maintain the original transaction concurrency, timing and dependencies.&lt;/p&gt;
&lt;p&gt;RAT is quite complex, so for the purposes of simplicity, I will just give you an overview of how it works.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;RAT consists of 2 main components:&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;&lt;strong&gt;Database Replay &lt;/strong&gt;– captures production workload and replays it on a different system (e.g. Test) &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;SQL Performance Analyzer &lt;/strong&gt;– identifies SQL execution plan changes and performance regression (see Example 3)&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;Database Replay in&lt;/strong&gt; &lt;strong&gt;RAT&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt;There are 4 main steps in RAT:&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Workload capture (from the production system)
    &lt;ol type="a"&gt;
        &lt;li&gt;Capture is available from Oracle version 9i and up (according to Oracle’s website)&lt;/li&gt;
        &lt;li&gt;Variety of workload filters inc User, Program, Module, Session ID, time period, etc&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;Workload pre-processing
    &lt;ol type="a"&gt;
        &lt;li&gt;Transforms the captured data into a replayable format&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;Workload replay
    &lt;ol type="a"&gt;
        &lt;li&gt;Any timing and concurrency characteristics are preserved&lt;/li&gt;
        &lt;li&gt;Transaction commit order is maintained&lt;/li&gt;
        &lt;li&gt;Maintains the same number of user connections&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;Analysis and reporting
    &lt;ol type="a"&gt;
        &lt;li&gt;Analysis can be performed via AWR, ASH and ADDM&lt;/li&gt;
        &lt;li&gt;AWR diff report can compare original performance to replayed performance&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-7.gif" /&gt;&lt;br /&gt;
RAT Workload Replay results screen&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;strong&gt;Example 2 Summary:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Toad DBA Suite&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;The use of Oracle Trace files is very easy with options on how they are created and a browser (Trace File Browser) to see exactly what was captured. Transactional latencies are faithfully reproduced and dependencies are reasonably well reproduced by Oracle, but extensive use of bind variables may require some interaction.&lt;/li&gt;
    &lt;li&gt;Works with any version of Oracle from 7.3.4. and upwards.&lt;/li&gt;
    &lt;li&gt;Workflow is logical with the workload replay being initiated straight from Toad’s Trace File Browser.&lt;/li&gt;
    &lt;li&gt;Everything is executed from the client including monitoring of the test environment using the Spotlight on Oracle component.&lt;/li&gt;
    &lt;li&gt;Workload replay is modifiable in the sense that the userload can be modified, number of SQL executions can be changed and also transactional latencies can be altered.&lt;/li&gt;
    &lt;li&gt;Workload replay can be defined as a goal-based test or a mixed-user test – where a bias (or weighting) can be applied to one particular session to amplify the stress.&lt;/li&gt;
    &lt;li&gt;SQL statements can be optimized on-the-fly, or after the workload testing by using SQL Optimizer’s SQL Inspector (part of the SQL Scanner component) to capture the workload SQL from the SGA.&lt;/li&gt;
    &lt;li&gt;Toad DBA Suite’s Benchmark Factory component can also be used to perform industry standard tests or ad-hoc scalability testing.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;&lt;span&gt;OEM&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;span&gt;The use of RAT is theoretically more accurate since it captures all client requests directed to the database. Values such as SCN, wall-clock time, binds are faithfully reproduced &lt;/span&gt;and the original transaction concurrency, timing and dependencies retained.&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;Cannot artificially scale the userload beyond that which is captured, therefore there is no opportunity to perform a “what-if” analysis.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;RAT cannot be used for SLA testing.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;RAT requires Oracle 11g, but will work with captured sessions on Oracle 9i and higher.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;RAT executes on the server, so loading is higher although Oracle optimizes this to minimize impact.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;Analysis can be performed via AWR, ASH and ADDM. An AWR diff report can compare original performance to replayed performance.&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;There is no opportunity to see if specific performance SLAs can be met.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;OEM does not provide any way of using of industry standard tests such as TPC-C or TPC-H for standard benchmarking or for ad-hoc scalability testing.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;Example 3&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In Example 2, we used production transactions and replayed them in test environment to simulate what might happen when making a planned change.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In this final example, I would like to show how it is possible to assess the &lt;strong&gt;impact of a&lt;/strong&gt; &lt;strong&gt;planned change&lt;/strong&gt; on the database and also determine whether &lt;strong&gt;performance regression&lt;/strong&gt; has taken place after the change has been made. Performance regression may well result after planned changes such as a different indexing strategy, database parameter changes, Oracle patch or a database upgrade.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Impact analysis and performance regression testing through comparison of “before” and “after” is vital to understanding these effects before they are implemented into production.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;In &lt;strong&gt;Toad DBA Suite&lt;/strong&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;Quest has two approaches to enabling the DBA to assess what happens when a change is planned:&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;span&gt;&lt;strong&gt;Static&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt; -&lt;/strong&gt; by comparing the execution plans for groups of SQL statements before and after the change on the database without actually executing them. In addition, with index changes, performance differences can be reported “before the fact” without actually building any “real” indexes.&lt;br /&gt;
    &lt;strong&gt; &lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;&lt;strong&gt;Dynamic&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt; –&lt;/strong&gt; SQL transactions (workload) are played in a test environment in order to assess whether performance regresses. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;span&gt;In Toad DBA Suite’s &lt;strong&gt;SQL Optimizer&lt;/strong&gt; component, the &lt;/span&gt;&lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_Impact_Analyzer_Tutorial"&gt;&lt;strong&gt;Impact Analyzer&lt;/strong&gt;&lt;/a&gt;&lt;span&gt; enables you to:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;span&gt;Compare execution plan changes to identify potential performance variations. For scenarios such as:&lt;/span&gt;
    &lt;ol&gt;
        &lt;li&gt;&lt;span&gt;Migrations&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span&gt;Upgrades&lt;span&gt;         } by comparing 2 instances&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span&gt;Deployments&lt;span&gt;   }&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span&gt;Index changes&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span&gt;Simulated configuration change via ALTER SESSION&lt;/span&gt;&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;span&gt;Stores SQL statements and execution plans in a (local) SQL repository for impact analysis.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;span&gt;The first thing you must do is decide which SQL statements you want to assess and then add them to the SQL Repository. You then create an Analysis Group into which these SQL statements will be associated. A simple to use wizard takes you through these steps.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;This initial process then creates a baseline snapshot against which execution plan changes can be compared.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;So let’s imagine that we want to look at the effects of an index change on these SQL statements.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;span&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-8.gif" /&gt;&lt;br /&gt;
SQL Optimizer’s Impact Analyzer &lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;Here you can see my Analyzer Group with six SQL statements which are being sent for index analysis using another SQL Optimizer component called &lt;/span&gt;&lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_Gobal_Indexing_Tutorial"&gt;&lt;strong&gt;Global Indexing&lt;/strong&gt;&lt;/a&gt;&lt;span&gt;. Global Indexing analyses all the SQL statements and offers suggested indexes which may &lt;strong&gt;collectively&lt;/strong&gt; improve the execution of all these SQL statements. Since SQL Optimizer uses virtual indexes, simply for the purposes of extracting an execution plan for comparison, nothing is built on the database.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;In order to perform the impact analysis, you select a proposed index and push it to the Impact Analyzer. Impact Analyzer asks you to confirm the Analysis Group (created earlier)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;Impact Analyzer then creates a second snapshot based on the virtual index I just created and copies the executions plans for the SQL statements into the SQL Repository.&lt;/span&gt;&lt;/div&gt;
&lt;div align="center"&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;span&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-9.gif" /&gt;&lt;br /&gt;
Adding a 2&lt;sup&gt;nd&lt;/sup&gt; snapshot (based on a proposed index) into the SQL Repository for execution plan comparison&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;Now, using the stored SQL statements and their corresponding execution plans (with and without an index) you can compare the baseline snapshot with the Global Indexing snapshot in order to assess the impact. All of this is done without building the index or executing any SQL!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-10.gif" /&gt;&lt;br /&gt;
SQL Optimizer’s Impact Analyzer comparing the execution plans for a proposed new index against a set of baseline execution plans stored in the SQL Repository&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;This same process can be used for other scenarios too. For example, SQL Optimizer’s &lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_SGA_Inspector_Tutorial"&gt;&lt;strong&gt;SQL Inspector&lt;/strong&gt;&lt;/a&gt; component allows the DBA to set up a scan of the Oracle SGA and capture SQL statements from there. (This can be scheduled). SQL statements captured using the SQL Optimizer’s &lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_SQL_Scanner_Tutorial"&gt;&lt;strong&gt;&lt;font color="#800080"&gt;SQL Scanner&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt; component (including scripts, PL/SQL code, etc) can also be saved into the SQL Repository.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;For regression testing, Toad DBA Suite’s Benchmark Factory for Oracle component can generate reports showing transaction performance versus userload to show whether performance regressed compared to before.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div align="center"&gt; &lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-11.gif" /&gt;&lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;Benchmark Factory’s Results screen showing Transaction Time vs User Load&lt;/em&gt;&lt;/div&gt;
&lt;div align="center"&gt; &lt;/div&gt;
&lt;div&gt;In addition, the &lt;a href="http://www.toadworld.com/Products/SpotlightonOracle/tabid/301/Default.aspx"&gt;&lt;strong&gt;&lt;font color="#800080"&gt;Spotlight on Oracle&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt; component can be used to determine, in real-time, where performance bottlenecks, as a result of performance regression, may be occurring.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In &lt;strong&gt;OEM&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;Oracle’s approach is slightly different since it cannot perform a static impact analysis. SQL statements have to be executed first in order to have something which can be compared.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;strong&gt;Real Application Testing (RAT)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt; contains a component called &lt;strong&gt;SQL Performance Analyzer&lt;/strong&gt;, which uses a similar approach to Toad DBA Suite and enables you to perform impact analysis of changes such as schema, database configuration, patches, etc with the major difference that, for index analysis, you would have to perform the actual impact analysis on a test server since Oracle must build the recommended indexes first.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;SQL Performance Analyzer uses its RAT Replay technology and captures SQL execution performance stats in what are called SQL Tuning Sets (or STS). To be completely effective, you must use SQL Performance Analyzer in conjunction with OEM and the Management Packs listed at the top of this blog.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The basic idea is that you capture workload (with all the transactions) via STS from production while the application is running and is being accessed by users. You then post the STS to your test database and execute everything in order to establish a baseline.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You then manually implement all the planned changes you are intending to apply to production (patches, hardware, upgrades, etc) and re-execute all the SQL.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You then compare and analyze the performance against the baseline and a report shows which SQL statements regressed as a result of the changes.&lt;/div&gt;
&lt;div align="center"&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_031809-12.gif" /&gt;&lt;br /&gt;
SQL Performance Analyzer report showing whether performance regression has taken place&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;SQL Performance Analyzer also lets you compare execution plans and execute SQL statements and time them.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;SQL Tuning Advisor is used to help implement any alternative SQL statements.&lt;/div&gt;
&lt;div&gt;This cycle can be repeated over the life of the application as further changes are made&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Example 3 Summary:&lt;br /&gt;
 &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Toad DBA Suite&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Specifically for index changes, Quest’s approach is to perform the impact analysis “before the fact” through the use of Virtual Indexes which means you do not have to build the index on the database first.&lt;/li&gt;
    &lt;li&gt;Execution plans (which can be displayed in a variety of ways, inc flow chart) can be compared side-by-side making interpretation easier.&lt;/li&gt;
    &lt;li&gt;Graphical comparisons following a static test (i.e. no SQL is executed) using Impact Analysis for performance regression helps to make an informed decision about the merits of a planned change.&lt;/li&gt;
    &lt;li&gt;Graphical comparisons following a dynamic test (i.e. SQL is executed) using Benchmark Factory for performance regression are not possible.&lt;/li&gt;
    &lt;li&gt;SQL Optimizer’s SQL Repository allows you to store baselines and snapshots containing execution plans and SQL statements for future comparisons.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;&lt;span&gt;OEM&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Specifically for index changes, &lt;span&gt;Oracle’s approach is to perform regression testing “after the fact” which means building indexes on a test server and executing the SQL first then performing the tests.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;Execution plans &lt;/span&gt;can be compared side-by-side making interpretation easier.&lt;/li&gt;
    &lt;li&gt;SQL statements can be executed and timed.&lt;/li&gt;
    &lt;li&gt;Graphical comparisons of performance metrics following regression testing helps to make an informed decision about the merits of a planned change.&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;SQL Plan Management lets you retain execution plans for future comparisons.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;For change management tasks, Toad DBA Suite offers a significantly lower cost solution and provides greater depth in some areas (e.g. impact analysis) than is currently available in Oracle OEM, across a wider range of platforms and in a way which is simple to use thereby minimizing the amount of interpretation the DBA has to do.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Schema change management is much simpler than OEM owing to its tried-and-tested &lt;strong&gt;Schema Compare &amp; Sync&lt;/strong&gt; technology which does not rely on OEM’s Change Management pack. If you require a full database compare, OEM’s Change Management pack includes non-schema database objects. In Toad, Database and Schema Compare are 2 separate operations with Database Compare providing comparison for non-schema database objects but also other items not included in OEM (such as Initialization Parameters and Directories). However, Toad DBA Suite offers the DBA two possible ways to generate a schema sync script depending whether or not their company uses data modeling technology. Toad DBA Suite’s &lt;a href="http://modeling.inside.quest.com/kbcategory.jspa?categoryID=116"&gt;&lt;strong&gt;Toad Data Modeler&lt;/strong&gt;&lt;/a&gt; component is a full data modeling solution which can generate a deployment script simply by comparing the development data model with a reverse-engineered model of the production schema.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite’s &lt;strong&gt;SQL Optimizer&lt;/strong&gt; technology is far more advanced in terms of its SQL re-writing and Virtual Index technology as well as its ability to perform what-if analysis compared to OEM’s more “black-box” approach to tuning.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite’s &lt;strong&gt;Benchmark Factory&lt;/strong&gt; workload replay technology is simpler to user, being based on established Oracle trace file technology and is integrated with Toad, but may involve additional work if extensive use of bind variables are used.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Oracle’s &lt;strong&gt;RAT&lt;/strong&gt; technology essentially recreates the whole production environment and so is a better representation, but there is no opportunity to make adjustments to userload or perform any other form of “what if” analysis.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Here’s a quick comparison of the differences:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Toad DBA Suite for Oracle&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Task oriented workflow starting in Toad as the core application with contextual links to related components.&lt;/li&gt;
    &lt;li&gt;Lightweight, standalone schema comparison with sync script creation which out-performs OEM Change Management pack in terms of speed and ease-of-use.&lt;/li&gt;
    &lt;li&gt;Lightweight, standalone data modeling environment with on-the-fly reverse engineering from Toad together with Alter Script generation based on model version differences.&lt;/li&gt;
    &lt;li&gt;Assessing the potential impact of new indexes and determining the effect of proposed indexes on the execution plan changes of other SQL statement is easy to use and requires the minimum of interpretation owing to the clear graphical reporting available.&lt;/li&gt;
    &lt;li&gt;Oracle Database Workload Replay is limited to the use of Oracle trace files which can get somewhat complex and cumbersome. However, this approach is very simple and quick to use and satisfies many user requirements especially when using earlier database platforms.&lt;/li&gt;
    &lt;li&gt;Toad DBA Suite’s Benchmark Factory component lets the DBA perform “what-if” analyses by letting them change such things as userload, latencies, etc.&lt;/li&gt;
    &lt;li&gt;Toad DBA Suite runs completely on the client PC and therefore does not consume resources on the server (except in the case of Spotlight – which are minimal and are configurable) and Benchmark Factory for Databases which should only be used to generate load on a non-production server)&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;Oracle OEM&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Workflow is initiated from the OEM Home Page and uses hyperlinks and is not therefore contextually connected to other tasks the DBA might be performing, such as the impact analysis of a proposed new index.&lt;/li&gt;
    &lt;li&gt;OEM’s Change Management Pack is designed for database comparison therefore schema compare workflow requires you to follow the same process. Workflow is improved if using SQL Developer.&lt;/li&gt;
    &lt;li&gt;No data modeling capability.&lt;/li&gt;
    &lt;li&gt;The impact of a proposed new index (or indexes) requires it (them) to be built on the database first in order to assess the execution plans. The only way to minimize disruption in production is to try them out in test and use RAT and SQL Performance Analyzer.&lt;/li&gt;
    &lt;li&gt;Database Workload Replay using RAT enables a more representative replay of application sessions since it mirrors full application transactional concurrency, synchronization and dependencies which Oracle trace files don’t. However, this is a more complex, expensive process better suited to patches and upgrades and is platform limited.&lt;/li&gt;
    &lt;li&gt;RAT does not allow “what-if” analyses. It simply replays what was captured.&lt;/li&gt;
    &lt;li&gt;OEM’s Management Packs and RAT all run on the server and therefore consume server resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;Caveats &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Quest relies on information from a variety of sources in preparing this document. While every attempt is made to ensure its accuracy, errors or omissions can occur.&lt;/p&gt;
&lt;p&gt;In addition, Oracle might make changes to its offering after this document is published, potentially affecting the comparison to Quest’s offering.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;If you missed Parts 1 and 2 of this blog where we contrasted &lt;a href="http://www.toadworld.com/Default.aspx?tabid=67&amp;EntryID=338"&gt;Database Administration&lt;/a&gt; and &lt;a href="http://www.toadworld.com/Community/Blogs/tabid/67/EntryID/345/Default.aspx"&gt;Database Performance Management&lt;/a&gt; tasks using Toad DBA Suite for Oracle and OEM, be sure to check them out.&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/351/Default.aspx</link>
      <author>Johannes Ahrends</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/351/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=351</guid>
      <pubDate>Wed, 18 Mar 2009 12:09:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=351</trackback:ping>
    </item>
    <item>
      <title>Using Toad DBA Suite for Oracle with Oracle Enterprise Manager (Part 2)</title>
      <description>&lt;div&gt;
&lt;p&gt;&lt;font size="1"&gt;By Johannes Ahrends and John Pocknell&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;In the &lt;a href="http://www.toadworld.com/Default.aspx?tabid=67&amp;EntryID=338"&gt;previous blog&lt;/a&gt;, we compared and contrasted how Database Maintenance operations are performed in Oracle’s Enterprise Manager (OEM) and Quest’s Toad DBA Suite for Oracle and how Toad is an excellent complement to OEM because it simplifies and automates many tasks which would take longer in OEM.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;In this second part, we contrast Performance Management operations between OEM (including OEM Database Control for Oracle 10g and above) and Toad DBA Suite for Oracle.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Performance Management&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Since OEM Database Control enables DBAs to manage the performance of many aspects of an Oracle database including SQL execution, configuration, storage, etc, for the purposes of this blog, we will just focus on contrasting application performance management.  For comparison with Toad DBA Suite for Oracle, you will need, in addition to OEM, 2 Management Packs:&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;&lt;strong&gt;Diagnostics Pack&lt;/strong&gt; – offers automatic performance diagnostics and monitoring. This pack is required for any kind of performance monitoring. &lt;a href="http://www.oracle.com/technology/products/oem/pdf/diagnostic-pack-11g-datasheet.pdf"&gt;&lt;span&gt;http://www.oracle.com/technology/products/oem/pdf/diagnostic-pack-11g-datasheet.pdf&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Tuning Pack&lt;/strong&gt; – offers automatic SQL tuning for applications &lt;a href="http://www.oracle.com/technology/products/oem/pdf/tuning-pack-11g-datasheet.pdf"&gt;&lt;span&gt;http://www.oracle.com/technology/products/oem/pdf/tuning-pack-11g-datasheet.pdf&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;Quest Software offers enterprise solutions which address the wider aspects of database performance management but which are beyond the scope of this blog.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 1&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Let’s start with a simple example where you are contacted by an end user who complains: “My application doesn’t respond”&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Possible cause? Blocking – waiting locks.  A very common problem in Oracle databases.&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;In Toad DBA Suite’s &lt;a href="http://www.toadworld.com/Products/SpotlightonOracle/tabid/301/Default.aspx"&gt;&lt;strong&gt;&lt;font color="#800080"&gt;Spotlight on Oracle&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt; component, you see a color change in the overview screen “changes per second” which will be either orange or red.  &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-1.gif" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Click on the “changes per second” flow.&lt;/li&gt;
    &lt;li&gt;A Lock Wait alarm pop-up opens. Click on the “Blocking Locks” drill down.&lt;/li&gt;
    &lt;li&gt;The detail screen provides additional information together with information about which session is holding the lock and which one is requesting it.&lt;/li&gt;
    &lt;li&gt;Click on one of the sessions and you see the actual DML statement the session wants to execute including explain plan if possible.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;In &lt;strong&gt;OEM&lt;/strong&gt; :&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Home page&lt;/li&gt;
    &lt;li&gt;Within your database and in “alerts” you see “waits by wait class” as warning.&lt;/li&gt;
    &lt;li&gt;Click on the message and you see (if you sent the “view data to last 1 hour”) a chart. But no further detail.&lt;/li&gt;
    &lt;li&gt;Recommendation on that page: “Run ADDM to get more performance analysis about your system.” Why?&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;But you might find it more interesting to go to the performance tab. It shows you that there is a problem with “active sessions”. Drill down and voila “here is the session detail”.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;But nothing about the blocking session.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You can drill down to find the actual SQL statement including an explain plan (on several pages) but only if you explicitly go the menu “Hang Analysis” you see that there are two sessions with a blocking waiting lock. Again, drilling down gives some more details.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;But how long does it take to come to the right conclusion? :&lt;/div&gt;
&lt;div&gt;“My application doesn’t respond = Blocking lock from user a SQL statement x”.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The significant differences between Spotlight on Oracle and OEM, in this example, is in the ability of Spotlight to evaluate what is happening in the Oracle database in a real-time, unambiguous way; be able to drill-down in context with the notified problem in order to obtain more information; cross-reference what you have found with other views such as user sessions and then (with the help of contextual advice, if necessary) arrive at the correct conclusion. This is achieved through a combination of Spotlight’s excellent visual dashboard, efficient navigation and the persistence of context even through to problem resolution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It is simply not possible to achieve the same feeling of real-time, smooth navigation and root cause analysis as efficiently by using OEM.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 1 Summary&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Spotlight on Oracle&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Progressive workflow starting with a top-down view of all managed databases.&lt;/li&gt;
    &lt;li&gt;Dynamic color change on a monitored metric notifies the DBA of a problem prompting an immediate response.&lt;/li&gt;
    &lt;li&gt;If the DBA misses the event, Spotlight’s History Browser enables the DBA to “playback” the event.&lt;/li&gt;
    &lt;li&gt;Clicking on a color change presents choices including access to more granular information.&lt;/li&gt;
    &lt;li&gt;Detail screen enables DBA to determine root cause and launch the appropriate solution to resolve the problem.&lt;/li&gt;
    &lt;li&gt;For more information on using Spotlight to diagnose Oracle bottlenecks and optimize databases, see &lt;a href="http://www.toadworld.com/Experts/GuyHarrisonsImprovingOraclePerformance/ResolvingOracleContention/tabid/257/Default.aspx"&gt;http://www.toadworld.com/Experts/GuyHarrisonsImprovingOraclePerformance/ResolvingOracleContention/tabid/257/Default.aspx&lt;/a&gt; or &lt;a href="http://www.toadworld.com/Knowledge/DatabaseKnowledge/GuyHarrisonsImprovingOraclePerformance/SQLTuning/tabid/398/Default.aspx"&gt;http://www.toadworld.com/Knowledge/DatabaseKnowledge/GuyHarrisonsImprovingOraclePerformance/SQLTuning/tabid/398/Default.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Top down view for the connected database only. For other databases, separate connections need to be made.&lt;/li&gt;
    &lt;li&gt;Alerts identify things like excessive Waits will draw DBAs attention to a problem. SQL related issues are less obvious.&lt;/li&gt;
    &lt;li&gt;OEM stores longer history than Spotlight does so the DBA can review performance trend over a longer period of time. (Note: Quest Software offers an enterprise performance management solution called Foglight Performance Analysis (beyond the scope of this article) which provides a long-term historical workload analysis and advisories which you can find out about &lt;a href="http://www.quest.com/Foglight-Performance-Analysis-for-Oracle/"&gt;&lt;span&gt;here&lt;/span&gt;.&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 2&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;Now let’s assume that you suspect that your performance problem is SQL statement related, but you are not sure which one it is within the application.&lt;/div&gt;
&lt;p&gt;Again, with Toad DBA Suite’s&lt;strong&gt; Spotlight on Oracle&lt;/strong&gt; component, you are able to drill down into the root cause from the home page. However, rather than expect you to copy and paste the SQL statement you’ve identified into an editor so you can begin figuring out what to do, Spotlight provides a launch point to another component of the Toad DBA Suite – &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/210/cid/77/Default.aspx"&gt;&lt;strong&gt;SQL Optimizer for Oracle&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p align="center"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-2.gif" /&gt;&lt;br /&gt;
&lt;em&gt;Spotlight on Oracle’s Top Sessions screen isolating the most CPU intensive SQL showing the launch button to SQL Optimizer for Oracle&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;As you can see in the Top Sessions drill down screen (above), the SQL statement which was the cause of the performance bottleneck is immediately isolated and a button on the screen enables you to launch SQL Optimizer to resolve the problem.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;SQL Optimizer’s unique artificial intelligence optimization engine automatically transforms the original SQL statement into multiple, semantically equivalent re-writes, then takes all the re-writes and re-writes those. It continues doing this until there are no possibilities left. This process takes seconds.&lt;/div&gt;
&lt;p&gt;SQL Optimizer then automatically discards all those re-writes which have the same execution plan leaving a number of possible improvements. Information such as plan cost enables the DBA to make an informed decision as to which SQL statement to execute in order to get a measure of actual performance improvement compared to the original statement as you can see below:&lt;/p&gt;
&lt;p align="center"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-3.gif" /&gt;&lt;br /&gt;
&lt;em&gt;SQL Optimizer’s Tuning Lab showing a completed SQL tuning task&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;This workflow here is also extremely productive especially where you have a dynamically changing landscape and SQL statements are being continuously being executed, and you need a quick and decisive way to identify, diagnose and resolve but at the same time maintain control over how the best probable solution is implemented.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;An alternate way of performing SQL optimization in the SQL Optimizer is to use the &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/202/cid/77/Default.aspx"&gt;&lt;strong&gt;Batch Optimizer&lt;/strong&gt;&lt;/a&gt;. The back-end process is still the same as described above, but multiple SQL statements and code can be fed-in to the Batch Optimizer (rather like a conveyor belt) for downstream optimization. This process frees the DBA from becoming involved with the optimization of each statement so that they only have to look at the results and decide which optimized statement to use in each case.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt; together with the &lt;strong&gt;SQL Tuning Advisor&lt;/strong&gt; takes an entirely different approach.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The first significant difference (especially on a production database) is that the problematic SQL statement has to have actually been executed first. Here are some other key differences:&lt;/div&gt;
&lt;ul&gt;
    &lt;li&gt;You can only send to the SQL Tuning Advisor SQL statements which have been captured by OEM (for example Top Activity or from AWR). You cannot enter your own SQL, therefore not helpful to DBAs who &lt;strong&gt;already know&lt;/strong&gt; what they want to tune.&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;SQL Tuning Advisor does not rewrite your code. It will offer suggestions for code changes which then need to be manually implemented by the DBA. It does not find all the rewrites, test the SQL or figure out which is the best alternative.&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;SQL Tuning Advisor’s more advanced plan analysis mode, creates what is called a SQL Profile, which collects additional information for the query by the optimizer. This analysis is not possible in the normal mode. Such a SQL Profile helps generate a better execution plan than the normal optimization. Additional tasks like checking for advanced predicate selectivity, correlation between columns, join skews, and complex predicates such as functions, help in profiling the SQL statement. Once a statement is profiled and stored, it can be used at will.&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;OEM also has a feature called SQL Repair Advisor which a DBA can run in the rare event that a SQL statement fails with a critical error. The advisor analyzes the statement and in many cases recommends a patch to repair the statement. If the DBA decides to implement the recommendation, the applied SQL patch circumvents the failure by causing the query optimizer to choose an alternate execution plan for future executions.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt; &lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-4.gif" /&gt;&lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;OEM’s Top Activity screen showing link to SQL Tuning Advisor&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 2 Summary&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Toad DBA Suite&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;SQL Optimizer works contextually with the identified problem and optimizes the SQL based on an automated optimizing engine generating every possible semantically equivalent re-write.&lt;/li&gt;
    &lt;li&gt;The DBA is offered choices and can select the most appropriate solution.&lt;/li&gt;
    &lt;li&gt;SQL Optimizer’s approach means that a junior or experienced user can use the tool. It can be used by developers and DBAs, and it fixes the root cause of many SQL performance problems - poorly written SQL.&lt;/li&gt;
    &lt;li&gt;SQL Optimizer is designed to simultaneously optimize multiple SQL statements using its Batch Optimizer to reduce the user’s workload.&lt;/li&gt;
    &lt;li&gt;If SQL Optimizer is initiated from Toad, the best solution can be implemented directly back to the SQL statement or PL/SQL code in Toad’s Editor.&lt;/li&gt;
    &lt;li&gt;In tests, the re-written statement performed better than the original.&lt;/li&gt;
    &lt;li&gt;SQL Optimizer can accept SQL statements for optimization at any time for “what-if” analysis.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Since there is no re-writing technology, there is no concept of offering possible alternatives – just one.&lt;/li&gt;
    &lt;li&gt;There is more dependency on the DBA to interpret the data and implement the best solution. This is not a solution for the developer.&lt;/li&gt;
    &lt;li&gt;While OEM’s approach on deploying objects like SQL Profiles influences an execution plan, you are creating an object in the database that needs maintenance and that most likely only DBAs have the rights to deploy.&lt;/li&gt;
    &lt;li&gt;OEM is not designed to simultaneously tune multiple SQL statements.&lt;/li&gt;
    &lt;li&gt;In tests, there is no guarantee that the offered suggestion actually improves the SQL performance.&lt;/li&gt;
    &lt;li&gt;SQL Tuning Advisor cannot accept SQL statements for tuning, the statement can only be captured once it has executed.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 3&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;In this example, you know you have performance problems in the application and you want to &lt;strong&gt;statically&lt;/strong&gt; scan the database and/or the application code to see which SQL statements are the most likely ones contributing to poor performance.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The problem is that database applications typically contain thousands of SQL statements that may need to be optimized for better performance. You would therefore have to find and extract each SQL statement manually — a very tedious and time-consuming task. Once you have found the SQL statements, you need to analyze the execution plan of each SQL statement to see if the execution plan represents a potential performance problem.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;SQL Optimizer’s&lt;strong&gt; &lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_SQL_Scanner_Tutorial"&gt;SQL Scanner&lt;/a&gt;&lt;/strong&gt; component relieves you of this tedious task:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The SQL Scanner extracts SQL statements embedded in database objects, captured from the SGA, or stored in application source code and binary files. It retrieves and analyzes the execution plans for the extracted SQL statements. It then categorizes them according to the complexity of the execution plan and determines whether it has the characteristics that typically cause performance problems.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The SQL Scanner allows you to quickly review SQL statements in existing code and detect potential problems. With this approach, you can be proactive in the detection of performance problems and identify the SQL statements that need to be optimized without actually executing them.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Once the problematic SQL statements have been identified, you can determine the best solution by&lt;/div&gt;
&lt;ul type="disc"&gt;
    &lt;li&gt;Sending a SQL statement to the Tuning Lab for optimization.&lt;/li&gt;
    &lt;li&gt;Sending a SQL statement to the Tuning Lab for index generation.&lt;/li&gt;
    &lt;li&gt;Sending a SQL statement to the Batch Optimizer for optimization. (see screenshot below)&lt;/li&gt;
    &lt;li&gt;Sending a group of SQL statements to Global Indexing for index generation.&lt;/li&gt;
    &lt;li&gt;Saving a group of SQL statements to the SQL Repository for further analysis.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt; &lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-5.gif" /&gt;&lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;SQL Scanner screen showing collected SQL statements from various sources&lt;/em&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt; does not have the ability to scan code directly in source code or in external files. The SQL has to have &lt;strong&gt;actually executed in the database&lt;/strong&gt; first. OEM can look for executed SQL statements in either of the following areas:&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Cursor Cache&lt;/li&gt;
    &lt;li&gt;AWR Snapshot within a specified time period&lt;/li&gt;
    &lt;li&gt;AWR Baseline&lt;/li&gt;
    &lt;li&gt;SQL Tuning Set&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The other disadvantage with this approach is it’s practically impossible to tell whether an executed SQL statement is part of a script, PL/SQL object, etc so locating it will be a problem.&lt;/p&gt;
&lt;p align="center"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-6.gif" /&gt;&lt;br /&gt;
&lt;em&gt;OEM’s SQL Search screen&lt;/em&gt;&lt;/p&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 3 Summary&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Toad DBA Suite for Oracle&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;Potentially problematic SQL statements can be statically scanned in a variety of sources and do not have to be executed first.&lt;/li&gt;
    &lt;li&gt;A classification system enables the DBA to prioritize what needs to be tuned and what does not.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;OEM does not have the capability to make tuning assessments on SQL unless it has been executed first.&lt;/li&gt;
    &lt;li&gt;Determining where the executed SQL statement came from is difficult.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 4&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;In this final example, we need to assess whether something other than a SQL re-write (i.e. an index) would offer a better alternative. It may well be that we need to collectively improve the execution performance of more than one SQL statement, which is particularly challenging for a DBA.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite for Oracle’s &lt;strong&gt;SQL Optimizer&lt;/strong&gt; component makes this task easy, without having to unnecessarily stress the database, through the use of &lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_Index_Expert_Tutorial"&gt;&lt;strong&gt;Virtual Index Simulation&lt;/strong&gt;&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Clicking the Indexing tab allows the DBA to add a single SQL statement or SQL script and determine the most effective index (or group of indexes) which would improve the performance of a single SQL statement or a group of SQL statements (using &lt;a href="http://sqloptimizeroracle.inside.quest.com/demos.jspa?x=Oracle_Gobal_Indexing_Tutorial"&gt;&lt;strong&gt;Global Indexing&lt;/strong&gt;&lt;/a&gt;).&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-7.gif" /&gt; &lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;Global Indexing performance comparison on a group of SQL statements using a Virtual Index&lt;/em&gt;&lt;/div&gt;
&lt;div align="center"&gt; &lt;/div&gt;
&lt;div&gt;An execution plan comparison can be performed without the proposed index being built. If full execution statistics are required before the DBA makes a decision, an index creation script is generated, run (to collect the stats) then the index is dropped afterwards. The script is saved for possible future use.&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;strong&gt;OEM&lt;/strong&gt; has something similar to this called the &lt;strong&gt;SQL Access Advisor&lt;/strong&gt;. This uses the concept of a workload which would typically include a group of SQL statements, but the critical difference here is that all the SQL statements must have already executed in the database.&lt;/p&gt;
&lt;p&gt;The workload source can be selected from one of the following:&lt;/p&gt;
&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Current and Recent SQL Activity (stored in cache)&lt;/li&gt;
    &lt;li&gt;Existing SQL Tuning Set (from SQL Tuning Advisor)&lt;/li&gt;
    &lt;li&gt;A hypothetical workload based on selected tables and schemas&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt; &lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_030209-8.gif" /&gt;&lt;/div&gt;
&lt;div align="center"&gt;&lt;em&gt;SQL Access Advisor showing indexing recommendations&lt;/em&gt;&lt;/div&gt;
&lt;div align="center"&gt; &lt;/div&gt;
&lt;div&gt;Recommendations can be based on indexes, materialized views or partitioning. Once the submitted job is complete, graphs show workload I/O cost improvements and query execution time improvement. Where indexes are recommended, the DDL script is generated which can be scheduled or run.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Although the concept is good on the basis of recommending a strategy based on a workload (SQL transactions), the fact is that these recommendations can only be made after execution on the database with no opportunity to do a “what-if” analysis.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Example 4 Summary&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Toad DBA Suite for Oracle&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Global Indexing proposes the most suitable index sets to collectively improve the performance of a group of SQL statements without having to (permanently) build the index and execute the SQL first.&lt;/li&gt;
    &lt;li&gt;What-if analysis enables a confident assessment of whether the index will improve performance with impacting the database.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt;OEM&lt;/strong&gt;&lt;/div&gt;
&lt;ol type="1"&gt;
    &lt;li&gt;OEM’s Tuning Pack offers one suggestion for an alternative index which must be created in the database before its effect can be determined.&lt;/li&gt;
    &lt;li&gt;OEM’s SQL Access Advisor recommends a course of action (possibly an index) to collectively improve a group of SQL statements.&lt;/li&gt;
    &lt;li&gt;The absence of what-if analysis means the recommended index might have a negative impact on performance.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Summary&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;This blog set out to contrast the differences between &lt;strong&gt;Toad DBA Suite for Oracle&lt;/strong&gt; and &lt;strong&gt;OEM&lt;/strong&gt; in the context of Performance Management. It is worth noting that there are certain tasks for which Toad DBA Suite for Oracle was not designed, such as database configuration advisories, longer historical collection, etc.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;However, Quest Software does offer Enterprise Database solutions which address these areas which you can find out about &lt;a href="http://www.quest.com/Foglight-Performance-Analysis-for-Oracle/"&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It is also worth mentioning that there are additional features in Toad DBA Suite for Oracle which I did not have space to include in this (already long) blog such as &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/233/cid/83/Default.aspx"&gt;Trace File Browser&lt;/a&gt;, &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/234/cid/83/Default.aspx"&gt;StatsPack and AWR Browsers&lt;/a&gt;, &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/235/cid/83/Default.aspx"&gt;Session Browser&lt;/a&gt;, &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/240/cid/83/Default.aspx"&gt;Database Health Check&lt;/a&gt;, etc which can help augment Spotlight in helping to pinpoint a performance related problem.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;For performance management tasks, Toad DBA Suite for Oracle enhances the DBAs productivity by starting with the big picture (across all managed databases) and allows the DBA to access successive layers until the root cause of a performance slow-down is presented. From that point, the DBA is able to directly access the appropriate component with which to resolve and implement a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;OEM is still able to present the big picture, but only shows one database at a time. The other key difference is interpretation of the information. The various screens which OEM presents requires the DBA to have more than a reasonable level of experience in order to understand and correctly interpret what’s presented in order to determine the exact cause of a problem. Implementation of the most appropriate solution also requires experience.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite for Oracle, therefore, is a worthy complement to OEM by providing the DBA with faster and more effective methods of problem identification and resolution with minimal impact to production, where time and accuracy matter and where the DBA sometimes just requires a “second opinion” when it comes to SQL tuning. OEM enables the DBA to take a longer term view of performance management with particular assistance around database configuration and advisories.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Caveats &lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;Quest relies on information from a variety of sources in preparing this document. While every attempt is made to ensure its accuracy, errors or omissions can occur.&lt;/div&gt;
&lt;div&gt;In addition, Oracle might make changes to its offering after this document is published, potentially affecting the comparison to Quest’s offering.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Look for Part 3 of this blog where we’ll be contrasting Change Management tasks using Toad DBA Suite for Oracle and OEM.&lt;/strong&gt;&lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/345/Default.aspx</link>
      <author>Johannes Ahrends</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/345/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=345</guid>
      <pubDate>Mon, 02 Mar 2009 14:04:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=345</trackback:ping>
    </item>
    <item>
      <title>Using Toad DBA Suite for Oracle with Oracle Enterprise Manager (Part 1)</title>
      <description>&lt;div&gt;&lt;font size="1"&gt;By Johannes Ahrends and John Pocknell&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
This 3-part blog will help you differentiate between what Oracle Enterprise Manager (OEM) offers the DBA compared to Toad DBA Suite for Oracle and how the same tasks are approached using each.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Toad DBA Suite for Oracle provides a complete solution for DBAs using Oracle Standard Edition, or in smaller shops where OEM is not being used or as a complementary solution for DBAs using Oracle Database Enterprise Edition and OEM.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;With the Toad DBA Suite for Oracle, you can improve operational efficiency to lower costs by formalizing database management through a systematic approach that assures maintenance, performance and change. The Toad DBA Suite for Oracle allows you to simplify and automate common database administration tasks and become more proactive in solving database-related performance issues before end users are impacted.  &lt;/div&gt;
&lt;div&gt;Toad DBA Suite for Oracle is comprised of the following components:&lt;/div&gt;
&lt;ul type="disc"&gt;
    &lt;li&gt;Toad for Oracle Xpert Edition (includes Quest SQL Optimizer for Oracle)&lt;/li&gt;
    &lt;li&gt;DB Admin Module&lt;/li&gt;
    &lt;li&gt;Benchmark Factory for Databases (Oracle Edition)&lt;/li&gt;
    &lt;li&gt;Toad Data Modeler&lt;/li&gt;
    &lt;li&gt;Spotlight on Oracle (seat-based license)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;The Toad DBA Suite focuses on the database &lt;em&gt;only&lt;/em&gt; and addresses three key areas of database administration:&lt;/div&gt;
&lt;ul type="disc"&gt;
    &lt;li&gt;Maintenance – managing users, database health checks (including security as it relates to user Oracle accounts and permissions), task automation and scheduling, etc.&lt;/li&gt;
    &lt;li&gt;Performance Management – real-time performance diagnostics, database and SQL optimization&lt;/li&gt;
    &lt;li&gt;Change Management – configuration changes, schema changes and database workload replay testing&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;Before we continue, it’s worth clarifying what I mean by OEM (for purpose of comparison in this and the following two parts of this blog).&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The full Oracle OEM Grid Control works to combine all aspects of database, application and infrastructure management in one tool. This leads to several distinct menu structures which make administration of only database-related issues (which most customers are interested in) very complicated.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;From database startup and shutdown to conversion of a database to RAC, there are tons of hypertext links in OEM Grid Control, which causes problems.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;OEM Grid Control is based on Oracle 10g and mainly on 10g Release 1. If you want to install it you first need to install Grid Control 10.2.0.1 which is the management server and agent in version 10.2 and the database in version 10.1.0.4. After the upgrade to 10.2.0.4, both the management server and the agent will be 10.2.0.4 aware (note that this is the final version of Enterprise Manager so still no 11g agent). And the database runs on 10.1.0.5 (which to my knowledge is not supported).&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In this blog, we will focus specifically on OEM or OEM Database Control (for Oracle 10g and above) which hereafter will be referred to as OEM.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Now let’s compare some typical tasks using OEM and Toad DBA Suite:&lt;/div&gt;
&lt;div&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Database Maintenance&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;OEM is built to manage databases over a web interface. So each function ends up as a hypertext link on a new webpage.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;So let’s assume, as a DBA, you want to create a table similar to an existing one:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In &lt;strong&gt;Toad DBA Suite&lt;/strong&gt; :  &lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Open Schema Browser&lt;/li&gt;
    &lt;li&gt;Click the table tab&lt;/li&gt;
    &lt;li&gt;Right-click table&lt;/li&gt;
    &lt;li&gt;Select Create Like&lt;/li&gt;
    &lt;li&gt;Notice the warning regarding the use of user-named constraints &lt;span&gt;              &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt; &lt;img height="341" alt="" width="352" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_020309-1.gif" /&gt;         &lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_020309-2.gif" /&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;In &lt;strong&gt;OEM&lt;/strong&gt; :&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Targets (new page)&lt;/li&gt;
    &lt;li&gt;Databases (new page)&lt;/li&gt;
    &lt;li&gt;Instance (new page)&lt;/li&gt;
    &lt;li&gt;Administration (new page)&lt;/li&gt;
    &lt;li&gt;Schema Tables (new page)&lt;/li&gt;
    &lt;li&gt;Search (popup page)&lt;/li&gt;
    &lt;li&gt;Select Schema&lt;/li&gt;
    &lt;li&gt;Then you select the original table and use “Actions create like” GO.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;After specifying the table name you might want to create a duplicate table. But that’s not possible because you are using the same names for the constraints (no warning, nothing). The execution (OK button) gives the error messages “ORA-02264 name already used by an existing constraint”.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Now let’s compare how you would look at overviews of your managed databases.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It is very common to have more than one database running on the same host. So you might want to have an overview about the structures like datafiles, memory layout, or top sessions.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;With &lt;strong&gt;Toad&lt;/strong&gt; &lt;strong&gt;DBA Suite&lt;/strong&gt; this is combined in the Database Browser:&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_020309-3.gif" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Open Database Browser (main toolbar)&lt;/li&gt;
    &lt;li&gt;Click on your host and use the tabs on the right-hand side. All the above details are shown in various tabs. One screen for ALL databases.&lt;/li&gt;
    &lt;li&gt;Access to both database objects and schema objects is provided in the navigator on the left-hand side meaning that you no longer need to use Schema Browser as well.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;In &lt;strong&gt;OEM&lt;/strong&gt; you first have to select the database again.&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Going to “CPU” gives you some information about the top sessions but not about the layout.&lt;/li&gt;
    &lt;li&gt;The memory layout can be found at databases -&gt; administration -&gt; memory.&lt;/li&gt;
    &lt;li&gt;The tablespace layout under databases -&gt; administration -&gt; tablespaces.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;Yes, everything &lt;em&gt;is&lt;/em&gt; available, but keep in mind that you are working with a Web browser so navigation always launches new screens.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;These are just a few examples which show that:&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;Yes, OEM provides a lot of the same information as Toad &lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;The navigation is very complex and it costs you lot of time to find the root cause of a problem&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;OEM has database maintenance features which are not available in Toad:&lt;br /&gt;
     
    &lt;ol&gt;
        &lt;li&gt;Recovery Manager (RMAN) repository (catalog) management&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Administration of Data Guard (Standby database)&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Database cloning&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Streams and advanced replication management&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Convert to cluster databases&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Administration of flashback recovery area and archiving&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Summary Advisor (for management of materialized views)&lt;br /&gt;
         &lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;Toad offers several database maintenance functions that OEM does not have (click the links for more information on each function):&lt;br /&gt;
     
    &lt;ol&gt;
        &lt;li&gt;All features related to data (browse, compare, generate, subset, export/import, report, etc)&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/230/cid/72/Default"&gt;Manage user accounts without scripts&lt;/a&gt;.  &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/246/cid/72/Default.aspx"&gt;Editor&lt;/a&gt; (yes there is an interface to iSQL*Plus but that product is no longer supported).  &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/237/cid/72/Default.aspx"&gt;Compare and synchronize schemas&lt;/a&gt; (this is available in OEM but only with the add-on Change Management Pack).  &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Compare objects (users, tables, PL/SQL, tablespaces, etc) including objects on other ODBC compatible DB platforms&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;DBMS Flashback (performs a flash back to a version of the database at a specified wall-clock time or a specified system change number (SCN). Uses the DBMS_FLASHBACK package).&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/241/cid/72/Default.aspx"&gt;Flashback data archive&lt;/a&gt; (as this is an Oracle 11g feature it’s not available in the full OEM Grid Control).  &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;Task scheduling – although OEM can enable the DBA to schedule tasks on the server, Toad allows you to schedule many tasks using the Windows Task Scheduler – including schema compare, database health check, script execution, and reporting&lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/229/cid/72/Default.aspx"&gt;Task automation&lt;/a&gt; – Toad’s AppDesigner lets you sequence a group of tasks such as those listed above and have them run against multiple managed databases rather than have to repeat them independently for each database, resulting in a huge amount of time savings on repetitive tasks. &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/240/cid/72/Default.aspx"&gt;Database health check&lt;/a&gt; (including database security vulnerabilities).  &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/242/cid/72/Default.aspx"&gt;Database and schema reporting&lt;/a&gt;. &lt;br /&gt;
          &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/239/cid/72/Default.aspx"&gt;Pre-defined RMAN script templates&lt;/a&gt;.  &lt;br /&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;a href="http://toadworld.com/Community/Blogs/tabid/67/EntryID/257/Default.aspx"&gt;Script management&lt;/a&gt;. &lt;br /&gt;
          &lt;/li&gt;
        &lt;li&gt;And my all time favorite: &lt;a href="http://toadworld.com/Knowledge/ToadKnowledge/CoffeeBreakBytes/tabid/73/TID/231/cid/72/Default.aspx"&gt;log switch frequency map&lt;/a&gt;. &lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;font size="3"&gt;
&lt;div&gt;&lt;strong&gt;Caveats &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;Quest relies on information from a variety of sources in preparing this document. While every attempt is made to ensure its accuracy, errors or omissions can occur.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;In addition, Oracle might make changes to its offering after this document is published, potentially affecting the comparison to Quest’s offering.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;For database maintenance tasks, Toad dramatically increase the DBAs productivity by providing a single, collective view of all managed databases (instead of one at a time) with the ability to drill-down and perform those tasks in a consistent, efficient way. Task automation and scheduling allow many tasks, which are often repetitive, to be executed without the DBAs direct involvement, thus freeing them up to perform other important tasks or processes.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;OEM still lets the DBA perform some of these tasks, but productivity is significantly slower due to navigational inefficiencies. Plus, OEM offers no opportunity to perform multiple tasks against multiple databases.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Look for Part 2 of this blog where we’ll be contrasting Performance Management tasks using Toad DBA Suite for Oracle and OEM.&lt;/strong&gt;&lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/338/Default.aspx</link>
      <author>Johannes Ahrends</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/338/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=338</guid>
      <pubDate>Tue, 03 Feb 2009 17:36:00 GMT</pubDate>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=338</trackback:ping>
    </item>
    <item>
      <title>Automatic RMAN Backup with Oracle Scheduler</title>
      <description>&lt;p&gt;&lt;font size="1"&gt;Is German your native language?  &lt;/font&gt;&lt;a href="http://www.toadworld.com/LinkClick.aspx?link=516&amp;tabid=67"&gt;&lt;font color="#000000" size="1"&gt;Read this blog in German on Johannes' tech articles page.&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Since version 10g, Oracle provides a new job scheduling mechanism named scheduler. There are several advantages over the old dbms_job function but as often the documentation and the various functions is more confusing than helpful. In 11g we have 7 (!) different functions (Scheduler Chains, Scheduler Programs, Scheduler Schedules, Scheduler Jobs, Scheduler Job Classes, Scheduler Windows, Scheduler Window Groups) so you might say “let’s better go with the unix cron!”.&lt;/font&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;But in most of the cases the daily usage is much simpler: I normally only use &lt;em&gt;Scheduler Programs&lt;/em&gt; and &lt;em&gt;Scheduler Jobs&lt;/em&gt; so I removed the others from my Toad Schema Browser menu.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;img height="520" alt="" width="620" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-1.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Picture 1: Schema Browser Configuration&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;With these two functions I’m able to create Jobs which can be executed inside the database (PL/SQL procedure) or outside the database as shown in the following example.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font size="2"&gt;RMAN Scheduling&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;The Oracle scheduler is able to call operating system commands on the server. Unfortunately it is very complicate to tell the Oracle scheduler to execute a command with a script (e.g. &lt;span&gt;rman rcvfile=…&lt;/span&gt;). Therefore I prefer to create a small shell scripts on Unix or Linux systems which only needs one variable (&lt;span&gt;ORACLE_SID&lt;/span&gt;) and includes the RMAN commands.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;A script can look like this:&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;pre&gt;#!/bin/sh&lt;br /&gt;PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin&lt;br /&gt;export PATH&lt;/pre&gt;
&lt;pre&gt;if [ $# -ne 1 ]&lt;br /&gt;then&lt;br /&gt;&lt;span&gt;    echo "Usage: $0 [ORACLE_SID]"&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    exit&lt;br /&gt;&lt;/span&gt;fi&lt;br /&gt;ORACLE_SID=$1&lt;br /&gt;ORAENV_ASK=NO&lt;br /&gt;. oraenv&lt;br /&gt;unset ORAENV_ASK&lt;br /&gt;shift&lt;br /&gt;rman target / &lt;CROSSCHECK ARCHIVELOG ALL;&lt;span&gt;                            &lt;br /&gt;&lt;/span&gt;BACKUP DATABASE;&lt;span&gt;                                     &lt;br /&gt;&lt;/span&gt;BACKUP ARCHIVELOG ALL NOT BACKED UP 2 TIMES;&lt;span&gt;         &lt;br /&gt;&lt;/span&gt;DELETE ARCHIVELOG ALL COMPLETED AFTER 'SYSDATE - 3';&lt;br /&gt;EOF&lt;/pre&gt;
&lt;div align="center"&gt;
&lt;p align="left"&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Script 1: Shell Script for RMAN-Backup&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;I normally store this script named &lt;span&gt;rman.sh&lt;/span&gt; into the &lt;span&gt;/usr/local/bin&lt;/span&gt; directory. Now I’m able to use Toad to create a scheduler job.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;First I create a scheduler program named &lt;span&gt;FULLDB_PROG&lt;/span&gt; which mainly includes the name of the executable (&lt;span&gt;/usr/local/bin/rman.sh)&lt;/span&gt; and some variables (in our case the &lt;span&gt;ORACLE_SID&lt;/span&gt;):&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p align="left"&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-2.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure 2: Scheduler Program Info&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;em&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-3.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure 3: Scheduler Program Arguments&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;font size="2"&gt;Now I’m creating the scheduler job named &lt;span&gt;Backup_JOB&lt;/span&gt;. Don’t forget to enable the job by checking the &lt;em&gt;Enable&lt;/em&gt; button.&lt;/font&gt;&lt;/p&gt;
&lt;div align="left"&gt;
&lt;p&gt; &lt;em&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-4.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure 4: Scheduler Job Basic  Info&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;In the tab &lt;em&gt;Scheduler Info&lt;/em&gt; the start date (midnight) for the first execution is specified and the execution interval (once per day).&lt;/font&gt;&lt;/div&gt;
&lt;p align="left"&gt; &lt;em&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-5.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure 5: Scheduler Job Schedule Info&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;font size="2"&gt;&lt;strong&gt;Useful Tip:&lt;/strong&gt; because the time syntax for the scheduler is not easy you might want to use the right mouse button and see some examples like “&lt;em&gt;Weekdays at 7 am and 3 pm&lt;/em&gt;” to change them accordingly.&lt;/font&gt;&lt;/p&gt;
&lt;div align="left"&gt;&lt;font size="2"&gt;In the tab “Program Info“ I now add the name for the scheduler program (&lt;span&gt;FULLDB_PROG&lt;/span&gt;) &lt;/font&gt;&lt;/div&gt;
&lt;p align="left"&gt; &lt;em&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-6.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure 6: Scheduler Job Program Info&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;font size="2"&gt;You can verify if the execution of your script was successful in the “&lt;em&gt;Run Log&lt;/em&gt;” tab of the scheduler job.&lt;/font&gt;&lt;/p&gt;
&lt;div align="left"&gt;
&lt;p&gt; &lt;em&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010809-7.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;&lt;font size="1"&gt;Figure 7: Scheduler Job Run Log&lt;br /&gt;
 &lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/331/Default.aspx</link>
      <author>Johannes Ahrends</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/331/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=331</guid>
      <pubDate>Thu, 08 Jan 2009 16:56:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=331</trackback:ping>
    </item>
    <item>
      <title>Being Successful with Toad and RMAN</title>
      <description>&lt;div&gt;
&lt;p&gt;&lt;font size="1"&gt;Is German your native language?  &lt;a href="http://toadworld.com/LinkClick.aspx?link=516&amp;tabid=67"&gt;Read this blog in German on Johannes' tech articles page.&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;A lot of companies with Oracle databases have been using RMAN as their main backup utility for years now. But others are still relying on the classical way by copying data files or even using Oracle export as a backup method. There are several reasons for this, but often it’s just only a lack of knowledge about RMAN which prevents DBAs from using this very flexible tool.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;Like other Oracle tools, RMAN was designed as an all-in-one tool which is capable of backing up and restoring nearly everything you want. But this means that for 90% of all databases you only need 10% of the functionality RMAN offers.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Why should you prefer RMAN verses copy or export?&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;First of all Export (and Data Pump export as well) shouldn’t be named a backup tool at all because it is primarily designed for exchanging data between Oracle databases. It can help recover objects from logical failures like DROP, TRUNCATE, DELETE, … but only to a specific point in time (the time the export was executed) and only with time exposure. For a full recovery you first have to create a basic database including SYSTEM, SYSAUX, UNDO and TEMP tablespaces. And then it will probably take more than 24 hours to import the data (even with databases of less than 100 GB in size). That’s often not acceptable for a production environment.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Since Oracle Version 6 it is possible to copy data files in an online database. To do so it is necessary to switch the database into archive log mode. For sure a database can be backed up with OS tools if it is offline and then archiving is not necessary but in case of a failure the database can only be restored to the latest backup. New transactions will be lost. So this practice is not suitable for production environments.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;In addition to the archive log mode it was always necessary to set the database or a data file into a backup mode (BEGIN BACKUP). This is the only way to guarantee that in case of an error the restore and recovery is possible. But this doesn’t imply that the backup is consistent. You have to backup all archived redo logs to assure a successful recovery of your database to any point in time.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Why RMAN?&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;Here are some reasons:&lt;/font&gt;&lt;/div&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;font size="2"&gt;RMAN is Oracle’s recommended tool for backup and recovery of databases&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;RMAN is easy to use (I’ll explain later)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Only tablespaces which are necessary for a recovery are backed up (so no TEMP-Tablespace)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Only used blocks are backed up (this can reduce the backup size dramatically)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Backup creates backup sets including the data file backup, the archived redo logs, the control files, and the spfile.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Restore and Recovery is simple&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Since Oracle 11g the data recovery advisor helps you to find the most effective recovery method without wasting time. &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;The database control files or a repository keeps track of all backups if they are successful or not&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;RMAN can control the archived redo logs (e.g. automatically deletes obsolete files)&lt;/font&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;font size="2"&gt;There are several other reasons why you should use RMAN. The possibility of on the fly compression and encryption. Oracle only allows standard compression with the enterprise edition and an enhanced compression and encryption is only available by buying additional options (advanced compression and advanced security). &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;How RMAN works&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;The following example is for backing up databases without an optional catalog. This catalog is mainly used in large environments with hundreds or thousands of Oracle database. This central repository allows you to maintain the backup of all your databases. But in case of a failure you have to rely on this repository so a second backup strategy is necessary and some other pitfalls (e.g. catalog version vs. RMAN version) limits the usage of a catalog for smaller environments.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;First of all you should – if it isn’t already - switch the database into archive log mode.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;Since Oracle 10g there is a default directory for archiving if you are using flash recovery. In this case the parameter &lt;span&gt;log_archive_dest_10&lt;/span&gt; points to the destination named with &lt;span&gt;db_recovery_file_dest&lt;/span&gt;. So in case you switch on archiving (&lt;span&gt;ALTER DATABASE ARCHIVE LOG&lt;/span&gt;) corresponding subdirectories are created automatically.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Before you backup the database with RMAN the first time you should set some configuration parameters in the control files. This simplifies the daily backup routine because the parameters are stored in the control files of the database.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;font size="2"&gt;&lt;img height="346" alt="" width="609" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010709-1.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;&lt;font size="1"&gt;Figure 1: Calling RMAN with Database Browser&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;Since Toad 9.7 the Database Browser has an addition menu named “&lt;em&gt;Generate RMAN Script&lt;/em&gt;”. From this menu you can call several predefined scripts and you can add your own scripts as necessary. &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;The “&lt;em&gt;Basic Script to setup RMAN for backups&lt;/em&gt;“ allows you to set the configuration parameters.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;Calling this script opens an additional parameter window to set or change some basic variables like log file location, backup location, etc.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010709-2.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;em&gt;&lt;strong&gt;&lt;font size="1"&gt;Figure2: Parameter windows&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;The parameter &lt;span&gt;DB&lt;/span&gt; (Database), &lt;span&gt;PWD&lt;/span&gt; (Password), and &lt;span&gt;USER&lt;/span&gt; are predefined with the corresponding values of the database you choose in the database browser. RMAN can only work with the privilege SYSDBA or SYOPER, so SYS is often used as the default user for RMAN:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;span&gt;RMAN_BACKUP_LOCATION &lt;/span&gt;is the backup directory on the server. RMAN will substitute the variable %d with the name of the database. So in the example the backup directory will be &lt;span&gt;/u02/oradata/PROD11G/&lt;/span&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;The &lt;span&gt;RMAN_LOG_LOCATION&lt;/span&gt; is a directory on the client to store some logging information. Even if this spooling of RMAN is not enabled all changes will be stored in some V$-Tables on the server.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;Now you will see the new RMAN-Editor which allows you to execute RMAN commands from the client.&lt;/font&gt;&lt;/div&gt;
&lt;p&gt;&lt;font size="2"&gt;This is the default configuration file:&lt;/font&gt;&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON; &lt;/pre&gt;
&lt;pre&gt;CONFIGURE DEFAULT DEVICE TYPE TO DISK;&lt;/pre&gt;
&lt;pre&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u02/oradata/%d/%F.bck';&lt;/pre&gt;
&lt;pre&gt;CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT &lt;br /&gt;'/u02/oradata/%d/%d-%Y-%M-%D-%p-%s.bck'&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p align="center"&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Script 1: RMAN-Configuration script&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Explanation:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON&lt;/pre&gt;
&lt;p dir="ltr" style="margin-right: 0px"&gt;&lt;font size="2"&gt;This enables automatic control file and spfile backup with every database backup. By default this is disabled but because in our case only the control file contains information about the backup sets it’s necessary to have the control file backup with every database backup.&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;CONFIGURE DEFAULT DEVICE TYPE TO DISK&lt;/pre&gt;
&lt;p&gt;&lt;font size="2"&gt;This sets the default backup method to disk instead of backing up directly to tape (&lt;span&gt;DEVICE TYPE SBT_TAPE&lt;/span&gt;). &lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u02/oradata/%d/%F.bck'&lt;/pre&gt;
&lt;p dir="ltr" style="margin-right: 0px"&gt;&lt;font size="2"&gt;This parameter tells RMAN were to store the control file and spfile backups. The variable %F should be used all the time because it’s a combination of the Database ID (DBID) the date and a sequence number. If you have to do a full restore and recovery of the database (missing controlfiles) the DBID is necessary in a first step to specify the database.&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u02/oradata/%d/%d-%Y-%M-%D-%p-%s.bck'&lt;/pre&gt;
&lt;div&gt;
&lt;p dir="ltr" style="margin-right: 0px"&gt;&lt;font size="2"&gt;This parameter tells RMAN were to store the database backup. It is a combination of the variable &lt;span&gt;RMAN_BACKUP_LOCATION&lt;/span&gt; and some other RMAN variables. In our example these are:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;%d the database name&lt;br /&gt;%Y Year&lt;br /&gt;%M Month&lt;br /&gt;%D Day of the month&lt;br /&gt;%p Backup Piece&lt;br /&gt;%s Backup Set&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;font size="2"&gt;The parameter s and p are necessary to identify the backup set (s) and uniquely store every piece of the backup.&lt;/font&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;There are several other parameters available but I think these are the most common used.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;In Toad you can now execute this script with the “&lt;em&gt;Execute statement&lt;/em&gt;“ button. As mentioned previously, this script needs to run only once because all parameters are stored in the control files. With &lt;span&gt;V$RMAN_CONFIGURATION&lt;/span&gt; you can validate the parameters.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010709-3.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure 3: RMAN-Configuration&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;Now the prerequisites for backing up the database, tablespaces, or data files (full or incremental) are done and we can backup the database for example with the following command:&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;pre&gt;BACKUP DATABASE PLUS ARCHIVELOG;&lt;/pre&gt;
&lt;p&gt;&lt;font size="2"&gt;You see, this is really an easy command!&lt;/font&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;For the daily backup you might want to add some other tasks to your backup procedure. So the default script “&lt;em&gt;Hot Backup of Database&lt;/em&gt;“ might help you.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Default Script:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;SPOOL LOG TO c:\temp\RMANDBHotBackup_PROD11G.log;&lt;/pre&gt;
&lt;pre&gt;CONNECT TARGET SYS/&lt;7,0,0,0,93,159,93,197,18,136,72,121,80,107,196,243,85,234,12,108&gt;&lt;br /&gt;@PROD11G;&lt;/pre&gt;
&lt;pre&gt;CROSSCHECK ARCHIVELOG ALL;&lt;span&gt;                           &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;BACKUP DATABASE;&lt;span&gt;                                     &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;BACKUP ARCHIVELOG ALL NOT BACKED UP 2 TIMES;&lt;span&gt;         &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;DELETE ARCHIVELOG ALL COMPLETED AFTER 'SYSDATE - 3';&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p align="center"&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Script 2: Backup Script&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Explanation:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;CROSSCHECK ARCHIVELOG ALL&lt;/pre&gt;
&lt;p&gt;&lt;font size="2"&gt;This is a verification routine to check if the archive logs we want to backup are available. Sometimes a DBA has to delete archive logs without backing them up (for example if due to an unforeseen event the database produces tons of archives). Missing archive logs are now marked.&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;BACKUP DATABASE&lt;/pre&gt;
&lt;p&gt;&lt;font size="2"&gt;This is the minimal command to backup the database including the control files and spfile.&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;BACKUP ARCHIVELOG ALL NOT BACKED UP 2 TIMES&lt;/pre&gt;
&lt;p&gt;&lt;font size="2"&gt;Now we are backing up all archived logs generated in the meantime. To reduce the backup size and enabling the storage of archived logs on disk for a longer period of time the “&lt;span&gt;NOT BACKED UP 2 TIMES&lt;/span&gt;” checks how often the archived redo logs are already backed up.&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;DELETE ARCHIVELOG ALL COMPLETED AFTER 'SYSDATE - 3'&lt;/pre&gt;
&lt;div&gt;&lt;font size="2"&gt;Because we normally backing up our database once a day we can remove all archive logs from disk if they are older than 3 days. If you have plenty of space you might want to change this parameter to 7 days.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;font size="2"&gt;This is only one example how to backup a database. In the Toad options menu you will find several predefined RMAN Templates which you can change as needed and you can add your own templates as shows in the example with a tape backup script.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;img alt="" src="http://toadworld.comhttp://toadworld.comhttp://toadworld.comhttp://toadworld.com/Portals/0/blogimages/Johannes Ahrends/JA_Blog_010709-4.gif" /&gt;&lt;br /&gt;
&lt;/font&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;strong&gt;Figure  4: RMAN Templates&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;strong&gt;Please Note:&lt;/strong&gt; We anticipate being able to provide further support for RMAN in the next version of Toad for Oracle, which will be released later this year, to provide DBAs with better visibility of (and reporting on) what backups they have carried out. We would very much welcome any feedback you have on this article and suggestions you have as to what else you would like us to provide. &lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/330/Default.aspx</link>
      <author>Johannes Ahrends</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/330/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=330</guid>
      <pubDate>Wed, 07 Jan 2009 20:51:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=330</trackback:ping>
    </item>
    <item>
      <title>Unicode Migration</title>
      <description>&lt;div&gt;Migrating to a database that supports Unicode is a challenge. You are safe if you are currently using  US7ASCII for you Oracle database because Oracle provides a mechanism with ALTER DATABASE SET CHARACTERSET UTF8 which allows you by just bouncing the database to switch to this new character set. But what if you are currently on a different character set? In Europe we have a bunch of WE8 (Western European) or EE8 (Eastern European) character sets and as they are not a strict subset of Unicode the ALTER Database does not work. So the only chance is to export the whole database, create a new one (with UTF8 or similar) and import it again.&lt;/div&gt;
&lt;div&gt;Is it that easy? No! The reason is that in most databases the so called length semantics hasn’t been used while creating a table. Since Oracle9i the correct syntax for creating is:&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;CREATE TABLE test1&lt;br /&gt;(custid   NUMBER(10),&lt;br /&gt;lastname VARCHAR2(6 CHAR))&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;Have you used this syntax? No of course not! We all used the old version:&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;CREATE TABLE test1&lt;br /&gt;(custid   NUMBER(10),&lt;br /&gt;lastname VARCHAR2(6))&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;p&gt;But what is the difference? The default behavior for an Oracle database is to use “BYTE” as length semantic. And this can cause huge problems while migrating to Unicode.&lt;/p&gt;
&lt;p&gt;Let’s assume your current database is working with WE8MSWIN1252 (common on western European Windows Databases). Entering the following name into the customer table is safe:&lt;/p&gt;
&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;INSERT INTO customer (custid, lastname)&lt;br /&gt;VALUES&lt;br /&gt;(1,’Müller’);&lt;br /&gt;COMMIT;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;If you try to enter the same row in an Oracle database with AL32UTF8 you get the following error message:&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;ERROR at line 2:&lt;br /&gt;ORA-12899: value too large for column "DEMO"."TEST1"."LASTNAME" (actual: 7, maximum: 6)&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;p&gt;The reason is that a German umlaut takes two bytes in Unicode as well as most special characters for other languages.&lt;/p&gt;
&lt;p&gt;When using Oracle export/import or datapump the situation doesn’t change because both utilities are using the exported format while importing into an new database.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;The only chance is to first create the objects and then do the import.&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Toad has a very nice switch under options -&gt; data types which is called “Include Byte/Char spec when creating DDL scripts from 9i databases”. This behavior is not limited to 9i but all existing Oracle versions you can switch off the “BYTE or CHAR” specification for all scripts.&lt;/p&gt;
&lt;p&gt;Now you can generate the schema script (under menu export) for all schemas you want to recreate and execute a user export or full export of the database.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;On your target you first create the user (maybe with CREATE LIKE…) using Toad and load your generated schema script. Before you execute it ,please add one command to the script:&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;ALTER SESSION SET NLS_LENGTH_SEMANTICS = 'CHAR';&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;p&gt;This will switch the actual session into a mode where the default length semantic is now CHAR instead of BYTE. This works for a session as well as for the database but there are several known bugs if you switch it for the database so better only use it for the actual session.&lt;/p&gt;
&lt;p&gt;The test table is now created like:&lt;/p&gt;
&lt;/div&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;pre&gt;CREATE TABLE test1&lt;br /&gt;(custid   NUMBER(10),&lt;br /&gt;lastname VARCHAR2(6 CHAR));&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;div&gt;which allows you to insert the lastname “Müller” now.&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;After all objects are successfully created you can run the import for the table data but don’t forget to switch on “IGNORE ERRORS” as the “CREATE TABLE” scripts are included in the export file.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/306/Default.aspx</link>
      <author>Johannes Ahrends</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/306/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=306</guid>
      <pubDate>Mon, 03 Nov 2008 17:24:00 GMT</pubDate>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=306</trackback:ping>
    </item>
  </channel>
</rss>