<?xml version="1.0" encoding="utf-8"?> 
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/"
     version="2.0">

    <channel>

        <title>DBAzine.com - Chris Foot's Oracle10g Blog</title>
        <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot</link>
        <description></description>
        <language>en-us</language>
        <generator>Plone 2.0</generator>

        
            
                  <item>
                      <title>Oracle9I and 10G Virtual Indexes</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-05-31.6959101573</link>
                      <description>Let’s take a look at an Oracle feature that I used quite regularly in 9i OEM to perform “what if” index scenarios during optimization testing. Although 10G Grid Control doesn’t provide the same graphical interface as 9i OEM, we can still utilize this hidden feature in 10G to simplify and accelerate the SQL tuning process</description>
                      <pubDate>Thu, 31 May 2007 20:18:29 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction</b><br>
  I would describe myself as a fairly good tuner. Not because tuning ever 
  came easy to me, I have just spent a lot of time working with the optimizer. 
  I still have troubles rewriting complex SQL statements from time to time but 
  I will admit that 20 years of experience makes it easier on me than it used 
  to be.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">One of the areas 
  I am strong at is using the proper indexes to influence SQL statement access 
  paths. We know that an index can influence the optimizer to change an access 
  path from a tablescan to a table lookup using an index ROWID. But indexes can 
  also influence the type of join used as well as the order of the tables being 
  joined. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at the benefits virtual indexes have and we'll finish this blog by reviewing 
  how indexes can affect simple access paths, join methods and join orders.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Virtual Indexes</b><br>
  I use virtual indexes in both 9i and 10G. I like them because I can quickly 
  do &quot;what if&quot; scenarios. I can create the index and present it to the 
  optimizer without waiting for the index to become populated and stored on disk. 
  This feature allows me to reduce the amount of time I spend tuning, which is 
  always a good thing. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I also use virtual 
  indexes when I am training myself and others. Most production environments do 
  have test counterparts, but there are times when I need to teach many different 
  indexing concepts and waiting for indexes to build often becomes a detriment 
  to the learning process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>9I OEM Virtual 
  Index Wizard</b><br>
  The Virtual Index Wizard feature is provided in the Tuning Pack option of 9I 
  OEM. Although there are a couple of ways to activate the wizard, let's take 
  a look at the one that I most often use. Since we are going to be naviating 
  through the SQL Analyze tool, we might as well review some of the other features 
  it provides.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Analyze</b><br>
  9I OEM provides the SQL Analyze tool to view access path information. SQL Analyze 
  is only available if you have purchased the tuning pack option for 9I OEM. This 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/5_sql_analyze2.gif">screenshot</a> 
  shows me navigating through 9I OEM's menus to activate SQL Analyze.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When you activate 
  SQL Analyze, the first step the utility performs is to <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/6_sql_analyze.gif">display 
  a listing</a> of all of the top resource consuming SQL statements that are contained 
  in the library cache. If the statement has been flushed from cache, you won't 
  find it in this display. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The tool lists 
  all of the databases on the left side of the panel that you worked with in the 
  past. As you can see, I am a pretty active user of SQL Analyze. I can double-click 
  on any statement in the top SQL listing to view its access path information. 
  I can also use the menu system at the top of the screen to create a blank worksheet 
  for new queries that I can enter manually. I found the statement I wanted from 
  the listing and double-clicked on it to <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/7_sql_analyze.gif">activate 
  the SQL tuning panel</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The panel displays 
  the SQL statement, and like our other utilities, allows us to step through the 
  access path the query is taking. I can click on the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/7_sql_analyze.gif">SQL 
  drop down menu</a> at the top of the screen to ask Oracle to explain the statement 
  using the various optimizer modes that are available.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Analyze 
  Tuning Tools</b><br>
  SQL Analyze provide us with tools that facilitate the SQL tuning process. The 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/9_tools.gif">tools 
  menu</a> at the top of the screen allows me to choose from three different wizards. 
  We'll review the Virtual Index Wizard in just a moment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> The Hint Wizard 
  allows us to choose hints from a drop-down menu system, while the SQL Tuning 
  Wizard activates an intelligent advisor that provides us with SQL tuning recommendations. 
  Once you have run the SQL Tuning Wizard a few times, it's pretty easy to see 
  that it was the precursor to some of the more advanced utilities that are now 
  available in Oracle 10G.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Virtual Index 
  Wizard</b><br>
  The Virtual Index Wizard allows me to create virtual indexes on tables that 
  my query is accessing. The key word in that last sentence is &quot;virtual&quot;. 
  Oracle does not permanently create the index. The intent of the wizard is to 
  allow users to determine the potential performance impact a new index would 
  have on the statement being analyzed. It is then up to the user to permanently 
  create the index.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I click on the 
  Virtual Index Wizard menu selection, 9I OEM responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/10_tuning_wizard.gif">Virtual 
  Index Wizard introduction panel</a>. When I click on next, the wizard displays 
  a panel that allows me to <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/11_tuning_wizard.gif">select 
  the columns for my virtual index</a>. Clicking next again <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/12_tuning_wizard.gif">displays 
  a panel</a> that allows me to attempt to force Oracle to use the new index or 
  allow it to choose the new index on its own. My personal preference is to allow 
  Oracle to choose the index on its own without providing any additional prodding. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Clicking Next again 
  displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/13_tuning_wizard.gif">projected 
  cost improvement</a> the new index will have on the statement being analyzed. 
  I used a full table scan on a rather large table as an example. Based on the 
  display, we can be pretty sure that the new index will have a positive affect 
  on our statement's performance. The last panel also displays a button that allows 
  us to view the before and after access paths.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Virtual Index 
  Wizard does a fairly good job of estimating the impact that new indexes will 
  have on a SQL statement. It is an excellent tool to use when you are starting 
  your tuning education as well as evaluating access paths in Oracle 9I databases. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I was surprised 
  when I found that this feature was not contained in 10G Grid Control. I continue 
  to firmly believe that using a tool to quickly build a virtual index, determine 
  if the optimizer will use it and then display a prediction of the index's performance 
  boost (or degradation) is very beneficial to the tuning process. I used the 
  virtual index wizard dozens of times and will continue to use it when I tune 
  9I (and earlier) databases. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Virtual Indexes 
  in Oracle10G</b><br>
  Although Grid Control doesn't provide the same graphical interface to create 
  virtual indexes as it did in 9I OEM, all is not lost. We can revert to the tried-and-true 
  SQL*PLUS command line to build virtual indexes using the &quot;NOSEGMENT&quot; 
  option. The only feature it won't provide us is the forecast of the statement's 
  performance.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The format of this 
  blog page doesn't provide me with enough space to show you the output from my 
  SQL*PLUS demo. Not without a whole lot of editing anyway. So, I decided that 
  the best option would be to create a separate HTML page for the 10G virtual 
  index demo output. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The demo will show 
  you:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How to create 
    virtual indexes in 10G</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How to configure 
    your session to allow the optimizer to choose a virtual index as an access 
    path</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The affect the 
    &quot;_use_nosegment_indexes&quot; parameter has on access path selection</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The error messages 
    returned if you attempt to manipulate virtual indexes</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Information 
    stored in the data dictionary pertaining to virtual indexes</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a <a href="/blogs/blog_cf/chrisfoot/blogentry2007_05_316959101573/10g_virtual_index_demo2.html">link 
  to the 10G SQL*PLUS Virtual Index demo</a>!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Now that we understand 
  how to create virtual indexes, lets' take a look at how any index can influence 
  simple access paths, join methods and join orders.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Index Affects 
  on Access Paths</b><br>
  Let's use a nested loop join as a quick and somewhat easy example. In a nested 
  loop join, one of the tables in the join is known as the outer table while the other table (the table being probed) is known as the inner table. 
  Oracle reads a row from the outer table and uses the columns in the join condition 
  to probe the inner table. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Take a look at 
  the SQL statement and graphical access path display below:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select a.employee_id, 
    a.last_name, b.department_id, b.department_name,<br>
    c.street_address, c.postal_code, c.city, c.state_province<br>
    from hr.employees a, hr.departments b, hr.locations c<br>
    where a.department_id=b.department_id <br>
    and b.location_id=c.location_id<br>
    and a.employee_id = 174<br>
    order by a.last_name;</font></p>
</blockquote>
<p align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><img src="/blogs/blog_cf/chrisfoot/blogentry2007_05_316959101573/pic.gif"><br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We are joining 
  three tables together HR.EMPLOYEES, HR.DEPARTMENTS and HR.LOCATIONS. Notice 
  that we have two different nested loop join operations. Oracle only joins two 
  tables together at a time. It then creates an intermediate result set and uses 
  that result set to join to the next table. It can use any type of join method 
  available for any of the join operations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  The indexes we have available to us are:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EMP_EMP_ID_PK 
    - index on the EMPLOYEE_ID column of the HR.EMPLOYEES table</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DEPT_ID_PK - 
    index on the DEPARTMENT_ID column of the HR.DEPARTMENTS table</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">LOC_ID_PK - 
    index on the LOCATION_ID of the HR. LOCATIONS table</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The optimizer has 
  chosen to join the HR.EMPLOYEES AND HR.DEPARTMENTS tables first using the nested 
  loop join method. It is on this join condition - A.DEPARTMENT_ID = B.DEPARTMENT_ID. 
  HR.EMPLOYEES is known as the outer table and HR.DEPARTMENTS is classified as 
  the inner table of the join</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The optimizer looked 
  at the local predicate &quot;A.EMPLOYEE_ID=174&quot; and checked to see if there 
  was an index that it could use to improve data access performance. It found 
  the EMP_EMP_ID_PK index that is defined on the EMPLOYEE_ID column. It will access 
  the index first and retrieve the ROWID for the row that has an EMPLOYEE_ID of 
  174. It will use the ROWID to probe the HR.EMPLOYEES table.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As stated previously, 
  the optimizer has chosen the nested loop join operation. It will access the 
  HR.EMPLOYEES table using the EMP_EMPID_PK index, retrieve the value for DEPARTMENT_ID 
  and use it to probe the HR.DEPARTMENTS table looking for a match (A.DEPARTMENT_ID 
  = B.DEPARTMENT_ID). If it finds a DEPARTMENT_ID value in the HR.DEPARTMENTS table 
  that matches, Oracle will use that row in future operations. If it does not 
  match, Oracle will discard it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Notice that the 
  optimizer has chosen to use the DEPT_ID_PK index that is built on the HR.DEPARTMENTS' 
  DEPARTMENT_ID column. Since we are probing this table using the values we found 
  for DEPARTMENT_ID from the HR.EMPLOYEES table, Oracle will use the index on the 
  HR.DEPARTMENTS' DEPARTMENT_ID column. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The B.LOCATION_ID 
  = C.LOCATION_ID is the join condition that is used in the second join operation. 
  The intermediate result set is used as the outer table and the HR.LOCATIONS 
  table is used as the inner table. The same type of probe occurs. Since we are 
  looking for matches using the LOCATION_ID contained in the intermediate result 
  set, the optimizer will choose the LOC_ID_PK index.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's how indexes 
  can influence the type of join used and the order of the tables being joined:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we didn't 
    have indexes on either of the first two tables being joined, the optimizer 
    would most likely have used a hash operation instead of a nested loop join 
    to join the tables together. The optimizer knows that the hash join operation 
    is best used for joins that return larger result sets. It could also have 
    influenced the join order of the tables. In the example, the optimizer could 
    have chosen to join the HR.DEPARTMENTS table to the HR.LOCATIONS table first. 
    It would have then used the intermediate result set created to probe the HR.EMPLOYEES 
    table.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The more indexed 
    columns we have on a table, the greater the chance that the optimizer will 
    use it as the outer table of the nested loop join. It can filter out more 
    rows before it sends it to the join operation. The earlier it can filter rows 
    out, the better.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we have an 
    index on both join columns (i.e. indexes on the DEPARTMENT_ID columns for 
    both the HR.DEPARTMENTS and HR.EMPLOYEES tables), Oracle will use the DEPARTMENT_ID 
    index on the inner table but not the outer. Why is that? Oracle doesn't know 
    if it has a DEPARTMENT_ID VALUE in the inner table that matches a DEPARTMENT_ID 
    value in the outer table unless it reads each and every row of the outer table 
    to do the match. Think about it. It knows that since it has to read every 
    row from the outer table to perform the match, the only indexes it can use 
    are the indexes built on local predicates (i.e. &quot;A.EMPLOYEE_ID=174&quot;).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we have an 
    index on the join column for one table and not the other, the optimizer will 
    often favor the table that has the index on the join column as the inner table 
    of the join. It knows it can't use an index on the join column if it is the 
    outer table but it can use the index if it is the inner.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This is just one 
  quick example to show you the impact that indexes have on access path selection. 
  The key to success is to continuously experiment with the optimizer. One of 
  the features that can speed up your experimentation is to use virtual indexes. 
  Remember, this feature uses an &quot;undocumented&quot; parameter in 10G.<br><BR>
  I would like to thank super-DBA Mark Shore for re-igniting my interest in both 
  9I and 10G virtual indexes. Marks has a natural talent for this profession which I often wish I had.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Director of Operations<br>
  <a href="http://www.remotedbaexperts.com">Remote DBA Experts</a><br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10 Things I Like About 10G - Part 3</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-04-28.5119185797</link>
                      <description>This series covers a few of the features that you may often overlook when using 10G. There are so many features in each new release of Oracle's flagship database that the challenge is to leverage as many features as possible to make your day-to-day life easier. </description>
                      <pubDate>Mon, 30 Apr 2007 09:56:50 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The key to being 
  a successful Oracle DBA is that you must be willing to accept the fact that 
  with each new database release, you will have to adjust the way you administer 
  your environments. In my profession, I work with many DBAs from companies across 
  the globe. The most successful administrators I have met are the ones that intelligently 
  leverage the new features that are available in the releases of the database 
  they are administering. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Running Commands 
  and Scripts Against Multiple Targets</b><br>
  Being involved in an IT audit, like death and taxes, is inevitable. If you work 
  as a technician for any length of time, you will be working with an auditor 
  and some point. Since we provide remote database services, our organization 
  is audited numerous times per year. Sox audits, security audits, HIPPA audits 
  - you name the audit and we have been involved in it. We have an office that 
  is left open full-time for onsite auditors.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Auditors often 
  ask you to run scripts on the operating systems and databases your unit is responsible 
  for supporting. In the past, you would review the scripts and then distribute 
  them to team members to run on the environments they were responsible for supporting. 
  10G Grid Control makes this task a whole lot simpler. Grid provides you with 
  the capability of running host commands and scripts against multiple host targets 
  at the same time. Virtually any command or script that can be executed on a 
  single host can also be executed on multiple hosts using 10G Grid Control R2. 
  Here's <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_01_08.4154171355">a 
  blog</a> that shows you how to use 10G Grid Control R2 to run operating system 
  scripts against multiple targets.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G Grid Control 
  R2 also provides an easy-to-use panel that allows administrators to run SQL 
  scripts against multiple database targets simultaneously. Just like its host 
  command counterpart, all you need to do is code up a SQL statement, choose a 
  set of database targets, run the SQL against the multiple targets and review 
  the output. The benefits that this feature provides is only constrained by the 
  DBAs imagination. Here's a link to <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_01_14.3116717615">a 
  blog</a> that will show you how to run scripts against multiple database targets. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Restore Points</b><br>
  How many times have database recoveries been performed because of incorrect 
  changes made to database data? A user deletes or updates &quot;one too many 
  rows&quot; by mistake and the result is a time-consuming and error prone process 
  to restore and recover the database to a point-in-time before the error occurred. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's go back to 
  my days as an Oracle instructor&#133;. A common question in the Oracle DBA backup 
  and recovery class was &quot;why can't I just roll the database back to remove 
  unwanted changes instead of restoring the database from a backup and applying 
  the redo logs to roll forward to a point-in-time before the error occurred?&quot; 
  The question was invariably followed by &quot;don't you think that would be 
  easier?&quot; The answer was always the same &quot;yes, it would be easier, 
  but the Oracle database doesn't have that capability.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">That was before 
  Flashback Database came along. Oracle's Flashback Database feature provided 
  a new tool in the DBA's recovery toolbox. Flashback Database allows the DBA 
  to &quot;roll back&quot; a table, set of tables or the entire database to a 
  previous point-in-time. Administrators often used a timestamp during the execution 
  of flashback operations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G R2 enhances 
  Flashback Database by allowing administrators to associate a user-defined name 
  with a point-in-time. The user-defined name, called a restore point, can be 
  used in place of a SCN or timestamp when executing a FLASHBACK TABLE or FLASHBACK 
  DATABASE statement. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A SQL statement 
  is used to create the restore point which means it can be embedded in application 
  programs as we as executed on an as-needed basis in SQL*PLUS. The example below 
  shows the creation of a restore point:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> CREATE RESTORE 
      POINT batch_daily_cycle_complete;</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Now if I execute 
  the following statement:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> UPDATE cti.employee_salary_table 
      SET<br>
      salary = 200000 WHERE empl_lname = 'FOOT';</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">My boss can execute 
  this statement to correct the 'mistake' (although I prefer to call it a fully 
  justifiable pay adjustment):</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> FLASHBACK 
      TABLE cti.employee_salary_table TO batch_daily_cycle_complete</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10GR2 also provides 
  guaranteed restore points which ensure that the database can be flashed back 
  to the point-in-time they were created. Guaranteed restore points save disk 
  space because only the flashback logs required to meet the guaranteed restore 
  point need to be retained by the database. The statement below creates a guaranteed 
  restore point:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> CREATE RESTORE 
      POINT batch_daily_cycle_complete GUARANTEE FLASHBACK DATABASE;</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Automatic Undo 
  Retention</b><br>
  In Oracle9i, administrators had their choice of continuing to manage rollback 
  segments on their own (manual undo management) or configuring the database to 
  manage its own before image data (automatic undo management). Oracle refers 
  to system managed before image segments as undo segments. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You didn't have 
  to be an Oracle expert to know that manual rollback segments were &quot;somewhat 
  troublesome.&quot; Out of space conditions, contention, poor performance and 
  the perennial favorite &quot;snap shot too old&quot; errors had been plaguing 
  Oracle database administrators for over a decade. Oracle finally decided that 
  the database could probably do a better job of managing before images of data 
  than we could. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But implementing 
  automatic undo retention didn't necessarily guarantee users a trouble free undo 
  environment. There really is only one parameter that administrators can tweak 
  in a system that uses automatic undo. The UNDO_RETENTION parameter specifies 
  the amount of time in seconds that Oracle attempts to keep undo data available. 
  Setting this parameter to the appropriate value could be described as more of 
  an art than a science. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Set it too low 
  and you are wasting disk space. In addition, you aren't taking advantage of 
  being able to flashback your data to as far back as the disk space allocated 
  to the undo tablespace allows. Set it too high and you are in danger of running 
  out of freespace in the undo tablespace. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G R2 comes to 
  the rescue! The database now collects undo usage statistics, identifies the 
  amount of disk space allocated to the undo tablespace and uses that information 
  to tune the undo retention period to provide maximum undo data retention. Administrators 
  can determine the current retention time period by querying the TUNED_UNDORETENTION 
  column of the V$UNDOSTAT view.</font></p>
<p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">RMAN Automatically 
  Creates Temporary Datafiles During Restore</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  Ever perform a restore and forget to recreate the temporary tablespace's data 
  files? I have. The database comes on-line but the first time a user's sort overflows 
  from memory to disk, an error code is returned. Recreating a database's temporary 
  files is one of those activities that are often overlooked. 10G R2 RMAN will 
  automatically recreate temporary datafiles belonging to locally managed temporary 
  tablespaces during the recovery operation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Enterprise Manager 
  Statistics Management Support</b><br>
  A new link titled 'Manage Optimizer' statistics has been added to the database 
  administration home page in Enterprise Manager. Clicking on the link displays 
  the new Manage Optimizer Statistics home page. The new home page provides wizards 
  and templates that facilitate and automate optimizer statistics management. 
  In 10GR2 administrators are able to use Enterprise Manager to gather, restore, 
  delete, lock and unlock statistics </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Why would you want 
  to lock and unlock statistics? Let me describe one real-life example from a 
  recent project. We have a warehouse system that contains an extremely volatile 
  table. Describing it as volatile is like stating the Titanic sprung a small 
  leak. Hundreds of thousands of rows are added and removed around the clock.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The level of activity 
  is based on the particular business process taking place. At one particular 
  time, the table can contain hundreds of thousands of rows and at other times 
  it can contain dozens. OK, so when do you generate statistics? If you run DBMS_STATS 
  at the same time each day, in most cases you would think you would get a predictable 
  set of statistics generated. Not so in this table's case, sometimes you get 
  hundreds of rows and some times you get hundreds of thousands. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are unlucky 
  and generate statistics on the table when it has hundreds of rows, access paths 
  suffer when the table grows to hundreds of thousands. So, we ran DBMS_STATS 
  when we knew the table contained numerous rows and never generated statistics 
  on it again. Problem is that we can no longer easily use the SCHEMA option for 
  DBMS_STATS. Freezing statistics on this table will allow us to use the SCHEMA 
  option and not generate statistics for selected tables.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DML Error Logging</b><br>
  What I like about SQL*LOADER is its ability to continue processing through load 
  errors. If the record being loaded is rejected because of a unique constraint 
  violation or discarded because it does not meet some user-defined criteria, 
  SQL*LOADER places the record into a discard or reject file and keeps on running 
  until it has reached a user-specified maximum number of rejects or discards.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The loader's log 
  file will show how many records were loaded, rejected or discarded. I can look 
  at the messages and review the discard or reject files, fix the problem and 
  attempt to reload them again.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In 10G R2, this 
  same type of processing has been applied to bulk DML operations. Users are able 
  to specify whether they want to log errors or abort the entire DML statement, 
  set the amount of detail information logged and the maximum error threshold. 
  So instead of the entire DML statement blowing up and rolling back, Oracle will 
  log the errors to the error table and continue processing until it exceeds the 
  maximum number of errors. Just like SQL*Loader! </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 10G R2's 
  DBMS_ERRLOG package is used to create the error log output table and link it 
  to the table being updated. The package's specification is provided below:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBMS_ERRLOG.CREATE_ERROR_LOG 
      (<br>
      dml_table_name IN VARCHAR2,<br>
      err_log_table_name IN VARCHAR2 := NULL,<br>
      err_log_table_owner IN VARCHAR2 := NULL,<br>
      err_log_table_space IN VARCHAR2 := NULL,<br>
      skip_unsupported IN BOOLEAN := FALSE);</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Most of the columns 
  are pretty self explanatory: table name being updated, error log table name, 
  owner of error log table and the error log table's tablespace. If the SKIP_UNSIPPORTED 
  is set to TRUE, column types that are not supported by error logging will be 
  skipped over and not added to the error logging table. If it is set to FALSE, 
  an unsupported column type will cause the procedure to fail.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a quick 
  example:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's create 
      or table that will be updated:<br>
      SQL&gt; r<br>
      1 CREATE TABLE foot.emp_table<br>
      2 (empno number(4), ename varchar2(10), job varchar2(8))<br>
      3* TABLESPACE users;</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Table created.</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add a primary 
      key:<br>
      SQL&gt; ALTER TABLE foot. emp_table ADD PRIMARY KEY(empno) <br>
      2 USING INDEX TABLESPACE users;</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Table altered.;</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Load some rows:</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; INSERT 
      INTO foot.emp_table VALUES<br>
      2 (7499, 'ALLEN', 'SALESMAN');</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; INSERT 
      INTO foot.emp_table VALUES<br>
      2 (7521, 'WARD', 'SALESMAN');</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; INSERT 
      INTO foot.emp_table VALUES<br>
      2 (7566, 'JONES', 'MANAGER');</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's cause a unique 
  constraint violation:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; insert 
      into foot.emp_table select * from foot.emp_table;<br>
      insert into foot.emp_table select * from foot.emp_table<br>
      *<br>
      ERROR at line 1:<br>
      ORA-00001: unique constraint (FOOT.SYS_C009069) violated</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create the 10G 
  R2 error logging table:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">exec dbms_errlog.CREATE_ERROR_LOG 
      ('emp_table','dml_errors_emp_table')</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's create a 
  table that we can update and change one row to see if we can get one row to 
  load and 2 to fail and be placed into the DML_ERRORS_EMP_TABLE:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; create 
      table foot.emp_load_table tablespace users as select * from foot.emp_table<br>
      Table created.</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Update one row 
  to change the EMPNO column's value to avoid the primary key violation:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; update 
      foot.emp_load_table set empno=123 where empno=7499;<br>
      1 row updated.</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Rerun the statement 
  specifying the new 10G R2 error logging syntax. Use our new load input table 
  so that our one changed row will be loaded and two will be rejected and placed 
  into the DML_ERRORS_EMP_TABLE:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; insert 
      into foot.emp_table select * from foot.emp_table<br>
      LOG ERRORS INTO dml_errors_emp_table('test_load_20050718')<br>
      REJECT LIMIT UNLIMITED;</font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OK, we loaded one. 
  What happened to our other two? Let's see what our DML_ERRORS_EMP_TABLE contains. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">First, let's describe 
  the DML_ERRORS_EMP_TABLE:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; DESC 
      foot.dml_errors_emp_table<br>
      <br>
      ORA_ERR_NUMBER$ NUMBER<br>
      ORA_ERR_MESG$ VARCHAR2(2000)<br>
      ORA_ERR_ROWID$ ROWID<br>
      ORA_ERR_OPTYP$ VARCHAR2(2)<br>
      ORA_ERR_TAG$ VARCHAR2(2000)<br>
      EMPNO VARCHAR2(4000)<br>
      ENAME VARCHAR2(4000)<br>
      JOB VARCHAR2(4000)</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Our error logging 
  table contains an incrementing error counter, the error message, ROWID, error 
  type, tag (contains our users specified name from above -'test_load_20050718') 
  and the three columns of our table.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's select from 
  the table. I have truncated the ORA_ERR_MESG$ table for readability sake:<br>
  <br>
  SQL&gt; SELECT ora_err_number$, ora_error_mesg$, emp_no FROM foot.dml_errors_emp_table;</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ORA_ERR_NUMBER$ 
      ORA_ERR_MESG$ EMP_NO<br>
      --------------- -------------------------------------------------- ------<br>
      1 ORA-00001: unique constraint (FOOT.SYS_C009069) violated&#133;..7521<br>
      2 ORA-00001: unique constraint (FOOT.SYS_C009069) violated&#133;.7566</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We loaded one row 
  and rejected two rows due to primary key constraint violations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Conclusion</b><br>
  I hope you enjoyed this series on 10G features.</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10 Things I like about Oracle 10G Part 2 (and other stuff)</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-04-15.6658230898</link>
                      <description>I thought I would combine two different topics of conversation. We'll review of some of the 10G features that we take for granted or are easily overlooked. The discussion also continues its lighthearted review of day-to-day DBA life and provides a few helpful hints and tips to make that life easier. Weird combination but it may make for an interesting and informative read.</description>
                      <pubDate>Mon, 16 Apr 2007 14:36:36 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a couple 
  of my favorite DBA discussions&#133;.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Favorite DBA 
  Conversation #1</b><br>
  Any discussion that ends in &quot;I hope you're not too busy because we need it now.&quot; 
I really dislike the conversation that ends in "we needed it yesterday."  If you needed it yesterday you should have stopped in to discuss this request a week before yesterday.  We all know these types of requests because we have all gotten them. One of your 
  customers pops in and states:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">&quot;We need a 
  complete refresh of XYZ database from production. Oh, and its an ERP application 
  database and we don't have enough disk space in test to hold everything so you'll 
  need to figure out how to reduce its disk size requirements AND make sure the 
  application still works. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I know the box 
  only has 1 CPU and 250 MEG of memory, but can you make sure we still get good 
  performance? We're testing some application coding changes and we need to get 
  performance benchmarks. We'll compare the stats from the test box to the ones 
  we get from our 22 CPU production box. It may not be an &quot;apples to apples&quot; 
  but I think the boxes are close enough to compare the performance stats. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I know its Friday afternoon at 3:00 and even though we knew about this 
  refresh 14 weeks ago, we didn't think we needed to tell you until 1 day before 
  we wanted it. So, we would like to have the system ready by Monday.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Over the last 20 
  years I have received dozens of these last minute requests. Requests that have 
  made me cancel plans, postpone trips and generate numerous apologies to friends 
  and family. The work never bothered me, but the timing of the requests sometimes 
  did. It also reduced the quality of service I provided to my other customers. 
  When you have DBAs jumping from one non-planned request to another, it affects 
  their ability to work on planned requests as well as perform proactive administrative 
  duties.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Fix #1</b>: 
  You minimize these requests by creating, advertising and enforcing DBA work 
  request SLA agreements. Agreements that clearly state lead times per type of 
  request. The more widespread the problem is at your organization, the more advertising 
  you must do. It really becomes a sales pitch on the importance of a DBA unit 
  being able to forecast workloads. The unit can't provide quality service to 
  their customers if they are being affected by work requests that could have 
  been planned for - but weren't.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The mantra should 
  be &quot;all of our customers suffer when we receive un-planned work requests.&quot; 
  I'm not afraid of telling application manager A that she can't get her 
  planned requests done because application manager B just gave us 32 emergency 
  requests. Kind of like putting them both in a jar and shaking it up a bit.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Fix #2: </b>10G 
  Grid Control allows you to clone both the Oracle Home software installation 
  as well as the Oracle database. Grid will automatically adjust the specific 
  home properties (IP address, host name, listener settings) during the cloning 
  process. 10G DBCA templates allow you to clone a new database from existing 
  databases. In addition, DBCA allows you to clone just the source database file structures 
  or the structures and the data. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can also use 
  some of the 10G Data Pump features to tailor the new database to your user's 
  specifications. 10G Data Pump provides numerous options that:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Specifiy what 
    objects you want to transfer from one database to another</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Transfer a subset 
    of data from those objects using various filtering options</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Remap objects 
    during the migration process. You can remap schema objects from one user to 
    another, from one tablespace to another </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You already know 
  I'm a huge fan of 10G Data Pump. You need to leverage the features this tool 
  provides to customize schema and data transfers from one database to another. 
  You shouldn't be writing scripts when you don't need to. The only way you will 
  realize the full potential of 10G Data Pump is to READ THE UTILITIES manual 
  and see how powerful 10G Data Pump really is. It will make your life easier.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Favorite DBA 
  Conversation #2</b><br>
  You come in to a meeting and you're confronted by an application manager who tells you that you need to tune your database because his ace developer 
  &quot;Sir Lawrence of LongSQL&quot; can't get his 32 page SQL statement to achieve 
  sub-second response times.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You know the SQL 
  statement that I'm talking about. It's the one that contains 15 inner and outer 
  joins, 12 subselects, and&#133;&#133;.(feel free to add any other type of complex 
  SQL Syntax here). </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Note from database 
  administrators to application developers:</b><br>
  Just because you can code a 32 page SQL statement, it doesn't mean you should. 
  We all understand how powerful the SQL language is, but do you really need to 
  try and use every feature available in a single statement? There's a difference 
  between leveraging the power of the SQL language and attempting to perform too 
  much work in a single SQL statement. Generating long, complex SQL statements 
  that no one can debug does NOT classify you as a supercoder. It does classify 
  you as something else, but I can't say that publicly.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Favorite DBA 
  Conversation #3</b><br>
  Favorite DBA Conversation #3 combines components of conversations #1 and #2. 
  It occurs when you are approached by a customer who says they have developed 
  this &quot;small&quot; application that goes live in two weeks and it isn't 
  performing &quot;as well as we think it should.&quot; This means that you have 
  to review the SQL from 23 new application programs in those two weeks.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Fix #1</b>: 
  Reinforce the need for the DBA team to be involved in all application development 
  projects. This can be done by creating a series of application design review 
  meetings. A dedicated an <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_08_09.0916922652">entire 
  blog</a> on this subject. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Fix#2</b>: You 
  will need to start a top down performance analysis project that focuses on tuning 
  the most poorly performing queries first. If you don't have access to the 10G 
  Grid Control sissy GUI tools, you can use the V$ views to retrieve the top resource 
  consuming statements. You can use the V$SQLAREA view for Oracle9I and below. 
  10G offers the V$SQLSTATS view that provides some distinct advantages over its 
  previous counterparts.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G V$SQLSTATS 
  Performance View</b><br>
  Before we discuss the new V$SQLSTATS view, let me deviate for a minute to provide 
  you with some quick SQL tuning advice. V$SQLAREA is one of my favorite SQL tuning 
  views. Until V$SQLSTATS came along&#133;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I want to perform 
  a traditional &quot;top down&quot; tuning approach and tune the highest resource 
  consuming SQL, I'll use the statements below to identify the top resource consuming 
  queries. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following query 
  identifies the SQL responsible for the most disk reads:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT disk_reads, 
      executions, disk_reads/executions, address, sql_text FROM v$sqlarea WHERE 
      disk_reads &gt; 5000 ORDER BY disk_reads;</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following query 
  identifies the SQL responsible for the most buffer hits:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT buffer_gets, 
      executions, buffer_gets/executions, address, sql_text FROM v$sqlarea WHERE 
      buffer_gets &gt; 10000 ORDER BY buffer_gets;</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  You can create a more readable report in SQLPLUS by inserting report breaks 
  between the output lines. To generate the report breaks in SQLPLUS, issue the 
  following statement before running the query:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">BREAK ON disk_reads 
      SKIP 2 --- for the disk read report and<br>
      BREAK ON buffer_gets SKIP 2 --- for the buffer get report</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  The first query returns SQL statements responsible for generating disk reads 
  greater than 5,000 while the second query returns SQL statements responsible 
  for generating buffer reads greater than 10,000. I used these numbers just as 
  an example but I sometimes use them as a starting point. I'll then adjust 
  them up or down accordingly, based on their output. The numbers also depend 
  on the system I'm reviewing. I'll use different numbers for OLTP environments 
  than I would for data warehouses.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll notice that 
  I divide the number of disk and buffer reads by the number of statement executions. If a statement is generating 1,000,000 disk reads but is executed 500,000 times, it probably doesn't need tuning. <br><br>
  Heavy disk reads per statement execution usually means a lack of proper indexing, 
  poor selection criteria, etc.. Heavy buffer reads sometimes means the exact 
  opposite - indexes are being used when they shouldn't be.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> But I'm personally 
  most interested in workload, that's why I most often use the buffer cache hits 
  in my initial queries.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But the SQLTEXT 
  column in V$SQLAREA does not provide the entire text of the SQL statement. That's 
  why I include the address column in the report. I can use that value to dump 
  the entire SQL statement from V$SQLTEXT using the statement below (where xxxxxxxx 
  is the value in the address column from the V$SQLAREA reports above):</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select sql_text 
      from v$sqltext where address = 'xxxxxxxxx' order by piece;</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 10G R2 provides 
  a new view called V$SQLSTATS that contains a combination of columns that appear 
  in V$SQL and V$SQLAREA. The benefits that V$SQLSTATS provides are as follows:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since V$SQLSTATS 
    contains the entire text of the SQL statement AND its associated performance 
    statistics, we are no longer required to access both the V$SQLTEXT and V$SQLAREA 
    to obtain the information we need.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle states 
    that V$SQLSTATS is faster and more scalable.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The data in V$SQLAREA 
  has a tendency to get its contents flushed out just when you need to get additional 
  information from it. The V$SQLSTATS view provides users with a longer access 
  window. That's one of the key benefits to this view. <br>
  <br>
  <b>Next Up</b><br>
  The series continues.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10 Things I like about Oracle 10G Part 1</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-04-06.2643727574</link>
                      <description>I review some of the 10G features that we take for granted or often overlook.  The discussion, although somewhat whimsical at times, does provide some very useful information.</description>
                      <pubDate>Mon, 09 Apr 2007 05:44:36 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's consider 
  this blog to be a review of sorts. Oracle 10G has been Oracle's flagship release 
  for some time now. I thought it might be beneficial to focus on some of the 
  benefits that 10G has to offer. They aren't in order of importance. Its just 
  a general list that may help readers remember that there are some pretty cool 
  features in Oracle 10G. Hopefully you will find it to be both informational 
  and an interesting read.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Ease of Installation</b><br>
  I remember the good old days. When I began my career, the Oracle installers 
  were just screen painters that forced you to use the TAB key to navigate back 
  and forth between selections and screens. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Installations used 
  to take hours and experiencing problem after problem was commonplace. Successfully 
  installing Oracle became a rite of passage as a DBA. Four hours after you started 
  the installation (and fighting through errors, warnings and placing a half dozen 
  CDs in the reader), you would finish up and think to yourself &quot;I am an 
  installation GENIUS!&quot;. You next thought would be &quot;I hope I don't have 
  to go through this again for a while.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">With each new release, 
  the installer became easier to use, installation speeds increased and the number 
  of installation problems decreased. In a few years, I'll be telling new DBAs 
  &quot;You don't know how good you have it. I remember when installations used 
  to take three days... We were real DBAs back then. We even had to log in at 
  NIGHT TIME and take the data OFFLINE to do work.&quot; Darn kids don't know 
  how good they have it nowadays&#133;.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We do DOZENS of 
  Oracle installations a month here at Remote DBA Experts. One of the benefits 
  of working here is the sheer thrill of working on virtually every operating 
  system that Oracle makes a product on. Name the O/S and hardware combination 
  and we can truthfully say &quot;been there and installed an Oracle product on 
  it.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When our first 
  set of 10G CDs arrived a couple of years ago, the DBA opened up the package 
  and said &quot;Hey, where's the rest of them? I think they forgot to send me 
  all of the CDs I need to do the install.&quot; We checked MetaLink and found 
  that Oracle10G only needs a couple of CDs. One main CD and another called &quot;The 
  Companion CD&quot; which really should be called &quot;The Companion CD that 
  is required for all installs&quot; since it pretty much has to be installed 
  when you install Oracle.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The team here really 
  likes the fact that the installer now performs pre-installation requirement 
  checks before laying down the software. The installer itself now determines 
  if the O/S environment is configured to correctly run the Oracle software. Having 
  the installer verify that you have performed &quot;your pre-installation&quot; 
  duties is very beneficial. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  <b>10G Data Pump</b><br>
  I'm a big fan of 10G Data Pump. Once you become accustomed to the new environment, 
  it's a pretty good utility. There is a learning curve - like the first time 
  you try to restart a Data Pump job by just rerunning the script again. You'll 
  quickly find out that Data Pump has a command for that. At least it provides 
  you with the &quot;Master table exists&quot; error message to point you to your 
  mistake.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a quick 
  list of some of the features I like:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The utility 
    IS faster than Export and Import. Maybe not as much faster as Oracle says 
    it is - but it is faster. I have personally seen Exports and Imports run for 
    hours - and days.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I like being 
    able to use parallelism to improve performance.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> You can stop 
    and restart jobs. How great is that? The master table knows where you left 
    off so you don't have to spend all of that time trying to code a new Import 
    statement that won't duplicate rows in tables that were successfully loaded. 
    This is really helpful.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How many times 
    did you have to &quot;pick a number, any number&quot; when you had to determine 
    how much space you would need for your Export Dump file? Data Pump provides 
    an option that estimates the output dump file size that would be created by 
    a Data Pump Export. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">One of my favorite 
    features is the network transfer option that allows administrators to attach 
    to any source database that can be accessed from the network, transfer the 
    data and write it to the target database. No dumpfile required! Administrators 
    use the NETWORK_LINK parameter to specify a pre-created database link that 
    points to the source database.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can use 
    the Data Pump Flashback feature to go back in time and export data how it 
    looked in the past. This helps when you get a visit from one of your developers 
    stating &quot;I think I might have updated 47 production tables by mistake, 
    but I won't know until I see the data.&quot; Use the flashback feature during 
    the Data Pump Export and use the Data Pump Import utility to pump the data 
    into a new schema for the developer to review. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> You can use 
    the EXCLUDE parameter to exclude specific objects using custom syntax. For 
    example, EXCLUDE=INDEX:&quot;LIKE 'DEPT%'&quot; would exclude indexes that 
    start with the name &quot;DEPT&quot;.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The more I thought 
  about the Data Pump features I liked, the longer I thought this blog would be. 
  So here are links to three blogs I wrote on Data Pump.</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_19.6918984141">Data 
    Pump Part 1 Features and Benefits</a> - A general overview of the 10G Data 
    Pump Utility.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_26.3042156388">Data 
    Pump Design and Architecture</a> - We dig deeper into inner-workings of the 
    Data Pump utility. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_06_02.2786242018">Data 
    Pump Export</a> - We continue the Data Pump discussion by learning how to 
    use 10G Data Pump Export to &quot;pump&quot; data out of an Oracle database.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_06_08.1893574515">Data 
    Pump Import</a> - The series finale on Data Pump Import.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G Automatic 
  Alerting</b><br>
  Oracle10G provides early warning mechanisms to alert administrators of possible 
  error conditions. The database itself collects numerous metrics that were previously 
  collected by 9i's Oracle Enterprise Manager. Administrators are able to select 
  from dozens of server-generated alerts. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Server 
  generated alerts are activated by a new background process called MMON. MMON 
  is able to access the SGA directly and perform the metrics calculations and 
  threshold monitoring. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G Grid Control 
  enhances these capabilities by providing administrators with a GUI interface 
  to administer alerts and configure notification mechanisms. Administrators are 
  able to use Grid Control or the standalone version, Database Control to set 
  up e-mail and pager notifications. In addition, all server-generated alerts 
  are displayed on the Database Control/Grid Control home pages.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As readers of this 
  blog know, I'm a huge fan of 10G Grid Control. Although the database alerts 
  can be set up in the database using the archaic command line interface, if I 
  can do it using Grid Control with a few clicks of the mouse, that's the tool 
  I will use. And to think I used to call 9i OEM &quot;a Sissy GUI Tool&quot;.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Setting up 10G's 
  &quot;early warning system&quot; places you in the proactive DBA category as 
  opposed to reactive. The term we us to describe a pure reactive DBA is &quot;firefighter&quot;. 
  That's the DBA or DBA team that runs from one fire to the next. I will acknowledge 
  that we are ALL firefighters from time to time. At one of my previous jobs, 
  I spent six months working with another DBA trying to beat an absolutely atrocious 
  third-party vendor package into submission. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You all know the 
  type of third-party vendor package I'm talking about. Someone from your management 
  food chain shows up in your cube and states &quot;Hey, even though you rated 
  this vendor an absolute 0 in all technical categories, and flatly stated that 
  we should not consider them as a viable alternative, we chose them anyway. The 
  Senior VP from the business unit liked the color of their screens. I'm sure 
  you'll be able to get it working.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You then get on 
  72 conference calls with the vendor after the package crushes a 6 CPU box with 
  10 concurrent users. Most of the conversations are with the vendor's lead technical 
  experts who are as arrogant as they are inexperienced. Their continued mantra 
  is &quot;you don't understand how Oracle works, it's your fault, you don't understand 
  how Oracle works, it's your fault&#133;.&quot;. This mantra never stops even 
  though you show them poor SQL coding, transaction looping problems, etc&#133;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But I digress... 
  During my career as an Oracle instructor, one of the most common recommendations 
  I used to provide to my Oracle students was the benefits of database monitoring. 
  My catch phrase was &quot;We monitor by day so we don't get called at night.&quot; 
  By the end of the DBA I class, all I would have to say is &quot;We monitor by 
  day&#133;&quot; and the class would respond accordingly. I would then award 
  them with a set of scripts that allowed them to do database connect checks and 
  track datafile free space. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G Grid Control 
  does all that (and more) for you automatically. The set of checks range the 
  spectrum, from agent unable to connect to target (that means either the database, 
  server or agent broke), to tablespace freespace and alert log errors. As I stated 
  previously, 10G provides dozens of alert choices and is your one-stop-shop for 
  proactive database monitoring. That's a good thing. I would rather wade through 
  dozens of alerts I don't want to activate than spend ANY time coding an alert 
  that wasn't provided by the toolset.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">One of my previous 
  blogs titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_14.9418191992">&quot;Configuring 
  10G OEM Grid Control's Automatic Alert Notification System&quot;</a> will help 
  you set up proactive performance monitoring in 10G. The title says it all. It 
  provides everything you need to activate 10G Grid Control's early warning system.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  The 10 Thinks I like About 10G Continues. Could be more than 10 maybe...</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>My Top 10G Tuning Tools</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-03-31.3616747160</link>
                      <description>This blog contains a listing of my top 10G Tuning Tools.   These are the tools that I most often turn to when I am faced with a “database performance challenge.”  In upcoming blogs, we’ll discuss tools that are available in Oracle 9i as well as review some generic tuning utilities.</description>
                      <pubDate>Mon, 02 Apr 2007 14:56:05 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b> </b></font>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We've spent a lot 
  of time discussing SQL statement tuning. We started off this 15 blog series with a discussion on system triage and finished with Oracle access path identification and tuning. I also dedicated a dozen blogs or so to 10G Grid Control performance monitoring and analysis tools. With the abundance of long-winded information 
I have made available on this blog, I thought it might be beneficial to condense some of it into a review  of some of my favorite tuning toolsets. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>My Number One 
  Tuning Tool of All Time - 10G Grid Control</b><br>
  If we are administering a 10G database, our administration tool of choice is 
  either 10G Database Control (non-grid, standalone version), or 10G Grid Control 
  to administer it. The advanced alerting, monitoring and administration features 
  make this tool our preferred method of administration. The advanced performance 
  monitoring and analysis features make it my number one tool for performance 
  problem determination.<br>
  <br>
  The future of Oracle database tuning will be administrators interpreting and 
  implementing the recommendations generated by the intelligent advisors and ADDM. 
  It is a foregone conclusion that Oracle will continue to improve upon its performance 
  monitoring and analysis toolsets. Self tuning features are no longer options 
  that are &quot;nice to have&quot;, they are requirements for Oracle's competitive 
  survival. SQL Server is continuing to scale, moving into areas that were once 
  dominated by UNIX big-iron machines running Oracle databases. Oracle must compete 
  with SQL Server's ease of use or it will undoubtedly lose market share.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As the intelligence 
  of the advisors and ADDM increases, the need to possess an in-depth knowledge 
  of Oracle and the usage of detailed diagnostics to improve database performance 
  will decrease. And you heard it here first folks, I also think that reading 
  SQL traces and statistics dumps will be a thing of the past. My crystal ball 
  tells me that its just a matter of time until Oracle's SQL advisors make SQL 
  traces and statistics dumps less and less important until they become totally 
  unnecessary. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The new breed of 
  top tuners will be the administrators who focus on how to use the toolsets and 
  interpret their output. Not the tuners who spend the majority of time digging 
  down into the dark, inner workings of the Oracle software. I'm not saying that 
  knowing how the database works is immaterial. I am stating that this intimate 
  knowledge will become less and less important as the tools mature. It's only 
  a matter of time until tuning is relegated to a minor sub-task that can be scheduled 
  between other activities. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a listing 
  of my favorite 10G Grid Control tools.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Host Performance 
  Home Page</b><br>
  If someone tells me &quot;the whole system is slow&quot;, the first thing I'm 
  going to do is review the host platform's key performance indicators. 10G Grid 
  Control's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/perf_home_page.gif">Host 
  Performance panel</a> provides me with exactly the information I'm looking for 
  - current CPU, memory and disk resource utilization. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each resource's 
  graphical display contains links that allow me to view more detailed statistical 
  information. Each of the drill down panels for <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/cpu_drilldown.gif">CPU</a>, 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/memory_drilldown.gif">Memory</a> 
  and <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/disk_drilldown.gif">Disk</a> 
  contains a drop down menu list that I can use to view current as well as historical 
  performance statistics for the last 24 hours, 7 days and 31 days. The main performance 
  panel also displays information on the top resource consuming processes that 
  are currently running on the host. Once again, a drop down menu lets me switch 
  between top CPU and top memory consumption reports. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For a more in-depth 
  discussion on host performance tuning, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_04_19.3743394432">&quot;Host 
  Performance Monitoring Using 10G Enterprise Manager Grid Control&quot;</a>. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control 
  Database Performance Home Page</b><br>
  If I want to review database performance, I will access the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_perf_home.gif">10G 
  Grid Control Database Performance Home Page</a>, which is available in both 
  10G Database Control and Grid Control.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The database performance 
  home page allows me to review performance historically, identify what sessions 
  are dominating &quot;finite system resources&quot;, activate advisors and drill 
  down into the top resource consumers.  I can then quickly review the SQL they are executing. 
  Does it get any better than that? </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I challenge anyone 
  to tell me that they would be able to monitor database performance more efficiently 
  using archaic command line toolsets. By the time you have identified the problem, 
  I'll have already contacted the user running the SQL and created a profile to 
  improve its performance. If I have Grid Control's alerting system configured 
  (which I always do), Grid Control's database performance threshold alert would 
  have already notified me that a problem was occurring. By the time you got that 
  call from an irate user, I would have had it solved. If you want to learn how 
  to configure 10G Grid Control's performance alerting feature, please turn to 
  my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_14.9418191992">&quot;Configuring 
  10G OEM Grid Control's Automatic Alert Notification System&quot;.</a></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To learn more about 
  10G Grid Control's database performance monitoring and analysis features, please 
  turn to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_22.3884573887">&quot;Database 
  Performance Monitoring Using 10G OEM Grid Control&quot;</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control 
  Advisors</b><br>
  OK, I'll admit it. I'm hooked on the advisors. At first I was very wary of their 
  recommendations, but the longer I worked with them, the better I liked them. 
  I have lots of experience tuning Oracle, but if an advisor is going to make 
  my job easier (and let me spend less time debugging a performance problem), 
  I'm all for it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For an overview 
  of 10G Grid Control's advisory features, please refer to my blog that is aptly 
  titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_06_10.8609363343">&quot;An 
  Overview of 10G Advisors&quot;</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a listing 
  of blogs that provide more specific information on the individual advisors. 
  Please note that each title below also links to a blog on that advisor.</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_06.5201081269">10G 
    SQL Access Advisor</a> - The SQL Access Advisor recommends a set of materialized 
    views and indexes based on a supplied workload input. The tool can also help 
    administrators optimize materialized views to take advantage of fast refresh 
    and query rewrite capabilities. In addition, the SQL Access Advisor may recommend 
    dropping indexes and materialized views that aren't being used. The SQL Advisor 
    ranks and groups the recommendations based on the positive impact they will 
    have if implemented. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">SQL 
    Tuning Advisor</a> - The SQL Tuning Advisor, as its name implies, provides 
    SQL tuning recommendations and includes information justifying why it generated 
    those recommendations. The recommendations may include collecting statistics 
    on objects, new index creation, restructuring the SQL statement or the creation 
    of a SQL profile to create a more optimal access path. I have a more detailed 
    blog the SQL Tuning Advisor titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_05.3335525140">&quot;SQL 
    Access Advisor Revisited&quot;</a>.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_25.8847176467">Segment 
    Advisor</a> - Although I don't use this advisor as much as the SQL Tuning 
    and SQL Access advisors, I do use it on a regular basis. The 10G segment advisor 
    identifies segments that have become fragmented as a result of update and 
    delete operations. The <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_16.1165649869">10G 
    R2 Segment Advisor</a> has been enhanced to identify tables that suffer from 
    excessive row chaining and row migrations. Oracle describes these objects 
    as being sparsely populated. Not only do sparsely populated objects waste 
    space but they can also contribute to SQL performance problems. </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Automatic Database 
  Diagnostic Monitor (ADDM)</b><br>
  ADDM is a &quot;recommendation engine&quot; that uses performance information 
  stored in the Automatic Workload Repository (AWR) as input. Here's <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_06_30.3614041361">a 
  blog</a> that provides a detailed description of the Automatic Database Diagnostic 
  Monitor. By default, AWR snapshots occur every 60 minutes. For more 
  information on the AWR snapshots, please turn to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_10_29.7417919231">&quot;Working 
  with Automatic Workload Repository Performance Snapshots&quot;</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To learn how to 
  tailor the 10G AWR snapshot environment to meet your specific needs, please 
  refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_11_06.0481421080">&quot;Configuring 
  and Administering Automatic Workload Repository Performance Snapshots&quot;</a>. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">After the AWR information 
  snapshot is executed, the Automatic Database Diagnostic Monitor is triggered 
  to analyze the information contained in the AWR for the period pertaining to 
  the last two Snapshots.  ADDM's output includes a plethora of reports, charts, 
  graphs, heartbeats and related visual aids. In general, ADDM provides users 
  with a top-down analysis of performance bottlenecks and their associated resolutions. 
  But you can also <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/04a_addm_task_output_page.gif">execute 
  ADDM manually</a> to generate recommendations for current, as well as historical, 
  time periods. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Statistical information, 
  by itself, is often useless. If you have nothing to compare a measurement to, 
  how will you know if its good or not so good? 10G Grid Control allows two sets 
  of snapshots to be compared to one another. The results of the comparison are 
  displayed graphically using horizontal bars to indicate differences between 
  the two measurements. To learn how to perform snapshot comparison, please refer 
  to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_12_03.3566409131">&quot;You 
  Can't Improve What You Can't Compare&quot;</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Conclusion</b><br>
  Take some advice from your friendly ex-Oracle instructor. LEARN HOW TO USE THESE 
  TOOLS. I can't emphasis that statement strongly enough. As I stated, ADDM and 
  the intelligent advisors may not currently be a total replacement for DBA experience 
  and expertise, but sooner or later, they most definitely will be. Don't get 
  left behind - because its only a matter of time.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Scientific Analysis</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-03-17.4269055673</link>
                      <description>We combine all of the knowledge we learned in previous blogs of this series to begin our scientific analysis on Oracle optimization.  We’ll review some of tools we can use to display access path information and look at some graphical displays that will assist us during the analysis process.  I’ll also provide you with some examples to jump-start your testing.</description>
                      <pubDate>Tue, 20 Mar 2007 12:13:34 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Introduction</b><br>
  This information is intended to help you begin your quest to become a database 
  performance scientist. There's a difference between tuning and learning how 
  to tune. Tuning is what happens when you get that call at 3:00 on a Friday afternoon. 
  You have a concerned customer stating that something is running longer (usually 
  way longer) than they would like. Your first response is to consider your choice 
  of career paths, dreaming how nice it would be to sell wood carvings at a roadside 
  stand in Montana. You then perform your diagnostic analysis, come to some sort 
  of conclusion and implement your solution. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Learning how to 
  tune requires that you spend time with the optimizer experimenting with different 
  environmental settings and database objects that affect access paths. It also 
  requires that you have a general understanding of the basics of optimization. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I dedicated <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_19.1078911078">an 
  entire blog</a> on educational resources that will help you build a firm foundation 
  of Oracle optimization knowledge. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's 
  critical that we understand as much as we can about optimization before we begin 
  our experimentation. But the key to success is to spend dedicated time experimenting. 
  I'm not professing that you spend the rest of your career becoming &quot;at 
  one&quot; with the optimizer. But if you don't want to be at a total loss each 
  time something runs long, you need to experiment to learn how to tune.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Environmental 
  Documentation and SQL Statement Selection </b><br>
  Before we begin, we'll need to document some of the key parameters that affect 
  optimization and gather some information on the data objects we will be using 
  in our experimentation. Please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_15.420968196520">&quot;Access 
  Path Scientific Analysis Part I&quot;</a> for more information on the importance 
  of documentation as well as the documentation process itself. In a <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_03_11.8660796218">previous 
  blog</a>, I provided a few hints and tips on identifying what types of statements 
  and access paths would be most beneficial to analyze. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Access Path 
  Identification Tools</b><br>
  Here are the tools that I most often use to review Oracle access paths:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL Scratchpad 
    - I like to see graphical representations of access paths. Even though I have 
    lots of experience reading SQL Trace output and the multitude of variations 
    of access path displays, I like seeing a graphical representation. The problem 
    is that Scratchpad must be installed on your client (comes embedded with 9I 
    OEM) and it doesn't like accessing 10G databases. If I am tuning a 9I database 
    and I have access to SQL Scratchpad, that is the tool I am going to use to 
    display access path information. For more information on SQL Scratchpad and 
    other 9I OEM tools, please turn to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_06.1280259716">&quot;Access 
    Path Identification Part V&quot;</a>.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL*PLUS Autotrace 
    - If I want to quickly display the statement's access path and associated 
    run-time performance statistics, I will use SQL*PLUS Autotrace. Here's <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_16.1691009429">a 
    blog</a> containing a few hints and tips on Autotrace. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Explain Plan 
    - If I don't want to run the query, and I am not concerned about the access 
    path changing during SQL statement execution (read next bullet), I will used 
    the tried and true &quot;explain plan into&quot; clause to ask Oracle to dump 
    the access path information into a table. I'll run a statement to retrieve 
    the data from the plan table and format the output. Please read my blogs titled 
    <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_01.4894880310">&quot;Access 
    Path Identification Part II&quot;</a> and <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_09.4712027033">&quot;Access 
    Path Identification Part III&quot;</a> for more information. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL Trace - 
    If I want to be absolutely sure that the access path the other tools are predicting 
    the statement will take matches what access path is chosen during runtime, 
    I'll run SQL Trace. It is one of the only tools you can use to determine the 
    path chosen during execution. How can the access path change during execution? 
    Read <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_18.7319544765">this 
    blog</a> to find out! The blog contains an example of a production problem 
    that was caused by an access path changing during runtime. For lots of information 
    on activating SQL Trace, please turn to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_16.1691009429">&quot;Access 
    Path Identification Part IV&quot;</a>. SQL Trace is the tool I will turn to 
    if I want to analyze a set of statements that belong to a specific online 
    transaction or batch job. The output quickly tells me what the top resource 
    consuming statements are.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">V$SQLPLAN - 
    V$SQLPLAN contains access path information the SQL statement takes during 
    execution. I'll run the statement, review the access path taken during execution, 
    make my tuning change, alter the text of the statement look different to the 
    optimizer, retrieve the access path information again and compare the before 
    and after results. My blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_01.4894880310">&quot;Access 
    Path Identification Part II&quot;</a> provides all of the information you 
    need when you are using the V$SQLPLAN table to retrieve information on access 
    paths taken during execution.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Regardless of 
    which tool I select, I will use the output to graphically display the statement's 
    access path. Although it is time consuming, graphically displaying a statement's 
    access path allows me to more clearly understand the access path and simplifies 
    the tuning process. <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_09.4712027033">This 
    blog</a> will show you how to graphically display a statement's access path. 
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Another Graphical 
  Display I find Useful</b><br>
  During my career as an Oracle instructor, I was often asked in the SQL tuning 
  classes how I personally documented a query I was attempting to tune. This is 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2007_03_174269055673/worksheet.gif">the 
  display</a> that I showed them. Let's take a look at the contents, starting 
  from the top of the page:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL statement 
    text - the full text of the SQL statement.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Columns in the 
    SELECT clause - a listing of the columns that are in the SELECT clause are 
    displayed under the table they belong to.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Columns in the 
    WHERE clause - a listing of the columns used in the WHERE clause are displayed 
    under the table they belong to. If the columns are tables used in a join operation, 
    an arrow is used to designate which of the other table's columns they are 
    joined to. If I am interested in cardinality and data skew, I would document 
    that information directly below the column name. For more information on determining 
    column cardinality and data skew, please turn to <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_15.420968196520">this 
    blog</a>. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> I</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ndexed 
    columns - The bottom of the page contains all of the indexes that are on columns 
    in the WHERE and SELECT clauses. This allows me to easily determine if I need 
    to create additional indexes are begin analyzing why an index isn't being 
    used.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Performing the 
  Scientific Analysis</b><br>
  Before we begin, we need to understand the effect that preloading the buffers 
  has on SQL statement performance. If you run the query and return the results, 
  you will be loading the buffer cache with data. As a result, subsequent runs 
  of the same statement could be faster. This is because your statement is retrieving 
  data from memory while the initial runs were forced to retrieve the data from 
  disk. You'll need to run the statement twice, make your change and run the statement 
  twice again to ensure that buffers don't impact your timings. You can then compare 
  the output of the second execution of each test. 10G provides a SQL statement 
  to flush the buffer cache. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are building 
  indexes during your testing, don't forget to generate statistics on the new 
  objects. You don't want the lack of object information to affect the optimization 
  process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In the discussion 
  that follows, I'll be providing you with some examples of changes to make during 
  your scientific analysis. You will run the SQL statement, record the execution 
  time and statistics and document the access path. You will then make the suggested 
  alteration, review the access path to see if it has changed and run the statement 
  again to record the new performance statistics and execution time. Please note 
  that in the examples below, I'm not going to remind you each time to run the 
  query to evaluate the performance statistics and execution times. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Index Testing</b><br>
  Let's use the same sample query I used in my graphical display in this discussion:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select a.employee_id, 
    a.last_name, b.department_id, b.department_name,<br>
    c.street_address, c.postal_code, c.city, c.state_province<br>
    from hr.employees a, hr.departments b, hr.locations c<br>
    where a.department_id=b.department_id <br>
    and b.location_id=c.location_id<br>
    and a.employee_id = 174<br>
    order by a.last_name;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is a myriad 
  of different changes we can make. Here's a couple of examples to get you started:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Drop all of 
    the indexes on the tables and review the access path. We know it will use 
    table scans, but what join method did it choose, how about the join order?<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Build an index 
    on one of the join columns (i.e. dept.department_id) and review the access 
    path. Determine if it chose the index, what join method was used and the order 
    in which the tables were joined.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Drop that index 
    and build an index on the other column in the join. Identify if it used the 
    index, join method and join order.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Build an index 
    on employee_id, department_id and last_name. Identify if it used the index, 
    join method and join order. Did you get an index only access path? <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Drop the index 
    you just created and change the order putting employee_id between department_id 
    and last_name. What was the access path?<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Change the 
    WHERE clause to look for rows based on the last_name and first_name columns. 
    Remove the a.employee_id = 174 clause. Build an index on the first_name and 
    last_name columns. What happened? <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Drop the index 
    built on the first_name and last_name columns and build two indexes, one on 
    first_name and the other on last_name. Did the optimizer use both indexes? 
    Which one did it choose?<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Add local predicates 
    to the other tables and identify the access path changes.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Identify a 
    column in one of the tables that has low cardinality. Change the WHERE clause 
    to access that low cardinality column. If you don't have a low cardinality 
    column available, its pretty simple to add a column and update it with a few 
    repeating values to create a low cardinality column. Build a bitmap index 
    on the low cardinality column. Did the optimizer choose the bitmap index? 
    What happens if you use a hint?<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Build a bitmap 
    index on a column that has high cardinality (i.e. employee_id). If it doesn't 
    use the bitmap index, use a hint to influence the optimizer to choose it. 
    Drop the bitmap index and build a B-tree index. Does the optimizer use that 
    index without the hint? Compare before and after execution performance statistics 
    and timing.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Identify columns 
    that have skewed data. Build an index on the skewed column. Change the query 
    to search for a value that occurs many times. Compare that execution to a 
    search on a value that appears few times. Analyze the table and build a histogram. 
    Re-execute the tests and compare the results.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Parameters that 
  Affect Optimization</b><br>
  We also need to learn how different parameter settings affect optimization. 
  We can start by adjusting a few of the basic parameters that have the best chance 
  of changing the access path for a given statement. Most of the parameters can 
  be changed in your session by using the ALTER SESSION statement. Using the ALTER 
  SESSION statement will allow you to change the parameter for your session only. 
  You won't have to worry about affecting other folks executing statements in 
  the same database that you are using for your testing. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_24.7493837565">a 
  blog </a>that provides a listing of parameters we can use during our initial 
  testing. Please note that this is not an all inclusive list. It is a listing 
  of parameters that I feel have the greatest chance to influence the optimizer 
  to choose a different access path.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to execute 
  the statement, change a parameter and note its affects on the statement's access 
  path, performance statistics and runtimes. If you are going to test changing 
  values for different parameters, don't forget to change the one you just tested 
  back to its original setting. That way you won't have multiple changes impacting 
  your test results. You can also test combinations of changes. Just be aware 
  of the changes you are making.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Hints</b><br>
  Administrators embed hints in a SQL statement to influence the optimizer to 
  choose a particular access path. Using hints will allow us to evaluate the affect 
  that different access paths have on SQL statement performance. We will run the 
  statement without any modification, review the access path and performance statistics, 
  use a hint to (hopefully) change the access path, run the statement again and 
  compare the before and after results. Since hints can be embedded in virtually 
  any SQL statement, they will provide us with an easy mechanism to learn more 
  about access paths. I have devoted <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_14.3900730733">a 
  previous blog</a> to hints. The blog also contains a demo document that will 
  show you how to embed hints and the affects the hints have on access paths. 
  One of the key tests is to determine the impact that operation cardinality has 
  on SQL statement performance. You can test this by using the ORDERED hint to 
  ask the optimizer to change the join order for statements that join more than 
  two tables together.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Conclusion</b><br>
  The tests above will hopefully stimulate your creativity and allow you to generate 
  your own test cases. As we become more experienced we'll need to review subselects, 
  views, complex selectivity issues (and the list goes on and on&#133;) Oracle 
  performance tuning is truly a wonderfully complex subject. The important thing 
  is that we start the process. That's the only way we'll become database performance 
  scientists!<br>
  </font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Acces Path Scientific Analysis Part IV</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-03-11.8660796218</link>
                      <description>We continue our series on Oracle access path scientific analysis.  In this latest installment, we’ll do a quick review of some of the blogs that led us to this point.  We’ll also learn how to select a set of SQL statements that we will use in our test cases.</description>
                      <pubDate>Mon, 12 Mar 2007 06:18:28 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <B>Introduction</B><br>
  The latest installment in a series of blogs on Oracle access paths. Before we 
  begin,it is important for us to do a quick review of my previous blogs on SQL 
  performance. We'll be using this information </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">during 
  our scientific analysis phase. </font> </p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_10_28.8698342650">Let's 
    Get Technical! - Using Deductive Reasoning and Communication Skills to Identify 
    and Solve Performance Problems<br>
    </a>The first blog of this series provides some helpful hints on what questions 
    to ask during the initial stages of application performance problem analysis.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_04.1538832230">System 
    Triage Part II - Host Performance Analysis Using Grid Control and Host Commands<br>
    </a>Using operating system commands and 10G Grid Control to monitor database 
    server performance.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_10.6780804300">System 
    Triage Part III - Finding the Top Resource Consumers<br>
    </a>We learned how to use 10G Grid Standalone to identify the top resource 
    consumers for a given instance.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_18.7319544765">System 
    Triage IV - Access Path Identification Part I</a> <br>
    A high-level overview of Oracle query optimization. Also discussed the difference 
    between estimated and runtime access paths.<br>
    <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_01.4894880310"><br>
    </a></font></li>
  <li><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_01.4894880310"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">System 
    Triage V - Access Path Identification Part II</font></a><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    <br>
    We reviewed the two data objects that contain access path raw data - plan_table 
    and v$sql_plan. In addition, we discussed a few of the V$ dynamic performance 
    views that provide information pertaining to SQL statements executing in our 
    Oracle database environment.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_09.4712027033">Access 
    Path Identification - Part III</a> <br>
    A discussion on the tools we can use to display graphical and text versions 
    of explain plan data including the DBMS_XPLAN package, UTLXPLS.SQL, UTLXPLP.SQL 
    and Oracle 9I Scratchpad (graphical). We also learned how to create our own 
    graphical displays of Oracle access paths.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_16.1691009429">Access 
    Path Identification - Part IV</a> <br>
    An investigation of everyone's favorite performance analysis tools - SQL*PLUS 
    Autotrace and SQL Trace.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_06.1280259716">Access 
    Path Identification - Part V<br>
    </a>A discussion on a couple of 9I Oracle Enterprise Manager tools that we 
    can use to identify Oracle access paths. We also learned how we can use 9I 
    OEM's SQL Analyze and the Virtual Index Wizard to help us better understand 
    access paths, monitor database performance and tune statements running in 
    an Oracle 9I database environment.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_13.9166686138">Access 
    Paths VI - 10G Grid Control SQL Details Panels</a> <br>
    We turned our attention to the 10G Grid Control's access path display panel 
    - the SQL Details Panel. It seems like no matter where you start your investigation 
    in 10G Grid Control, sooner or later, you'll end up with a panel that contains 
    a link to the SQL Details Panels. We took a look at a few of the more popular 
    ways of finding our way to them.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_19.1078911078">Access 
    Paths VII - Access Path Education</a> <br>
    Focuses on the importance of Oracle access path education. The blog contains 
    links to resources and numerous Metalink Notes that provide access path educational 
    information.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_15.4209681965">Access 
    Path Scientific Analysis Part I</a> <br>
    An introduction to Oracle Access Path Scientific Analysis. We learn why it 
    is important for us to become &quot;database performance scientists&quot; 
    if we want to fully understand Oracle access paths and the affect they have 
    on SQL statement performance. We also learned how to select a test system 
    to use as well as document the parameters and database objects that play key 
    roles in the optimization process.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_14.3900730733">Access 
    Path Scientific Analysis Part II</a> <br>
    We learn how to use hints to influence access paths for testing purposes. 
    Using hints allows us to evaluate the affect that different access paths have 
    on SQL statement performance. When we finally begin our access path scientific 
    analysis, we will run the statement without any modification, review the access 
    path and performance statistics, use a hint to change the access path, run 
    the statement again and compare the before and after results. Contains a document 
    that provides a demo on using hints to influence access paths. The demo document 
    also contains a description of some of the basic access paths that Oracle 
    can choose from.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_24.7493837565">Access 
    Path Scientific Analysis Part III</a> <br>
    An overview of the various types of indexes as well as indexing strategies 
    that affect Oracle access path selection. Also includes a list of parameter 
    that can influence the optimizer to favor index access.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Selecting SQL 
  Statements to Analyze</b><br>
  We need to select a few SQL statements that we can use as input to our scientific 
  analysis. Let's take a look at the various tools we can use to select the SQL 
  statements we can use for testing.</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Using 9I Oracle 
    Enterprise Manager - We can use the Session Details Panel to retrieve the 
    SQL text of statements that are currently executing in the database. The Session 
    Details Panel also provides the access path the statement is taking. The <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_06.1280259716">blog 
    on 9I OEM</a> will show you how to drill down to find the text of the SQL 
    statement and the access path it is taking.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G Grid Control 
    - Grid Control' s Execution Plan Panel allows administrators to display the 
    entire text of a SQL statement and the access path it is taking. This <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_13.9166686138">blog 
    on 10G Grid Control</a> will show you how to navigate through the various 
    panels to access the Execution Plan Panel. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL Trace - 
    If we don't have access to the &quot;SGTs&quot; (Sissy GUI Tools), all is 
    not lost. We can also use the SQL Trace utility to capture the text of the 
    SQL statement as well as its access path. To use this method, we would contact 
    one of our friendly application developers and ask them to run a series of 
    batch jobs or online transactions in the environment we have selected as our 
    test bed. <br>
    <br>
    We can then activate SQL Trace, contact the developer to run the selected 
    workload, deactivate the trace and format the trace's output into an easily 
    readable format. SQL Trace provides the benefit of allowing us to capture 
    multiple SQL statement access paths in a single execution. The <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_16.1691009429">blog 
    on Autotrace and SQL Trace</a> provides instructions on how to activate the 
    SQL Trace utility.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What Statements 
  Should I Choose?</b><br>
  We are looking for statements that utilize the different Oracle access paths. 
  Try and find statements that use:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Table scan and 
    index access paths: <br>
    <br>
    </font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index only 
        - Oracle is able to read all of the data required to satisfy the query's 
        data needs from the index structure alone. <br>
        <br>
        </font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index to 
        table - Oracle uses a row identifier to probe the table to satisfy the 
        data request. <br>
        <br>
        </font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Full table 
        scan - Oracle reads all rows from the table. Oracle will scan the table 
        to the last block used (as opposed to the last block that actually contains 
        data).<br>
        <br>
        </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Join access 
    paths:<br>
    Used when the statement retrieves data based on matches between two tables 
    (i.e. retrieve all of the employees that have the department name of &quot;Welding&quot;). 
    The employee information is contained in the employee table and the department 
    information (including the department name) is in the department table.<br>
    <br>
    </font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Nested 
        loop join - Good path when the join is accessing a small subset of rows. 
        <br>
        <br>
        </font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hash join 
        - Efficient access path for joins that access larger sets of data. <br>
        <br>
        </font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sort merge 
        join - Sorts rows to allow quicker access during the join. </font><br>
        <br>
      </li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Outer joins 
        - An outer join returns all of the rows that satisfy the particular join 
        condition and returns additional rows from one table that do not satisfy 
        the join condition.</font></li>
    </ul>
  </li>
</ul>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We don't have 
    to find each and every access path I outlined above. In addition, each statement 
    that does a join will also contain table scan and/or index access paths. Try 
    to find statements that access a single table and statements that join two, 
    three and four tables together. It should be relatively easy to find the nested 
    loop and hash join access paths. Sort merge and outer joins may be a little 
    harder to find. Try and stay away from SQL statements that use parallel processing, 
    are 13 pages long or join 5 or more tables together. We want to start with 
    the basics. We also don't want to use statements that have exorbitantly long 
    execution times. We'll be executing them on a fairly regular basis during 
    testing and waiting hours for the results will lengthen the testing process.</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  We devise our scientific analysis testing process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Almost Forgot</b><br>
  How are the Daylight Savings Time changes treating you? I may break in one last 
  time to discuss their impact on our organization.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>DST Deadline - One Week and Counting</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-03-04.1596857853</link>
                      <description>Although I didn’t want to break the flow of our series on access path scientific analysis, it is important for us to review the upcoming DST changes one last time.   We’ll return to our original discussion on access paths in my next blog.</description>
                      <pubDate>Mon, 05 Mar 2007 07:02:41 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> We should all know 
by now that the DST changes will impact many of this systems we are charged with 
supporting. Since we administer a LOT of different environments here, I thought 
it may be helpful to discuss some of our findings.</font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Problem</b><br>
  Before we begin, we need to understand exactly what the problem is. If you haven't 
  read my previous blogs on this topic, I highly suggest you do so before continuing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Metalink DST 
  Information</b><br>
  In my <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_03.3876734950">first 
  blog on DST</a>, I provided you with numerous links to Metalink Notes that focused 
  on Daylight Saving Time. In <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_02_03.3876734950">my 
  second blog</a>, I provided a link to Oracle's new Metalink support category 
  on DST. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Updates</b><br>
  We have patched dozens of databases and operating systems since I wrote that 
  first blog on DST. I've compiled a a few notes on what we have found:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Operating System 
  Patches</b><br>
  <br>
  <b>Windows<br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We have 
  patched all of our customers database servers that we are responsible for providing 
  OS support for and have experienced no issues. But some of our customers have 
  notified us that they have experienced problems when they patched their mail 
  and application servers. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If one implementation 
  experiences a problem, you have a tendency to chalk that one up to that specific 
  environment. When multiple implementations experience problems, we decided to 
  inform our entire customer base of the potential for issues. Especially when 
  we know that several of the customers that reported problems have top-notch 
  Windows administrators on staff.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All of the environments 
  had test and production operating systems that were configured to mirror each 
  other as closely as possible. The test patches worked as advertised but a few 
  of their production environments failed. Either the patch wasn't applied successfully 
  or the environment refused to work after the patch was applied. In one case, 
  Microsoft support had the administrator apply the patch again using the exact 
  same steps and it worked the second time. Go figure. Several of the other customers 
  were asked by Microsoft support to make various changes to their O/S configuration 
  and attempt the patch a second time. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A few of our customers 
  experienced mail performance problems because the DST patch caused the mail 
  engine to generate dozens (upon dozens) of meeting time updates. The DST patch 
  forces the mail engine to change the meeting times for all meetings that were 
  sheduled between March 11 (new DST date) and April 1 (old DST date). </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I do apologize 
  that I don't have specifics on the the other issues. I do know that each fix 
  was specific to that environment. I know that this may seem not very helpful 
  at this time but I think a general warning was warranted. <br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendations<br>
  </b> Just because all of your test patches worked, don't assume that the production 
  environment will also be successful. When you patch the production environment, 
  be prepared for issues that did not occur during the test patches. You can't 
  blame Microsoft either; test and production environments that are configured 
  &quot;as closely to each other as possible&quot; aren't mirror images of each 
  other. Close doesn't count when it comes to operating system/hardware configurations. 
  Visit Microsoft's website regularly to ensure that there is no additional information 
  you need to be aware of.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  UNIX, LINUX</b><br>
  Our O/S admins experienced a few minor issues with UNIX and Linux. Please remember 
  - if the server has its own Java engine (and you run Java programs on the O/S), 
  your best bet is to patch both the operating system and the Java engine. We 
  did find that several O/S vendors were updating their DST patching instructions 
  on a regular basis.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendations</b><br>
  Don't forget to patch that Java engine too! Visit your O/S vendor's website 
  regularly to ensure that there is no additional information you need to be aware 
  of.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Oracle Database Patches</b><br>
  The biggest issue we had was with Oracle's updates to the DST patching documentation. 
  Since we were required to do a LOT of patching, it was important for us to get 
  a head start. In the middle of January, we download all of the DST documentation 
  and studied the information. We then created our plan of attack and began implementing 
  it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We also checked 
  the DST area on Metalink every few days for updates. Here's where the problem 
  arose. Some of the database patching documentation (10G specifically) can be 
  described as &quot;somewhat fluid&quot; in nature. Our DST coordinator, Brian 
  &quot;Captain Patch&quot; Hays found that some of the changes forced him to 
  assemble his DST team to review their impact. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Although the updated 
  documentation did not force us to redo any patches, we did have to revisit several 
  of the environments that we already patched to ensure that we didn't have to 
  reapply them. In one case, the initial documentation did not provide a complete 
  listing of DST datatypes that could be used in table definitions. We reviewed 
  each of the environments looking for tables containing the additional DST datatypes 
  and were pleased to find that none were in use. I can state that when we did 
  apply the database patches (both for the database and the Oracle Java Engine), 
  they worked flawlessly. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendations<br>
  </b>We intend to check for updates to all Oracle DST documentation until March 
  11. I would highly suggest that you also do so.<br>
  <br>
  <br>
  <b>Oracle Application Server</b><br>
  Oracle's application server was the biggest challenge. Oracle recommended numerous 
  patches for the infrastructure database to ensure DST compliance. Many of the 
  patches required that the infrastructure database be at a specific release. 
  Oracle also recommended that we apply DST patches to all of the target databases 
  that could potentially be accessed by the application server. Once again, all 
  of the patches worked.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendations<br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you 
  haven't patched your application server yet, you had better get started! Review 
  the Metalink DST documentation for updates.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Oracle E-Business Suite Applications<br>
  </b>All of the patches worked flawlessly. <br>
  <br>
  <b>Recommendation<br>
  </b>Review the Metalink DST documentation for updates.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <br>
  <b>General Recommendations<br>
  </b>Visit Oracle's and your operating system vendor's websites regularly to 
  ensure that you have the most up-to-date information possible. Ensure that your 
  database and application support technicians are readily available during the 
  week of March 11th. The challenge is that some of the problems that could occur 
  may not become readily apparent. They could very well crop up days, weeks and 
  possibly months later. Be ready.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading 
  and good luck on DST. Let me know how it works out for you!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Scientific Analysis Part III</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-02-24.7493837565</link>
                      <description>Now that we have an understanding of how we can influence access paths using hints and session parameter changes, let’s continue our discussion by reviewing the various types of indexes as well as indexing strategies that affect Oracle access path selection.  We’ll complete this series next week when we use all of the information we have learned to perform our own scientific analysis on Oracle optimization.</description>
                      <pubDate>Mon, 26 Feb 2007 10:04:14 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction 
  to Oracle Indexes</b><br>
  Generally, the fastest way to access Oracle data is with an index. The Oracle 
  database contains several different indexing types that are designed to provide 
  complementary performance functionality. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">While standard 
  B-tree indexes are most effective for columns containing a high number of different 
  values (high selectivity), bitmapped indexes are most appropriate for columns 
  with a relatively limited number (low selectivity) of different values. The 
  low selectivity statement above comes with several caveats. Instead of spending 
  this entire blog on the bitmap index/low selectivity issue, please turn to Jonathan 
  Lewis's DBAZine article titled <a href="/oracle/or_articles/jlewis3/index.html">&quot;Bitmap 
  Indexes Part 1&quot;</a>. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 
  also provides function-based indexes to allow index access using SQL that contains 
  column manipulations in the WHERE clause.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Administrators 
  supporting large data stores use partitioned indexes to decompose large index 
  structures into smaller, more manageable pieces called index partitions. Starting 
  with the 8i release, Oracle places index data in the separate index partitions 
  based on the index's partitioning key. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before we begin 
  our reviewing some of the more popular Oracle index types, let me provide you 
  with a few thoughts on indexes in general.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>How Many Indexes 
  Can I Build?</b><br>
  This subject has always been a matter for great debate. The DBA must balance 
  the performance of SELECT statements with their DML (INSERT, UPDATE and DELETE) 
  counterparts. SELECT statements that return a limited number of rows from a 
  table yet access non-indexed columns will suffer from poor performance. Conversely, 
  if you have too many indexes on a particular table, DML statements may be adversely 
  affected. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The DBA must take 
  the business requirements, application processing workload and workload scheduling 
  into consideration when determining how many indexes to build. If you compare 
  the performance improvements an index makes on a SELECT statement to the negative 
  affect it has on DML statements, you will find that the benefits of building 
  the index usually far outweigh the performance drawbacks. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Indexes on columns 
  in the WHERE clause of SELECT statements can reduce query times by minutes and 
  even hours. The creation of additional indexes may add additional time to on-line 
  transactions that execute DML statements. Additional indexes will have the greatest 
  negative impact on DML statements that access a large number of rows. The more 
  rows that are inserted, deleted or changed, the greater the negative impact 
  will be. Traditionally, programs that process large volumes of rows are scheduled 
  to execute during off-hours. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The DBA must also 
  consider the needs of the business. What process is more important to the business 
  unit - getting the data in or getting the data out? Who complains the most? 
  Is it the business user that must wait minutes (or hours) for their transaction 
  or report to retrieve data or the business user that is waiting an extra few 
  seconds for their update transaction to complete? Is the nightly batch window 
  tight on time?</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The DBA will need 
  to find out how much time the additional indexes add to programs that process 
  large volumes of rows. In addition, the DBA must determine when these programs 
  run. If they run at night or do not require high-performance, consider building 
  the index. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the transaction 
  update performance requirements are excessive (dot com applications are one 
  example), keep the number of indexes to a minimum. A good recommendation is 
  to build a set of tables that have no indexes for lighting-fast update performance 
  and move the data to historical tables (with proper indexing) during off-hours 
  to improve retrieval performance. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Index Monitoring</b><br>
  Determining if an index will increase performance is a pretty straightforward 
  process. The administrator is focusing their tuning efforts on a particular 
  query and is able to gather the specific information necessary to assist in 
  the decision making process. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Dropping unused 
  indexes is also an important part of application tuning. We learned previously 
  that indexes force Oracle to occur additional I/O every time a row is inserted 
  or deleted into the table they are built upon. Every update of the table's columns 
  incurs additional I/O to all indexes defined on those columns. Unused indexes 
  also waste space and add unnecessary administrative complexity. Since unused 
  indexes (excluding those used to enforce integrity constraints) do not add any 
  benefits to the environment, why keep them?</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Determining if 
  indexes were being used in releases prior to Oracle9i was a time consuming and 
  error-prone process. EXPLAIN plan and trace output could be used but there was 
  no single mechanism that monitored index usage at the database level.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Starting with release 
  9i, the Oracle database simplifies the index usage monitoring process by providing 
  the ALTER INDEX&#133;&#133;&#133; MONITOR USAGE command. The statement below 
  turns monitoring on for the index SCOTT.EMPIDX while the second statement ends 
  the monitoring session:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ALTER INDEX scott.empidx 
  MONITORING USAGE;<br>
  ALTER INDEX scott.empidx NOMONITORING USAGE;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The V$OBJECT_USAGE 
  table can then be accessed to determine if the index was used during the monitoring 
  session. When the session is started, Oracle clears the information in V$OBJECT_USAGE 
  for the index being monitored and enters a new start time identifying when the 
  index monitoring session started. After the index monitoring session is concluded, 
  the USED column in the V$OBJECT_USAGE table will contain the value 'YES' if 
  the index was used during the monitoring session and the value 'NO' if it was 
  not.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Parameters that 
  Impact Index Usage</b><br>
  The parameters listed below influence the Oracle cost-based optimizer to favor 
  or not favor index access. Please note that this is not an all inclusive list. 
  It is a listing of parameters that I feel have the greatest chance to influence 
  the optimizer to choose, or not choose, index access paths. We'll use these 
  parameters during our scientific analysis. </font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OPTIMIZER_MODE 
    = first_rows or first_rows_nnnn - The optimizer chooses the best plan for 
    fast delivery of the first few rows or the first nnnn rows. The first_rows_nnn 
    replaces the first_rows parameter in later Oracle releases. The first_rows 
    is available for backward compatibility. More often than not, that access 
    path will include an index. This optimizer mode tends to favor nested loop 
    joins over hash and merge scan. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is important 
    to note that using this mode is not a switch. It won't change each and every 
    table scan and hash join to index access and the nested loop join method. 
    The optimizer, at times, will favor index access and nested loop joins. The 
    reverse goes for the all_rows optimization mode below.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OPTIMIZER_MODE 
    = all_rows - The optimizer chooses the best plan for fast delivery of all 
    of the rows that queries return. The optimizer may decide to choose a full 
    table scan over index access and hash joins instead of nested loop.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OPTIMIZER_INDEX_COST_ADJ 
    = xxxx - This parameter lets you tune the optimizer to be more or less index 
    &quot;friendly.&quot; It allows the administrators to influence the optimizer 
    to make it more or less prone to selecting an index access path over a full 
    table scan. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The default 
    for this parameter is 100. This setting tells the optimizer to evaluate index 
    access paths at the regular cost. Any other value makes the optimizer evaluate 
    the access path at that percentage of the regular cost. For example, a setting 
    of 50 makes the index access path look half as expensive as normal.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OPTIMIZER_INDEX_CACHING 
    = xxxx - You set this parameter to a value between 0 and 100 to indicate the 
    percentage of the index blocks the optimizer should assume are in the cache. 
    Setting this parameter to a higher value makes the indexes on the inner table 
    of a nested loop joins look less expensive to the optimizer. The end result 
    is that the optimizer may for favor a nested loop join using an index.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Index Affects on Access Paths</b><br>
  If a table only contains a few hundred rows, queries may run faster if the optimizer 
  chooses to read all of the blocks in the table as opposed to using an index. 
  The I/O generated traversing the index blocks to get to the table row entries 
  would be higher than if Oracle read just the blocks allocated to the table being 
  accessed.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What if we access 
  a larger table using a column with poor selectivity? Selectivity describes the 
  number of different values stored in a column. Poor selectivity means that the 
  column has many values that are the same. If our statement contains a WHERE 
  clause that searches for a column value that is contained in 90% of the table's 
  rows, it is best that Oracle, once again, read each and every row in that table. 
  Conversely if a WHERE clause searches for a column value that appears in 1% 
  of the table rows, it would be beneficial for the optimizer to choose an index. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here are some examples 
  of index access paths that we will see during our testing:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index only - 
    Oracle is able to read all of the data required to satisfy the query's data 
    needs from the index structure alone. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index to table 
    - Oracle searches through the index structure looking for the key value(s), 
    then uses row identifiers to probe the table to satisfy the data request. 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index unique 
    scans - The SQL statement accesses an index using a column (or columns) that 
    are defined in a unique or primary key index with an equality condition. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Index range 
    scans - Oracle scans a set of entries in the index to satisfy a query. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Index skip 
    scans - Oracle is able to break down a multi-column index and view them as 
    smaller subindexes. This is achieved by Oracle &quot;skipping&quot; the leading 
    columns in the index and using columns that appear later in the index's definition.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Full scans 
    - Oracle scans all of the index entries. Kind of like a tablescan on an index. 
    Oracle drops down to the leaf blocks and traverses the leaf blocks using the 
    leaf pointers.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Fast full scan 
    - Oracle uses multi-block reads to read both leaf and non-leaf blocks. Non-leaf 
    (branch blocks) are discarded.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But indexes influence 
  more than just index-related access paths. Indexes can also impact the type 
  of join operations used. Here's an &quot;over the top&quot; example to clarify. 
  If you are joining two tables together in a SQL statement on join columns that 
  have good selectivity (returns relatively few rows compared to the table size), Oracle will favor index access paths and a nested loop join.  If you don't have indexes on the join columns, Oracle may choose table scans 
  using a hash join instead of the nested loop join method. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Index Types</b><br>
  Let's continue our discussion by reviewing some of the more popular types of 
  indexes: B-Tree, Bitmap and Function.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>B-Tree Indexes</b><br>
  A traditional B-Tree index stores the key values and pointers in an inverted 
  tree structure. The key to good B-Tree index performance is to build the index 
  on columns having a lot of different values. Oracle describes this as &quot;good 
  selectivity&quot; Oracle is able to quickly bypass rows that do not meet the 
  search criteria when searching through indexes built on columns having a high 
  degree of selectivity.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Bitmap Indexes</b><br>
  As I stated previously in this blog, there is a sense of confusion about bitmap 
  indexes and the benefits they provide to columns with low selectivity. Instead 
  of spending this entire blog on the bitmap index/low selectivity issue, please 
  turn to Jonathan Lewis's DBAZine article titled <a href="/oracle/or_articles/jlewis3/index.html">&quot;Bitmap 
  Indexes Part 1&quot;</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The optimizer can 
  be stubborn at times. It can be particularly stubborn when you want it to choose 
  a single bitmapped index for an access path. A single bitmap index may not be 
  chosen at all. The optimizer will be more inclined to choose bitmapped indexes 
  as an access path if it can use multiple bitmapped indexes simultaneously. That's 
  where the benefits of bitmaps are realized. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Bitmap Indexes 
  and Concurrency</b><br>
  Anyone accustomed to database programming understands the potential for concurrency 
  problems. When one application program tries to update data that is in the process 
  of being changed by another, the DBMS must sometimes forbid access until the 
  modification is complete in order to ensure data integrity.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each entry in a 
  B-Tree index entry contains a single ROWID. When the index entry is locked during 
  an update, a single row is affected. A bitmap lock affects a range of entries 
  which could have a negative impact on other transactions attempting to update 
  rows already locked. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Locking issues 
  affect data manipulation operations in Oracle. As a result, bitmapped indexes 
  are not appropriate for OLTP applications that have a high level of concurrent 
  insert, update and delete operations. Concurrency is usually not an issue in 
  a data warehousing environment where the data is maintained by bulk loads, inserts 
  and updates.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Function Based 
  Indexes</b><br>
  Oracle 8i solved an indexing problem that had been affecting database performance 
  for close to a decade. Before Oracle8i, any SQL statement that contained a function 
  or expression on the columns being searched on in the WHERE clause could not 
  use an index. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For example, the 
  statement:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT * FROM 
      employee_table<br>
      WHERE Upper(first_name) = 'CHRIS';</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  would not use an index. A full table scan would be required to retrieve the 
  desired result set. We now know that we are able to use B-tree and bitmap indexes 
  to speed query performance.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle8i and 
  later releases, we are able to build both bitmap and B-tree indexes on columns 
  containing the aforementioned functions or expressions. The following index 
  could be used to increase performance of the query:<br>
  </font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CREATE INDEX 
      upper_first_name on employee_table (upper(first_name));</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Function based 
  indexes will affect the performance of DML statements that manipulate the columns 
  contained in the function based index. The more complex of the expression used, 
  the more time the database will require to update the index.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  The intent of this blog was not to provide you with an all-inclusive education 
  on Oracle indexes. There are folks that spend dozens of hours learning about 
  access paths and the affects that indexes, hints, statistics and parameters 
  have on Oracle optimization. We are laying the groundwork to begin our own scientific 
  analysis of Oracle access paths. As I stated previously, we need to begin experimenting 
  on our own to fully understand the Oracle optimization process. In my next blog, 
  we'll use the information we learned in this series to start our experimentation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Scientific Analysis Part II</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-02-14.3900730733</link>
                      <description>We continue to analyze the affects that initialization parameters, statistics and hints have on SQL statement access paths.  In this blog, we'll take a look at the hints we will be using to influence the optimizer to select an access path that is different from the one it would normally choose. We'll also review a few of the tools that we will be using to monitor and compare SQL statement access paths and performance for our upcoming tests.</description>
                      <pubDate>Mon, 19 Feb 2007 07:30:44 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> In my last blog, 
we reviewed the parameters that we will be modifying to influence the access paths. 
In this blog, we'll review the hints that we will use to ask the optimizer to 
select an access path that is different that the one it would normally choose. 
</font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Hints</b><br>
  Administrators embed hints in a SQL statement to influence the optimizer to 
  choose a particular access path. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">By using hints, 
  you are telling Oracle that your access path is better than the one the optimizer 
  is choosing. It&#146;s a safe assumption that most of us aren&#146;t as smart 
  as the optimizer. Let it make the choice, unless you are certain the optimizer 
  is choosing the incorrect access path. <br><br>
  But what happens if the optimizer is making incorrect decisions? Before you 
  begin adding hints to SQL or freezing access paths using Optimizer Plan Stability 
  or 10G Profiles, consider taking the following steps first:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Determine if 
    it is actually an incorrect access path that is causing the performance problem. 
    It may be some external influence affecting the SQL (hardware, workload, and 
    so on). <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Identify and 
    review the SQL taking the bad access path for proper SQL coding techniques. 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Verify that 
    statistics have been generated on the tables and indexed columns. The Oracle-supplied 
    utility DBMS_STATS is currently the preferred method of collecting statistics. 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Review parameters 
    that affect SQL optimization (optimizer_mode, optimizer_index_cost_adj, optimizer_index_caching, 
    optimizer_dynamic_sampling, optimizer_features_enable, optimizer_max_permutations). 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Investigate 
    system statistics. Is it activated? Is it configured correctly if it is activated? 
    Should it be activated? <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Does the application 
    use bind variables? If so, investigate bind peeking quirks. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Check for skewed 
    data. Consider using histograms to compensate. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Go to Metalink 
    and review optimization bugs for your release. Oracle could have already identified 
    your issue and fixed it.<br><br>
    OK, so you have performed all of the actions cited previously and you find 
    that the optimizer is actually making an incorrect decision. Regardless of 
    what some industry pundits may tell you, the optimizer is NOT infallible; 
    it can make mistakes. Oracle created hints for a reason, and wouldn&#146;t 
    have made them public if it didn&#146;t think we really needed them from time 
    to time. If you are forced to add hints to the query to improve its performance, 
    do so intelligently and judiciously. </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Using Hints 
  to Compare Oracle Access Paths</b><br>
  OK, now that I have provided you with my standard warning on hints, the intent 
  of this blog is to learn how to use hints to influence access paths for testing 
  purposes. Using hints will allow us to evaluate the affect that different access 
  paths have on SQL statement performance. We will run the statement without any 
  modification, review the access path and performance statistics, use a hint 
  to (hopefully) change the access path, run the statement again and compare the 
  before and after results. Since hints can be embedded in virtually any SQL statement, 
  they will provide us with an easy mechanism to learn more about access paths. 
  We are on our way to becoming database performance scientists! </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We'll begin our 
  access path scientific analysis by using a very basic set of hints to influence 
  the optimizer to choose a different access path. The hints I will be using in 
  my introductory demo are:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Hints for 
    optimization mode</b> - We will be asking Oracle to optimize the statement 
    using different optimization goals. Since we are using Oracle9i for my demo, 
    we'll be asking it to use choose, first_rows, all_rows and rule. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Hints for 
    access paths</b> - Access path hints ask the optimizer to choose the access 
    path it recommends. We'll be asking Oracle to use an index that it didn't 
    choose in the original access path it generated. We'll also be asking the 
    optimizer to choose a full table scan instead of using an index. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Hints for 
    join operations</b> - Oracle provides several different join methods for statements 
    that join one, or more, tables together. We'll ask the optimizer to choose 
    nested loop, merge scan and hash joins.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hints for 
    join order</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Oracle only joins two tables at a time. If 
    multiple tables are joined, join order also describes the overall order of 
    the tables being accessed. Oracle will join two tables and create an intermediate 
    result set which is then used as input to the next join.<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Join order 
    plays a significant role in query performance. Both in the outer and inner 
    tables selected and the overall join order. In general, you want to reduce 
    the number of rows processed as soon as you can during the processing of a 
    given SQL statement. The sooner you can reduce the number of rows being sent 
    to future operations, the faster the query will usually run. We'll ask the 
    optimizer to choose different join orders to determine the impact it has on 
    SQL performance.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The bullets above 
  are just a subset of all of the hints that are available. For a complete listing 
  (and their definitions), please refer to the Oracle Database Performance and 
  Tuning Guide for your release. You'll find the documentation on <a href="http://technet.oracle.com">Oracle's 
  Technet website</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommended 
  Toolsets</b><br>
  The two tools that I most often use to review SQL performance during my own 
  scientific analysis is SQL*PLUS Autotrace and SQL Trace. Please refer to my 
  blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_16.1691009429">&quot;Access Path Identification - Part IV&quot;</a> 
  to learn more about using SQL*PLUS Autotrace and SQL Trace utilities to evaluate 
  SQL access paths and SQL statement performance. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Demo Document</b><br>
  The intent of this demo is not to train you to identify which access path is 
  most optimal for a given situation. Its intent is to help you gain experience 
  interacting with the Oracle optimizer. Take it from your friendly ex-Oracle 
  instructor, spending time experimenting with the optimizer and analyzing the 
  performance statistics that different access paths generate is critical to your 
  tuning education. There really is no substitute for time spent &quot;in the 
  seat&quot; performing your own scientific analysis on query optimization.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The demo will show 
  you how to use hints and the ALTER SESSION SQL statement to influence the optimizer 
  to take a different access path than it normally would. You can then compare 
  the the access paths and their associated performance statistics to obtain a 
  better understanding of what accces path is best for your test queries.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a link to 
  <a href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-02-14.3900730733/demo.doc">the 
  demo document</a>. It is in Word format for ease of reading. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In my next blog, 
  we'll discuss what SQL statements to use for your testing and what to look for 
  when you compare the results. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot<br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Scientific Analysis Part I</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-02-15.4209681965</link>
                      <description>If you want to become an access path guru, you’ll need to spend some time learning how optimization parameters, statistics and hints affect SQL access paths and statement performance.   This blog will provide you with a few hints and tips to help you begin your scientific analysis of the Oracle optimization process.  In upcoming blogs, I’ll provide you with some sample test cases.</description>
                      <pubDate>Thu, 15 Feb 2007 11:32:29 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Introduction</b><br>
The objective we are trying to accomplish is to identify the affects that startup 
parameters, statistics and hints have on access paths, and ultimately, SQL performance. 
There really is no substitute for spending time &quot;in the seat&quot; learning 
how different environmental settings influence the optimization process. You also 
need to spend some time changing a statement's access path and noting the impact 
that different access path has on performance. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have found that most good tuners share a common set of traits. They are inquisitive 
  by nature, understand that there is no substitute for experience and dedicate 
  lots of time performing scientific analysis on SQL statement and database performance. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">One of my favorite 
  tuning gurus is Jonathan Lewis. Jonathan used terms like &quot;scientific analysis&quot; 
in his <a href="/podcasts/podcast_lewis/index.html">DBAZine 
  podcast</a>. It's really a very appropriate description of his activities. After 
  reading many of his works, I would describe him as a database performance 
  scientist. He identifies something he wants to learn more about, creates a test 
  environment, executes a series of tests, analyzes the data and provides documented 
  results to reienforce his theories.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">That's what we 
  all MUST DO to expand our knowledge on the Oracle optimization process. We need 
  to become database performance scientists. We do that by creating a test environment, 
  running and documenting performance baselines, changing the environment to influence 
  the statement's access path and documenting the results.<br>
  <br>
  We'll begin this series by learning how to select a test environment and document 
  it. In upcoming blogs, we'll discuss the tools we will use to measure and compare 
  our results, select a set of SQL statements to use for our testing, create our 
  test cases, execute the tests and document the results.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Setting up a 
  Test Environment</b><br>
  Running test cases to identify the affects that different database environmental 
  settings have on a statement's access path is not as monumental as it may seem. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Most production 
  databases have a test counterpart. Select an environment that is actively used 
  by your application developers. Don't worry, if one of our test causes a statement 
  to &quot;run longer than anticipated&quot;, we can use the trusty ALTER command 
  to kill our session. We can also run our workloads during lull times. Lastly, 
  the majority of changes we will make to influence the statement's access path 
  will be done in our own session. We won't be making changes that affect the 
  entire database environment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I prefer to use 
  an active test environment because it allows me to easily select SQL statements 
  to use as test cases, the data is usually more representative of what will be 
  found in production and the developers will most likely have a firm understanding 
  of the active workload being executed. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to talk 
  to the developers who are responsible for running workloads on that test environment 
  to ensure that the changes being made to the test data doesn't skew your results 
  from one test execution to the next. You can't run a test, have a load insert 
  another 100 thousand rows in the table, run another test and expect to have 
  a good comparison. You want your test bed to be active but not so active that 
  it complicates your testing process or causes your tests to generate incorrect 
  results. You'll need to use common sense when selecting the test environment 
  as well as determining the most optimal time to run your test cases.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We also want to 
  choose a test environment that is providing adequate performance for the workloads 
  being executed upon it. We really don't want to use an environment that isn't 
  performing well to begin with.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There's a myriad 
  of options available to you. If you don't want to impact any of your test environments, 
  create a test environment of your own. Clone one of your test databases to a 
  sand-box environment if you can. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll also want 
  to make sure that statistics are up to date on the database you will be using 
  as a test bed. If you are running 10G databases, the database will run statistics 
  jobs for you automatically (isn't 10G great?). If you don't have statistics 
  run automatically, it will be up to you to analyze the data objects to ensure 
  that the statistics optimally represent what is stored in the data structures.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Documenting 
  the Parameters That Affect the Optimization Process </b><br>
  The next step is to document the environment. There are a couple of dozen parameters 
  that affect optimization and SQL statement performance. To begin, we are going 
  to choose the basic parameters that are easy to change and have the biggest 
  impact on optimization. These are not all of the parameters that can influence 
  the optimization process, just the ones that are easy to change and provide 
  the best chance of successfully achieving an access path change.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> It is important 
  that we read the documentation beforehand for these parameters for the specific 
  Oracle release that we are using as our test environment. We know that each 
  Oracle release may contain enhancements to these parameters that change the 
  affect they have on the optimization process and how we alter them to different 
  values. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> We'll want to 
  document the following parameters to begin our scientific analysis:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">cursor_sharing 
    - For our first set of initial tests, we'll hardcode values in our selection 
    criteria to ensure that our statements aren't affected by cursor sharing. 
    To learn more about cursor sharing and the impact it has on statements using 
    bind variables, please turn to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_18.7319544765">&quot;System 
    Triage IV - Access Path Identification Part I&quot;</a><br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">db_file_multiblock_read_count 
    - The number of blocks that Oracle will read in one I/O when performing a 
    sequential scan of data (i.e. table scan). We also need to note that if we 
    are using Oracle 10.2 as our test environment, the database itself may adjust 
    this parameter dynamically if it identifies that the buffer cache is being 
    flooded by blocks being retrieved using a table scan. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">optimizer_features_enable 
    - This parameter allows you to make the optimizer behave as it would for a 
    specific release of the Oracle database. You set the value to a release identifier 
    (the listing of the optimizer releases that you can set this parameter to is provided in the Reference Manual) and the optimizer will act 
    as it would if the database were at that release. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">optimizer_index_caching 
    - Administrators will often set this parameter in conjunction with optimizer_index_cost_adj 
    to influence the optimizer to use more indexes and Nested Loop joins. Setting 
    this parameter makes Nested Loop joins look less expensive when compared to 
    Hash or Sort-Merge joins. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">optimizer_index_cost_adj 
    - Allows the administrator to make index access more, or less, costly to the 
    optimizer. The default value of 100 tells the optimizer to evaluate the index 
    using the regular cost. The lower you set this value, the less costly the 
    indexes will look to the optimizer. Conversely, the higher you sent this parameter, 
    the more expensive the indexes will look.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">optimizer_mode 
    - Sets the approach the optimizer will use when analyzing queries. Since there 
    have been a few changes made between Oracle 9i and Oracle10g, I'll provide 
    information on both sets.<br>
    <br>
    </font> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 9i provides 
      the following settings:<br>
      </font></p>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Rule - The 
    optimizer will use the rule based approach during analysis. The rule based 
    optimizer does not use data statistics as input when generating the access 
    path. Each access path is assigned a numerical ranking. The rule based optimizer 
    chooses the access path that has the most favorable numerical ranking. The 
    rule based optimizer has been superceded by the cost based approach. There 
    are a few cases where I have seen the rule based optimizer choose a better 
    access path than the cost based method - but not many.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Choose - If 
    optimizer_mode is set to choose, the optimizer is able to switch between rule 
    and cost-based optimizations. When optimizer_mode is set to CHOOSE, the optimizer 
    uses the all_rows cost-based approach for a SQL statement if there are statistics in 
    the dictionary for at least one table accessed in the statement. If you generate 
    statistics on one table, every query that accesses that table will use the 
    cost-based optimizer. What happens if other tables in the query do not have 
    statistics collected? The optimizer will make an educated guess on the statistics 
    for those tables. The problem is that Oracle isn't always a good statistics 
    guesser and the end-result is a &quot;less than optimal&quot; access path. 
    To learn more about the affect that statistics have on cost based optimization, 
    please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_18.7319544765">&quot;System 
    Triage IV - Access Path Identification Part I&quot;</a>. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> first_rows 
    - Influences the optimizer to choose an access path that minimizes response 
    time. Most often used for online transaction processing systems that return 
    small result sets. The optimizer favors Nested Loop joins and index access.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> all_rows - 
    Influences the optimizer to choose an access path that minimizes total execution 
    time. Most often used for decision support and data warehouse environments. 
    The optimizer tends to favor full table scans, Hash and Merge-Scan joins.<br>
    <br>
    </font> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle10g settings 
      for optimizer_mode:<br>
      </font></p>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> first_rows 
    - The same influence on the optimizer as it did in Oracle9i.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> first_rows_n 
    - Where &quot;n&quot; = 1, 10, 100, 1000. Influences the optimizer to optimize 
    queries to provide the fastest response when returning the &quot;n&quot; number 
    of rows. Acts as a throttle, which allows you to better balance the optimization 
    process.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> all_rows - 
    The same influence on the optimizer as it did in Oracle9i.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We will use the 
  ALTER SESSION SQL statement to alter these parameters during our scientific 
  analysis on the affects they have on the Oracle optimization process. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Documenting 
  Our Test Tables</b><br>
  After we document some of the parameters that affect optimization, let's turn 
  our attention to documenting the tables we will be accessing. In my next blog, 
  I'll provide you with a few hints and tips on how to select or create SQL statements 
  to use in your test cases but let's continue our discussion on documentation. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following information 
  will provide you with a good base of information on the data objects our statments 
  will be accessing. Since we are just beginning our scientific analysis, we'll 
  use basic storage objects (tables and b-tree indexes). We'll discuss some of 
  the more complex objects (bitmap indexes, partitioning, etc.) in later blogs.</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Row counts for 
    all tables that are accessed by our test queries. Can be found in the num_rows 
    column in dba_tables if we have statistics generated for our tables.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of blocks 
    the table is using. Can be found in the blocks column in dba_tables if we 
    have statistics generated for our tables.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index listing 
    for all indexes on our tables. The query below will provide you with a listing 
    of indexes for a given table:<br>
    </font> 
    <blockquote> 
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select b.index_name, b.column_name, a.uniqueness, b.column_position<br>
from sys.dba_indexes a, sys.dba_ind_columns b<br>
where a.index_name = b.index_name<br>
and a.table_owner='&amp;table_owner' and<br>
a.table_name = '&amp;table_name'<br>
order by b.index_name, b.column_position<br>
/ </font></p>
    </blockquote>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Once we find 
    all of the indexes and columns in those indexes, let's check them for both 
    selectivity and data skew. Selectivity is the number of unique values for 
    a given column. Skew means that some values can occur a few times in a column 
    while other values can occur many, many times. Since data skew will affect 
    optimization, that information will also be important to us.<br>
    <br>
    We can easily find the selectivity for a single or multi-column index by accessing 
    the distinct_keys column in our dba_indexes table if we have statistics generated. 
    For multi-column indexes, we will want to check the individual selectivity 
    for each column in our multi-column index. We can do this with the following 
    query:</font> 
    <blockquote> 
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select count 
        (distinct index_colname) from owner.table_name; <br>
        <br>
        Where index_colname is one of the columns in our multi-column index,owner 
        is the table owner and table_name is the name of our table. We'll need 
        to do this for all columns in our multi-column indexes.</font></p>
    </blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We'll use the 
      following queries to identify data skew and determine if any histograms 
      are on our tables. </font></p>
    <blockquote> 
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select index_colname, 
        count(*) from owner.table_name<br>
        group by index_colname;</font></p>
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Where index_colname 
        is the column name, owner is the table owner and table_name is the name 
        of our table. We'll need to do this for all columns in our indexes. We'll 
        do this for both single column and multi-column indexes.</font></p>
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select * 
        from dba_tab_histograms where owner='&amp;owner' and table_name=</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'&amp;table_name';<br>
        </font></p>
      <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Where owner 
        is the table owner and table_name is the name of our tables. We'll need 
        to do this for all tables that our queries will be accessing.</font></p>
    </blockquote>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Coming Up Next</b><br>
  We'll continue our discussion in the next blog when we review the hints we will 
  be using to influence the optimizer's choice of access paths. In addition, we'll 
  discuss the various tools we will use to measure and compare our results.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>2007 Daylight Saving Time Changes Update</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-02-03.3876734950</link>
                      <description>A quick follow up on the 2007 Daylight Saving Time changes.  Since my last blog, I have found some important new information.   I’ll also challenge you in this blog with one question – “Are you ready for DST?”.</description>
                      <pubDate>Mon, 05 Feb 2007 05:48:40 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>The Problem</b><br>
Before we begin, we need to understand exactly what the problem is. If you haven't 
read my <a href="/blogs/blog_cf/chrisfoot/blogentry.2007_01_27.813482040320">last 
blog</a> on this topic, I highly suggest you do so before continuing. <br>
</font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Important New 
  Information</b><br>
  In that last blog, I provided you with numerous links to Metalink Notes that 
  focused on Daylight Saving Time. Since then, super-DBA Mark Shore informed me 
  that Oracle has created a new DST support category in Metalink's Knowledge Base.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's pretty easy 
  to find the new DST support area. After you log on to <a href="http://metalink.oracle.com">Metalink</a>, 
  you'll notice that Oracle provides a list of <a href="/blogs/blog_cf/chrisfoot/blogentry2007_02_033876734950/knowledgebase.gif">navigation 
  tabs</a> at the top of each page.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Click on the second 
  navigation tab from the left titled &quot;Knowledge&quot;. Metalink will respond 
  by displaying the Knowledge Browser home page. Scroll half-way down the page 
  until you find the section titled <a href="/blogs/blog_cf/chrisfoot/blogentry2007_02_033876734950/knowledgebase2.gif">&quot;New 
  in the Knowledge Base.&quot;</a></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">At the end of that 
  paragraph, there will be a link titled &quot;USA DST 2007 Category&quot;. If 
  you click on that link, Metalink will respond by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_02_033876734950/knowledgebase3.gif">Daylight 
  Savings Time (DST) USA 2007 Support Category home page.</a></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Daylight Savings 
  Time (DST) USA 2007 Support Category</b><br>
  The new support category in Metalink's Knowledge Base contains links to ALL 
  of the notes on Daylight Saving Time. It is your one stop shop for DST information. 
  If you scroll down to the Topic Listing Table, you'll see that the first note 
  (Note:412789.1) provides information on Oracle DST Webcasts.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle DST Webcasts</b><br>
  We have already attended the DST Webcasts and have found them to be very informative. 
  Oracle provides DST Webcasts for all of their products that are affected by 
  the 2007 DST changes:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Webcast 1 - 
    Oracle Database and Client. Provides information on the Oracle database, Oracle 
    client software, Oracle Enterprise Manager and the Oracle JVM. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Webcast 2 - 
    Oracle E-Business Suite Applications. Provides information on all of the components 
    affected by DST including the data server and the middle-tier services, such 
    as Forms, Concurrent Manager, Apache, JServ and the JVM. The presenter will 
    tell you which components are affected, which aren't, and what to do to prevent 
    the 2007 DST changes from becoming a problem.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Webcast 3 - 
    Peoplesoft Application. Describes the changes to Peoplesoft that will be required 
    to support the 2007 DST changes.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The remaining DST 
  Webcasts combine the Application and Database DST Webcasts into a single presentation. 
  All of the Webcasts begin with a presentation on DST and finish with a Q&amp;A 
  session. We found the Q&amp;A sessions to be just as helpful as the presentations. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you haven't 
  attended one of the DST Webcasts, all is not lost. There are  a few dates and times still available.  In addition, Note:412789.1 contains information 
  on how to replay prior DST Webcasts. Oracle also provides you with a couple 
  of different options to choose from. You can replay a prior DST Webcast by accessing 
  it straight from your browser or you can download it to your PC and replay it 
  at your leisure. I highly suggest that you replay the DST Webcasts or attend 
  one of the future sessions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Our Status</b><BR>
  I thought it may be beneficial to provide you with a status on our own internal 
  2007 DST project:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since we support 
    both the database and E-Business Suite applications, we have created two teams 
    that focus on 2007 DST changes. Each team member is required to become an 
    expert on the impact that the changes will have on the components they are 
    responsible for. This includes identifying what needs to be patched, learning 
    the patching process and coordinating patching efforts with their fellow technicians 
    and our customers. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All of our technicians 
    have read the Metalink Notes pertaining to DST and have attended one, or more, 
    of the DST Webcasts.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We executed 
    the scripts provided in Metalink Note:412971.1 and have determined that none 
    of the databases we are responsible for supporting use the TIMESTAMP WITH 
    TIMEZONE datatypes. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We executed 
    the scripts provided in Metalink Note: 397770.1 to identify all of the databases 
    that have the Oracle JVM installed. We will be applying the JVM patch to all 
    Oracle 8.1.7, 9x and 10x databases that support applications using Java programs.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We will be applying 
    both the timezone and JVM patch to all 10G databases.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We are patching 
    all Oracle E-Business Suite applications.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All Grid Control 
    databases will have both the JVM and timezone patch applied.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We have sent 
    notifications to all customers to review all third-party applications, middle-tier 
    products, operating system and external Java engines to ensure that they are 
    2007 DST compliant.</font></li>
</ul>
<p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Your Status?</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  Twenty some years ago, Craig Mullins and I had the good fortune of being trained 
  and mentored by someone who I would describe as being one of the top managers 
  in the database profession.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We once had to 
  revert to a previous backup in DB2 because an operator had allowed one of the 
  current backup tapes to be overwritten. Since DB2 is intelligent enough to go 
  back to a prior version without problem, the impact on the recovery was minimal. 
  He called me to his office and asked &quot;Who is ultimately responsible for 
  the availability, reliability and recoverability of the databases here?&quot;. 
  I stated that I was. He then calmly declared &quot;Then you should understand 
  that since you are ultimately responsible, you are also responsible for ensuring 
  that there are no weak links in the chain.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I continue to live 
  by that rule. Its blatantly obvious that we need to ensure that our databases, 
  administration toolsets and applications are 2007 DST compliant. But we also 
  need to play a dominant role in our organizations to ensure that all of the 
  components (operating systems, third-party applications, middle-tier products, 
  external Java engines, etc.) that interact with our databases are also 2007 
  DST ready. I am confident that my organization has done everything we can to 
  ensure the transition is smooth. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>My challenge 
  to you is &quot;Is your shop ready for 2007 DST?.<br>
  </b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>2007 Daylight Saving Time Changes</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-01-27.8134820403</link>
                      <description>We are breaking in to our regularly scheduled blog with the following emergency message:  “Are you ready for the impact that the 2007 Daylight Saving Time Changes will have on your Oracle Ecosystems?”   I think that after reading this blog, you’ll agree that much work needs to be done to ensure that our systems are able to handle the new Daylight Saving Time dates for 2007.</description>
                      <pubDate>Mon, 29 Jan 2007 06:53:34 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>The Daylight Saving Time Changes for 2007</b><br>
  In previous years, daylight time began in the US on the first Sunday in April 
  and ended on the last Sunday in October. The clocks were set ahead one hour 
  at 2:00 AM to begin local daylight time. On the last Sunday on October, 
  the process was reversed. The clocks were set back one hour at 2:00 AM. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To improve energy 
  conservation, the Energy Policy Act of 2005, Pub. L. no. 109-58, 119 Stat 594 
  (2005) changed the start and end dates of Daylight Time. Starting in 2007, Daylight 
  Time begins on the second Sunday in March and ends on the first Sunday in November. 
  That means that in 2007, Daylight Time begins on March 11 and ends on November 
  4. In 2008, Daylight Time begins on March 9 and ends on November 2.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Impact on the 
  Oracle Database Ecosystem</b><br>
  Most computer systems have been configured to accept the Daylight Time changes 
  that have been in effect since 1986. My personal desktop computer pops up a 
  box in April and October to let me know that it needs to change the date to 
  adhere to the Daylight Time policy.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I don't apply 
  the recommended Microsoft fixes, my PC will have the incorrect time for the 
  duration of the new DST 2007 change periods (March 11, 2007 - April 1, 2007 
  and between October 28, 2007 and November 04, 2007). I'm assuming that if I 
  manually change the time and don't apply the fix, I'll wake up one morning to 
  find that my PC operating system made another change for me using the old Daylight 
  Saving Time dates. One way or another, my PC's date will be off.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You understand 
  how this could have a pretty dramatic effect on virtually every database ecosystem 
  that we support. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Warnings and 
  Recommendations</b><br>
  I am by no means a 2007 DST impact expert. Personally, I find a lot of the documentation 
  provided by the vendors on this subject to be vague and confusing. I'm providing 
  you with links to assist you in your own education.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We are taking the 
  safe route. When in doubt, we are asking the vendor detailed questions to clarify 
  their statements. Our feeling is that this is what we pay support for - to get 
  answers to questions. Many of the vendors responses will tell you to &quot;play 
  it safe&quot; and patch the systems. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Operating Systems 
  and Java Engines</b><br>
  If your organization does not apply the operating system patches to correct 
  the timezone change, the timestamps those systems use will probably be incorrect 
  by one hour for the duration of the new DST 2007 change periods (March 11, 2007 
  - April 1, 2007 and between October 28, 2007 and November 04, 2007). That means 
  any dates and times that the database pulls from the operating system for SYSDATE 
  and DATE will be incorrect. In addition, the operating system's Java engines 
  are also affected because they use their own embedded time zone information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#0000FF"><b><font color="#000066">Recommendation 
  - Visit your operating system provider's website to determine what patches are 
  required for the operating system and the Java engine.</font></b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Database 
  Impact</b><br>
  Oracle is providing two patches, one for the JVM and one for the time zone files. 
  Each patch has a different set of requirements on when to implement it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle JVM</b><br>
  Like its operating system counterpart, Oracle's embedded Java engine uses embedded 
  time zone information and is impacted by the new Daylight Time start and stop 
  dates. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a snippet 
  from one of Oracle's white papers:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><i>JVM patch 
    - for all Oracle versions 8.1.7, 9.x, 10.x (database only):<br>
    If you have the Oracle JVM installed you are advised to apply the JVM patch. 
    See section &quot;JVM Fixes&quot; below for more details.</i></font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The problem is 
  that a lot of shops install the Oracle JVM when they install the database but 
  don't run Java programs in Oracle. I'll provide you with a Metalink Note that 
  will provide you with instructions on how to determine if the Oracle JVM is 
  installed and what to do if it is.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Time Zone Files</b><br>
  Depending on the release, there are Oracle datatypes that will be affected by 
  the Daylight Time changes. Oracle states that the TIMESTAMP and DATE datatypes 
  do not have time zone knowledge. But the 10G TIMESTAMP WITH LOCAL TIME ZONE 
  (TSLTZ) and TIMESTAMP WITH TIME ZONE (TSTZ) datatypes and the TZ_OFFSET function 
  take their time zone information from Oracle's time zone files. These datatypes 
  can be used as column types or as PL/SQL types.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The time zone files 
  are installed during the database installation. Oracle states that the version 
  3 and higher time zone files include the 2007 Daylight Time changes. I'll provide 
  you with a Metalink Note that will show you how to determine what version you 
  have. <br>
  <br>
  Here's the killer, Oracle is stating that if you use the affected datatypes, 
  you will be required to patch the database and <i>all clients</i> that need 
  to access those datatypes. Once again, read the notes I am providing you and 
  make your own decision on what to do.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Grid 
  Control and Agents</b><br>
  Oracle Grid Control agents must have their times synchronized with the operating 
  system. If not, the agents will not start. Both the O/S and agents must be patched 
  or not-patched in order for Grid Control Agents to work. Oracle has supplied 
  a manual work-around in case of emergency. The repository databases must also 
  be patched. We have asked Oracle to provide us with clarification on the 9i 
  OEM agents. We are patching all 9i OEM and 10G Grid Control repositories.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle E-Business 
  Suite Applications and Application Server</b><br>
  I have included an Oracle Metalink noted that discuss the impact the Daylight 
  Saving Time changes have on Oracle applications and the Oracle Application Server.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000066"><b>Recommendation 
  for all Oracle products - Visit the Metalink website, use the Metalink notes 
  I provide as a starting point.</b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  <b>Third-Party Applications</b><br>
  There are numerous applications that will require a patch in addition to the 
  required operating system patches. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000066"><b>Recommendation- 
  Your organization will need to contact all third-party applications to determine 
  the impact that timezone changes have on your applications. </b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Metalink 
  Notes</b><br>
  The following Metalink Notes will provide you with a good starting point to 
  begin your 2007 Daylight Time changes education. Good luck!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Start your education 
  by reading these notes:</b><br>
  Note 359145.1 - Impact and overview of 2007 USA daylight saving changes on the 
  Oracle database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 402742.1 - 
  USA 2007 DST Changes: Frequently Asked Questions for Oracle RDBMS. Probably 
  the most beneficial of all the overview documents.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 397281.1 - 
  USA 2007 Daylight Saving Time (DST) Compliance for Oracle Server Technologies 
  Products.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Generic time 
  zone information:</b><br>
  Note 357056.1 - Impact of changes to daylight saving time (DST) rules on the 
  Oracle database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 340512.1 - 
  Timestamps &amp; time zones - Frequently Asked Questions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 396906.1 - 
  Patches to Update the Time Zone Transition Rules.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 412160.1 - 
  Updated Time Zones in Oracle Time Zone File patches.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Installing and 
  using the utltzuv2.sql script:</b><br>
  Note 406410.1 - Dealing with existing Database time zone use when updating Oracle 
  TZ-files.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 396670.1 - 
  Usage of utltzuv2.sql before updating time zone files in Oracle 9.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 396671.1 - 
  Usage of utltzuv2.sql before updating time zone files in Oracle 10.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 397013.1 - 
  Advanced use of utltzuv2.sql.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 402614.1 - 
  Time Zone Data in the Data Dictionary During a Time Zone File Update.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 399832.1 - 
  Workarounds when utltzuv2.sql patches are not available for your patchset.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Applying the 
  time zone file patch:</b><br>
  Note 359145.1 - Impact of 2007 USA daylight saving changes on the Oracle database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 396387.1 - 
  Workarounds when Database time zone patches are not available for your patchset.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 396426.1 - 
  Effects on client and middle-tier of applying time zone patches on the Oracle 
  Database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 402316.1 - 
  Database Time Zone Patching Strategy in the Enterprise.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Platform specific 
  information for those platforms with some special patching issues:</b><br>
  Note 406196.1 - VMS: DST 2007: Information for OpenVMS platforms.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>JVM issues:</b><br>
  Note 359145.1 - Impact of 2007 USA daylight saving changes on the Oracle database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note 397770.1 - 
  How to check if Oracle JVM is installed in the Database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note:276554.1 - 
  How to Reload the JVM in 10.1.0.X and 10.2.0.X.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note:209870.1 - 
  How to Reload the JVM in 9.2.0.X.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Applications:</b><br>
  Note 403659.1 2007 - Daylight Saving Time Changes For Oracle Applications.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note:403311.1 -Impact 
  of U.S. 2007 Timezone Changes on Oracle E-Business Suite, Release 11i Environments.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Grid Control 
  Issues:</b><br>
  Note:401834.1 - EM Agent will not start - due to a Daylight Savings change - 
  (Workaround). Explains why it is impacted, how to fix it and the workaround.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Paths VII – Access Path Education</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-01-19.1078911078</link>
                      <description>A few recommendations from your friendly ex-Oracle instructor on resources that will help you learn more about Oracle access paths.  These resources will benefit beginners and tuning gurus alike.</description>
                      <pubDate>Mon, 22 Jan 2007 06:13:29 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction</b><br>
  This blog is not about the SQL tuning process, the last 6 blogs contain a plethora 
  of information on how to identify performance issues and drill down to find 
  the poorly performing SQL. It's intent is also to not teach you to tune, it's 
  focus is to help you begin, or brush up, on access paths and SQL tuning. Remember 
  the Foot Rule of Thumb &quot;The mark of being a good DBA is not knowing everything, 
  its knowing where to look when you don't&quot;.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Gaining a well-rounded 
  and deep understanding of Oracle access paths and SQL performance is a wonderfully 
  challenging task. One of the hurdles is the time required to learn how to tune 
  SQL. DBAs are being challenged with ever-increasing workloads, shrinking DBA 
  staffs and increasingly complex technologies to support. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In addition, the 
  majority of shops view database administrators as much more than just &quot;table 
  jockeys.&quot; The DBA is often seen as the go-to technician because of their 
  traditionally strong problem solving skills. The DBA is also viewed as the IT 
  staff's technical generalist because of the working knowledge they have in many 
  different facets of information technology. Those of us that have been working 
  in this profession for any time at all understand that the term &quot;database 
  administration&quot; is really a misnomer. We have to know everything from application 
  and data design to network communications and operating systems (and everything 
  in-between).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As a result, many 
  of us don't have enough time to dig deep into the many different facets of the 
  Oracle database environment. Oracle has recognized this issue and has created 
  the various advisors in 10G to assist us in the monitoring and tuning process. 
  I have written dozens of blogs on the toolsets provided in 10G that are designed 
  to reduce the amount of time we spend administering, troubleshooting and tuning 
  the Oracle Ecosystem (database, operating system, hardware server).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Importance 
  of Understanding Oracle Access Paths</b><br>
  That being said, all DBAs must have a firm understanding of Oracle access 
  paths and SQL tuning. During my career, I've learned that there is nothing that 
  can drag down an Oracle Ecosystem than poorly performing SQL statements. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">That's when management 
  suddenly doesn't care about how much you know about RAC, standby databases and 
  data design. They want the database &quot;fixed&quot; and running smoothly again. 
  They suddenly have a single-minded purpose. They quickly begin the chant, the 
  chant that can only be described as the management mantra - &quot;is it fixed 
  yet, is it fixed yet, is it fixed yet, is it fixed yet, is it fixed yet&#133;..&quot; 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I've actually had 
  my entire chain of command stand behind me in order of where they fit into the 
  management food chain (team lead, project manager, section manager, division 
  manager, VP&#133;) while I was working on a database performance issue. I turned 
  around and chuckled when I saw the lineup of managers. Funny, they didn't share 
  my humor. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to get 
  the performance problem fixed, you're nervous and you have a 15 page SQL statement 
  on your screen. This is where a strong education in Oracle access paths becomes 
  &quot;somewhat handy.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Tuning Topics 
  You Must Understand</b><br>
  Here's a quick laundry list of topics you'll need to know. All of them are important. 
  I have tried to include resources later in this blog that will provide you with 
  information on all of them. You can use this listing to check off the topics 
  during the education process.</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Oracle release's 
    impact on optimization and SQL tuning. Each new release contains features 
    that affect access paths and SQL performance. Sometimes good and sometimes 
    not so good.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle parameters 
    that affect the optimizer. There are a handful or two of startup parameters 
    that can influence the SQL optimization process. I have provided several articles 
    below on this topic.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Optimizer modes 
    - Rule, choose, first_rows, all_rows. Each of the modes influence the optimizer 
    to create access paths for the type of workload the database is responsible 
    for supporting. For example, the first_rows optimizer mode may be OK for online 
    transaction processing (read a record/write a record) but probably won't generate 
    efficient access paths for a data warehouse database where millions of records 
    are summarized. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle data 
    statistics - How the optimizer uses them, how they affect access paths.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle system 
    statistics - Later releases of Oracle can also incorporate the system load 
    information during optimization. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Basic access 
    paths</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index only 
        - Oracle is able to read all of the data required to satisfy the query's 
        data needs from the index structure alone.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index to 
        table - Oracle uses a row identifier to probe the table to satisfy the 
        data request. Why read all of the rows in a table if you can use an index 
        structure to retrieve just the rows you need?</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Full table 
        scan - Oracle reads all rows from the table. If the statement is going 
        to read the majority of a table's rows, why would you want it to needlessly 
        traverse an index to get the data? You are reading extra index blocks 
        for no reason. You also need to learn the impact that the high-water mark 
        has on full table scans. Oracle will scan the table to the last block 
        used (as opposed to the last block that actually contains data).<br>
        <br>
        </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Join access 
    paths - Used when the statement retrieves data based on matches between two 
    tables (i.e. retrieve all of the employees that have the department name of 
    &quot;Welding&quot;). The employee information is contained in the employee 
    table and the department information (including the department name) is in 
    the department table.</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Nested 
        loop join - Good path when the join is accessing a small subset of rows.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Hash join 
        - Efficient access path for joins that access larger sets of data.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sort merge 
        join - Sorts rows to allow quicker access during the join.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Cartesian 
        join - The tables being joined do not have join clauses that relate the 
        two tables together.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Outer joins 
        - An outer join returns all of the rows that satisfy the particular join 
        condition and returns additional rows from one table that do not satisfy 
        the join condition.<br>
        <br>
        </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Join order - 
    Oracle only joins two tables at a time.  If multiple 
    tables are joined, join order also describes the overall order of the tables 
    being accessed. Oracle will join two tables and create an intermediate result 
    set which is then used as input to the next join.<br>
    <br>
    Join order plays a significant role in query performance.   In general, you want 
    to reduce the number of rows processed as soon as you can during the processing 
    of a given SQL statement. The sooner you can reduce the number of rows being 
    sent to future operations, the faster the query will usually run.</font><br>
    <br>
  </li>
  <li> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Subqueries 
    - A select within a select statement. Can be one of the trickier statements 
    to tune, especially when you have multiple subqueries embedded within each 
    other.</font><br>
    <br>
  </li>
  <li> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Indexes and 
    selectivity </font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">B-tree indexes 
        are good for column(s) that have many unique values (high selectivity)</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Bitmap indexes 
        are used for column(s) that do not have many unique values (low selectivity)</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How SQL 
        statement predicates can determine if an index can be used. There are 
        times when the way a statement is coded prevents Oracle from choosing 
        an index as the access path. A common problem that often leads to poor 
        performance. You do get a chance to flog the application developer responsible, 
        though.<br>
        <br>
        </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Types of index 
    access paths</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index unique 
        scans - The SQL statement accesses an index using a column (or columns) 
        that are defined in a unique or primary key index with an equality condition.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index range 
        scans - Oracle scans a set of entries in the index to satisfy a query.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Index skip 
        scans - Oracle is able to break down a multi-column index and view them 
        as smaller subindexes. This is achieved by Oracle &quot;skipping&quot; 
        the leading columns in the index and using columns that appear later in 
        the index's definition.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Full scans 
        - Oracle scans all of the index entries. Kind of like a tablescan on an 
        index.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Fast full 
        scan - Oracle uses multi-block reads to retrieve the index blocks.<br>
        <br>
        </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorting - Many 
    operations require the database to sort a result set. It could be that the 
    query wants to return the data in a particular order (ORDER BY, GROUP BY). 
    In addition, some joins require that the data be sorted during the operation's 
    execution. You'll need to understand why sorts are performed and the impact 
    they have on performance.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Views - Views 
    can really complicate the tuning process. You think you are accessing a few 
    tables in a query and then find that you are actually joining views together 
    that also contain join operations.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Hints - My 
    next blog will show you how to use hints to influence access paths and how 
    hints can be used to educate yourself on the performance of a particular access 
    path operation.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Bind variables 
    and bind peeking - In the first and second blogs of this series, I described 
    the impact that bind peeking can have on SQL statement optimization. Bind 
    peeking may lead to the predicted access path not matching the access path 
    taken during execution.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Query transformation 
    - Oracle can rewrite a query during the optimization process. Learn how Oracle 
    uses view merging, predicate pushing, OR expansion and subquery unnesting 
    to attempt to improve execution performance. This will occur on a regular 
    basis and you need to understand how query transformation works and how it 
    affects SQL performance. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Local predicates 
    vs join predicates - A local predicate accesses a bind or hardcoded variable 
    (i.e. emp_id = :empid, emp_id = 13344) while a join predicate is used to join 
    two tables together (i.e. emp.dept_id = dept.dept_id)<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Predicate usage 
    - You need to understand how predicate usage affects indexes and access path 
    generation. I have provided information below that discusses predicate conditions 
    (=, &gt;, &lt;, etc) as well as how predicates affect index utilization and 
    access paths.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Operation cardinality 
    - The number of rows returned by a particular access path operation. Importance 
    of operation cardinality is magnified as the number of tables accessed in 
    the query increases. As stated previously, the sooner you can reduce the rows 
    sent to future operations, the better your query will perform.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Skewed data 
    and histograms - What happens when you have an index built upon a column in 
    a million row table that has twenty occurrences of the value &quot;OUT OF 
    STOCK&quot; and the rest of the column values contain the value &quot;IN STOCK&quot;. 
    This is an extreme case, but the impact is that even though you may access 
    the table looking for an &quot;OUT OF STOCK&quot; value, Oracle will most 
    likely perform a table scan. You'll be searching close to a million values, 
    while you need to retrieve only twenty of them. An index would be a much better 
    access path, but Oracle sees that the column has such poor selectivity that 
    it won't choose it. A histogram identifies skewed data and is able to provide 
    the optimizer with the information it needs to make a more educated decision when choosing between a table scan 
    and index access.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Parallel processing 
    and partitioning - A best practice for large data stores is to partition data 
    into smaller subsets of data. Partitioning allows data to be broken down into 
    these smaller subsets yet still be viewed as a single-entity by the application. 
    Parallel processing breaks a single request for data into one or more processes 
    that access the data in parallel and return the data to the calling application.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Parsing - Learn 
    the differences between hard parses vs soft parses. When the application sends 
    a statement to the database for processing, one of the first steps in the 
    execution process is called a parse. Oracle will check the statement's syntax, 
    check security, generate the access path, etc.. Like most operations the less 
    steps it needs to perform the better. You will need to understand the impact 
    that bind variables have on the parsing process and how the hard parse/soft 
    parse ratio affects query and database performance.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Access Path 
  Education</b><br>
  You can start your education on the different access paths that are available 
  to the optimizer by reading Oracle's Database Performance Tuning Guide that 
  is provided in each Oracle release's documentation. Before you buy third-party 
  books on any topic, I highly suggest that you read Oracle's documentation first. 
  The importance of this suggestion bears repeating - READ ORACLE's DOCUMENTATION 
  FIRST. <a href="http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#i21299" target="_blank">Here's 
  a link</a> to the 10G Database Performance Tuning Guide.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll need to 
  create an account, but its free to register and the process is painless. Virtually 
  every topic that I described above is covered in the Database Performance Tuning 
  Guide. It is very important that you read the guide that pertains to the release 
  that you are working with. Each release contains enhancements to the optimizer 
  as well as new features that affect the optimization process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Classroom 
  Education</b><br>
  OK, since I'm an ex-Oracle Instructor, you could have predicted that my next 
  recommendation was to sign-up for an Oracle class on SQL performance tuning. 
  Here's a <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_10_14.0635922648">previous 
  blog</a> that provides you with a few hints and tips to obtain the most from 
  your classroom experience.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle Education 
  offers a class that focuses on SQL tuning. Here's an excerpt from the class 
  description provided on the <a href="http://education.oracle.com" target="_blank">Oracle 
  Education Website</a>:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What you will learn: 
  <br>
  --------------------------------------------------------------------------------<br>
  This course is designed to give the experienced SQL Developer or DBA a firm 
  foundation in SQL tuning techniques. The participant learns the necessary knowledge 
  and skills to effectively tune SQL in the Oracle Database 10g. They learn about 
  tuning methodology as well proactive tuning and reactive tuning methods. Students 
  are introduced to the benefits of the new automatic tuning mechanisms available 
  in Oracle Database 10g. On completion of the course they are able to compare 
  and contrast the steps involved to tune manually as in prior releases as well 
  as use the automatic SQL tuning features provided in the current release. Students 
  gain a thorough conceptual understanding of the Oracle Optimizer, and reinforce 
  instructor-led learning with structured hands-on practices. The course uses 
  a series of challenge-level workshops, allowing students to &quot;play, discover, 
  and learn&quot; at their own level and pace. The students learn to use the Oracle 
  diagnostic tools and facilities: Automatic SQL Tuning components, EXPLAIN, SQL 
  Trace and TKPROF, SQL*Plus AUTOTRACE. Students also learn to influence the behavior 
  of the Optimizer by changing the physical schema and modifying SQL statement 
  syntax.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Metalink Notes</b><br>
  Oracle's premier web support service is available to all customers who have 
  current support service contracts. Oracle MetaLink allows customers to log and 
  track service requests. Metalink also allows users to search Oracle's support 
  and bug databases. The website contains a patch and patchset download area, 
  product availability, product life-cycle information and technical libraries 
  containing whitepapers and informational documents. A few of the white papers 
  and notes that pertain to SQL tuning, optimization and access paths are provided 
  below (do a search using the note number on the main page in Metalink to retrieve 
  the note):</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">199083.1 - Query 
    Tuning Overview - Lots of good links to other articles.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">398838.1 Frequently 
    Asked Questions. Very good discussion on the optimizer. Discusses queries 
    not using indexes. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">248971.1 - Query 
    tuning best practices. LOTS of links to other notes. Links discuss a wide 
    range of topics. From parameters that affect optimization to system statistics 
    impact on optimization.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">35934.1 - Common 
    Issues and Misconceptions about the cost based optimizer.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">68735.1 Diagnostics 
    for Query tuning.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">67522.1 - Diagnosing 
    why a query doesn't use an index. Very helpful.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">207434.1 - Tuning 
    Queries - Quick and Dirty Solution.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">372431.1 - Troubleshooting 
    a new queries.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">154354.1 - Using 
    the FIRST_ROWS for fast query response.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">100229.1 - Measuring 
    Index Selectivity.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">41954.1 - Hash 
    join operations - a little dated but still valid.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Third Party Books</b><br>
  If you want to learn how the optimizer works, I highly suggest that you read 
  Jonathan Lewis's book titled Cost-Based Oracle Fundamentals. It is one of the 
  most educational and informative books I have ever read on the cost-based optimizer. 
  Here's my <a href="/oracle/or_articles/foot14/index.html">review 
  of the book</a> for DBAZine. If I could only recommend one book on the Oracle 
  optimizer, Jonathan's book would be it. Jonathan also maintains a <a href="http://jonathanlewis.wordpress.com/%20-%20blog">blog</a> 
  that focuses on a wide range of topics but does include a lot of discussions 
  on Oracle tuning.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tom Kyte's <a href="http://asktom.oracle.com">Ask 
  Tom Website</a> also provides a lot of information on SQL tuning, access paths 
  and proper coding techniques. One of Tom's trademarks is to use a snippet of 
  code to reinforce the information he is conveying. I'm a big fan of using examples 
  and a big fan of Tom's website. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Articles and 
  Presentations</b><br>
  <a href="http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/burleson_cbo_pt1.html">Article 
  by Don Burleson</a> on cost based optimization. Discusses parameters that affect 
  the cost based optimizer. Statistics, helpful hints and tips.<br>
  <br>
  Advanced CBO <a href="http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.pdf">Article</a> 
  and <a href="http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.ppt.pdf">Presentation</a>. 
  Advanced discussion on how statistics influence the optimizer, why the optimizer 
  doesn't always take the correct access path. Written By Wolfgang Breitling. 
  <br>
  <br>
  <a href="http://www.oracle.com/technology/oramag/oracle/05-jan/o15tech_tuning.html">Article</a> 
  on the Oracle 10G Costing model changes and how they influence access paths. 
  Listing of parameters that affect optimization. Author is Kimberly Floss.<br>
  <br>
  <a href="http://www.oracle.com/technology/pub/articles/lewis_cbo.html">Oracle 
  Statistics Article</a> - System statistics affects on the optimizer. Very good 
  article that provides lots of details. Written by Jonathan Lewis<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/oracle/or_articles/jlewis12/index.html">Article</a> 
  on why Oracle won't use an index (when you think it should). Excellent article 
  written by Jonathan Lewis. <br>
  <br>
  <b>Test, Test, Test</b><br>
  Experience pays. You need to spend time &quot;in the seat&quot; learning how 
  to tune. Read the above information and find a database that you can use as 
  a test environment. You need to work with tables that have small numbers of 
  rows and queries that return small result sets. You also need to run queries 
  that access tables with high numbers of rows and return large result sets. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'll show you how 
  to use hints to change access paths in then next blog. Change the access path 
  with a hint and run the query. Influence the optimizer to take a different access 
  path and join order and keep a tuning record of the changes and runtimes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Don't' fall into 
  the trap of favoring one access path or join method for all situations. I once 
  overheard a conversation between a developer that just moved from an online 
  transaction system to the data warehouse team and the data warehouse DBA. The 
  developer was looking at an access path and stated &quot;I hate hash joins.&quot; 
  The warehouse DBA stated &quot;Not in this en</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">vironment 
  you won't&quot;. All access paths and join methods have a place in Oracle optimization. 
  Its up to you to learn which ones apply for a given situation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Paths VI – 10G Grid Control SQL Details Panels</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-01-13.9166686138</link>
                      <description>We continue our discussion on Oracle access path identification.  This blog takes an in-depth look at 10G Grid Control’s SQL Details Panels. </description>
                      <pubDate>Mon, 15 Jan 2007 05:33:24 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction</b><br>
  The intent of this first series of blogs is educate ourselves in the various 
  tools we can use to identify Oracle access paths. In my next series, I'll provide 
  you with links to information provided by various Oracle experts on access paths. 
  Finally, we'll discuss how we can influence access paths when we think our choice 
  of access path is better than Oracle's.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>All Roads in 
  10G Grid Control Lead to the SQL Details Panels</b><br>
  10G Grid Control's primary display tool for providing information on specific 
  SQL statements is the SQL Details Panels. It seems like no matter where you 
  start your investigation in 10G Grid Control, sooner or later, you'll end up 
  with a panel that contains a link to the SQL Details Panels. Let's take a look 
  at a few of the more popular ways of finding our way to them.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Database Performance 
  Home Page</b><br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/1_perf_home_combined.gif">Database 
  Performance Home page</a> provides a couple of links that lead to the SQL Details 
  Panels. If we start from the top, we'll see the Sessions: Waiting and Working 
  Chart in the middle of the screen. This display allows us to determine exactly 
  what resource our disgruntled users are waiting for. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Clicking on one 
  of the colored areas of the Sessions: Waiting and Working Chart allows us to 
  drill down to the specific resource being waited on. Clicking on any of the 
  colored areas will display a drill down panel that provides details on that 
  specific resource. For example, if we click on the purple I/O color on our chart, 
  we'll navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/io_drilldown.gif">I/O 
  drill down page</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">No matter what 
  resource you drill down into, they all have the same look and feel. All of the 
  resource panels display the particular resource's historical utilization and 
  two pie charts on the bottom of the screen that allow administrators to drill 
  down into the top sessions and SQL statements utilizing that resource. If we 
  click on the links listed under the Top Waiting SQL: User I/O heading, 10G Grid 
  Control will respond by displaying the SQL Details Panels. If we click on the 
  links under the Top Waiting Sessions: User I/O heading, 10G Grid Control will 
  display the Session Information panel. The Session Information panel contains 
  a link to the current SQL being executed which is displayed using the SQL Details 
  Panels.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are interested 
  in learning more about the Database Performance Home Page, please turn to my 
  blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_22.3884573887">&quot;Database 
  Tuning Using Oracle 10G Grid Control&quot;</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Top Sessions 
  Panel</b><br>
  If we return to our <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/1_perf_home_combined.gif">Database 
  Performance Home Page</a>, we need to scroll down to see the Top Sessions and 
  Top SQL links. When we click on the Top Sessions link, 10G Grid Control will 
  respond by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/2a_top_sessions.gif">Top 
  Session display panel</a>. If you look at the red box, you'll see that the Top 
  Sessions panel is actually part of the Top Consumers set of display panels. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We navigate to 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/3_session_details.gif">Session 
  Details Panels</a> for each session in our report by clicking on the link under 
  the SID column heading. The Session Details Panel provides a link to the current 
  SQL being executed which 10G Grid control displays using the SQL Details Panels.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Top SQL Panel</b><br>
  Let's return to our <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/1_perf_home_combined.gif">Database 
  Performance Home Page</a>. The link below Top Sessions is the Top SQL. Clicking 
  on the link displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/5_top_sql.gif">Top 
  SQL panel</a>. The Top SQL panel has to be one of my favorite display panels 
  in 10G Grid Control because it allows us to view SQL performance historically. 
  The Top SQL panel provides a listing of SQL Details links that provide us with 
  access to the SQL Details Panel.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Viewing Performance 
  Historically</b><br>
  10G Grid Control allows us to take the database &quot;back in time&quot; and 
  review performance historically. This screenshot shows the Database Performance 
  Home Page in <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/10_perf_historical.gif">historical 
  mode</a>. Historical mode is activated by the drop down menu (red box) that 
  is displayed in the upper right hand corner of the page.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The historical 
  mode display provides a slider that allows us to go back in time and view performance 
  statistics captured during a specific time period. When I drag the slider to 
  a time in the past, 10G Grid control displays the Database Performance Home 
  page statistics for the chosen time period. If we click on the Top SQL link 
  at the bottom of the page, 10G Grid Control responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/12a_period_sql.gif">Top 
  SQL Period display panel</a>. This panel provides links to the SQL Details panels 
  for the top SQL statements that were active during the chosen time period.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Details 
  Panels</b><br>
  Now that we have learned how to navigate to the SQL Details Panels, let's take 
  a look at the information they provide. The first screen displayed is the Execution 
  Plan panel.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Execution Plan</b><br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/6_sql_details_combined.gif">Execution 
  Plan panel</a> provides us with the SQL statement's access path taken during 
  execution. The top section will display the entire text of the SQL statement. 
  The next section displays where the panel retrieved this information from (cursor 
  cache), the optimizer mode, data capture time, plan hash value and optimizer 
  mode. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The bottom section 
  provides us with all of the basic information we need to identify the access 
  path this query is taking. It also includes key performance indicators including 
  the number of rows that were used in each step, the time to perform the step 
  and CPU and I/O cost indicators.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Current Statistics</b><br>
  Let's take a look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/7_sql_details_stats.gif">Current 
  Statistics Panel</a> and the wealth of tuning information it provides. The panel 
  will tell us if this SQL statement is being influenced by a SQL Profile. We'll 
  have an entire discussion on SQL Profiles in an upcoming blog. But for the sake 
  of this discussion, a SQL Profile is a stored access path that we can generate 
  using the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.022793870420">SQL 
  Tuning Advisor</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Time Model information 
  provides key performance indicators including elapsed time per execution, CPU 
  time per execution and the statement's wait ratio. The Execution Statistics 
  includes the number of executions, parse calls, rows per fetch, rows per execution 
  and executions per parse call.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Execution History</b><br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/8_sql_details_exec_hist_combined.gif">Execution 
  History panel</a> provides us with another key set of performance indicators. 
  It shows us the statement's performance historically. The top chart displays 
  the number of seconds the statement took to execute. This allows us to quickly 
  determine if a statement's spike in elapsed and CPU times can be attributed 
  to an event that occurred during a specific time in the past.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Executions 
  chart shows us how many times a statement was executed historically. This allows 
  us to determine if an overall degradation in database performance can be attributed 
  to an increase in the number of executions of this statement. I have used this 
  panel to find a problem in a program that was causing it to loop and execute 
  a particular statement millions of times. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Tuning History</b><br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_139166686138/9_sql_details_tuning_hist.gif">Tuning 
  History Panel</a> displays information on past tuning exercises for this statement. 
  If you have generated any SQL Profiles, this panel will display information 
  on each SQL Profile generated. It will also provide information on which SQL 
  Profile is currently being used. The panel allows users to activate and deactivate 
  each of the SQL Profiles that were generated for this statement. As I stated, 
  we'll focus on SQL Profiles in an upcoming blog and I'll show you how to use 
  this panel to switch between the different SQL Profiles created for a given 
  statement.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  I hope you enjoyed this blog on the SQL Details panels. I think you'll agree 
  that it provides us with a good set of information to begin our SQL performance 
  tuning activities.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Identification - Part V</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2007-01-06.1280259716</link>
                      <description>The series on access path identification continues.  We’ll review a couple of 9I Oracle Enterprise Manager tools that we can use to identify Oracle access paths.  I’ll also show you a couple of beneficial utilities that will help you better understand access paths, monitor database performance and tune statements running in an Oracle 9I database environment.</description>
                      <pubDate>Mon, 08 Jan 2007 06:27:19 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction<br>
  </b>Readers of this blog know that 10G Grid Control provides a wealth of tools 
  that facilitate database and SQL tuning. I have written a couple of dozen blogs 
  that focus on the various advisors and utilities we can use to assist us in 
  the tuning process. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But 9I's Oracle 
  Enterprise Manager (OEM) is no slouch either when it comes to tuning and diagnostic 
  tools. Since the focus of this blog has been to cover Oracle 10G, I won't be 
  reviewing all of the 9I tools we can use to assist us in the tuning process. 
  But this recent series of blogs focuses on the various tools that we can use 
  to view access path information and there are tools that 9I OEM provides that 
  are definitely worth discussing. And lets face it, there are LOTS of Oracle9I 
  databases out there. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif"> <font size="2">9I OEM allows 
  us to log in with a repository or in stand-alone mode. Most of the tuning and 
  diagnostic tools require the use of a repository which is a set of tables stored 
  in a database. If you install the Oracle9I software in a windows environment, 
  you'll find a 9I Oracle Enterprise Manager Configuration Assistant contained 
  in your Oracle menus. When you run the configuration assistant, Oracle will 
  prompt you for database connection information. Once the repository is configured, 
  you will have the ability to run the advanced diagnostic tools that Oracle9I 
  OEM provides. After the initial configuration is complete, you'll need to run 
  the Navigator to add databases into the Oracle9I OEM infrastructure.</font></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Sessions Panel<br>
  </b>After the databases are added using the Navigator drop down, each time you 
  activate 9I OEM, the first panel shown will be a database listing. You select 
  the database you want to administer or monitor and then activate the various 
  tools and utilities you want to use.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at this <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/1_9IOEM_main2.gif">first 
  screenshot</a><b>. </b> On the far left of the screen, you'll see a listing 
  of icons we can use to activate the various toolsets provided by 9I OEM. The 
  display screen itself is split into two subpanels. The subpanel on the left 
  allows me to navigate to a database and then drill down to view and administer 
  configuration settings, schema definitions, security, locking, etc..</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Please note that 
  this screen shows that I have already activated the Sessions display panel. 
  I use this panel a lot when I am reviewing SQL performance for a 9I database. 
  Look at the column headings at the top of the screen. It allows users to sort 
  the sessions by the column headings. The columns provide information 
  on program name, machine name, OS User and process ID, which allows users to 
  easily identify specific sessions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The columns also 
  provide key performance indicators. We can sort sessions by CPU, memory and 
  physical and logical I/O. These columns make it easy for us to identify the 
  top resource consumers. We are then able to drill down into that session to 
  determine what SQL statement the session is executing and how well it is performing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Drilling Down 
  to View Specific Session Information<br>
  </b>If I double-click on a specific session, 9I OEM displays the session drill 
  down panels. I am able to select from general information, long operations (if 
  available), the SQL statement currently being executed (blank if the session 
  is not currently running a statement), performance statistics and locking information. 
  Here's a <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/2_longopsa.gif">screenshot 
  of long operations</a> information for a session in my database. The long operations 
  display tells me how many blocks have been accessed and how many more blocks 
  Oracle predicts must be read before that individual operation is complete. This 
  display shows that I have almost completed a table scan on the HR.EMPLOYEE_TEST 
  table.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The SQL tab at 
  the top of this panel allows me to display the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/3_sql_panel_1a.gif">current 
  statement being executed by the session.</a> The panel also displays the access 
  path that Oracle is predicting the statement is taking. Remember that we learned 
  in previous blogs that because of certain conditions (like bind peeking for 
  one), that the access path can change during execution. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The panel allows 
  me to choose from either a text or graphical description of the access path. 
  In this case, I have chosen to view the graphical display of the access path. 
  The cool feature of this panel is that the icons on the right hand side of the 
  screen allow me to step through the access path. As we step through the access 
  path, Oracle will display a description of the step being performed at the bottom 
  of the panel. Not only does it allow us to more quickly identify how the query 
  is accessing the data, but it also provides us with a quick education on the 
  access paths themselves. If you aren't an expert in Oracle access paths, this 
  is a quick way for you to start your education.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Scratchpad</b><br>
  Let's close this subpanel and navigate back to the main 9I OEM screen. When 
  I click on the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/1_9IOEM_main2.gif">top 
  tool icon</a>, 9I OEM will respond by displaying a horizontal menu listing of 
  additional icons. The icon on the far right will be for the SQL Scratchpad utility. 
  If I click on the far right icon,9I OEM responds by displaying <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/1a_table2.gif">SQL 
  Scratchpad</a>. Scratchpad allows me to run SQL statements, edit them and then 
  save them to a folder. For this discussion, we are most interested in Scratchpad's 
  graphical access path display capabilities. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I click on the 
  icon that looks like an open book, 9I OEM responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/1b_table2a.gif">predicted 
  access path</a> the query will use when it executes. Like its session drilldown 
  counterpart, SQL Scratchpad allows me to view the access path in text or graphical 
  mode and allows me to step through the individual steps. Once again, the tool 
  provides us with an easy way to educate ourselves in Oracle access paths.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Analyze<br>
  </b>Another tool that 9I OEM provides to view access path information is SQL 
  Analyze. SQL Analyze is only available if you have purchased the tuning pack 
  option for 9I OEM. This <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/5_sql_analyze2.gif">screenshot</a> 
  shows me navigating through 9I OEM's menus to activate SQL Analyze.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When you activate 
  SQL Analyze, the first step the utility performs is to <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/6_sql_analyze.gif">display 
  a listing</a> of all of the top resource consuming SQL statements that are contained 
  in the library cache. If the statement has been flushed from cache, you won't 
  find it in this display. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The tool lists 
  all of the databases on the left side of the panel that you worked with in the 
  past. As you can see, I am a pretty active user of SQL Analyze.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I can double-click 
  on any statement in the top SQL listing to view its access path information. 
  I can also use the menu system at the top of the screen to create a blank worksheet 
  for new queries that I can enter manually. I found the statement I wanted from 
  the listing and double-clicked on it to <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/7_sql_analyze.gif">activate 
  the SQL tuning panel</a><b>. </b><br>
  <br>
  The panel displays the SQL statement, and like our other utilities, allows us 
  to step through the access path the query is taking. I can click on the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/8_optimizer_mode.gif">SQL 
  drop down menu</a> at the top of the screen to ask Oracle to explain the statement 
  using the various optimizer modes that are available.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Analyze 
  Tuning Tools</b><br>
  SQL Analyze provide us with tools that facilitate the SQL tuning process. The 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/9_tools.gif">tools 
  menu</a> at the top of the screen allows me to choose from three different wizards. 
  We'll review the Virtual Index Wizard in just a moment. The Hint Wizard allows 
  us to choose hints from a drop-down menu system, while the SQL Tuning Wizard 
  activates an intelligent advisor that provides us with SQL tuning recommendations. 
  Once you have run the SQL Tuning Wizard a few times, it's pretty easy to see 
  that it was the precursor to some of the more advanced utilities that are now 
  available in Oracle 10G.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Virtual Index 
  Wizard<br>
  </b>The Virtual Index Wizard<b> </b>allows me to create virtual indexes on tables 
  that our query is accessing. The key word in that last sentence is &quot;virtual&quot;. 
  Oracle does not permanently create the index. The intent of the wizard is to 
  allow users to determine the potential performance impact a new index would 
  have on the statement being analyzed. It is then up to the user to permanently 
  create the index.<br>
  <br>
  If I click on the Virtual Index Wizard menu selection, 9I OEM responds by displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/10_tuning_wizard.gif">Virtual 
  Index Wizard introduction panel</a>. When I click on Next, the wizard displays 
  a panel that <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/11_tuning_wizard.gif">allows 
  me to select the columns</a> for my virtual index. Clicking next again <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/12_tuning_wizard.gif">displays 
  a panel</a> that allows me to attempt to force Oracle to use the new index or 
  allow it to choose the new index on its own. My personal preference is to allow 
  Oracle to choose the index on its own without providing any additional prodding. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Clicking Next again 
  displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2007_01_061280259716/13_tuning_wizard.gif">projected 
  cost improvement</a> the new index will have on the statement being analyzed. 
  I used a full table scan on a rather large table as an example. Based on the 
  display, we can be pretty sure that the new index will have a positive affect 
  on our statement's performance. The last panel also displays a button that allows 
  us to view the before and after access paths.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Virtual Index 
  Wizard does a fairly good job of estimating the impact that new indexes will 
  have on a SQL statement. It is an excellent tool to use when you are starting 
  your tuning education as well as evaluating access paths in Oracle 9I databases. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I hope you enjoyed 
  this blog on Oracle 9I access path identification. I think that after reading 
  this blog, you'll agree that Oracle9I OEM provides users with a host of utilities 
  to facilitate the access path identification and SQL statement tuning processes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  We'll take a look at the various tools in 10G Grid Control that we can use to 
  display access path information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p>&nbsp;</p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Happy Holidays</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-12-27.8121221631</link>
                      <description>Just a quick note to wish everyone a happy holiday and a great New Year. My next blog entry will be January 8th!  We'll continue our discussion on access path identification.</description>
                      <pubDate>Wed, 27 Dec 2006 09:23:28 -0600</pubDate>
                              
      <content:encoded><![CDATA[ ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Identification - Part IV</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-12-16.1691009429</link>
                      <description>We continue our discussion on Oracle access paths.   In this blog, we’ll learn about the SQL*PLUS Autotrace utility and everyone’s favorite tracing tool SQL Trace.  Since there is an abundance of information available, we’ll cover these tools briefly and I’ll provide you with some great links to learn more.</description>
                      <pubDate>Mon, 18 Dec 2006 20:51:59 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL*PLUS Autotrace 
  and the SQL Trace command are tools that we can use to display access path information. 
  In addition, SQL Trace also provides additional statistical information that 
  we can use to evaluate a given statement's performance.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can easily 
  tell how popular these tools are by doing a Google search on them. You'll find 
  hundreds of different articles, blogs and whitepapers that cover Autotrace and 
  SQL Trace. Instead of me just regurgitating information that is already provided 
  by a myriad of other sources, we'll keep this blog short. I will point you to 
  a few of my favorite &quot;go to&quot; websites for more information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL*PLUS AUTOTRACE<br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The SQL*PLUS 
  AUTOTRACE command can be used to create a report of the execution path used 
  by a particular SQL statement. Statement execution statistics can also be generated 
  if desired. This is my favorite explain tool because it's a quick and easy way 
  to display the access path the query is taking. The following parameters are 
  used as input to Autotrace to generate different report output:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> SET AUTOTRACE 
    OFF- No AUTOTRACE output is generated. This is the default value.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SET AUTOTRACE 
    ON EXPLAIN - The AUTOTRACE output displays the optimizer access path. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SET AUTOTRACE 
    ON STATISTICS - The AUTOTRACE output displays SQL statement execution statistics.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SET AUTOTRACE 
    ON - The output will display the optimizer access path and the SQL statement 
    execution statistics.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SET AUTOTRACE 
    TRACEONLY - Will display the same output as SET AUTORACE ON but will suppress 
    the display of the query output.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Take a look at 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_161691009429/autotrace.txt">this 
  output file</a> I generated in SQL*PLUS. It displays the output of all of the 
  different variations of the Autotrace command. Tom Kyte's <a href="http://asktom.oracle.com">Ask 
  Tom website</a> provides an abundance of information on setting up and running 
  Autotrace. Here's <a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4783147586098">Tom's 
  brief description</a> of the performance statistics generated by Autotrace.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Bind Peeking 
  and Autotrace</b><br>
  In addition, you will have to watch out for those pesky bind variables. I discussed 
  the impact bind variables had on generating different access paths at explain 
  time versus run time in a <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_18.7319544765">previous 
  blog</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Here's Something 
  I didn't Know</b><br>
  You will also need to be aware that SQL*PLUS and Autotrace will assume that 
  all bind variables are strings - regardless of how you define them. <a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:10898805685947693076::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:231814117467">Tom 
  Kyte's blog</a> (do a search on this value &quot;to_number(:bv)&quot; twice 
  when the page is displayed) to see Tom's comments on this.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I agree with Tom's 
  recommendation that if you want to attempt to get the access path displayed 
  by Autotrace to match the access path taken during execution, your best bet 
  is to replace the bind variables with hard-coded values. The issue is the values 
  you choose to replace the bind variables with may not match the values actually 
  used in production. So, once again, your access paths may differ. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Some Interesting 
  Information from Jonathan Lewis on Autotrace</b><br>
  Jonathan Lewis's <a href="http://jonathanlewis.wordpress.com/2006/11/27/autotrace/">blog 
  entry</a> on Autotrace provides some interesting hints and tips on how to better 
  format Autotrace output.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The first comment 
  in the blog, by one of my favorite bloggers - Howard Rogers, asks Jonathan to 
  provide evidence that Autotrace does only an explain when using the SET AUTOTRACE 
  TRACEONLY EXPLAIN command. Please follow the link that Jonathan provides to 
  show his explanation. You'll see that, once again, you need to be careful when 
  using Autotrace to display access paths.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL TRACE</b><br>
  If you have been reading my previous blogs on access paths, you'll know that 
  I stated that the data in V$SQL_PLAN and the output provided by a SQL Trace 
  command will show the actual access path a statement used during execution. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL Trace is used 
  to create a raw trace file that contains SQL performance information for all 
  statements that were executed while the trace was active. The raw trace output 
  can be found in the database's UDUMP directory. You use the TKPROF utility that 
  resides in the $ORACLE_HOME/rdbms/admin directory to read the raw trace data 
  and format it for easier readability.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is an absolute 
  myriad of ways to activate tracing. The range of tracing options ranges the 
  spectrum, from tracing every statement that executes in the database to tracing 
  individual SQL statements. The two primary methods to activate a trace are SQL 
  statements to alter the session setting to activate tracing (&quot;alter session 
  set sql_trace = true;&quot;) or setting the 10046 event parameter.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Instead of me regurgitating 
  information that is already on the web, here's a link to an <a href="http://www.petefinnigan.com/ramblings/how_to_set_trace.htm">extremely 
  thorough discussion</a> on the various ways to activate SQL tracing. <br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is from another 
  one of my favorite bloggers, Pete Finnigan. I think that after reading Pete's 
  document, you'll agree that he has done a great job at showing us how to activate 
  tracing. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We learned in previous 
  blogs how to identify poorly performing queries using the various tools available 
  in 10G Grid Control. You can also activate a trace from the Grid Control Panels. 
  In my blog titled &quot;<a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_10.6780804300">System 
  Triage Part III - Finding the Top Resource Consumers&quot;</a>, I show you how 
  to drill down from the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/top_activity_combined.gif">Top 
  Activity Page</a> to the Session Details page. If you notice, the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_activity.gif">Session 
  Details page</a> has a link to activate a SQL trace.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'm also a big 
  fan of Mark Rittman. Mark shows us a <a href="http://www.rittman.net/work_stuff/extended_sql_trace_and_tkprof.htm">couple 
  of additional tricks</a> on activating a SQL trace and how to read its output. 
  <br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We now know that 
  we have numerous alternatives to choose from to activate tracing. Here are the 
  ones I most commonly use:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I can quickly 
    identify the statement, or statements, causing the problem (discussed in previous 
    blogs in this series), I will cut the statement out and attempt to run it 
    in the production environment. This is easily done if it is a SELECT statement. 
    I'll try to mimic the execution environment as closely as I can in production. 
    Here's an example of a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_10_288698342650/input_variables.txt">PL/SQL 
    bloc</a>k I have often used to trace a SQL statement that I think may be affected 
    by bind peeking. I'll set my session to trace using the &quot;alter session 
    set sql_trace=true&quot; command, run the query, format the dump file and 
    review the output.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I identify 
    the program or user having the problem, I'll use one of the methods described 
    by Mark Rittman and Pete Finnigan to trace another user's session.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I can narrow 
    it down to a specific user or program, I'll activate a logon trigger.</font>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><i>Login trigger 
      for schema login. Replace SCHEMA_OWNER with user name. </i><br>
      <br>
      CREATE OR REPLACE TRIGGER SYS.LOGINTRIGGER AFTER <br>
      LOGON ON SCHEMA_OWNER.SCHEMA BEGIN <br>
      execute immediate 'alter session set sql_trace = true'; <br>
      END; <br>
      <br>
      <i>Login trigger to trace program. Replace &quot;name of program&quot;. 
      </i><br>
      <br>
      CREATE OR REPLACE TRIGGER SYS.TRC_PKREVCSORT AFTER <br>
      LOGON ON DATABASE DECLARE <br>
      progname v$session.program%type; <br>
      BEGIN <br>
      select max(program) into progname from v$session where audsid = userenv('sessionid'); 
      <br>
      if (progname = 'name of program') then <br>
      execute immediate 'alter session set sql_trace = true'; <br>
      end if; <br>
      END;<br>
      </font></p>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">These two logon 
  triggers were provided to me by Ron Berner. Ron states &quot;you have to match 
  the program name exactly. Selecting from v$session and pulling the whole value 
  from the column PROGRAM. If the program name is &quot;/opt/oracle/programs/ron.exe&quot; 
  you have to include the full path in the name.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tom Kyte's Ask 
  Tom website has a whole host of different variations of the above two triggers. 
  You can pop over to Tom's website to learn what the different options are and 
  the benefits they provide when activating traces using logon triggers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a quick 
  look at a trace file I generated from the very simple SQL statement I have been 
  using as an example. The intent of this discussion is to use the formatted trace 
  output file to compare the access path that Oracle predicts the statement will 
  take and compare it to the actual access path taken during statement execution. 
  Before we do, here are the commands I executed in SQL*PLUS to generate the trace 
  file:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> alter session 
    set timed_statistics = true</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">alter session 
    set max_dump_file_size = unlimited</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">alter session 
    set tracefile_identifier = 'test_event_tracing'</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">alter session 
    set events '10046 trace name context forever, level 12'<br>
    Could have used the &quot;alter session set sql_trace=true&quot; command.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I then executed 
  this single statement:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select a.employee_id, 
    a.last_name, b.department_id, <br>
    b.department_name,c.street_address, c.postal_code, <br>
    c.city, c.state_province<br>
    from hr.employees a,<br>
    hr.departments b,<br>
    hr.locations c<br>
    where a.department_id=b.department_id<br>
    and b.location_id=c.location_id<br>
    and a.employee_id = 174<br>
    order by a.last_name<br>
    /</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The &quot;set tracefile_identifier&quot; 
  allows us to easily find the raw trace file in our database's UDUMP directory. 
  Once we find the file, we can run the TKPROF command to format the output. Executing 
  the TKPROF command without any options <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_161691009429/tkprof_help.gif">lists 
  the different options that are available</a>. Here's <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_161691009429/tkprof_commands.gif">the 
  command</a> I issued to format the trace file. The &quot;explain=&quot; option 
  asks TKPROF to display the predictive access path while &quot;SYS=no&quot; prevents 
  TKPROF from displaying statements executed by SYS.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we take a look 
  at the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_161691009429/event_trace.txt">output</a>, 
  you'll see two access paths displayed. The access path under the title &quot;Execution 
  Plan&quot; is the one the optimizer thinks the statement will take, while the 
  access path displayed under the title &quot;Row Source&quot; Operation&quot; 
  shows the access path the statement actually used during execution.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll notice that 
  in my example, the predicted and actual access paths are the same. Here's a 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_187319544765/access_paths_tkprof.txt">trace 
  output file</a> that shows the access path changing during run time.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The intent of this 
  series of blogs is to show you how to display access paths and to determine 
  which access path the statement is taking during execution. Along the way, we 
  learned how bind variables and SQL*PLUS/Autotrace can cause the access path 
  generated by the explain to not match the access path taken during execution.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What's Next</b><br>
  We'll take a look at 9I Scratchpad and 10G Utilities that display access path 
  information.</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Access Path Identification - Part III</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-12-09.4712027033</link>
                      <description>Now that we have a firm understanding of Oracle's plan table and V$SQL_PLAN, let's continue our education by learning how to format the raw data contained in these two objects.  In addition, we'll also learn how to create graphical access path displays using the raw data as input.</description>
                      <pubDate>Mon, 11 Dec 2006 05:46:09 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> In my last blog 
  we learned about the two data objects that contain the access path raw data 
  - PLAN_TABLE and V$SQL_PLAN. If you don't have a firm understanding of Oracle's 
  plan table and V$SQL objects, it may be a good time to review the information 
  contained in that blog before continuing on. <br>
  <b><br>
  Explain Plan VS V$SQL_PLAN</b><br>
  In previous blogs of this series, we learned that the output in the PLAN_TABLE 
  is a prediction of the access path a given query will take while V$SQL_PLAN 
  is the access path actually taken during execution. We also learned that one 
  of the ways we can reduce the likelihood of an access path change occurring 
  is to replace the bind variables with hardcoded values when we run the explain.<br>
  <br>
  <b>Retrieiving Data from the PLAN_TABLE</b><br>
  Let's take a look at a couple of tools we can use to retrieve data from our 
  plan table. If you read my last blog, you know that Oracle supplies statements 
  that retrieve data from the plan table and displays it in an easy-to-read format.</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's the statement 
    that we will be using in our example:<br>
    <br>
    SQL&gt; <br>
    SQL&gt; <br>
    SQL&gt; explain plan into system.plan_table for<br>
    2 select a.employee_id, a.last_name, b.department_id, b.department_name,<br>
    3 c.street_address, c.postal_code, c.city, c.state_province<br>
    4 from hr.employees a, hr.departments b, hr.locations c<br>
    5 where a.department_id=b.department_id <br>
    6 and b.location_id=c.location_id<br>
    7 and a.employee_id = 174<br>
    8 order by a.last_name;<br>
    <br>
    Explained.</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When we run the 
  statement, Oracle will insert rows into our plan table that describe the statement's 
  access path. I'm not using bind variables for simplicity sake, not because I'm 
  afraid of an access path change during execution.<br>
  <br>
  Let's use Oracle's stored procedure to retrieve the contents from our plan table 
  and format the output:<br>
  <br>
  08:54:53 orcl9i&gt; select * from table(dbms_xplan.display);<br>
  <br>
  Here is the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_094712027033/dbms_xplan.gif" target="_blank">output</a> 
  from the above statement's execution.</font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DBMS_XPLAN Package</b><br>
  The DBMS_XPLAN package is the &quot;go to&quot; procedure for displaying the 
  contents of plan tables as well as:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Access paths 
    from statements (cursors) that are loaded in the cursor cache.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Access paths 
    from statements stored in the Automatic Workload Repository.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DBMS_XPLAN.DISPLAY</b><br>
  The statement &quot;SELECT * FROM table(dbms_xplan.display);&quot; asks Oracle 
  to display the current contents of our default plan table. The DBMS_XPLAN.DISPLAY 
  function accepts &quot;TABLE_NAME&quot;, &quot;STATEMENT_ID&quot; and &quot;FORMAT&quot; 
  as input. </font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_NAME allows 
    you to specify a non default name for the plan table you are accessing. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> STATEMENT_ID 
    allows you to select a specific access path from a plan table that contains 
    access paths from different statements. Please read my two earlier blogs on 
    access paths to learn how to set the STATEMENT_ID. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> FORMAT allows 
    a user to choose from four different output formats:</font> <br>
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">BASIC - 
        Displays the operation ID, object name and operation option. Provides 
        limited information for a quick review</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TYPICAL 
        - Default option that displays partition pruning, parallel execution information 
        and predicates. This is the one I use the most</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ALL - All 
        information from TYPICAL and also includes projection information</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SERIAL - 
        Does not display any information on parallel execution<br>
        </font></li>
    </ul>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's a few quick 
  examples:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT * FROM 
    table(DBMS_XPLAN.DISPLAY('save_plan_table'));<br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Retrieves 
    the contents from a non-default plan table.</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT * FROM 
    table(DBMS_XPLAN.DISPLAY('plan_table', 'stmt_1'));<br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Retrieves 
    a statement from our default plan table that has a statement ID of &quot;stmt_1&quot;.</font></p>
  </blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DBMS_XPLAN.DISPLAY_CURSOR</b><br>
  Not only can we use DBMS_XPLAN to retrieve the contents of our plan table, we 
  can also use the DISPLAY_CURSOR function to display the access path that a statement 
  used during execution. We are able to provide the program with a few input variables 
  that will allow us to search the cursor cache for individual SQL statements:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL_ID - The 
    statement's SQL identifier. This value can be found by accessing either V$SQL 
    or V$SQLAREA. You can search VSQL/V$SQLAREA's SQL_TEXT column for the text 
    of the SQL statement you are looking for and use the statement's SQL_ID as 
    input to DBMS.XPLAN.DISPLAY_CURSOR. <br>
    <br>
    I've provided a few examples of how to search these two tables for a statement's 
    text in <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_12_01.4894880310">an 
    earlier blog</a>. You'll need to add the SQL_ID column in the SELECT clause 
    of your searches. The example below shows the addition of the SQL_ID column 
    to the statement I provided as an example in my previous blog:</font> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; select 
      <font color="#0000FF">sql_id</font>, address, executions, buffer_gets, sql_text 
      from v$sqlarea<br>
      where sql_text like '%select a.employee_id, a.last_name%' order by buffer_gets 
      desc;</font></p>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CHILD_NUMBER 
    - Child number of the child cursor. If you don't supply this value, you will 
    retrieve all child cursors from the SQL_ID you are using as input.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">FORMAT - Allows 
    a user to choose different display outputs (discussed earlier in this blog).</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's an example 
  of using DBMS_XPLAN.DISPLAY_CURSOR to retrieve access path information for all 
  child cursors that have a statement ID of 'xuponh8k9hjyk'.</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT * FROM 
    table(DBMS_XPLAN.DISPLAY_CURSOR('xuponh8k9hjyk'));</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The PL/SQL Packages 
  and Types References manual provides in-depth instructions on how to use DBMS_XPLAN 
  to retrieve and format access path information from plan tables, AWR and the 
  cursor area. I highly suggest that you go to <a href="http://technet.oracle.com">Oracle's 
  Technet Website</a> and study the information on DBMS_XPLAN. <a href="http://asktom.oracle.com">Tom 
  Kyte's website</a> also provides an abundance of information on this utility, 
  how to use it and customize its output. Just hop on over and do a search on 
  DBMS_XPLAN.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The UTLXPLS.SQL 
  and The UTLXPLP.SQL</b><br>
  Oracle also provides two scripts that format plan table contents. The UTLXPLS.SQL 
  script is used to format output for statements that perform serial processing, 
  while UTLXPLP.SQL is used to format output for statements that perform processing 
  in parallel.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Other Scripts</b><br>
  There are literally thousands of customized scripts on the web that you can 
  use to format access path raw data. Find one that formats the output in a style 
  that you prefer and go for it!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Graphically 
  Displaying Access Paths</b><br>
  We'll use the same query we used previously for this next discussion:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; explain 
    plan into system.plan_table for<br>
    2 select a.employee_id, a.last_name, b.department_id, b.department_name,<br>
    3 c.street_address, c.postal_code, c.city, c.state_province<br>
    4 from hr.employees a, hr.departments b, hr.locations c<br>
    5 where a.department_id=b.department_id <br>
    6 and b.location_id=c.location_id<br>
    7 and a.employee_id = 174<br>
    8 order by a.last_name;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's review the 
  information displayed by DBMS_XPLAN and use it to graphically display the query's 
  access path. We'll also take a look at the output from a query I personally 
  use when creating graphical access path displays to help. Before we begin, it 
  will be beneficial to show you what we are trying to achieve. Let's take a look 
  at the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_094712027033/3_table_2.gif" target="_blank">graphical 
  output</a> from 9I Oracle Enterprise Manager's Scratchpad tool. One of the benefits 
  that Scratchpad provides is that with one quick mouse click, we can generate 
  a graphical display of a statement's access path. We'll be reviewing this tool 
  in an upcoming blog. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Graphically displaying 
  a statement's access path will help us to easily understand how the access path 
  works. The graphical display tells us that:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We are accessing 
    the HR.EMPLOYEES table using a unique scan on the HR.EMP_EMP_ID_PK index. 
    The key words &quot;(UNIQUE SCAN&quot;) in the graphical display tells us 
    that we are searching the index for a unique value. When we find the value 
    we are looking for (in this case an EMPLOYEE_ID that has a value of 174), 
    we are using the row's ROWID to access the HR.EMPLOYEES table. DBAs often 
    use the term &quot;local predicate&quot; to designate predicates that use 
    a value to access a specific table.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The HR.EMPLOYEES 
    table is the outer table in our nested loop join. We are using the results 
    that satisfy the local predicate (a.employee_id = 174) to access the HR.DEPARTMENTS 
    table. We are looking for rows in the HR.DEPARTMENTS table that have DEPARTMENT_IDs 
    that match the results returned from our local predicate on HR.EMPLOYEES. 
    The predicate &quot;where a.department_id=b.department_id&quot; joins the 
    two tables together and is classified as a &quot;join predicate&quot;.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We are using 
    another unique scan on the HR.DEPT_ID_PK index, retrieving the row's ROWID 
    from that table and using it to access the HR.DEPARTMENTS table. The HR.DEPARTMENTS 
    table is the inner table of our nested loop join.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Rows from HR.EMPLOYEES 
    AND HR.DEPARTMENTS that have matching DEPARTMENT_ID values become the intermediate 
    result set. Rows that don't match are filtered. The result set from this join 
    is used as the outer data set in another nested loop join. The join predicate 
    is &quot;and b.location_id = c.location_id&quot;.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Like our previous 
    two table accesses, we are using a unique index called HR.LOC_ID_PK to access 
    the HR.LOCATIONS table. HR. LOCATIONS is the inner table in this nested loop 
    join.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data from the 
    intermediate result set and the HR.LOCATIONS table that have matching LOCATION_IDs 
    (and b.location_id=c.location_id) is passed to the next step. </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Our Own Graphical 
  Display</b><br>
  Take a look at <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_094712027033/graphical_display.gif" target="_blank">this 
  graphic</a>. The top query is one that I often use to help me to create a graphical 
  display of a statement's access path. The graphic below is the graphical display 
  I created from its results. The query at the bottom is the output from DBMS_XPLAN. 
  Let's take a look at the information provided from my query and learn how we 
  can use it to create a graphical display of a given query's access path:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ID - Numeric 
    identifier that tells us the order of the step in relation to other steps. 
    It is important to note that this is not the order in which Oracle performs 
    the steps during the statement's execution. Generally, Oracle will perform 
    the steps from left to right and bottom up during execution.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">PARENT_ID - 
    Numeric identifier of the step's parent step. Used to determine where to place 
    the step in our graphical display.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">POSITION - Numeric 
    identifier that provides the position of the step in relation to other child 
    steps that have a common parent step. Like PARENT_ID, it is used to determine 
    where to place the step in our graphical display.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The graphical display 
  helps me to more easily understand a query's access path. You can compare the 
  output from my query to the results returned from DBMS_XPLAN and other Oracle 
  utilities. Once you become more experienced, you will be able to create a graphical 
  display from virtually any output format that Oracle, or you, generate. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  We'll continue our review of the various tools that we can use to generate and 
  format access path information.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>System Triage V - Access Path Identification Part II</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-12-01.4894880310</link>
                      <description>We continue our series on system triage by learning how to find the access paths our poorly performing queries are taking during execution.  In this blog, we’ll review the two data objects that contain the access path raw data - plan_table and v$sql_plan.  In addition will review a few of the V$ dynamic performance views that provide information pertaining to SQL statements executing in our Oracle database environment.</description>
                      <pubDate>Mon, 04 Dec 2006 07:05:40 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Explain Plan</b><br>
The explain plan clause is used to ask Oracle to insert data describing a SQL 
statement's predicted access path into a database table. When the statement containing 
the explain plan clause is executed, Oracle will not run the statement; it sends 
the statement to the optimizer to generate the access path and then updates the 
plan table accordingly. The user is then able to execute standard SQL statements 
to retrieve the data from the table and review the access paths that the optimizer 
is predicting the SQL statement will take.<br>
<br>
<b>Oracle's Plan Table</b><br>
Oracle provides a table to contain the output from the explain plan execution. 
The script utlxplan.sql that contains the DDL to create the plan table can be 
found in the $ORACLE_HOME/rdbms/admin directory in most installations. Utlxplan.sql 
creates a table called plan_table, which is owned by the account that executed 
utlxplan.sql.</font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The EXPLAIN PLAN 
  statement will inserts rows into the plan_table that describes a given statement's 
  </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> execution 
  plans. Oracle's standard recommendation is to drop and recreate all plan tables 
  after an Oracle upgrade to ensure that you use the latest and greatest version 
  of the object. It is a good practice to follow Oracle's advice just in case 
  the definition of the plan_table changes from one release to another.<br>
  <br>
  <b>Manually Running the Explain</b><br>
  Although the intent of this series of blogs is to review the tools that Oracle 
  provides to automatically display access path output, it is important to begin 
  with the basics. The only tool you need to manually run an explain plan is SQL*PLUS. 
  <br>
  <br>
  Take a look at the examples below. I'm adding the explain plan clause to the 
  beginning of the statement to notify Oracle to update the plan_table with rows 
  describing the statement's access path:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EXPLAIN PLAN 
    FOR select * from scott.emp;<br>
    <br>
    This statement will explain the statement &quot;select * from scott.emp&quot; 
    and place the results in the plan_table owned by the account executing the 
    statement.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EXPLAIN PLAN 
    INTO schema.plan_table FOR select * from scott.emp;<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This statement 
    will explain the statement &quot;select * from scott.emp&quot; and place the 
    results in the plan_table owned by account referenced in schema.plan_table. 
    The account executing the statement must have the proper privileges on the 
    plan_table to execute this statement successfully.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> EXPLAIN PLAN 
    INTO schema.plan_table SET STATEMENT_ID = 'test1' FOR select * from scott.emp;<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This statement 
    will explain the statement &quot;select * from scott.emp&quot; and place the 
    results in the plan_table owned by account referenced in schema.plan_table. 
    The statement ID allows users to retrieve the statement's access path information 
    from a plan_table that contains rows from many different explains.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's important 
  to note that the contents of the plan_table are a prediction of the access path 
  that the statment will take. V$SQL_PLAN, discussed below, contains information 
  on the access paths the statements used during execution. For more information, 
  please refer to my previous blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_18.7319544765">&quot;System 
  Triage IV - Access Path Identification Part I&quot;</a></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When you explain 
  in statements in SQL*PLUS, you also need to be aware of how the tool interprets 
  the bind variables. Tom Kyte has a discussion on <a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:13433365108330277167::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:44737838132269">bind 
  variable interpretation</a> on his Ask Tom website. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to be 
  careful when you are copying and pasting SQL statements that you are attempting 
  to explain. I have seen experienced DBAs forget to copy the keywords &quot;explain 
  plan for&quot; when they copy the statement, dump the statement into SQL*PLUS 
  and run the statement instead of explaining it. It's an easy mistake to make 
  when you are rushing to solve a performance problem. If it's an update, use 
  the ROLLBACK statement to remove the unwanted data.<br>
  <br>
  <b>V$SQL, V$SQLAREA, V$SQLTEXT and V$SQLTEXT_WITH_NEWLINES</b><br>
  Before we begin our discussion on v$sql_plan, let's take a high level look at 
  some of the views we will use to gather information on SQL statements contained 
  in the library cache. We'll need this information before we access v$sql_plan 
  to determine what access path our queries are taking.</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> V$SQL - contains 
    information on statements in the library cache. It will contain a row per 
    SQL statement, which allows you to review information for an individual query. 
    This becomes beneficial when you have tables that have the same names but 
    have different owners. If two users are both executing &quot;SELECT last_name, 
    first_name, emp_id FROM employees&quot; and both users own a table called 
    employees, you'll find both statements in v$sql. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">V$SQL's 
    sql_text column provides the first 1,000 characters of the text of the SQL 
    statement and an address column that we can use to as an identifier when we 
    query the other V$ views. V$SQL's sql_fulltext is a CLOB column that contains 
    the entire SQL statement. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">V$SQL also 
    provides an abundant amount of information on resource utilization including 
    sorts, memory utilization, disk reads, buffer gets, rows processed. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">V$SQLAREA - 
    Is an aggregate of the aforementioned v$sql view and contains much of the 
    same information as in v$sql. Because it is an aggregate you'll have to remember 
    that if two users are both executing &quot;SELECT last_name, first_name, emp_id 
    FROM employees&quot; and both users own a table called employees, you'll find 
    only one statement in v$sqlarea.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">V$SQLTEXT - 
    Although both v$sql and v$sqlarea do provide CLOB columns that provide this 
    information, this view provides an easy way to retrieve the entire text of 
    the SQL statement. If the text of the SQL statement looks like it has been 
    truncated in v$sql/v$sqlarea's sql_text columns, use the value in the address 
    column from v$sql/v$sqlarea to query v$sqltext to get the entire statement. 
    If the text of the SQL statement contains any newlines or control characters, 
    they will be replaced with whitespace.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">V$SQLTEXT_WITH_NEWLINES 
    - Contains the text of the SQL statement without the newlines or control characters 
    being replaced by whitespace.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is important 
  to note that information for specific SQL statements contained in the V$ performance 
  views provided above, as well as v$sql_plan, could be flushed from the system 
  based on workload and memory allocations. Although you will always find data 
  for currently executing queries, you may, or may not, find information pertaining 
  to statements that were executed some time in the past. If a SQL statement has 
  been aged out of the library cache, you won't be able to find information on 
  it. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Going in-depth 
  into each of these dynamic performance views is far beyond the scope of this 
  particular blog. Consult the Oracle Reference Guide for your specific release 
  for more information on this VERY helpful set of views. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>V$SQL_PLAN </b><br>
  Oracle provides the v$sql_plan view to hold information on the 
  access paths SQL statements used during execution. If you want to quickly find 
  out exactly what access path was taken during runtime, this is the view to go 
  to for that information. <br>
  <br>
  If you do a describe on a plan_table and compare it to v$sql_plan, you'll notice 
  that although most of the column definitions are the same, v$sql_plan, has additional 
  columns to help you match the access path information to the SQL statement that 
  generated it. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at the statements below:<br>
  <br>
  The first step is to execute the statement we'll be using in the example. That 
  way we'll be able to query a few of the dynamic performance views to retrieve 
  some identification and performance information.</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; <br>
    SQL&gt; r<br>
    1 select a.employee_id, a.last_name, b.department_id, b.department_name,c.street_address, 
    c.postal_code, c.city, c.state_province<br>
    2 from hr.employees a,<br>
    3 hr.departments b,<br>
    4 hr.locations c<br>
    5 where a.department_id=b.department_id<br>
    6 and b.location_id=c.location_id<br>
    7 and a.employee_id = 174<br>
    8* order by a.last_name</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EMPLOYEE_ID LAST_NAME 
    DEPARTMENT_ID DEPARTMENT_NAME STREET_ADDRESS POSTAL_CODE CITY <br>
    ----------- ------------------------- ------------- ------------------------------ 
    ---------------------------------------- ------------ ------------------------------ 
    <br>
    STATE_PROVINCE <br>
    ------------------------- <br>
    174 Abel 80 Sales Magdalen Centre, The Oxford Science Park OX9 9ZB Oxford 
    <br>
    Oxford </font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's see if we 
  can find the statement in the library cache by accessing the v$sqlarea. Since 
  I know there is just one query in the library cache, I'm not interested in finding 
  each specific version of it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In this case, I'm 
  interested in the address value to identify the statement and the number of 
  buffer gets to get a feel for the statement's workload. I'll query the v$sqlarea 
  view to retrieve the address for the statement, the number of executions and 
  the buffer gets it consumed during those executions. </font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; <br>
    SQL&gt; select address, executions, buffer_gets, sql_text from v$sqlarea<br>
    2 where sql_text like '%select a.employee_id, a.last_name%' order by buffer_gets 
    desc;<br>
    <br>
    ADDRESS EXECUTIONS BUFFER_GETS <br>
    -------- ---------- ---------SQL_TEXT --------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
    697F521C 1 349 <br>
    select a.employee_id, a.last_name, b.department_id, b.department_name,c.street_address, 
    c.postal_code, c.city, c.state_province from hr.employees a, hr.departments 
    b, hr.locations c where a.department_id=b.department_id and b.location_id=c.location_id 
    and a.employee_id = 174 order by a.last_name <br>
    <br>
    A couple of quick points to remember. Here is the WHERE clause for the above 
    statement:</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">sql_text like 
    '%select a.employee_id, a.last_name%' </font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We know that v$sql 
  and v$sqlarea only contain the first 1,000 characters of the text of the SQL 
  statement. If your search value falls after those 1,000 characters, you'll have 
  to find the address from v$sqltext and use that value to search v$sql, v$sqlarea 
  and v$sql_plan. In addition, the way the statements are stored can also have 
  an affect on whether you will be able to successfully find the statement you 
  are looking for. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If there is a break 
  between &quot;employee_id&quot; and &quot;a.last_name&quot;, you may not be 
  able to find it using this search. That's why I attempt to search for the first 
  few characters for a given SQL statement. The important point is to find the 
  smallest chunk of the statement that allows you to differentiate it from other 
  statements and use that value in your searches. There is a whole host of different 
  options when searching the SQL_TEXT column. <a href="http://asktom.oracle.com/">Tom 
  Kyte's blog</a> contains a lot of good suggestions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Although the text 
  of this SQL statement can be found entirely in the v$sqlarea performance view, 
  as I stated, there are times when the statement will be too large to be entirely 
  contained in the sql_text column. If the text of the SQL statement looks like 
  it has been truncated, use the statement's address to query v$sqltext to retrieve 
  the entire text of the statement.</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; r<br>
    1* select sql_text from v$sqltext where address = '697F521C' order by piece<br>
    <br>
    SQL&gt;<br>
    -------------------------------------------------------------<br>
    select a.employee_id, a.last_name, b.department_id, b.department_name<br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">,c.street_address, 
    c.postal_code, c.city, c.state_province from hr.employees a,
    hr.departments b, hr.locations c where.department_id=b.department_id <br>
    and b.location_id=c.location_id and a.employee_id = 174 order by a.last_name 
    </font></p>
  </blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OK, let's use the 
  same value for the address column to query the v$sql_plan view to take a look 
  at the access path it used during execution:<br>
  <br>
  SQL&gt; r<br>
  1 select operation, options, object_name, id, parent_id, position<br>
  2* from v$sql_plan where address = '697F521C'</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's <a href="/blogs/blog_cf/chrisfoot/blogentry2006_12_014894880310/access_path_output.txt">the 
  output</a> for the statement above.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll notice that 
  the SQL statement I personally use to retrieve the statement's access path looks 
  different to most others you will find. This is how it was done in &quot;the 
  old days&quot; and I still feel comfortable using it from time-to-time. If I'm 
  working on simple queries (no partitioned tables accessed, etc.), I will use this one 
  because it allows me to quickly review the access path for the query.</p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> It is important to note that this statement does not provide cardinality information.  Cardinality is the number of rows that each, individual operation will access. Like the access paths themselves, there is a predicted cardinality and the actual cardinality.  Bad things can happen if the predicted and actual differ.  We'll discuss the importance of cardinality in a later blog.  Right now, we are just concerned about displaying basic access path information.  We'll 
  take a look at some of the queries that Oracle provides to format access path 
  output in my next blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The output of the 
  query tells me the operation being performed, option used, object being accessed, 
  ID and PARENT_ID. I'm a big fan of &quot;bubbling out&quot; queries. I'll use 
  this query, grab a piece of scratch paper and draw a graphical representation 
  of the query's access path. I'll discuss this in-depth in my next blog. The 
  intent of this blog is to just provide you with a high level understanding of 
  the two main objects we use to retrieve access path information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at the next statement below:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; r<br>
    1 select<font color="#0000FF"> A.</font>employee_id, a.last_name, b.department_id, 
    b.department_name,c.street_address, c.posta<br>
    2 from hr.employees a,<br>
    3 hr.departments b,<br>
    4 hr.locations c<br>
    5 where a.department_id=b.department_id<br>
    6 and b.location_id=c.location_id<br>
    7 and a.employee_id = 174<br>
    8* order by a.last_name</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> I have changed 
  the lower case character &quot;a&quot; to an upper case &quot;A&quot; in &quot;<font color="#0000FF">A.</font>employee_id&quot;. 
  That allows me to make the statement look different to Oracle. It makes it easier 
  for me to find that exact statement in v$sqlarea. I'll do this if I decide to 
  make some kind of structural change (building an index on a table) or am testing 
  changes to session parameters (optimizer_index_caching, optimizer_index_cost_adj) 
  that influence the optimizer.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">That allows me 
  to do before and after comparisons. I'll run the statement document the buffer 
  gets, disk reads, access path and timing, perform the tuning alterations and 
  then execute the statement making a slight change to the text of the SQL. I 
  will then find the new address for the statement and use it to access v$sql, 
  v$sqlarea and v$sql_plan to retrieve the performance and access path information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I see a decrease 
  in buffer gets, I'll know that I'm probably headed in the 
  right direction. It is important to not forget about preloading the buffer cache. 
  When a query executes, it will populate the buffers with data. As a result, 
  subsequent executions will be faster. I'll often execute both the before and 
  after versions of the query multiple times and use the aggregate performance 
  data to perform my analysis.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You will also have 
  to replace any bind variables with hard coded values to be able to successfully 
  execute the statement. If you use the same values for the before and after, 
  it will allow you to accurately compare the performance of the statement before 
  and after your changes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'll use the same 
  query I used previously to identify the ADDRESS for this statement. Please note 
  that I have changed the lower case character &quot;a&quot; to an upper case 
  &quot;A&quot; in &quot;A.employee_id&quot;. This will allow me to retrieve information 
  on the statement executed after I made my tuning changes.</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL&gt; r<br>
    1 select address, executions, buffer_gets, sql_text from v$sqlarea<br>
    2* where sql_text like '%select <font color="#0000FF">A.</font>employee_id, 
    a.last_name%' order by buffer_gets desc</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ADDRESS EXECUTIONS 
    BUFFER_GETS<br>
    -------- --------- -----------<br>
    SQL_TEXT<br>
    ----------------------------------------------------------------------------------------------------<br>
    697AD768 1 8<br>
    select A.employee_id, a.last_name, b.department_id, b.department_name,c.street_address, 
    c.postal_cod<br>
    c where a.department_id=b.department_id and b.location_id=c.location_id and 
    a.employee_id = 174 order by a.last_name</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I can then use 
  the new address value for this statement to access the v$sql_plan view to determine 
  if the access path has changed. You can add spaces between words, change case, 
  place a newline to make the statements look different to Oracle.</font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Running Statements 
  Using Bind Variables</b><br>
  If you prefer to try and mimic the SQL that is being executed as closely as 
  possible, here's <a href="/blogs/blog_cf/chrisfoot/blogentry2006_10_288698342650/input_variables.txt">an 
  example</a> (courtesy of ace DBA Ron Berner) of how to use inline input to SQL 
  bind variables that will be executed in SQL*PLUS. Please note that executing 
  a SQL statement in SQL*PLUS requires that you define both input and output variables. 
  <br>
  </font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Finding the 
  Top Resource Consuming Queries</b><br>
  If I want to perform a traditional &quot;top down&quot; tuning approach and 
  tune the highest resource consuming SQL, I'll use the statements below to identify 
  the top resource consuming queries. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following query 
  identifies the SQL responsible for the most disk reads:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT disk_reads, 
    executions, disk_reads/executions, address, sql_text FROM v$sqlarea WHERE 
    disk_reads &gt; 5000 ORDER BY disk_reads;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following query 
  identifies the SQL responsible for the most buffer hits:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT buffer_gets, 
    executions, buffer_gets/executions, address, sql_text FROM v$sqlarea WHERE 
    buffer_gets &gt; 10000 ORDER BY buffer_gets;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can create 
  a more readable report in SQLPLUS by inserting report breaks between the output 
  lines. To generate the report breaks in SQLPLUS, issue the following statement 
  before running the query:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">BREAK ON disk_reads 
    SKIP 2 --- for the disk read report and<br>
    BREAK ON buffer_gets SKIP 2 --- for the buffer get report</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's common knowledge 
  that poorly performing SQL is responsible for the majority of database performance 
  problems. The first query returns SQL statements responsible for generating 
  disk reads greater than 5,000 while the second query returns SQL statements 
  responsible for generating buffer reads greater than 10,000. I used these numbers 
  just as an example but I do personally use them as a starting point from time-to-time.  Based on their output, I'll then adjust the numbers up or down accordingly. The numbers 
  also depend on the system I'm reviewing. I'll use different numbers for OLTP 
  environments than I would for data warehouses.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll notice that 
  I divide the number of disk and buffer reads by the number of statement executions. 
  If a statement is generating 1,000,000 disk reads but is executed 500,000 times, 
  it probably doesn't need tuning. But the more it runs, the more emphasis I will 
  place on tuning it. If you can reduce the buffer gets generated by a query that 
  runs thousands of times of day by even small amount, you are still reducing 
  the total workload the system has to process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Heavy disk reads 
  per statement execution usually means a lack of proper indexing, poor selection 
  criteria, etc.. Heavy buffer reads sometimes means the exact opposite - indexes 
  are being used when they shouldn't be. But I'm personally most interested in 
  workload, that's why I most often use the buffer cache hits in my initial queries.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I don't (can't) 
  use the above queries to tune individual statement executions for a given user. 
  In that case, I would be using a SQL trace and TKPROF to review individual statement 
  execution. I'll use the queries above to get a general understanding of what 
  statements are the top resource consumers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I hope you enjoyed 
  this blog. In my next blog, we'll take a look at the various queries we can 
  use to format the raw access path data contained in the plan_table and v$sql_plan.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>System Triage IV - Access Path Identification Part I</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-11-18.7319544765</link>
                      <description>Now that we have used 10G DBConsole's toolsets to identify the top resource consumers, our next step is to determine the access paths our poorly performing queries are taking.  This series of blogs begins with a high-level overview of Oracle query optimization.  We'll also learn the difference between estimated and runtime access paths. Subsequent blogs will provide details on the various tools we can use to retrieve access path information.  </description>
                      <pubDate>Mon, 20 Nov 2006 05:55:32 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> The intent of this 
series of blogs is to show readers the various tools that can be used to display 
a SQL statement's access path. Once you have identified the top resource consuming 
queries (discussed in a <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_11_10.6780804300">previous 
blog),</a> you will need to identify the access paths the statements are taking. 
</font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The intent of this 
  blog is to not provide you with a detailed analysis of all of the access paths 
  available in Oracle. It is intended to show you how to identify access paths using the various tools the Oracle system provides. 
  It is important that I provide you with some background information on access 
  paths before we begin using the various tools that display access path information. 
  Part one of this blog will provide you with that background information. The 
  blog will also provide you with additional resources that will help you have 
  a better understanding of the different access paths that are available to the 
  optimizer.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Optimization 
  and Access Paths</b><br>
  When an application submits a SQL statement to the database for execution, several 
  steps are performed before it begins accessing data. These steps are collectively 
  called &quot;parsing&quot;. During the parse phase, the database ensures that 
  the statement is syntactically correct, that the objects it is accessing exist 
  in the environment, determines if the statement has executed before, etc., etc.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Generating a new 
  access path is a relatively expensive process. If the statement has been executed 
  before, Oracle will attempt to use the same access path that was created during 
  the earlier parse. If the statement hasn't been executed before, or it is invalidated 
  for some reason, Oracle will activate the optimizer to generate the statement's 
  access path to the data. The access path is the physical steps Oracle will take 
  to retrieve the data and return it to the calling application.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">So little is known 
  about the inner-workings of the cost based optimizer that is often called the 
  Oracle database's &quot;little black box.&quot; The optimizer's job is to analyze 
  the statement being executed and determine the most efficient access path to 
  the data for that statement. Craig Mullins provides an excellent description 
  of a database optimizer in <a href="http://www.amazon.com/DB2-Developers-Guide-Craig-Mullins/dp/0672326132">The 
  DB2 Developer's Guide</a> &quot;the optimizer is equivalent to an expert system. 
  An expert system is a standard set of rules when combined with situational data 
  can return an expert opinion.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The cost based 
  optimizer uses statistics generated by the DBMS_STATS procedure as the situational 
  data when creating its expert opinion on which access path to the data is most 
  optimal. These statistics are stored in the data dictionary and describe the 
  objects space characteristics, data uniqueness and data distribution. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The cost-based 
  optimizer is only as good as the statistics it uses as input. Statistics collections 
  should be run on a regular basis to ensure that the statistics are current (representative 
  of the data being accessed). The optimizer is then able to create a highly accurate 
  access path that is based on the least cost. If statistics are not available, 
  the optimizer uses a simple algorithm to calculate the statistics, which often 
  leads to &quot;less than optimal&quot; access paths. In other words, Oracle 
  guesses and it is sometimes not a very good guesser.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Object Statistics</b><br>
  Object statistics describe the contents of the data and how it is stored in 
  the physcal database objects. Before we continue, it may be beneficial for me 
  to provide you with a few examples:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If a table only 
  contains a few hundred rows, queries may run faster if the optimizer chooses 
  to read all of the blocks in the table as opposed to using an index. The I/O 
  generated traversing the index blocks to get to the table row entries would 
  be higher than if Oracle read just the blocks allocated to the table being accessed.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What if we access 
  a table using a column with poor cardinality? Cardinality describes the uniqueness 
  of a particular value stored in a column. Poor cardinality means that the column 
  has many values that are the same. If our statement contains a WHERE clause 
  that searches for a column value that is contained in 90% of the table's rows, 
  it is best that Oracle, once again, read each and every row in that table.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Conversely if 
  a WHERE clause searches for a column value that appears in 1% of the table rows, 
  it would be beneficial for the optimizer to choose an index. The optimizer also 
  uses object statistics to determine which join method should be used and the 
  order in which the joined tables are accessed. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here are just a 
  few of the object statistcs that the optimizer uses as input during access path 
  generation:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of rows 
    in the tables being accessed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of blocks 
    allocated to the table</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Average table 
    row length</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of distinct 
    values for a column</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of nulls 
    in a column</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of leaf 
    blocks allocated to indexes</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of leveles 
    in the B-Tree</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Clustering factor 
    - how the order of the index matches the order of the table rows</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Access Path 
  Prediction vs The Access Path Actually Taken During Execution</b><br>
  It is important to understand that there can be a difference between the access 
  path that Oracle predicts a statement will take versus the actual access path 
  taken during execution.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Many years ago, 
  I learned this fact the hard way. I was executing a performance analysis test 
  plan on a database that we were migrating from Version 8 to Version 9. I kept 
  using the Explain command (discussed in the next blog) to display the access 
  path of a statement I was attempting to tune. The access path looked perfect 
  to me. It was using the correct indexes, join methods, join sequence&#133; But 
  the transaction continued to perform poorly. Describing the statement as running 
  &quot;poorly&quot; is like describing the Titanic as having a &quot;small leak&quot;. 
  It ran forever. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I began to question 
  my ability to tune, Oracle Version 9I and my chosen career path. I just couldn't 
  figure out why this seemingly excellent access path was affecting the statement's 
  performance. I decided it was time to run a SQL Trace (discussed in next blog) 
  to generate more detailed performance information. I ran the TKPROF to format 
  the output. I used the explain option to dump the access paths and reviewed 
  the results. I stumbled across the titles &quot;Row Source Operation&quot; and 
  &quot;Execution Plan&quot;. I noticed that the access paths were different. 
  Hmm, how could that be? I began to dig into the Oracle 9i documentation for 
  TKPROF and found that &quot;Row Source Operation&quot; is the access path that 
  was taken during the statement's execution and the &quot;Explain Plan&quot; 
  is the access path that Oracle is predicting the statement will take before 
  it executes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's an <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_187319544765/access_paths_tkprof.txt">excerpt 
  of a recent TKPROF report</a> showing two different access paths for the same 
  statement. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If 
  you carefully review the two sets of access paths, it should become clear that 
  they are different. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Bind Variables</b><br>
  As I stated, sometimes those access paths are the same and sometimes they aren't. 
  The times &quot;they aren't&quot; are the times that will complicate your performance 
  tuning analysis. Oracle will change the access path for a couple of different 
  reasons. One reason is Bind Variable Peeking. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Bind variables 
  are used to simplify application program coding and improve the performance 
  of the parsing process. Oracle matches statements being executed to statements 
  that are already parsed and stored in the shared pool. If Oracle finds an exact 
  match, it will use the statement in the shared pool. When the statement is found 
  in the shared pool, it is described as being a soft parse. If Oracle does not 
  find any matching SQL in the shared pool, it will perform a hard parse which 
  requires more steps to be performed than a soft parse. As with mostly everything 
  elese, less steps = faster performance. When Oracle looks for a matching SQL 
  statement in the shared pool, the statements must match EXACTLY. That is, the 
  statement must match in case, line breaks and spacing. If the SQL doesn't match 
  exactly, Oracle executes a hard parse.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's an example 
  of a series of SQL statements using hardcoded variables:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select first_name, 
  last_name, dept_id from scott.emp where emp_id = 103487;<br>
  select first_name, last_name, dept_id from scott.emp where emp_id = 989566;<br>
  select first_name, last_name, dept_id from scott.emp where emp_id = 436709;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's the same 
  SQL statement using bind variables:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">select first_name, 
  last_name, dept_id from scott.emp where emp_id = :empid;<br>
  select first_name, last_name, dept_id from scott.emp where emp_id = :empid;<br>
  select first_name, last_name, dept_id from scott.emp where emp_id = :empid;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The first set of 
  SQL statements will all look different to the Oracle optimizer. As a result, 
  Oracle will be forced to hard parse each execution of the statement. One of 
  the steps in a hard parse is to generate the statement's access path. Regenerating 
  a statement's access path each time it is executed is an extremely inefficient 
  process and can drive the utilization of &quot;finite CPU resources&quot; to 
  unacceptable levels. If you execute these exact statements again with the same 
  values for emp_id (103847, 989566 and 436709), Oracle will find the matching 
  statements (if they haven't been flushed or invalidated) and not have to perform 
  a hard parse.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The second set 
  of SQL statements highlights the use of bind variables. The application program 
  will move the values 103847, 989566 and 436709 into the EMPID bind variable 
  and send it to Oracle for parsing and execution. Because the bind variable makes 
  the statement looks the same, Oracle will perform a hard parse for the first 
  execution and a soft parse of the statement for subsequent executions. A soft 
  parse will not regenerate the access path. This leads to faster statement execution 
  and a reduction in resource utilization.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Using bind variables 
  is not a panacea. If you want to learn the pros and cons of bind variables, 
  read Jonathan Lewis's book titled <i>Cost-Based Oracle Fundamentals</i>. I have 
  provided a link in the Access Path Education paragraph at the end of this blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Bind Variable 
  Peeking Potential Issues</b><br>
  Oracle 9I introduced bind variable peeking to improve the performance of statements 
  using bind variables. During the SQL statement's execution, Oracle will look 
  at the contents of the bind variable and use that information to generate the 
  access path. One example of where this helps is skewed data. Skewed data means 
  that one particular value in a column may occur a few times (high cardinality), 
  while another value may occur many times (poor cardinality). The best access 
  path for a value that occurs only a few times could differ from the access path 
  from the same statement that has a value in the bind variable that occurs many 
  times. For example, DBAs often use histograms on skewed data to provide more accurate situational data to the optimizer. This often causes issues when bind peeking occurs.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A bind variable 
  peeking problem may occur when the access path generated during the hard parse 
  uses &quot;an unlucky set of values&quot; as Jonathan Lewis describes it in 
  <i>Cost-Based Oracle Fundamentals</i>. That &quot;unlucky set of values&quot; 
  in the bind variables could generate an optimal access path for the initial 
  execution of that statement but not be as optimal for future executions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we go back to 
  my TKPROF output, the access path changes are a result of Oracle used bind peeking 
  to identify the contents of the bind variable. Oracle then changed the access 
  path the statement took during execution.</font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Bind Variable 
  Interpretation in SQL*PLUS<br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When 
  you explain in statements in SQL*PLUS, you also need to be aware of how the 
  tool interprets the bind variables. Bind variable interpretation will also affect 
  access path predictions. Tom Kyte has a discussion on <a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:13433365108330277167::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:44737838132269">bind 
  variable interpretation</a> on his Ask Tom website. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Which Access 
  Path Information Can You Trust?</b><br>
  Because the access path that Oracle predicts a statement will use often differs 
  from the one that it actually uses, I will highlight which output you can trust 
  and which you can't. I'll also provide you with a few helpful hints and tips 
  on how to influence some of the tools to predict an access path that more closely 
  matches the access path taken during run time.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Access Path 
  Education</b><br>
  You can start your education on the different access paths that are available 
  to the optimizer by reading Oracle's Database Performance Tuning Guide that 
  is provided in each Oracle release's documentation. Before you buy third-party 
  books on any topic, I highly suggest that you read Oracle's documentation first. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you want to 
  learn how the optimizer works, I highly suggest that you read Jonathan Lewis's 
  book titled <a href="http://www.amazon.com/Cost-Based-Oracle-Fundamentals-Jonathan-Lewis/dp/1590596366">Cost-Based 
  Oracle Fundamentals</a>. It is one of the most educational and informative books 
  I have ever read on the cost-based optimizer. Here's <a href="/oracle/or_articles/foot14/index.html">my 
  review</a> of the book for DBAZine.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What's Next?</b><br>
  In my next blog, we'll begin our review of the various tools we can use to identify 
  the access path a given SQL statement will take.</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>System Triage Part III - Finding the Top Resource Consumers</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-11-10.6780804300</link>
                      <description>In part three of this series, we'll use 10G Grid Standalone to identify the top resource consumers for a given instance.  We'll learn that 10G's DBConsole is able to provide us with all of the information we need to identify the top resource consumers, what resources they are consuming and the SQL they are executing. </description>
                      <pubDate>Mon, 13 Nov 2006 05:43:47 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Now that we have 
  identified that our database is the cause of our application's poor performance, 
  let's continue our system triage analysis by trying to identify the top resource 
  consumers. During our investigation, we'll also find out what resource the top 
  resources are consuming and the SQL they are executing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For sake of clarity, 
  we will make the assumption that the database ecosystem (database, operating 
  system and hardware platform) has been performing fairly well historically. 
  In addition, this blog also builds upon my previous two blogs. In those blogs, 
  we created a not so mythical performance problem that began with a business 
  user notifying us that they are experiencing a performance problem. During our 
  analysis, we have ruled out the network and application tiers and narrowed the 
  problem down to a database issue. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Finding the 
  Top Resource Consumers</b><br>
  We begin our investigation by logging into 10G Grid DBConsole and displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/database_home_merged.gif">Database 
  Home Page</a>. The first indicator that we are having a problem is the Host 
  CPU graphic displayed in the middle of the screen. The DBConsole has placed 
  a small red 'X' next to the title 'Host CPU' to notify us that CPU is an issue. 
  If we scroll down to the lower half of the screen, we notice that ADDM has already 
  identified the problem and is reporting its recommendations. I've discussed 
  drilling down into ADDM recommendations in a <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_11_24.2858305991">previous 
  blog</a>. We can certainly use the ADDM output to help us solve our problem 
  but it is important for us to discuss all of the tools that 10Grid DBConsole 
  provides to us.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's continue 
  our investigation by using the navigation tab on the top left hand side on the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/database_home_merged.gif">Database 
  Home Page</a> to navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/database_performance_home_merged.gif">Database 
  Performance Home Page</a>. This panel certainly makes it easy for us to determine 
  what resources are being utilized. We immediately see that we have a high CPU 
  utilization by the large green area displayed at the top of the screen. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We are able to 
  use DBConsole's drill down capabilities to drill down to the specific SQL and 
  Sessions that are consuming that resource. It is important to note the the DBConsole 
  provides drill down capabilities for all major resources displayed on this page. 
  We activate the drill down for CPU utilization by clicking on the green area 
  displayed on the screen. DBConsole responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/CPU_drilldown_from_db_perf_page.gif">CPU 
  drilldown panel</a>. DBConsole provides a slider that allows us to go back in 
  time and review the utilization of this resource historically. If we click on 
  the SQL statement drill down on the left side of the screen, DBConsole responds 
  by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/sql_details_activity_total.gif">SQL 
  Details Acitivity Page</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Once again, a large 
  green area shows that this statement is consuming a LOT of CPU resources. You 
  will begin to notice that almost every page DBConsole displays during our ananlysis 
  provides a button to run the SQL Tuning Advisor. For more information on the 
  SQL Tuning Advisor, please refer to my blogs titled<a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704"> 
  The SQL Tuning Advisor</a> and <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_04_28.3742757902">The 
  10G Automatic Tuning Optimizer</a>. These blogs provide a wealth of information 
  on the SQL Tuning Advisor. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have personally 
  seen the tool executed numerous times and can attest that the recommendations 
  it makes are worthwhile. Please remember this point - the SQL Tuning Advisor 
  often recommends that you implement a Profile that changes the SQL statement's 
  access path. This tool is currently not a substitute for having a firm understanding 
  of SQL access paths. The advisor will allow you to view the new access path. 
  Review it, determine if you want to activate it and then monitor the new access 
  path for the statement very closely. Don't blindly implement the profile without 
  monitoring the performance of the new access path. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We can use the 
  navigation tab on this page to navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/sql_details_stats_combined.gif">SQL 
  Details Statistics Page</a>. The SQL Details Statistics Page provides us with 
  a wealth of information on this particular SQL statement. Note the large green 
  area in the Activity By Waits pie chart. The page's Activity By Time section 
  also denotes both high elapsed and high CPU times. In addition, the page provides 
  us with other pertinent information including the number of times this statement 
  was executed, buffer gets, disk reads, etc.. Once again we see a navigation 
  button for the SQL Tuning Advisor. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we click on 
  the Plan navigation tab, DBConsole responds by displaying information on the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/sql_details_access_path.gif">SQL 
  statement's access path</a>. It's blatantly obvious in this case that we have 
  a cartesian join occurring. We also see that DBConsole is displaying a Schedule 
  SQL Tuning Advisor button.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/sql_details_tuning_history.gif">Tuning 
  Information Pane</a>l provides us with historical information on past tuning 
  changes. When we finally take Oracle's advice and run the SQL Tuning Advisor, 
  it will display the activated profile on this page. If you have implemented 
  several different profiles in the past, DBConsole will provide a listing of 
  them on the Tuning Information Panel. You then have the option of deactivating 
  one profile and reactivating a past profile if you desire. Here's a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/tuning_history_multiple_recs.gif">screenshot</a> 
  of a Tuning Information panel showing multiple executions and profile recommendations 
  generated by the SQL Tuning Advisor. As I stated previously, the intent of this 
  blog is not to instruct you how to use the advisor. I've covered that in a previous 
  blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's continue 
  our discussion by navigating back to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/database_performance_home_merged.gif">Database 
  Performance Home Page</a>. If we scroll to the bottom of the page, we can see 
  a column heading titled &quot;Additional Monitoring Links&quot;. If we click 
  on the Top Activity link, DBConsole responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/top_activity_combined.gif">Top 
  Activity Page</a>. This is the panel that I personally use the most when I am 
  trying to find top resource consumers in DBConsole. The Top Activity Page displays 
  both Top SQL and Top Sessions. If we click on the SQL ID link provided in each 
  line of the Top SQL section of this panel, DBConsole will display the SQL Details 
  Activity page we reviewed earlier in this blog. We are also able to drill down 
  into more specific session information by using the drill down links provided 
  in each line of the Top Session Panel. As I stated, when I use DBConsole to 
  determine what resources are being consumed, I will navigate to the Database 
  Performance Home Page and look at the graph at the top of the page. Although 
  I may drill down into the resource, I most often find myself dropping down to 
  the Top Activity link to display the Top Activity Page. It allows me to quickly 
  identify both the top SQL and sessions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is a link 
  displayed in the middle right hand side of the Top Activity Page titled 'Run 
  ASH Report'. Since the Automatic Workload Repository, by default, takes snapshots 
  every 60 minutes, performance information could be up to 60 minutes old. As 
  a result, snapshots do not contain enough information to allow administrators 
  to perform analysis on the active workload currently being performed in the 
  database system. Oracle10g contains a new internal utility, called Active Session 
  History (ASH), to provide administrators with access to current performance 
  information. ASH samples data from the V$SESSION dynamic performance table every 
  second and stores the information in V$ACTIVE_SESSON_HISTORY. The information 
  contains the events for which current sessions are waiting. The information 
  pertains to active sessions only; information from inactive sessions is not 
  recorded. The view contains one row per active session for each one-second sample. 
  Administrators are able to access V$ACTIVE_SESSON_HISTORY as they would any 
  other V$ dynamic performance table. DBConsole also provides this handy report 
  to provide you with information derived from statistical data stored in V$ACTIVE_SESSON_HISTORY. 
  The ASH report provides a wealth of top resource consuming components.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/top_activity_combined.gif">Top 
  Activity Page</a> also allows me to drill down into individual session information. 
  Each Session ID displayed in the Top Sessions chart on the Top Activity page 
  is a link to a set of session information panels. If we click on the Session 
  ID link, DBConsole will resond by displaying the Session Activity page. The 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_activity.gif">Session 
  Activity Page</a> provides us with information on the resources being used and 
  navigation buttons that allow us to kill the session and enable or disable SQL 
  Tracing. You'll notice that these buttons are displayed on all of the panels 
  dealing with session information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> If we click on 
  the General Tab, DBConsole will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_main.gif">General 
  Information Page</a>. The General Information page provides us with a wealth 
  of pertinent information on this specific session. Depending on the application's 
  architecture, the Client information could help us identify and contact the 
  specific user experiencing the problem. In addition, the panel provides information 
  on the application and server. The most important piece of information displayed 
  on this page is under the heading titled &quot;Wait&quot;. It tells us what 
  resource is currently being waited for, and in this case, the file and object. 
  Great diagnostic information when you are trying to debug a performance problem. 
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_statistics.gif">Session 
  Statistics Page</a> is a dump of all the raw statistics for this session. The 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_open_cursors.gif">Open 
  Curors Page</a> displays information on the SQL statement or statements being 
  executed by this specific session. It provides the text of the SQL statement 
  and drill downs that allow you to access the SQL Details drilldown screens discussed 
  previously in this blog. The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_blocking_tree_2.gif">Blocking 
  Tree Page</a> helps you determine if this session is being locked out by another 
  process or locking out other processes. For more information on locking and 
  blocking, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_03_04.9606206243">&quot;10G 
  Grid Control Hang Analysis Feature.&quot;</a> Lastly, the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/session_details_wait_event_history.gif">Wait 
  Event History Page</a> provides drilldown capabilities into the specific waits 
  this session is experiencing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at another set of panels that provides information on top resource consumption. 
  We will navigate back to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/database_performance_home_merged.gif">Database 
  Performance Home Page</a> and click on the Top Consumers link to display the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/top_consumers_combined.gif">Top 
  Consumers Home Page</a>. Although I don't use this page frequently when performing 
  database triage, it does provide some very useful information. My personal favorite 
  is the Top Modules by Service chart on the upper right hand side of the panel. 
  It organizes the resource consumers by the type of service. This information 
  is very beneficial when you have numerous sessions consuming a high level of 
  resources because it allows you to determine if the problem is localized to 
  a specific area of the application. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Currently, it is 
  my SQL*PLUS service that is dominating our database resources. I have seen personally 
  viewed report writer programs, application server programs, TOAD, SQL*PLUS, 
  etc. all displayed on this chart. The information allowed me to quickly identify 
  if the problem sessions were all coming from that one specific component of 
  the application environment. For example, I once viewed TOAD being displayed 
  as the top resource consumer during one of my investigations. I drilled down 
  into the session information, found the accounts that were being used, stopped 
  by the development area and found that a group of developers just had TOAD installed 
  and were testing it by accessing production data. The panel provides drilldowns 
  for Top Services, Top Clients, Top Clients and Top Sessions. The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/sessions_dump.gif">Top 
  Sessions Panel</a> allows me to once again drill down into individual session 
  information. The panel also provides a link that takes you to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_106780804300/show_active_SQL_from_top_sessions.gif">SQL 
  being executed</a> by the top sessions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As we have found, 
  the 10G DBConsole provides many different features that allow us to identify 
  the top resource consumers in the database it is monitoring. With time and experience, 
  you'll be able to quickly determine what sessions, SQL and components are the 
  top resource consumers. In addition, you will also be able to determine what 
  resource the top consumers are utilizing and the SQL they are executing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>System Triage Part II – Host Performance Analysis Using Grid Control and Host Commands</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-11-04.1538832230</link>
                      <description>In my previous blog, we discussed the investigative process used to determine exactly what application component is causing the performance problem.   This blog will cover the various Grid Control and Host Monitoring Tools we can use to further drill down into the database ecosystem (database, O/S, hardware server) to provide us with additional diagnostic information.  In future blogs, we’ll continue our investigation using Grid Control’s database performance monitoring and analysis tools.</description>
                      <pubDate>Mon, 06 Nov 2006 06:18:05 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Introduction<br>
  If you haven't read my previous blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_10_28.8698342650">Using 
  Deductive Reasoning and Communication Skills to Identify and Solve Performance 
  Problems</a>, I would highly suggest that you do so before continuing. The blog 
  will provide you with recommendations that can be used to determine what architectural 
  component is causing the problem. This blog assumes that you have determined 
  that the performance issue is somewhere in the database ecosystem (database, 
  operating system, hardware).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Determining 
  the Scope of the Problem</b><br>
  We'll begin with the premise that the entire application is running slow. If 
  the problem is localized to a specific transaction, you won't need to perform 
  all of the steps I am providing. The next blog will be more pertinent for transaction 
  specific performance problems. But you will be able to use a subset of the investigative 
  activities in this blog because both sets of problem determination activities 
  are very close regardless if it is a specific transaction or an application-wide 
  performance problem. The remainder of this blog will focus on Host Performance 
  Analysis. We'll continue the discussion on System Triage in subsequent blogs 
  when we use the 10G Grid Control R2 toolset to indentify the specific transactions 
  and SQL statements that are causing the performance problem. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Host Performance 
  Analysis</b><br>
  We need to determine the health of the server that the database is running on. 
  We are able to use 10G Grid Control's host performance analysis capabilities 
  in conjunction with O/S commands to determine the current system load. In this 
  blog we'll be using UNIX as an example. Although the commands may be a little 
  different in LINUX, the output we will be evaluating will be very close. I'll 
  cover Windows system performance in an upcoming blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Let's begin by 
  activating 10G Grid Control R2 and navigating to the Host's Home page. We accomplish 
  that by selecting the 'Targets' tab at the top of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/01_home.gif">10G 
  Grid Control R2's Home Page</a>. 10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/02_host_execute_link.gif">Hosts 
  Home Page</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G Grid Control 
  R2 will provide you with a listing of all hosts that is monitoring. If you would 
  like to learn how new database ecosystems are added into Grid Control, please 
  refer to one of <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_09_17.7657940139">my 
  previous blogs</a>. Although the blog doesn't provide detailed installation 
  guidelines, it does provide a high level overview of the Grid Control Management 
  System. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Your next step 
  will be to select the host that runs the database having the performance problem. 
  Once the host's home page is displayed, you will want to click on the performance 
  tab at the top of the screen to display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/perf_home_page.gif">Host 
  Performance Home Page</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You will want to 
  review the utilization of the three primary resources: CPU, Memory and Disk. 
  Take a look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/perf_home_page.gif">CPU 
  chart</a>, you'll notice that our server was experiencing a high level of CPU 
  usage a short time ago. Here's another <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/perf_home_page_vs_nmon.gif">performance 
  home page</a> showing some definite CPU utilization problems. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each of the primary 
  resources displayed on the page <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/perf_home_page.gif">provides 
  drill down capabilities </a>that allow you to further investigate the problem. 
  The drilldown panels allow you to review past performance of <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/cpu_drilldown.gif">CPU</a>, 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/memory_drilldown.gif">memory</a> 
  and <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/disk_drilldown.gif">disk</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For more information 
  on Using 10G Grid Control to evaluate Host Performance, please refer to the 
  following blogs: <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_03.4782910010">Using 
  10G OEM Grid Control's Host Performance Monitoring</a> and <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_04_19.3743394432">Tuning 
  Features and Host Performance Monitoring Using 10G Enterprise Manager Grid Control</a>. 
  The information they provide will be pertinent to both 10G Grid Control R1 and 
  R2 users.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Operating System 
  Monitoring Tools</b><br>
  There is a host of UNIX performance monitoring tools that display performance 
  information. Two of my favorites are NMON and TOP. Here's an <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/nmon3.gif">NMON 
  display</a> verifying that we are indeed experiencing CPU problems. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>NMON</b><br>
  Take a look at the CPU utilization display at the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/nmon3.gif">top 
  of the NMON page</a>. The letter 'U' designates the CPU being consumed by User 
  processes, while the letter 'S&quot; designates the CPU consumed by the system. 
  If you see a high number of S characters on the display and very little U characters, 
  it is time to contact your friendly system administrators and ask them why their 
  system is consuming such a high level of CPU. If you see a lot of U characters 
  and Oracle processes are the top resource consumers, your database is probably 
  the culprit. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For more information 
  on NMON (including how to show the top processes), please refer to the <a href="http://www-128.ibm.com/developerworks/aix/library/au-analyze_aix/">IBM 
  NMON home page</a>. IBM's NMON is a free tool that is available for download 
  and is available for most UNIX and LINUX systems. I personally prefer it to 
  over the Top command. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Top</b><br>
  Let's take a look at a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_11_041538832230/top_output.gif">Top 
  screenshot</a>. The important indicators are CPU States, Memory Utilization 
  and Top processes. Like NMON, Top also provides settings to provide you with 
  disk performance information. On both NMON and Top, you can use the Process 
  IDs to confirm the information displayed on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/perf_home_page.gif">10G 
  Grid Control R2 Host Performance Home Page.</a><br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Jonathan Lewis 
  provides some helpful hints on the Top command in Appendix B of his book titled 
  Practical Oracle 8i - Building Efficient Databases. Here's an <a href="http://www.jlcomp.demon.co.uk/app_b.html#top" target="_blank">addendum</a> 
  to the appendix that describes the output of the Top command that you may find 
  useful. Although the book is on Oracle8i, the Top information is still pertinent. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's some <a href="http://linux.about.com/od/commands/l/blcmdl1_top.htm" target="_blank">additional 
  information</a> on the Top command that will help you understand Top. It is 
  a little hard to read but the information it provides will be very useful. Lastly, 
  if your system administrators have configured the MAN command, you can use the 
  operating system manuals to retrieve informtion about most of the system commands 
  we are discussing. If they don't have MAN configured, the first question you 
  need to ask them is &quot;why not?&quot;. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>VMSTAT</b><br>
  The VMSTAT command is also available on many flavors of UNIX and Linux. VMSTAT 
  provides you much of the same information that TOP and NMON do, but it also 
  provides you with disk performance and system queueing information. Instead 
  of me regurgitating information on VMSTAT, here is an <a href="http://ertw.com/%7Esean/news/Mar-7-2002.html" target="_blank">excellent 
  description</a> of the VMSTAT utility. The author also shows you how to interpret 
  VMSTAT output. Although the author's discussion pertains to LINUX, like other 
  commands, the majority of information he provides will also pertain to the various 
  UNIX flavors.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Two of the display 
  columns I review frequently when I am performing host performance analysis are 
  the numeric values listed under the &quot;R&quot; and &quot;B&quot; columns 
  in the output. The numbers under the &quot;R&quot; column in VMSTAT designate 
  how many processes in the system are queued up and waiting to run. The higher 
  the number, the bigger the problem. The numbers under the &quot;B&quot; column 
  designate how many processes are blocked and can't do anything. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>IOSTAT</b><br>
  LINUX and the many of the UNIX variations provide the IOSTAT command to allow 
  users to analyze disk performance. IOSTAT displays kernel I/O statistics on 
  terminal, disk and CPU operations. By default, IOSTAT displays one line of statistics 
  averaged over the machine's run time. The use of -c presents successive lines 
  averaged over the wait period. Here's an <a href="http://www.linuxquestions.org/linux/answers/Jeremys_Magazine_Articles/Hunting_I_O_Bottlenecks_with_iostat" target="_blank">excellent 
  article</a> that shows you how to use IOSTAT and interpret its output.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SAR</b><br>
  SAR is another command that can be used to evaluate host performance. One of 
  the benefits that SAR provides is that it allows you to run it via CRON on a 
  regular basis and spool the performance data to a SAR output file. Users are 
  then able to use the SAR command to retrieve historical performance statistics. 
  Once again, here's an <a href="http://www-128.ibm.com/developerworks/aix/library/au-unix-perfmonsar.html" target="_blank">article</a> on how to use SAR to create historical performance reports. The article 
  also provides information on how to intrepret its output.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Using 10G Grid 
  Control in Conjunction with UNIX Monitoring Commands</b><br>
  10G Grid Control's Host Performance Home Page, provides you with a quick snapshot 
  of the host's key performance indicators (CPU, Memory and Disk). Oracle's intent 
  was to provide you with this information so that you would not be forced to 
  log on to the operating system to evaluate CPU, memory and disk performance 
  indicators. 90 percent of the time, I will use the key performance indicators 
  provided by Grid Control. They provide me with just the right amount of 
  diagnostic information I need to continue my investigation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are times 
  when the system is so locked up that 10G Grid Control will &quot;act up&quot; 
  when you attempt to access the host system's performance panels. That's a good 
  indication that you are definitely experiencing some server resource problems.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In that case, your 
  only choice is to revert back to the tried-and-true O/S commands that provide 
  server performance information. I will also use O/S commands when I want to 
  retrieve more detailed information than 10G Grid Control is able to provide.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Not all of the 
  performance monitoring commands I have provided will be available on all flavors 
  of UNIX and LINUX. Even if they are available, some of the commands must be specifically 
  installed. You need to determine what tools are available, have your O/S admins 
  install the ones that are and use the information in the links I have provided 
  to understand them.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In my next blog, 
  we'll continue our performance analysis using 10G Grid Control's database performance 
  analysis features.</font></p>
<p></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Let’s Get Technical! –  Using Deductive Reasoning and Communication Skills to Identify and Solve Performance Problems</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-10-28.8698342650</link>
                      <description>Those that excel at tuning understand that the tuning process starts with an understanding of the problem and continues with the DBA collecting statistical information.  Information collection begins at a global level and then narrows in scope until the problem is pinpointed.  Part 1 of this series provides hints and tips that can be used to determine what architectural component is causing the problem.  In subsequent blogs, we’ll learn how to use the toolsets provided in Oracle9I and Oracle10G to continue the investigation.  </description>
                      <pubDate>Mon, 30 Oct 2006 05:47:23 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Introduction</b><br>
Remember the old days? When the applications our customers used were simple and 
problem determination was easy? The days of true client server application architectures 
that consisted of a fat client application running on the PC, a network and a 
database. High-level performance problem determination was a breeze. It was either 
the PC, the network or the database. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Well, we all know 
  those days are looong gone. We can also agree that application complexity will 
  continue to grow and continue to complicate the problem determination process. 
  From Service Oriented Architectures and BPEL to advanced disk drive hardware 
  configurations (and everything in-between), our environments are growing more 
  challenging by the moment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Performance 
  Problem Analysis - System Triage</b><br>
  One of the common mistakes that is often made during a tuning exercise is not 
  gathering enough high level information during the initial stages of the problem 
  determination process. I often have the same issue. I get an inkling of what 
  I think the problem is and jump right in. As I stated in my introduction, the 
  key to success is to begin the analysis at a high level and then continue by 
  narrowing the scope of information collection until the problem is identified. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Once the problem 
  is identified, we tune and tweak, record the same statistics we used to identify 
  the problem and compare the before and after information. This iteration of 
  recording/changing/recording comparing is done again (and again) until the problem 
  is corrected. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Asking the Right 
  Questions to Help Identify the Problem</b><br>
  OK, so you have been called about a performance problem. What do you do? Suggestion 
  - blame the network! OK, I'm kidding. What you need to do is contact the parties 
  affected by the problem and perform a little detective work.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before we continue, 
  let's take a quick look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_10_288698342650/data_flow.gif">application 
  architecture diagram </a>for the sample application that we'll be using in this 
  discussion. It is a simple multi-tier application that uses a lightweight application 
  on the PC, a workload balancer (CoyotePoint, HydraWeb, etc.), one or more web/application 
  servers and finally, an Oracle database back end. Denver and Atlanta are remote 
  sites while the application hardware, additional business users and you  are located in Dallas. Like most applications, each site runs a common set of 
  programs with a few programs that are site specific. We also can assume that 
  most load balancers are configured to transfer connections to the least utilized 
  web/application server.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's 2:30 PM on 
  Friday. You are counting down to the weekend. You're thinking to yourself &quot;this 
  week wasn't so bad&quot; when the phone rings. It's Mike the applications manager 
  telling you that users are complaining about poor database performance and you 
  need to fix it. The first question that comes to your mind is &quot;Why does 
  everyone always assume that it is a database problem?&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The DBA Detective</b><br>
  You decide to begin your detective work by going straight to the end-user (or 
  users) experiencing the problem.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You ask Mike the 
  manager for the end-user's contact information. He gives you the number for 
  the business team lead in Denver. You make the call and begin your interrogation. 
  Your first question is as follows:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How many users 
  are affected by the problem?</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>If it is all 
  users at a specific site:</b><br>
  You continue your investigation by calling the other remote site to determine 
  if they are also affected by the problem. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the other remote 
  site is not experiencing the problem, continue you're your own investigation 
  but you should also place an emergency call to your friendly network specialists 
  and ask them for help. Explain to them that you have one remote site that is 
  running fine, while the other site is affected by poor application performance.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the other remote 
  site is also experiencing the problem, call one of your favorite users in Dallas. 
  Since the hardware for the application is also in Dallas, this is an easy way 
  to determine if the problem is localized to just the remote sites. Ask the user 
  in Dallas if they can run the application. If the Dallas users are running fine, 
  the performance of the remote network is now a suspect. Once again, continue 
  your own investigation but also ask assistance from network support.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>If all sites 
  are affected:</b><br>
  The list of possible suspects now grows. It could be any piece of the puzzle 
  - network, load balancing, application server, database, hardware server. One 
  of the tricks I have used to assist in my analysis of performance sensitive 
  applications is to talk with the application developers and ask them to send 
  me a half dozen to a dozen performance sensitive SQL statements from their application 
  that don't perform data updates. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I will try and 
  mimic the application as closely as possible. If the application is using stored 
  procedures, it's easy, I'll create my own stored procedure. If the application 
  uses bind variables, I'll code my program to use bind variables. Here's <a href="/blogs/blog_cf/chrisfoot/blogentry2006_10_288698342650/input_variables.txt">an 
  example</a> (courtesy of ace DBA Ron Berner) of how to use inline input to SQL 
  bind variables that will be executed in SQL*PLUS. Please note that executing 
  a SQL statement in SQL*PLUS requires that you define both input and output variables. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'll run the statement 
  when performance is good with timing on in SQL*PLUS to get a baseline. When 
  I'm troubleshooting a performance problem, I'll execute the SQL statements and 
  compare their performance against my baseline. I like to run the statements 
  twice, once from my PC and another execution on the database server itself. 
  If it runs fine on the database server yet runs poorly from my PC, the network 
  is once again one of my prime suspects.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'll l continue 
  my own quick database ecosystem (database, operating system, hardware server) 
  triage before contacting other units. I'll be looking at CPU, memory and disk 
  utilization and identifying processes that are consuming large amounts of resources. 
  I'll log on to the database itself and look at top SQL, session waits, locking 
  and system event statistics for more information. If the database is 10G, I'll 
  use an entirely different set of tools than I would with 9I. I'll cover the 
  different toolsets in upcoming blogs. I want to continue to focus on high-level 
  investigation activities in this blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the statements 
  run close to the baseline from both my PC and on the database server and my 
  initial review of the database ecosystem looks like it is working as it should, 
  I don't immediately rule it out as the cause. But it will affect the way I continue 
  my analysis. Before I begin my own more detailed database ecosystem performance 
  analysis, I will contact the technicians responsible for the application and 
  network tiers. All groups involved can work in unison to identify the problem. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'll ask the folks 
  responsible for the application tier to log on to their web/application servers 
  and review the same CPU, memory and disk utilization statistics that I would 
  on a database server. The application tier folks can also review connection 
  input/output queues. I will also ask them to compare performance statistics 
  amongst all hardware components of the web/application tier. If one web/application 
  server is at 100% utilization while the others are at 20%, the workload balancer 
  now becomes one of the suspects. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I will also ask 
  the network and server specialists to review network performance of all hops 
  from the database server to the remote and local sites. As I stated previously, 
  I don't arbitrarily rule out the database ecosystem if the SQL statement runs 
  fine on the server, but I know that other components of the application also 
  need to be investigated.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>If it is a select 
  group of users having a problem:</b><br>
  If Mike the Manager states that only a subset of users is experiencing a problem, 
  you will need to identify the specific transactions they are executing. It's 
  time to talk one-on-one with a business user that is having the problem. If 
  only one user is experiencing the problem, ask them if they can log on to the 
  application using a fellow user's computer and execute the same transaction. 
  If performance is acceptable, ask the user to run other transactions. If they 
  continue to run with acceptable performance, ask them to log on to their original 
  PC and run an additional workload. If performance is once again poor, their 
  PC and/or network connection could be the culprits.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If it is a group 
  of users, or the user continues to experience poor performance on all PCs they 
  try, it's time to get the developers involved and ask a few more questions:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Is it the entire 
    application running slow or just specific screens/transactions?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How much slower 
    is it?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Is the problem 
    intermittent or continuous?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Has this problem 
    occurred before?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If so, is it 
    getting worse?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Does the problem 
    occur at the same time every day?</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">After the line 
  of questioning is complete, you will need to determine exactly what transaction 
  is causing the problem. It's a relatively simple process if all users come in 
  with unique accounts and/or program identifiers. Log on to Grid Control or 9I 
  OEM, ask the user to log on and look at the sessions or top sessions screens. 
  Both 9i and OEM provide components that allow you to drill down and identify 
  what SQL statements a specific transaction is executing. In addition, both toolsets 
  provide screens that show database locking information. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">An application 
  that uses a common ID and program complicates the problem identification process. 
  Having an application developer on hand that knows the SQL being executed by 
  the various transactions can be invaluable. Oracle 9I and Oracle10G both provide 
  components that allow you to monitor the current SQL being executed. More on 
  that later...</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As I stated previously, 
  I don't' want to get too in-depth in this blog. In upcoming blogs, we'll take 
  a look at what tools you can use to identify poor performance when you find 
  out that it is your database causing the problem.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The intent of this 
  blog was not to persuade you to follow the steps it provides verbatim, it was 
  to provide you with a few high-level recommendations to help you quickly determine 
  what component is causing the problem. Look for more detailed information in 
  upcoming blogs.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA - Excelling at Verbal and Written Communications </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-10-20.6229555671</link>
                      <description>I thought I would spend one of the last few blogs in this series by discussing the importance of soft skills. If you want to remain competitive in this profession, you must be able to communicate effectively. I'll provide you with a few helpful hints and tips to improve your verbal and written communication skills.   </description>
                      <pubDate>Mon, 23 Oct 2006 05:42:21 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> The importance of 
improving your communication skills cannot be understated. I don't care how strong 
of a technician you are, if you can't communicate effectively with your peers, 
you won't be able to succeed in this profession. In the old days, you might have 
been able to get by with just your technical skills. That is definitely not the 
case in today's business world. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In a recent interview 
  with Bill Gates and Warren Buffet at the University of Nebraska, Buffet was 
  asked what one piece of advice he would give to others wanting to be successful. 
  He stated that students &quot;should polish their public speaking skills.&quot; 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As I wrote in a 
  previous blog, take a look at your last performance appraisal forms, I'm betting 
  that a lot of the criteria you are being judged upon depends upon communications. 
  The key words and phrases to look for are &quot;ability to work in a team environment&quot;, 
  &quot;keep supervisors informed&quot;, &quot;maintain good communication with 
  the user community&quot;, &quot;ensure the content of the communication is at 
  the appropriate level for the intended audience&quot;, &quot;provide system 
  and user documentation for projects and system enhancements.&quot; I pulled 
  all of the aforementioned phrases verbatim from one of my own recent performance 
  appraisals. I reviewed all of the criteria that I was being evaluated upon and 
  found that almost ninety percent of the items depended upon verbal or written 
  communications.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">So, let me get 
  off my soapbox and get to the topic at hand. How exactly do you improve upon 
  your verbal and written communications? If you don't have good communication 
  skills, all is not lost. Like anything else, these skills can be learned.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Improving Verbal 
  Communications</b><br>
  We have all heard that speaking in front of an audience is the number one fear 
  for most folks, surpassing both financial and health problems. Let me give you 
  a couple of hints and tips that have helped me. Although, I still don't view 
  myself as an accomplished speaker, I'm a LOT better than I used to be.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Toastmasters International 
  - I can not recommend this organization highly enough. <a href="http://www.toastmasters.org" target="_blank">Toastmasters 
  International</a> is a non-profit organization that focuses on improving communication 
  and leadership skills. Toastmasters is also a great place to network and advance 
  your career (it makes for an impressive bullet on your resume).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Toastmasters International 
  consists of hundreds of Toastmasters Clubs that are governed by a Board of Directors 
  that is elected by Toastmaster members. The Toastmaster website provides a <a href="http://www.toastmasters.org/find/default.asp" target="_blank">search 
  function</a> that allows visitors to find nearby clubs. If you want to learn 
  how to speak effectively in public, do yourself a favor and search for the clubs 
  in your area. I think that you will be surprised at how many clubs there are. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Everyone that attends 
  a Toastmasters event is there for one reason - to improve their public speaking 
  and leadership skills. You are not only taught the skills you need but you are 
  also provided with the opportunity to showcase your new found talents by giving 
  various speeches to fellow members. The key benefit of speaking at Toastmasters 
  is that you are giving speeches to others in a supportive environment. Everyone 
  there wants to improve their communication and leadership skills. A great place 
  to become an accomplished speaker.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Formal Classroom 
  Education</b><br>
  It would be a rare event indeed if you found an institution of higher learning 
  that didn't provide classes on public speaking. If you are attending school 
  to obtain that next degree, you need to make sure one, or more, of those classes 
  pertains to verbal communications. The more the merrier. Many colleges offer 
  adult education curriculum at night. Review the night class curriculum for local 
  colleges. I would be surprised if you didn't find one or two classes on public 
  speaking.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Books</b><br>
  This list will be short. I am an avid fan of anything written by Dale Carnegie. 
  My all time favorite book from this author is titled <i>The Quick and Easy Way 
  to Effective Speaking</i>. Amazon carries this book in stock. The benefit it 
  provides far outweighs its current price tag of $7.99. If I could only have 
  one book on public speaking, it would be this one.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Personal Recommendations</b><br>
  Here's a quick list of recommendations that have helped me improve my own public 
  speaking skills:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When you attend 
    presentations from others, pay attention to both the material they are presenting 
    and how the present it. Two of the most engaging speakers I have ever had 
    the pleasure of meeting are Craig Mullins and Richard Niemiec. I actually 
    attended one of Niemiec's presentations a second time. The first time I attended 
    was to learn the material he was presenting and the second time I focused 
    on the techniques he used to engage the audience. </font><br>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">I once saw a representative 
    from Microsoft give a presentation on their new operating system to a group 
    of 700 people. By the end of his speech, he had the entire audience &quot;high 
    fiving&quot; each other on a regular basis. I thought to myself, &quot;he 
    generated this much enthusiasm over an operating system?&quot;. I stayed right 
    where I was and watched him give the presentation to a second group of 600 
    with the same result. The second time I paid close attention to his presentation 
    style and stage mannerisms.</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'm 
    not saying that you should attempt to clone your presentation style from a 
    particular speaker, but you can improve your own communication skills by learning 
    from accomplished speakers.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The more you 
    speak in front of an audience, the better you will become. Absolutely, positively 
    no doubt about it that &quot;practice makes perfect&quot; in this case. Start 
    your public speaking career by starting with a small audience. Maybe you know 
    a particular database feature or a tip or trick that you think your fellow 
    technicians may benefit from. Invite them to a meeting, create a presentation 
    and present it! Work your way up to larger audiences. Join local users groups 
    and ask if they would allow you to give a presentation. Every time there is 
    a call for presentations from IOUG or Open World, I submit several presentations. 
    I may not get picked all of the time but I still try.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have found 
    that the more prepared I am, the less I am affected by anxiety before and 
    during a speech. I will present a speech to myself, my wife, my dogs numerous 
    times before I give the speech in public. The more times I do it, the more 
    confident I am.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I always visit 
    the room I am going to speak in. It makes me more comfortable when the time 
    comes to stand up in front of the audience. I also stand right in the middle 
    of the aisle and introduce myself to as many participants as I can. It helps 
    me to feel more comfortable when I step up on stage.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Improving Written 
  Communications</b><br>
  Have you ever read a document or e-mail that was so poorly written that you 
  had a hard time understanding what the writer was trying to convey? What was 
  your opinion of the author? Not good, I'll bet. Whether we like it or not, we 
  will be continuously judged upon our written communications througout our careers. 
  From entry-level to CEO, you will be judged on the words you write.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll find that 
  these recommendations closely parallel my public speaking recommendations. They 
  focus on formal education, gaining experience and best practices.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Formal Classroom 
  Education</b><br>
  Universities, colleges and high schools all offer adult night classes. Like 
  public speaking courses, you will be able to find a local educational institution 
  that offers classes on effective writing skills. I still have a couple of my college 
  textbooks on my desk that I use as references.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Books and Websites</b><br>
  You need the tools of the trade to write effectively. As I stated previously, 
  I still use a few of my aging college textbooks as references. I also have Anne 
  Stillman's book appropriately titled <i>Grammatically Correct: The Writer's 
  Essential Guide to Punctuation, Spelling, Style, Usage and Grammar</i>. This 
  is the book I refer to about 90% of the time when I am attempting to improve 
  my grammar, spelling and punctuation. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I also visit one 
  website regularly when I write. If you hop on to your browser of choice and 
  navigate to <a href="http://www.thesaurus.com" target="_blank">www.thesaurus.com</a> 
  or <a href="http://www.dictionary.com" target="_blank">www.dictionary.com</a>, 
  you will go to the same website. This very helpful website allows me to quickly 
  find definitions, synonyms and antonyms. If I want to obtain information specifically 
  on grammatical rules and concepts, I'll visit the <a href="http://grammar.ccc.commnet.edu/grammar" target="_blank">Guide 
  to Grammar and Writing website</a>. The numerous dropdown lists allow me to 
  quickly navigate to the topic I am looking for.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can also take 
  advantage of Microsoft's Spelling and Grammar Checker tools in Word. You will 
  need to be careful with some of the recommendations. Use Anne Stillman's book 
  or the Guide to Grammar and Writing website as a reference if you suspect that 
  the Microsoft tool's recommendation is incorrect.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Obtaining Assistance 
  from Accomplished Writers</b><br>
  When I first started working in a corporate environment, my writing skills were 
  terrible. But I had the good fortune of having a manager that understood the 
  importance of both verbal and written communications. I would write a memo, 
  she would correct it with her red pen and send it back to me for a rewrite. 
  Many of them had a &quot;Nice Try!&quot; and a smiley face on top. Even though 
  all of the rewrites (and smiley faces) were somewhat exasperating, her persistence 
  forced me to become a better writer. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I also had the 
  good fortune of being able to use a very accomplished writer, Craig Mullins, 
  as an editor during the initial stages of my writing career. His first piece 
  of advice stays with me to this day. I told him that I often get writer's block 
  when I first start. He stated &quot;Hey, who says you have to start at the beginning 
  of the article? After you do the initial article layout, start anywhere you 
  want to. If your initial design and layout are good, it will be easy to tie 
  it together.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's relatively 
  easy to find fellow technicians that excel at written communications. Think 
  about all of the e-mails and documents that come across your desk on a daily 
  basis. You can read the content and also review the text for ease-of-reading 
  and grammatical style. Find the folks that are good at written communications 
  and ask for their input. I think you'll find that most of your requests will 
  be warmly received.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Practice Makes 
  Perfect</b><br>
  Like public speaking, the more you write, the better you'll get. That's one 
  of the benefits of writing this blog. It keeps my skills sharp. When I first 
  started this blog, I would often agonize over every written word. Although I 
  still get stuck from time to time, the words now flow a little more easily for 
  me.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You also need to 
  become involved with as many company newsletters and related communications 
  as you can. When I asked to join a newsletter, I always started with &quot;I'm 
  not the greatest writer, but I'm trying to learn.&quot; I also asked my peers 
  that worked on the newsletter to critique my work. The more I was critiqued 
  and the more I plugged away at writing, the better I became. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Wrapup</b><br>
  IT shops are no longer evaluating technicians purely on their technical skills. 
  It is the total package of skills that you bring to the table that you are being 
  evaluated upon. We all know the importance that our technical skill sets have 
  upon our success in this field. But you also need to be well rounded in all 
  of the skill sets your managers are looking for. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA – Obtaining the Most Benefit From Oracle Training </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-10-14.0635922648</link>
                      <description>This blog will provide you with some hints and tips that will help you obtain the most benefit when you attend “Old OU” (Oracle University).  I’ll also provide some recommendations to help you pass the Oracle Certification Exams.  </description>
                      <pubDate>Mon, 16 Oct 2006 05:54:21 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction</b><br>
  Readers of this blog know that I've been involved in some form of Oracle Education 
  for close to twenty years now. I started my career in Oracle Education working 
  as a courseware creator and &quot;instructor to the instructors&quot; for Platinum 
  Technologies. I had the good fortune of working with fellow blogger, Craig Mullins 
  during my stint there. At Platinum, I was responsible for creating their entire 
  Oracle curriculum including classes on general administration, backup/recovery, 
  database tuning and several SQL and PL/SQL courses. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I was also employed 
  as an Oracle Certified Instructor for a number of years. The greatest accomplishment 
  in my career came was when I was awarded the OAEC Quality Achievement Award. 
  These awards are given to the top instructors in the OAEC (Oracle Authorized 
  Education Center) program. That recognition was quickly followed by Oracle allowing 
  me to certify a few of my fellow instructors. Certifying my fellow instructors 
  was a responsibility I took very seriously.   One of the folks I certified continues to have 
  a very prosperous career in Oracle Education. It should be interesting if I 
  ever attend one of his classes in the future. &quot;The student becomes the 
  teacher&quot; syndrome would be an interesting dynamic. I'll try not to critique 
  him in the middle of his class&#133;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Classroom 
  Education</b><br>
  When is the best time to take the classes? This may sound trite, but it is best 
  to follow Oracle's recommendations on the sequence of classes. Take the intro 
  classes before taking the more advanced classes. If you have the luxury (meaning 
  you aren't the only DBA in your shop), gain some day-to-day experience before 
  taking the more advanced classes (SQL or database tuning, backup and recovery, 
  etc.). You shouldn't be asking questions like &quot;What is an init.ora parameter 
  file, anyway?&quot; in a tuning or backup and recovery class. Instructors don't 
  have the time and your fellow students won't have the patience to bring you 
  up to speed before continuing on to more advanced topics. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Preparation</b><br>
  Being prepared is the single most important factor to obtain the most benefit 
  from any formal training class. I can't stress this highly enough - PREPARATION 
  IS THE KEY TO SUCCESS. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's a pretty simple 
  process to prepare for class. <a href="http://education.oracle.com" target="_blank">Oracle 
  Education's Website</a> will provide you with all of the information you need to prepare 
  for your upcoming class.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Step one is to 
  read the information provided by the Oracle Corporation that pertains to the 
  class you are attending. Sounds simple enough, right? That's because it is. 
  Oracle Education's website provides a detailed description of each class it 
  offers. It will tell you EXACTLY what to prepare for. Go to the Course Curriculum 
  page on Oracle Education's website, find the course you are attending, navigate 
  to the course description page and then click on &quot;Course Objectives&quot; 
  and &quot;Course Topics&quot;. You will find a detailed listing of all of the 
  topics the course will cover.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are a new Oracle DBA and will be attending your first database administration class, read the 
  Oracle Concepts Manual, Administrator's Guide and review the Reference and SQL 
  Reference books. Follow this same advice for whatever class you are taking. 
  If it's a new features class, read the new features guide for that release. 
  Tuning and performance - read the Performance Tuning Guide. Same thing for backup 
  and recovery, standby, RAC, etc.. Do yourself a favor and perform some self-education 
  first. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You 
  may not know the mechanics, but you'll be ahead of the game if you know the 
  lingo and the concepts used. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Showing Enthusiasm 
  and Willingness to Learn</b><br>
  If an instructor sees that you are making an extra effort to overcome your lack 
  of day-to-day experience by coming in early, staying late and being prepared, 
  they will be more prone to help you. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It's basic human 
  dynamics. If the instructor walks by your work area and sees you continuously 
  reading &quot;NFL Today&quot; when you should be doing labs, they are going 
  to spend less time with you and more time on students who are exhibiting a willingness 
  and enthusiasm to learn. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Instructors are 
  weird; we like to see people excited about what we are teaching. Seeing someone 
  enthused about learning makes us want to make sure they get the most out of 
  class. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Class Participation</b><br>
  Class participation means more than just answering questions that are asked. 
  You also need to ask questions. If you still don't understand, ask again. If 
  you are having a hard time understanding a particular concept, ask the instructor 
  during a break to explain the information to you again. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Trust me, your 
  instructor will be glad to help. Instructors don't choose training as a profession 
  because they like living out of a suitcase; education is a passion for them. 
  I knew it was time for me to retire when I woke up one morning in a hotel room, 
  looked out the window and couldn't remember what city I was in. After I cleared 
  my head (and looked at the local phone book), I found out where I was and started 
  contemplating that it may be time for a career change. Coming in my front door 
  that weekend and having my German Shepherd attack me because he forgot who I 
  was pretty much confirmed my decision.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are experienced 
  in Oracle and you have a lab partner that isn't as well versed in Oracle as 
  you are, take the time and help them. Don't take control of the keyboard and 
  blast through the labs. Be patient with them, show them the little tricks of 
  the trade you picked up and help them along. You'll probably have their undying 
  gratitude and you'll be contributing to the health and welfare of our profession.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are an Oracle 
  expert taking one of the more advanced classes, don't let your ego get in the 
  way of you obtaining the utmost benefit from the class you are taking - ask 
  questions and get involved! </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Over the years, I found that the discussions that were held during class breaks were often just as illuminating as the instructor led training. One DBA would ask a question about a problem 
  that occurred or the challenges they were facing. Their fellow DBAs would immediately 
  provide recommendations to help them. Don't be afraid to ask your fellow DBAs 
  and instructor for advice. If you have a problem, an Oracle class is the perfect 
  forum to obtain the information you need to get it resolved.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Familiarize 
  Yourself with the Next Day's Material</b><br>
  I know this can be hard to do. Especially if you are attending class in a place 
  you've never been to before. It's a tough decision between sightseeing in San 
  Francisco or planting your nose in an Oracle Admin I class guide. You'll need 
  to make some compromises here. Go out for a few hours, come in early and prepare 
  for the next day's class. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Importance 
  of Becoming Certified</b><br>
  Becoming certified is an essential ingredient for all Oracle technicians who 
  want to prosper in their chosen profession. Certifications are especially important 
  to those seeking employment in a field that often has many candidates competing 
  for a single position. An Oracle certification shows the potential employer 
  that the candidate has made the commitment to &quot;learn their trade&quot; 
  and has the background and education to quickly become a productive member of 
  the their staff.<br>
  <br>
  The Oracle Certification also gives a distinct advantage to DBAs looking to 
  advance in their careers. Being an Oracle Certified Professional raises their 
  visibility in the organization, which is a requirement for career advancement 
  in most shops. <br>
  <br>
  <b>Preparing for the Oracle Certified Professional Exams</b><br>
  The best time to take the exam is a week or two after taking the Oracle class 
  that the exam pertains to. Passing the OCP test is much easier when the information 
  is fresh. The class workbook should be used as the primary study guide. I have 
  passed every exam I have taken by studying only the information contained in 
  the class workbooks. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Oracle Education 
  website allows students to purchase practice exam tests. Free sample questions 
  are also available. Practice tests will provide you with a firm understanding 
  of the areas you are strong in as well as the areas where you need to shore 
  up your knowledge. Oracle University has chosen two partners (Self Test Software 
  and Transcender) to provide authorized Oracle Certified Practice Exams.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I am fully aware 
  that there are many competing websites that offer Oracle Certification practice 
  tests. If you want to prepare for an Oracle Exam by purchasing a practice test, 
  why not purchase the test from the vendors that Oracle has chosen to partner 
  with?</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Self Test Software 
  and Transcender practice tests provide a thorough coverage of the Oracle certification 
  requirements and use the same test question technology as the real exams including 
  simulations, scenarios, hot spots and case studies. This makes the choice clear 
  - go with the Oracle partner practice exams.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Day of Your 
  Test</b><br>
  Oracle partners with Prometric Testing Centers to provide testing centers throughout 
  the United States. The <a href="http://securereg3.prometric.com/">Prometric 
  Testing Center website</a> provides a test center locator to help you find testing 
  centers in your area. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following hints 
  and tips will prepare you for the day you take your certification tests:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> You must have 
    two forms of identification, both containing your signature. One must be a 
    government issued photo identification. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Try to show 
    up early (at least 15 minutes) before your scheduled exam. If you show up 
    late, the testing center coordinator has the option of canceling your exam 
    and asking you to reschedule your test.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You cannot bring 
    any notes or scratch paper to the testing center. Paper will be provided by 
    the testing center and will be destroyed when you leave.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Testing center 
    personnel will provide you with a brief overview of the testing process. The 
    computer will have a demo that will show you how to answer and review test 
    questions.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Don't leave 
    any questions unanswered. All test questions left unanswered will be marked 
    as incorrect.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Your exam score 
    is provided to you immediately and the exam results are forwarded to Oracle 
    Certification Program management. Make sure you keep a copy of your test results 
    for your records.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you fail 
    a test, you must wait at least 14 days before retaking it (except for exam 
    #1Z0-007 Introduction to Oracle9i: SQL).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Don't let your 
    ego prevent you from studying. I have seen numerous experienced DBAs receive 
    &quot;less than stellar&quot; test scores because they thought they knew the 
    material they were being tested on.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  I hope you enjoyed this blog on Oracle Education.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA - Third Party Product Evaluations</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-10-07.2939694079</link>
                      <description>Database administrators are much more than just “table jockeys.”  Because of our well-rounded expertise, we are often asked to help evaluate third-party business applications, application development tools and database administration and monitoring products. Over the years, I have developed a Product Evaluation Methodology that you may find helpful.</description>
                      <pubDate>Mon, 09 Oct 2006 05:35:18 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Introduction</b><br>
</font> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">A methodology 
can be loosely defined as a body of best practices, processes and rules used to accomplish 
a given task. The task in this case is to evaluate and select information technology 
products. The product could be a tool used by technicians or an end-user application 
that solves a business problem or improves efficiencies. The success of any methodology 
depends on its continuous refinement. As a result, all methodology documents should 
be considered to be &quot;work in progress.&quot; The steps contained in this 
section are not meant to be followed verbatim. They should be considered as a 
set of general recommendations to be used to increase the quality of the third-party 
application evaluation process. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Initial Analysis</b><br>
  Clarifying the business needs takes place during this phase. Individual, departmental 
  and corporate requirements are evaluated. The focus of the analysis is on solving 
  the business or technical problem as opposed to buying a product. End users 
  may have conflicting requirements. Needs clarification helps the users in synthesizing 
  a common statement of the overall requirements. Analysis to determine if existing 
  products can solve the problem is performed at this time. The make vs buy analysis 
  is also completed during the initial analysis phase.<BR> <br>
  The following questions need to be addressed during the initial analysis:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Can the solution 
    be provided with existing product sets?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Should the product 
    be purchased or built in-house?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Are other business 
    or technology units able to utilize the product?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Does the product 
    provide any other additional benefits?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What is the 
    impact of not solving the business or technology problem?</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Determine Impact 
  to the Information Technology Support Infrastructure</b><br>
  The product's affect on the support infrastructure is determined during this 
  phase. Although the major focus should be on solving the problem identified 
  in the initial analysis, it is proper to allow external considerations to affect 
  the final outcome. A product is useless if it cannot be successfully implemented 
  and integrated into the existing information processing environment. The product's 
  impact on individuals and groups as well as its impact on existing products 
  and technologies is determined at this time. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Collect the following 
  information during this phase of the analysis project:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The use of new 
    products often increases development time and training costs. Can the additional 
    time and higher application development costs be justified by an increase 
    in functionality or competitive advantage?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the product 
    requires support from the development area, can the application personnel 
    effectively administer the selected product?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Risk vs Benefit. 
    Is the additional functionality/competitive advantage worth any additional 
    risk the product brings to the business or IT units? This is often described 
    as the product's <i>comfort ratio</i>.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Identify changes 
    to the organizational infrastructure required to support the product (staff 
    additions, training, etc.)</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Identify 
        changes to other technologies and products. </font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Identify 
        additional products required to support the selected product.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Identify 
        changes to existing technologies and products the selected product will 
        require.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Identify 
        changes to policies and procedures the selected product will require.</font></li>
    </ul>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Analysis Evaluation</b><br>
  The analysis evaluation determines the resources required to evaluate, select, 
  implement and support the selected product. Some problems may not be cost-effectively 
  solved by existing technologies. Evaluation personnel must estimate the costs 
  required to evaluate the competing products. In other words, don't spend $100,000 
  to evaluate a $1,000 product. As a rule of thumb, the evaluation, selection 
  and procurement costs should range from three and ten percent of the project 
  budget. The time required to perform the evaluation is also determined during 
  this phase. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Perform the following 
  activities during this phase:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Determine and 
    estimate the resources required to further evaluate the business needs.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Determine and 
    estimate the resources required to perform the product selection. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Estimate general 
    implementation and customization costs.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Estimate on-going 
    support costs, including staff requirements and training.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Determine timelines 
    and deliverables for the evaluation, selection and implementation processes.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Determine date 
    when the recommendation will no longer be valid (recommendation life-cycle).</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Obtain Business 
  Unit and IT Management Commitment</b><br>
  One of the major activities of any evaluation process is acquiring management 
  commitment for the evaluation, selection and implementation stages. Representatives 
  from user and technical management need to be a part of the evaluation process 
  to ensure their continued support. Management always asks the same questions. 
  As a result, it is relatively easy to prepare for them. A satisfactory answer 
  to &quot;What business problem are you trying to solve?&quot; is usually followed 
  by &quot;How much will it cost to purchase, implement and support?&quot;, and 
  &quot;What is the risk if we don't solve the problem?&quot;. Management wouldn't 
  be doing their job if they didn't ask these questions. To be successful in this 
  phase, you need to be prepared to answer them.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Obtain business 
  unit and IT management commitment on the evaluation process, selection process 
  and possible implementation by providing the following information:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Reasons why 
    you are performing the evaluation (What business problem are you trying to 
    solve?)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How the product 
    solves the business problem.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What you intend 
    to test.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Time and cost 
    estimates for product selection, product purchase, implementation and on-going 
    support (Is the solution worth the cost?)</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Create Evaluation 
  Team<br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The evaluation 
  team is created in this phase. For products that do not have a wide impact and 
  are relatively inexpensive, the evaluation team will consist of a few select 
  individuals. But for products that have a wide impact or are expensive, it is 
  prudent to involve a larger group, some with a technical background, others 
  with a user perspective. Wide representation and diverse viewpoints obtained 
  early in the decision process produce better decisions and fewer surprises later. 
  It is imperative to include all those affected: IT personnel who will be supporting 
  the product, IT groups affected by its usage and end-users. Team leaders are 
  also identified during this phase.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The evaluation 
  team consists of representatives from:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Infrastructure 
    support (personnel who are experienced in related technologies or who would 
    be affected by the product implementation).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Application 
    developers who will be supporting the application.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Business unit 
    champions and end-users. </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Locate Potential 
  Vendors</b><br>
  Identifying the vendor offerings that will be evaluated takes place in this 
  phase. The problem is usually too much information as opposed to too little. 
  The best way to create a potential vendor list is to take a structured view 
  of the marketplace and investigate all avenues to give your evaluation team 
  the best possible chance of finding the alternatives. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A few sources of 
  locating potential vendors follow:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Internal personnel 
    who are experienced in related technologies (evaluation team).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Industry research 
    groups- Gartner, Forrester, Burton, IDC.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Internal research 
    - trade journals and trade shows.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Vendors that 
    have existing relationships with your company (i.e. IBM, MSOFT, Oracle, etc.)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Internet search 
    engines.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Initial Elimination</b><br>
  This phase will eliminate products that should clearly not be considered as 
  viable alternatives. The overall intent is to reduce the number of candidates 
  being evaluated. With each additional candidate, the cost of the evaluation 
  increases. The key to a successful elimination process is to create an in-depth 
  set of evaluation criteria that will be used to evaluate the potential candidates. 
  Using weighted measures helps to identify the measurement criteria that are 
  most important to solving the business problem. If the product passes this phase, 
  it is passed to the vendor evaluation phase for a more thorough examination.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Perform the following 
  activities during this stage:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create the vendor 
    selection process (methods used to perform the evaluation) and evaluation 
    metrics (evaluation criteria used to compare the products). Document both 
    the evaluation methods and metrics.</font> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The evaluation 
      metrics will include:</font></p>
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Vendor Assessment 
        (financial stability, size, alliances, etc.). The best product doesn't 
        always win. The more expensive the products are, the more time you need 
        to spend reviewing the vendors making them.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Functional 
        requirements - evaluate product based on its ability to solve the business 
        problem.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Technical 
        requirements - evaluate product based on its technical capabilities.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create a 
        general requirements document containing a compliance matrix that uses 
        weighted measures to show how each vendor meets the requirements.<br>
        <br>
        </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create and distribute 
    a Request for Information (RFI) document using the evaluation metrics created 
    above as the basis for the document.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Evaluate the 
    vendor responses to the Request for Information request.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Reformulate 
    the requirements based on vendor input.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create a vendor 
    short list to keep evaluation costs to a minimum.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Vendor Evaluation</b><br>
  An in-depth evaluation of each of the remaining products takes place in this 
  phase. The processes and methods created in this step are more detailed than 
  those created in the initial elimination phase. Vendor responses to the Request 
  for Information may also require alterations to both evaluation processes and 
  evaluation metrics. Remember that an individual product's feature set is usually 
  a compromise of function, speed and cost when compared to its competitors. You 
  need to determine which factors are most important to you and weight them more 
  heavily during your evaluation. A Request For Proposal (RFP) helps to formalize 
  the evaluation process. The Request For Proposal details the scope of the sales 
  process and defines the procedures and rules to be followed by the vendors. 
  Vendors are more enthusiastic about committing resources to the sales process 
  when it is clear to them how they are to respond and how their responses will 
  be evaluated.<br>
  <br>
  Perform the following steps in the Vendor Evaluation phase:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create a final 
    vendor selection process (methods used to perform the evaluation) and weighted 
    evaluation metrics (evaluation criteria used to compare the products). </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The evaluation 
    processes and metrics created in this phase are more in-depth than those created 
    during the Initial Analysis phase. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Vendor responses 
    to the Request for Information may require alterations to both evaluation 
    processes and evaluation metrics.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Functional requirements 
    - evaluate the product based on its ability to solve the business problem.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Technical requirements 
    - evaluate the product based on its technical capabilities.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create Request 
    for Proposal (RFP)</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Request 
        for Proposal is more formal than the Request for Information.</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The document 
        details the scope of the sales process (meetings, presentations, product 
        demos, trial periods, timelines and deliverables).</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It also 
        defines the procedures and rules to be followed by vendors during the 
        evaluation process. Ground rules are written and shared with the qualified 
        vendors. </font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Notify the vendors 
    of how they will be evaluated (overview of compliance matrix).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Vendor meetings 
    and presentations are held during this phase.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create a questionnaire 
    and contact the vendor supplied customer references.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The evaluation 
    matrix is used to measure product conformance to the business unit IT unit 
    requirements.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Communicate 
  Results</b><br>
  The results of the evaluation process are communicated during this phase. There 
  are many communication avenues to choose from. A formal evaluation document 
  is created and distributed. Presentations detailing the evaluation process are 
  also given. Before you make your recommendation, be prepared to justify it. 
  The major questions to ask yourself are &quot;Did you choose the best product?&quot;, 
  &quot;Did you keep the level of risk at an acceptable level?&quot; and &quot;Did 
  you achieve these objectives at a reasonable price?&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The documentation 
  provided to business and IT management includes:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">An executive 
    summary.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A detailed description 
    of the vendor chosen.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A financial 
    analysis of the chosen vendor.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The reasoning 
    behind the vendor's selection.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What other products 
    were evaluated and the reasons why they weren't selected.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">An overview 
    of the evaluation process.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The metrics 
    used as the basis for evaluation.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">An overview 
    of the responses to the Request for Information and the Request for Proposal.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The benchmark 
    results of all competing products, if any.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b></font><br>
  <font face="Verdana, Arial, Helvetica, sans-serif" size="2">I hope you enjoyed 
  reading this blog on third-party product evaluations. As I stated in the introduction, 
  the intent of this blog was to not influence you to follow the steps provided 
  verbatim. This contents of this blog should be considered as a set of general 
  recommendations that can be used to increase the quality of the third-party 
  product evaluation process. Happy evaluating!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA – A Preview of Future Blogs</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-09-23.7237763466</link>
                      <description>I’ll provide you with a quick preview of the last few remaining blogs on this topic.  I’ll be taking a one-week vacation and I’ll see you back here in two weeks! </description>
                      <pubDate>Mon, 25 Sep 2006 05:20:31 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Troubleshooting</b><br>
The standard operating procedure for most IT shops is to &quot;blame the database first&quot; when a 
problem occurs. That would be any type of problem - performance, availability, 
data quality issues, poor water quality, global warming&#133;. Whatever the problem 
is, it the DBA's responsibility to prove that their database is not the culprit. 
I'll provide you with a few helpful hints on how to make your case when you finally 
determine that it isn't your database causing the issue. We'll also review some 
high-level best practices that will help you pinpoint the real cause of the problem 
in complex, multi-tier application environments. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Communication 
  Skills</b><br>
  The importance of improving your communication skills cannot be understated. 
  I don't care how strong of a technician you are, if you can't communicate effectively 
  with your peers, you won't be able to succeed in this profession. In the old 
  days, you might have been able to get by with just your technical skills. That 
  is definitely not the case in today's business world. This will be a reprise 
  of a previous blog which I feel bears repeating in this series.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Knowing More 
  than Just the Database</b><br>
  One of the benefits of being a database administrator is that you are exposed 
  to a wide range of technologies. From application design to the operating system 
  that the database runs on, you'll need to &quot;know more than just the database&quot; 
  to be successful in this profession. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In many shops, 
  the DBA is known as the &quot;GOTO&quot; technician when problems occur. DBAs 
  are given this role (whether they like it or not) because they have a reputation 
  as having strong problem solving skills and are known to possess an in-depth 
  understanding of the entire application architecture. As a result, the DBA is 
  often viewed as the IT staff's technical generalist and is often called upon 
  to provide advice on many different facets of information technology. I'll provide 
  a few helpful hints on what technologies you'll need to learn and what the best 
  sources are to help you quickly educate yourself.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Obtaining the 
  Most Benefit From Oracle Classroom Education</b><br>
  I've been teaching Oracle, on and off, for most of my career. I have taught 
  literally hundreds (and hundreds) of students during that time. The greatest 
  accomplishment in my career came was when I was awarded the OAEC Quality Achievement 
  Award. These awards are given to the top 4 instructors in the OAEC program. 
  Like most instructors, I took my teaching responsibilities seriously. It was 
  my job to ensure that all students taking my classes were prepared for the challenges 
  that would face them. But it takes more than just a good instructor to ensure 
  the transfer of technical information from teacher to student successfully 
  occurs. The recipients (students) must be ready, willing and well prepared to 
  receive this information. It truly is a &quot;two-way street&quot;. Now that 
  I am officially retired as an Oracle instructor, I thought I would provide you 
  with a few unofficial hints, tips and tricks that will help you to obtain the 
  most benefit from Oracle Classroom Education. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Evaluating Third-Party 
  Products</b><br>
  As we learned in previous blogs, database administrators are much more than 
  just &quot;table jockeys.&quot; DBAs often become involved in the evaluation 
  of third-party business applications, application development tools and database 
  administration and monitoring products. Over the years, I have developed a Product 
  Evaluation Methodology that you may find helpful.</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A 
  methodology can be loosely defined as a body of practices, procedures and rules 
  used to accomplish a given task. The task in this case is to evaluate and select 
  information technology products. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>You are Moving 
  into Management - Now what?</b><br>
  I've stated more than once that being a good technician doesn't mean that you'll 
  make a good manager. But most of you can learn. If I can do it, you certainly 
  can. I'll provide you with a primer on what to do when your manager calls you 
  in their office and offers you that promotion &quot;you've always dreamed of.&quot; 
  I have had the good fortune of being supervised by folks that I would rate as 
  being among the best managers in the IT industry. In the last twenty years, 
  I've worked for many different businesses and I've seen my share of both good 
  and bad management styles. I'll show you what to do and not to do to make your 
  migration from DBA to manager a success. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Non-Technical 
  Art of Being a Successful DBA - Wrapup</b><br>
  I'll spend the last blog of this series summarizing what we have learned. This 
  blog will also provide me with one last chance to reinforce my opinion that 
  it takes much more than technical expertise to become a successful database 
  administrator.<br>
  </font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA – Paranoid DBA Best Practices</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-09-17.9516775168</link>
                      <description>Ever look at a screen’s output and get that puckered feeling in the pit of your stomach?  If you have been working in this profession for any amount of time, you know the feeling I’m talking about.   The feeling that makes you think you would rather be living in Montana making woodcarvings at a roadside stand than being a DBA.  I’ll be taking a somewhat lighthearted look at the perils of our profession and discuss ways to reduce problem occurrences.</description>
                      <pubDate>Mon, 18 Sep 2006 06:14:39 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Perils of 
  our Profession</b><br>
  One of the common challenges that all DBAs face, no matter what vendor's database 
  they work on, is the absolute attention to detail our profession demands. Switch 
  a couple of characters in a script, forget to set your SID, set the wrong flag 
  at the wrong time and the end result usually isn't very pretty. Many commands 
  we issue on a regular basis are destructive by their very nature. This is the 
  reason why I have a great respect for all technicians who have selected database 
  administration as their chosen profession. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I know they have 
  all experienced that uncontrolled &quot;eye-twitching&quot; at 2 AM when they 
  are ready to hit the final enter key to execute the command. You know what command 
  I'm talking about too. It's that one command that you really, really, really 
  hope is going to come back with a successful return code and ultimately end 
  with a database that is finally usable. Whether it's a recovery, a file fix 
  or corrupt data is immaterial, it's the wait that we are talking about.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is no longer 
  wait in our profession than waiting for the message below after a database recovery:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL&gt; 
      Database opened.</b></font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Time always seems 
  to stand still. The longer the recovery, the messier the recovery, the more 
  critical the database - the longer you wait. You stare at the screen hoping 
  beyond hope that the above message will appear. It's the ritual cross your fingers, 
  spin around three times, face towards Oracle headquarters and pray to everything 
  that is Larry Ellison wait. I've actually caught myself mumbling &quot;come 
  on, please open, please open&#133;&quot; I don't care how sure you are of your 
  capabilities - you know the anticipation I'm talking about. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You then either 
  breathe a sigh of relief or you are in absolute disgust when you see an Oracle 
  error message appear. How about the old &quot;File 1 needs more recovery to 
  be consistent&quot; or the &quot;File 2 not restored from a sufficiently old 
  backup&quot;? Those messages are enough to make anyone cringe. I'm an ex-Oracle 
  instructor, I've seen those messages A LOT in class. I still cringe.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">At a previous job, 
  I once had to run through 36 hours of tapes to restore a multi-terabyte warehouse. 
  A disaster occurred that required us to do a recovery. THAT was the longest 
  wait for a database open message I ever experienced. One of my fellow DBAs asked 
  if I needed a brown paper bag to breathe into.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Or it's the command 
  that drops the schema in the test environment that will allow you to do a refresh 
  from production. It's that test database that runs on the same box as production. 
  The environment that makes you do a &quot;SELECT name FROM V$DATABASE&quot; 
  command in SQL*PLUS about 15 times in a row before you finally execute the &quot;DROP 
  USER CASCADE&quot; statement.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Not only must we 
  try to prevent our own mistakes, we must safeguard our environments against 
  the mistakes of others. Operating system administrators, disk storage technicians 
  and application developers are just like us. We are all part of the human community 
  that makes mistakes from time to time. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you never make 
  mistakes, send me a resume. I'm always looking for a &quot;Patron Saint of Oracle&quot; 
  here at Remote DBA Experts. It will also save us on travel costs because I'm 
  sure you'll be able to spread your wings and fly here on your own.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But as my old boss 
  Dan Pizzica used to tell me (when I was a VERY junior DBA) &quot;It really doesn't 
  make a difference who broke the database. You are the technician who is ultimately 
  responsible for fixing it. The buck stops with you. If you can't protect your 
  environments, you aren't doing your job.&quot; We all know he's absolutely correct.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Then there's the 
  software glitches. The problems that pop up out of the blue and make you go:</font></p>
<p> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">&quot;WHAT THE 
  ? - how did THAT happen? I've done this 317 times in a row and it worked every 
  time.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For you math majors, 
  here's my calculation for this:</font></p>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="8%">&nbsp;</td>
    <td width="92%"><font face="Arial, Helvetica, sans-serif" size="2">CLOSER 
      YOU ARE TO PRODUCTION TURNOVER </font></td>
  </tr>
  <tr>
    <td width="8%"> 
      <div align="center">+</div>
    </td>
    <td width="92%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><u>THE 
      GREATER THE VISIBILITY OF THE PROJECT</u></font></td>
  </tr>
  <tr>
    <td width="8%"> 
      <div align="center">=</div>
    </td>
    <td width="92%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">THE 
      MORE LIKELY A PREVIOUSLY UNKNOWN SOFTWARE GLITCH WILL OCCUR</font></td>
  </tr>
</table><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I don't care what 
  software you are using, you will run into the &quot;only occurs on this release, 
  on this version of the operating system, using this particular feature on the 
  third Tuesday of the sixth month when it's cloudy outside&quot; BUG. Be sure 
  to expect management to stop by and ask &quot;well why didn't you test this 
  on the third Tuesday of the sixth month when it was cloudy outside?&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The more complex 
  the database ecosystem, the more paranoid I become. Which is why I'm not a follower 
  of &quot;the database is getting so easy - we won't need DBAs&quot; mantra that 
  mindless industry pundits profess on a seemingly endless basis. <br>
  <br>
  So now we know that our jobs are somewhat unforgiving and we do make a mistake 
  from time to time. What can we do to reduce the chance of an error occurring?</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Second Set 
  of Eyes</b><br>
  As I have stated in previous blogs, I have over 20 years of experience using 
  Oracle and have done my fair share of database backups and recoveries. During 
  my career as an Oracle instructor, I have assisted in hundreds of database recoveries 
  in Oracle's classroom environments. If possible, I still have others review 
  my recovery strategy and recovery steps before I begin the recovery process. 
  I used backup and recovery just as an example. Whatever the process is you are 
  are performing, a second opinion may prevent you from making a mistake. A review 
  from a fellow DBA has saved me more than once. I may be described as having 
  an ego (I have no idea where they get that opinion) but it doesn't prevent me 
  from asking for help from others.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We were recently 
  correcting a very poor backup script created by a customer's previous database 
  support vendor. The customer described this particular environment as &quot;if 
  it goes down we lose our ability to make money&quot; application. After our 
  massive set of changes were complete, two of us went line-by-line verifying 
  each line of the backup script. At the end of each script we asked each other 
  &quot;are you OK with this?&quot;. Only then did we move on to the next one. 
  I don't care how much time you have &quot;in the seat&quot; using Oracle, you 
  need to put your ego aside at times and have someone check your work on critical 
  activities. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Concentration</b><br>
  I used to work for a shop that subscribed to &quot;the everybody in one big 
  room&quot; philosophy. I guess it was supposed to allow everyone to work together 
  as a team and become as &quot;one with each other&quot;. It may have achieved 
  that purpose but it sure didn't allow you to concentrate on your work very well. 
  You could hear so many different conversations they had to pump white noise 
  in. The constant 'whhhsssssshhhssshhh&quot; noise made me feel like I was a 
  crewmember of the Starship Enterprise. I always wondered when Captain Picard 
  would walk through.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Like all DBA units, 
  our particular area was often populated with various developers and O/S technicians. 
  Many different conversations were occurring, some that could be described as 
  somewhat animated. The environment did not allow you to concentrate on the task 
  at hand. We often had to go into small conference rooms to work on critical 
  tasks. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The point I'm trying 
  to make is that no matter what type of environment you work in; if you can concentrate 
  OK, but if you are like me and you can't, find a spot where you can. Block off 
  some time, send questions to other DBAs and concentrate on the task at hand. 
  Don't attempt to answer questions and code a complex script at the same time. 
  May seem obvious, but throughout my career I have personally watched numerous 
  DBAs attempt to multitask when they are working on a critical process. It's 
  a recipe for a problem. Once you are done, follow rule number one and have someone 
  review your work.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What Database 
  Are You Working IN?</b><br>
  Working in the wrong database is a common problem for database experts as well 
  as their less experienced counterparts. How many times have YOU found yourself 
  running statements in the wrong environment? Feel free to include me in that 
  not so select group. The operating system command SET can be used in Windows 
  systems to display environment variables. The ENV command can be used to display 
  the environment variables in UNIX. Many seasoned database administrators change 
  their UNIX shell prompt in their.profile to display the current Oracle SID. 
  Displaying the current Oracle SID in the shell's prompt provides a continuous 
  reminder to the DBA of the database they are working in.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The entire paragraph 
  above was from a <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_06_22.933222125120">recent 
  blog</a> I wrote on the new capabilities of 10G SQL*PLUS. I highly recommend 
  you read this blog and use the 10G Version of SQL*PLUS to take advantage of 
  this safeguard. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Setting your 
  SID Automatically During Logon </b><br>
  Here's an easy recommendation - don't do it. Many of the servers we work on 
  contain several databases that use different database software releases. It is our standard 
  to not set environments in logon scripts. We create shell scripts that have 
  the database name in their title to set our SID, ORACLE_HOME, etc.. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is a little 
  harder in Windows environments. During installation, Oracle often uses the first 
  database created on the server as the default SID. You can override this configuration, 
  but you'll need to read the Oracle installation guides to find out how. The 
  manuals will show you how to override the default database on Windows operating 
  systems.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Saving Time 
  VS Creating a Problem</b><br>
  I once watched a fellow DBA perform a rather complex set of administrative tasks 
  to solve a problem. He was rapidly flipping back and forth between at least 
  15 active screens, copying and pasting and editing and copying and pasting and 
  editing&#133; I describe this particular activity as &quot;Multiple Screen Syndrome&quot;. 
  He also had several other screens open that were connected to other databases. 
  He was multi-tasking to its highest degree. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How about the rm 
  -r /u0*/ora*/prod*/*/*.* command in UNIX? It's the command that drops multiple 
  databases in multiple directories. All in one painful swoop. How many 
  times have you heard of a mistake caused by commands like this causing mass 
  mayhem? When you make a mistake like this, you become immortalized in conversations 
  for years to come. Get a few technicians together after work and ultimately 
  the conversation will include &quot;remember when Bob so-and-so ran that big 
  rm -r command by mistake and wiped out the entire O/S on our production web 
  server? You can't tell me you haven't heard stories like this.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">My opinion as a 
  database manager is that I would rather you take your time than showcase your 
  multi-tasking and time saving skills. The more complex and critical the activity, 
  the more basic you should become in your plan of attack.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Safety First 
  Mindset</b><br>
  I once saw a DBA log in to a database using a particular schema account. He 
  then logged into a different database using a DBA account and dropped the schema 
  with the same name he was logged into on the first database. I asked him why 
  he logged into the first database using the schema account he just dropped in 
  the second. He stated &quot;Oracle won't let you drop a schema that is connected. 
  No matter what happens after this, I'm positive that I won't drop the user in 
  this database by mistake.&quot; I like that Safety First mindset in a DBA. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to think 
  Safety First when you are performing any particular complex or critical activity. 
  Take the time and put one or two safeguards in place like the DBA did when he 
  dropped the user.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Other DBAs may 
  call you paranoid, I'll call you an experienced DBA that would rather be safe 
  than sorry.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  The intent of this blog was to not provide you with a laundry list of recommendations. 
  It was intended to help jumpstart your creative juices to think about different 
  methods to protect yourself against problems. If you have any helpful hints, 
  please feel free to respond to this blog with your Safety First Tips and Tricks.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA Continues</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-09-10.8657066083</link>
                      <description>The next few blogs in this series provide readers with miscellaneous hints and tips to enhance their skill sets and improve their ability to provide quality support to their customers.  In my next blog, we’ll look at “Paranoid DBA” best practices.
</description>
                      <pubDate>Mon, 11 Sep 2006 16:44:37 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Foot Rule 
  of Thumb</b><br>
  The Foot Rule of Thumb is pretty simple. You need to experiment and create your 
  own rules of thumb. A few months ago I wrote a series of interview questions 
  for DBAZine. The questions were the basis for a podcast interview with Jonathan 
  Lewis. What impressed me the most about the interview with Jonathan was the 
  amount of time he spent researching how the database worked. He stated that 
  he became an expert by spending time investigating the database's intricacies 
  and documenting the results. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You begin creating 
  your own rules of thumb by reading opinions from folks that you can trust. The 
  industry experts that are both learned in their chosen profession and aren't 
  afraid to provide you with their opinion. If you are interested, I wrote a blog 
  listing my <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_06_29.5435751381">favorite 
  authors and bloggers.<br>
  </a><br>
  In addition to learning from others, you need to create your own test environments 
  and experiment. One of Oracle's great benefits is that it runs virtually anywhere. 
  If you aren't sure how something works and the manuals aren't explicit enough, 
  build a test case and execute it. I experiment with my Oracle9i and Oracle10G 
  environments on a daily basis to teach others and continue my own database education. 
  If someone asks me a question that I can't answer, we'll log on to my test environment 
  and try it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How do you make 
  your own rules of thumb? Follow Jonathan Lewis's advice and test, experiment 
  and learn! Afraid that performance will suffer if you place 4 columns in an 
  index to obtain index-only access? Build the index in test, have the developers 
  run transactions that access the new index, monitor on-line transaction performance 
  and find out. Then document the results.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Try different column 
  combinations, multiple index usage,  etc. When prototyping 
  complex joins between several tables, build a set of indexes that favors one 
  access path and test the queries in question. Drop the first set of indexes 
  and create indexes that favor another access path. Build the different permutations 
  of indexes that influence the optimizer to join a different set of tables first 
  or allow different join types to be performed. Test the different access paths 
  and record the performance statistics.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The above recommendation 
  may seem to be a time consuming process, but until you learn access paths this 
  is the best approach to take. I have spent hundreds of hours working with access 
  paths and if I could impart one bit of wisdom, it would be the following one: 
  No matter how much time you spend reading other's opinions on how the database 
  works, you need to spend time &quot;in the seat&quot; experimenting and learning 
  on your own.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The same advice 
  goes for learning OEM, backups and recoveries, advanced database features and 
  virtually every other facet of the database. You need to do as all the other 
  experts do - test, experiment and learn. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Repeatable Processes 
  </b><br>
  Repetition, even though it can be boring, is the foundation for a high quality 
  support environment. If the scripts and administrative process worked correctly 
  the first time, chances are they will continue to work correctly in the future. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Automating and 
  documenting complex administrative processes such as production to decision 
  support database refreshes and application upgrade activities will allow future 
  iterations of these activities to be executed more quickly and with less errors. 
  If you have been reading my blogs, you'll understand the importance I place 
  on documentation. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As I have stated 
  in the past, have you ever tried to refresh an ERP application test environment 
  from production when that test environment didn't have enough space to hold 
  all of production's data? 4,000 steps later and you begin to second-guess your 
  choice of professions. The more complex the process is, the greater the need 
  for detailed documentation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The moral of this 
  story is: If you don't want to be the only one that can perform that 900 step 
  ERP Application production to test refresh, script it and then document it.<br>
  <br>
  <b>DBA Report Cards and the 360-Degree Review Process</b><br>
  Effective measurements are required to judge the success of any activity. The 
  quality of support the DBA team provides should be reviewed on a regular basis. 
  A DBA report card allows business and application development units to provide 
  feedback on DBA support activities. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The report card 
  will allow them to measure how well they feel you are meeting your <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_08_26.6612575938">Service 
  Level Agreement objectives</a>. Here are a few sample questions to start you 
  on your way: </font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How would you 
    rate the turnaround times for DBA unit work requests?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How would you 
    evaluate the DBA unit's responsiveness to questions?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How would you 
    evaluate the DBA unit's responsiveness to requests for assistance?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Please rank 
    the quality of communications the DBA unit provides.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Please rank 
    the overall quality of work the DBA unit provides.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All questions are 
  ranked from 1 to 5 with 5 being the highest. You can also allow the respondents 
  to rank the importance of each question from 1 to 5 with 5 being the highest.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A short survey 
  should be attached to the DBA report card to gather additional information that 
  can be used to improve the quality of support the DBA unit provides to their 
  customers:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What are your 
    top three technical challenges that you face?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What are the 
    top three non-technical challenges?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Please list 
    your current priorities. Rank them in order of importance. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">List the most 
    important services the DBA unit provides. Rank them in order of importance.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What support 
    services does the DBA unit do a good job of providing? </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What support 
    services should the DBA unit improve upon?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What additional 
    services would you like the DBA unit to provide?</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Meetings can be 
  held with the respondents to discuss their reviews. DBA team members participating 
  in the reviews must be prepared to respond to criticism in a professional manner. 
  But just as its title describes, the 360-degree review process also allows support 
  units to provide feedback on their customer's support requests and work activities. 
  The 360-degree review process provides important feedback to both support units 
  and their customers. Once again, your customers may not know that some of their 
  expectations are unachievable until you tell them the reasons why.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Corrective Action 
  Reports</b><br>
  Oracle is a challenging database to administer. As much as we would like to 
  prevent mistakes, we do make them. That's one of the benefits of being human; 
  we learn from our mistakes. During my 20 years in this field, I've seen all 
  kinds of mistakes made - from little ones to catastrophic. I've also made my 
  fair share of them. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The worst one I 
  ever experienced is when we brought a technician in from a third-party disk 
  vendor to format what we thought was to be a single disk in a huge disk array. 
  We just purchased the arrays and were in the process of assuming support responsibilities 
  from the vendor. The vendor assisted us in the initial setup and data migration 
  from our old storage devices to their new whiz-bang storage system.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The array stored 
  data from dozens of Oracle databases. After 20 minutes of showing our folks 
  how to set the necessary switches and enter the appropriate values at the prompts, 
  the technician hit the enter key with much flair and bravado. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I assumed we would 
  see the one activity light activate for the disk being formatted. Instead, I 
  saw a whole wall of lights begin flashing and twinkling. I thought to myself 
  &quot;Hmmm, this can't be good&#133;&quot;. I glanced at the technician and 
  the look of horror on his face confirmed my suspicions. He then reinforced my 
  conclusions when he stammered, &quot;I think I just formatted the entire array.&quot; 
  I looked at the DBA next to me and said &quot;Looks like we are in for a looong 
  night.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I continue to be 
  amazed at the rapid improvements in hardware redundancy and reliability. Hardware 
  platforms now have the ability to recognize individual component failures, bypass 
  them, produce diagnostic information and &quot;phone home&quot; to report the 
  problem to the manufacturer. But hardware components will fail. Just as the 
  sun comes up every morning, hardware components will fail, operating systems 
  will get tied up in knots and database bugs will manifest themselves. Such is 
  life for a computer technician. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The key is to document 
  everything that happened during the time period when the problem occurred. Documenting 
  provides you with the information you need to prevent the problem from occurring 
  again and your customers with information on exactly what happened. Its my experience 
  that the more informed a customer is about the problem and the steps your unit 
  is taking to prevent its reoccurrence, the better they feel.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The corrective 
  action report should contain:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A detailed description 
    of the error that caused the problem.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The customer 
    impact the problem caused.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A timeline of 
    the activities that were performed.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The steps that 
    were performed to correct the problem.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Mitigating factors 
    that contributed to or exacerbated the problem's impact.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The steps that 
    will be taken to prevent the problem from occurring again. Include who is 
    responsible for the activity and a date the activity will be completed.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA - Naming Conventions</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-09-03.5097535464</link>
                      <description>Ever fumble around at 2 AM looking for that SQL statement you wrote a while back? You know, that one special script that will give you just the information you need to solve the problem and go back to bed? I must admit, I have done my fair share of moonlight script hunting.  This blog will provide you with a few recommendations on naming convention best practices.</description>
                      <pubDate>Tue, 05 Sep 2006 06:17:59 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Following proper 
  naming conventions is absolutely critical to us as a remote database services 
  provider. We have a couple of dozen DBAs on staff now that are responsible for 
  supporting hundreds (and hundreds) of different database ecosystems. We have 
  a standard set of naming conventions for our administrative directories. Although 
  we sometimes didn't follow them in the past - we do now.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each one of our DBAs 
  can go to any platform and quickly navigate to the script directories, find 
  the script they are looking for and execute it. I feel that this is so important 
  to the quality of support we provide that I have selected a few DBAs to be members 
  of a team that are responsible for creating and auditing naming conventions 
  here at CTi. These folks, led by Ace DBA Jeff Kondas, review environments to 
  ensure that our naming conventions and best practices are being followed. They 
  find few deviations because this best practice has become integrated into our 
  organization's psyche. Very good news.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I'll continue our 
  discussion on naming conventions by providing you with a few recommendations. 
  As always, these recommendations are not intended to be all-inclusive. They 
  are a few examples to help start you in the right direction.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Follow OFA Naming 
  Conventions</b><br>
  OFA stands for Optimal Flexible Architecture. The OFA standard is a set of naming 
  conventions and configuration guidelines that:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Distributes 
    I/O among different disk drives.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Facilitates 
    ease of administration by creating naming conventions for mountpoints, directories, 
    file suffixes, database binary directories and database output (i.e, background 
    dump, core dump).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Improves the 
    DBA's ability to manage and administer database growth. </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">These standard 
  naming conventions and placement guidelines are intended to improve database 
  performance by spreading I/O, protect against drive failures and also allow 
  administrators to more easily assume the responsibility of supporting new database 
  environments. In addition, because OFA standards are well documented by the 
  Oracle Corporation, newly hired DBA and consultants are able to more quickly 
  assume administration responsibilities.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To learn more about 
  OFA, please visit <a href="http://technet.oracle.com">Oracle's Technet website</a>. 
  Go to the top right hand corner of the page and type &quot;OFA&quot; in the 
  search box. You will find all of the documentation you need!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Create and Standardize 
  Monitoring and Administration Scripts<br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All DBAs 
  have their own set of favorite Oracle administration and monitoring scripts. 
  They find them on the web, get them from third-party books and trade them like 
  bubble-gum cards. They then tune, tweak and tailor them until they fit their 
  own unique style of administration. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is highly recommended 
  that database administration units create a set of scripts for daily monitoring, 
  hot and cold backups, exports and common administrative activities. This library 
  of scripts can then be installed on each server administered by the team. Personalizing 
  the scripts should be highly discouraged. Any modifications to the library can 
  be reviewed during team meetings. Assign a team member the responsibility of 
  being the script library owner. The script library owner will be responsible 
  for making all script modifications and installing the new scripts on the supported 
  servers. Here at CTi, we have a virtual team that is assigned this responsibility.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All scripts and 
  directories should have names that allow them to be easily recognized. It irks 
  me to no end when I log in to a server, navigate to a script directory and find 
  files named SQL1.SQL, SQL2.SQL, FIXIT.SQL, TUNEIT.SQL&#133; Fix what? Tune what? 
  What the? Personally, I would prefer to have a SQL file name that is long, but 
  descriptive, as opposed to a name that doesn't provide me with any clue on its 
  contents.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is also important 
  to follow a strict naming convention for your output files. Whether the output 
  is from a SQL, DDL or operating system command, the output file should be placed 
  in the appropriate directory and have a descriptive name. The file name should 
  also contain the date the output was created. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For example:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> create_mcfinemp1_table_012606.out 
    would be the output from the DDL statement execution that created the MCFINEMP1 
    table on January 26, 2006.</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Because many of 
  our customers have a preference where we store our scripts and internal monitors, 
  we have created our own directory naming conventions:</font></p>
<table width="97%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="8%" height="19"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>CTI</b></font></td>
    <td colspan="4" height="19"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Company Name</font></td>
  </tr>
  <tr> 
    <td width="8%" height="2"><font size="1"></font></td>
    <td width="14%" height="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>monitor</b></font></td>
    <td height="2" colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Home directory for monitors</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>bin</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
      - Java monitoring control program</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>SQL</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
      - SQL executed by main control program</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>CMD</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Operating system commands executed by main program</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>out</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Monitoring program output that is captured and sent to<br>
      our monitoring repository here at CTi for processing</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>admin</b></font></td>
    <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Administration scripts directory</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>SQL</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      SQL statements</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>global</b></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">-A 
      collection of our favorite scripts</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td valign="top" width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>dbname</b></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Where dbname = database name. SQL executed in this database</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
      <b>out</b> - Output from SQL execution for this database</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>cmd</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">- 
      Operating system command directory</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>out</b></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
      - Output directory for OS commands</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>exp</b></font></td>
    <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
      - Export file main directory</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td valign="top" width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>dbname</b> 
      </font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
      - Where dbname = database name. Export parameter files for this database</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>log</b> 
      - Log files for export execution</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="10%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="14%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>bad</b> 
      - Bad files</font></td>
  </tr>
  <tr> 
    <td width="8%"><font size="1"></font></td>
    <td width="14%"><font size="1"></font></td>
    <td width="10%"><font size="1"></font></td>
    <td width="14%"><font size="1"></font></td>
    <td width="54%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>dis</b> 
      - Discard files</font></td>
  </tr>
</table>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Object Naming 
  Conventions</b> <br>
  This is the area where having a Data Administrator available is certainly beneficial. 
  These are the folks that are trained in naming convention best practices. If 
  you don't have the good fortune of having a DA available, it will be up to you 
  and your application developer counterparts to create a set of naming convention guidelines. It is important to create a naming 
  convention that contains abbreviation guidelines that are used to shorten object 
  names.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's an example 
  of an index naming convention I have used in the past:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>INDEX <br>
  </b>Definition: An index is an object that ensures efficient access to the data 
  by using an ordered set of pointers to the table's data rows. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Naming Conventions:</b></font></p>
<table width="89%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Format 
      #1</b> tb_idx_uu - index naming convention</font></td>
  </tr>
  <tr> 
    <td width="11%">&nbsp;</td>
    <td width="6%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>tb</b></font></td>
    <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- table name 
      (abbreviated if required)</font></td>
  </tr>
  <tr> 
    <td width="11%">&nbsp;</td>
    <td width="6%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>idx</b></font></td>
    <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- constant 
      identifying this object as an index</font></td>
  </tr>
  <tr> 
    <td width="11%">&nbsp;</td>
    <td width="6%" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>uu</b></font></td>
    <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- ascending 
      numeric or character index identifier (used to identify multiple indexes 
      per base table)</font></td>
  </tr>
</table>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Example:</b> 
  MCFINEMP_IDX_01 would be the first index on the MCFINEMP table. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are dozens 
  of guidelines available on the web. In addition, many of the 
  books on Data Administration provide suggested naming  conventions. 
  We also have our own personal preferences. For example, many DBAs like to include 
  column name abbreviations in their index names. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What the standard 
  naming conventions are is not as important as creating them and adhering to 
  them religiously. That is the key to success. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">These recommendations 
  are not intended to coerce readers into using the provided naming convention 
  examples verbatim but to emphasize the importance of a creating a set of standardized 
  naming conventions and then strictly adhering to them.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p></p>
<p></p>
<p></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA - Application Change Management Best Practices</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-08-26.6612575938</link>
                      <description>Database administrators are ultimately responsible for guaranteeing the quality of their organization’s database environments.  From protecting against unauthorized access to providing 24x7 availability – “the buck stops at the DBA Unit.”   Although the database infrastructure (DB binaries, O/S, hardware) doesn’t change much, there is one component that usually changes a lot – the application.  This blog provides readers with helpful hints and tips on application change management best practices.</description>
                      <pubDate>Tue, 29 Aug 2006 05:40:06 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  I started my career working in a mainframe environment. Fellow blogger Craig 
  Mullins and I administered DB2 databases on huge, big iron platforms. Platforms 
  that supported thousands (upon thousands) of concurrent users. One of the benefits 
  of this background is that it taught us the importance of change management 
  best practices. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Craig and I learned 
  that a key ingredient of a trouble-free mainframe environment is ensuring that 
  there are no &quot;surprises&quot; when a change is implemented in production. 
  Changes that can affect the day-to-day business operations of an entire organization. 
  Throughout my career, I have applied these &quot;mainframe style&quot; best 
  practices to all other database ecosystems that I was responsible for supporting. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It works. The first 
  company I applied these best practices to was selected by Oracle as a &quot;Showcase 
  Environment&quot;. This was back in the old days, when Scott's tiger was just 
  a cub. Oracle identified shops that it thought had rock-solid support environments 
  and asked them to host visitors from other organizations that wanted to create 
  their own high-quality support infrastructures.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I thought I would 
  provide you with a few helpful hints and tips on change management best practices.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Database Design 
  Reviews</b><br>
  One of my <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_08_09.0916922652">earlier 
  blogs</a> provides information on database design reviews. Database design review 
  meetings foster effective communications between the DBA unit, system support 
  personnel and application developers throughout the entire application design 
  and implementation process. When Oracle design issues are addressed early in 
  the development lifecycle, problems are minimized and the migration from test 
  to production is more easily accomplished.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you haven't 
  read the design review blog, you should. I'm intentionally not covering the 
  importance of rigorous testing of any change before it is implemented in production 
  because it is covered in-depth in the design review blog. From simple changes 
  to new application implementations, there is simply no reason not to perform 
  the test, review, change, test, review, change iteration lifecycle. Although 
  the blog covers new application implementations, the blog will show you how 
  important I think it is to follow a rigorous test plan.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Proceduralize 
  the Change Request Process</b><br>
  Database administrators usually support different business units with each unit 
  having their own set of unique procedural requirements. Formalizing and documenting 
  the change request process minimizes the potential for miscommunication between 
  the business units, application development areas and the database administration 
  unit. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The notification 
  lead-time required for the database administration team to perform a requested 
  change should be documented and distributed to business and application development 
  units. This will prevent your team for getting a request to migrate a database 
  from test to production in the morning with a required date for that afternoon. 
  Of course, we all know that never happens.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If your organization 
  doesn't have a formal change request process in place, (and many shops don't) 
  create your own! There are dozens of change management and source code versioning 
  tools available on the market today. The prices can range from thousands to 
  tens of thousands of dollars.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Although I highly 
  recommend these types of products, I wouldn't let the lack of having one prevent 
  me from formalizing the change management process. You do the best with what 
  you have. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OK, so you don't 
  have the good fortune of having a formal change management process in place. 
  What do you do? You can begin the formalization of the change request process 
  by:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Creating standardized 
    change request documents</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Establishing 
    change management meetings</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Creating Service 
    Level Agreements (SLAs), which include change request turnaround times. </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Standardized 
  Change Request Documents</b><br>
  Standardized request documents help to increase the quality of the change request 
  process. The forms are sent to the database administration unit by the application 
  owner of the data to be processed. Any requests not sent or signed off by the 
  application owner should be rejected. Keep copies of all completed work requests 
  for auditing purposes. Application owners can be virtually any member of the 
  organization that is identified as having the authority to sign off on change 
  requests. The most common persons are application development team leaders, 
  section heads, department heads, etc..<br>
  <br>
  Each request form contains the following common information:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Form identifier 
    - naming convention that allows the form to be easily identified</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Application 
    name</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database name</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Name and contact 
    information of the person requesting the change</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Request date</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Required date</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Application 
    owner signoff</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data security 
    signoff (if required by shop standards)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A free form 
    request area for nonstandard requests</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">An area that 
    the DBA will fill out when executing the change that contains the following 
    information:</font>
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBA executing 
        change</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBA contact 
        information</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Date and 
        time change was processed</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Verification 
        procedures followed</font></li>
    </ul>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here are a few 
  examples of specific forms that will help formalize the change request process:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Authorization 
  Request Form<br>
  </b> This form is used for requesting authorization changes to the Oracle database 
  environment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Oracle Authorization 
  Request Form contains the following information pertinent to Oracle authorization 
  requests:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Grantee listing 
    for security grant or revoke</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Type of security 
    granted or revoked</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Test 
  Environment Change Request Form<br>
  </b>The Oracle Test Environment Change Request Form will be used for requesting 
  physical changes to Oracle test databases. It is used for requesting both new 
  objects (tables, indexes, views, stored programs, etc.) and object alterations 
  (adding new columns, changing datatypes, adding columns to indexes, etc.). In addition, the form notifies 
  the DBA team to perform ad-hoc activities (test database refreshes, exports, 
  etc..) in test environments.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Oracle Test 
  Environment Change Request Form contains the following information pertinent 
  to Oracle change requests:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Schema owner 
    of object to be changed or created</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Object name 
    to be changed or created</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Object type 
    (i.e. table, index, view) of the object to be changed or created</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Detailed description 
    of change requested</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data administration 
    sign off for new data objects</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Free from area 
    for ad-hoc activities</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Production 
  Environment Change Request Form</b><br>
  </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This form 
  will be used for requesting the migration of Oracle objects (databases, tablespaces, 
  tables, indexes, etc.) from test to production and the alteration of existing 
  production objects. For new database implementations, please see my blog titled 
  <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_08_09.0916922652">&quot;Database 
  Design Reviews&quot;</a>. In addition, the form notifies the DBA team to perform 
  ad-hoc activities in production environments.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each Production 
  Environment Change Request Form must have an associated Oracle Test Environment 
  Change Request Form counterpart. If the change wasn't made in test, you don't 
  implement it in production. To facilitate this process, the identifier for the 
  test change request form that was used to notify the DBA team to create or alter 
  the test objects should be provided on the production change request form.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Production 
  Environment Change Request Form contains the following information pertinent 
  to production environments:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle Test 
    Database Change Request Form. Allows DBA to determine if the change was implemented 
    in test. If no change request is found, the DBA needs to determine the reason 
    why</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Object name 
    of the object to be migrated or changed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Object type 
    for the object to be migrated or changed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What time these 
    activities should be performed </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The name of 
    the database the object will be migrated from (source database)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The name of 
    the database the object creation/alteration will be implemented in (target 
    database)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A freeform area 
    for special processing required during the migration or alteration process</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Free from area 
    for ad-hoc activities</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Change Management 
  Meetings</b><br>
  If you read my earlier blog on database design review meetings, you know I'm 
  a proponent of constant communication between all units that are involved in 
  the change management process. How often should you hold these change management 
  meetings? As often as you implement objects in production. If your organization 
  makes changes to production environments on a daily basis, the meetings should 
  be held daily. This is not as big of an imposition on your time as you may think. 
  We provide remote database services for several very large organizations that 
  have these change management meetings on a daily basis. The process takes about 
  15 to 20 minutes. Not a lot of time spent to ensure that everyone knows what 
  is happening.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To shorten the 
  amount of time these meetings consume and to make them as productive as possible, 
  the following discussion items should be a standard part of the meeting's agenda:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Application 
    name being changed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Date and time 
    change will be implemented</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Change description</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Potential business 
    impact if the changes don't go as expected (include both units affected and 
    how they will be affected)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Backoff procedures</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Requestor</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tested by</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Service Level 
  Agreements</b><br>
  Identifying support needs and expectations is required to provide high quality 
  support. You probably won't be meeting all of your customer's expectations if 
  you don't know what any of them are. As stated previously, each application 
  has it own unique set of support requirements and expectations. Service Level 
  Agreements (SLA) help to solidify support requirements and dispel any inflated 
  expectations a business or application development unit may have. They probably 
  won't be aware of your current workload and resulting work request lead times 
  until you tell them. The DBA team lead should meet with each unit supported 
  to establish a set of measurable Service Level Agreements that include work 
  request lead times, support activities required and application performance 
  and availability objectives.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  This is by no means an all inclusive list of activities you need to perform 
  to standardize the change request process. It is intended to give you a head 
  start in the right direction.</font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA – Database Recovery Best Practices</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-08-18.4294842011</link>
                      <description>We are going to cover a lot of different topics in the next few blogs.  The information will range the spectrum, from keeping our environments organized and uncluttered to backup and recovery best practices. &lt;BR&gt;&lt;BR&gt; This blog will focus on the most important responsibility we are charged with as DBAs  - ensuring that our organization’s databases can be quickly and easily recovered.</description>
                      <pubDate>Mon, 21 Aug 2006 05:07:24 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Introduction</b><br>
  Let me begin by stressing how strongly I feel about this topic. As I stated 
  in my first blog of this series, I always started my Oracle backup and recovery 
  class with this statement &quot;The fastest way to lose your job in this profession 
  is to lose data for your company. You can be a Tom Kyte and a Jonathan Lewis 
  X 2, but if you can't recover a database, you aren't of any use to your employer.&quot; 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">That always seemed 
  to ensure that my students paid attention during the remainder of the class. 
  The backup and recovery class was one intense week of instruction that consisted 
  of me pounding information and best practices into my students' collective heads. 
  I would often stop after an important topic and bellow &quot;DO YOU UNDERSTAND?!?!!&quot; 
  as loud as I could. By the end of the week, the class would immediately yell 
  back &quot;YES!!!&quot; as loud as they could. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What can I tell 
  you, that style worked for me. Trust me when I say that when my students left 
  that class, they could all backup and recover an Oracle database. The backup 
  and recovery classes were the ones responsible for my courses being labeled 
  as &quot;Foot Camp&quot; by the Oracle student population. That was OK by me. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">My first &quot;mentor&quot;, 
  if you could call him that, was an ex-Marine Corps drill instructor that went 
  into IT after he retired. When I started my career, he was the first senior 
  DBA I worked for. Every so often, he would walk up to the back of my chair as 
  I was facing my terminal, lean in real close to my ear and say &quot;You know 
  what Foot, the next time I see you make a mistake, I'm not even going to tell 
  you. I'm just gonna wait 5 minutes then come back and kick your *&amp;^%$ up 
  around your shoulder blades.&quot; Not motivational for sure, but I made few 
  mistakes. Maybe some of that rubbed off...</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Backup 
  and Recovery</b><br>
  </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Recovering 
  an Oracle database is a wonderfully complex task. Data files, log files, control 
  files, full backups, hot backups, RMAN and point-in-time recoveries all combine 
  to make many administrators lie awake nights thinking about whether their databases 
  can be easily recovered (or not). </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> The next few sections 
  will provide some useful information on the Oracle backup and recovery process. 
  My intent is to not cover any technical topics in-depth. You can get that information 
  from a myriad of sources. My focus will be on the non-technical tips and tricks 
  that will help you improve your recovery skills and ensure trouble free recoveries. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>It's the Little 
  Things That Bite You</b><br>
  Most botched recoveries can be attributed to human error. Make sure all tapes 
  have proper retention periods, verify that all backups are executing correctly 
  and run test recoveries on a regular basis. Don't let missing tapes or backups 
  cause you to lose data. You don't want to hear UNIX support say &quot;the retention 
  on that tape was supposed to be how long?&quot; in the middle of a recovery. 
  COMMUNICATE with others that are responsible for all other pieces of the recovery 
  &quot;pie&quot; (system admins, operators) on a regular basis to ensure you 
  have everything you need to recover a crashed database. Pick a database, identify 
  the backup output files and verify that they are available when you need them. 
  Remember, YOU are the technician that is ultimately responsible for ensuring 
  that your organization's databases can be recovered. Not O/S support, operations, 
  application developers.... </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Document Your 
  Recovery Environment!</b><br>
  OK, I'm yelling already. I already covered the importance of good documentation 
  in a previous blog. You know by now that I work for a remote database services 
  provider. It is absolutely imperative for us to know EVERYTHING about our customer's 
  existing backup and recovery strategies. Part of our assimilation process is 
  to document our customer's environment. Here's a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_08_184294842011/backup_recovery_template.txt">quick 
  list</a> of some of the questions we ask. The document we actually use is a 
  standardized Word template that uses drop downs, text boxes and help buttons 
  but this shortened text document should provide you with a starting point to 
  help you build your own backup and recovery documentation library.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Keep Your Skills 
  Sharp</b><br>
  Don't let your recovery skills get rusty. The more test recoveries you do the 
  easier the production recoveries become. Create one database that you and your 
  fellow administrators can trash on a regular basis. Take turns and make a game 
  out of it. DBAs can be pretty creative when causing problems for others when 
  it's all in fun. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It can actually 
  become quite an interesting game competing for bragging rights over who has 
  the current title of &quot;the most devious database destroyer.&quot; During 
  one of my test recoveries, I couldn't even bring up the monitor. I waltzed down 
  to the server room and saw an open drive bay on our test server with a bundle 
  of unconnected wires sticking out. There was a single note attached below the 
  opening telling me to look for the next note. 15 notes later and I found the 
  drive. Dumped it in, fired it up and found that the database was deleted. I 
  recovered it from a tape backup. THAT was devious. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> If you are a senior-level 
  DBA, make sure you keep the junior folks on their toes. I have never personally 
  seen the database make a mistake during the recovery process. That leaves incomplete 
  backups and DBA error as the most likely causes of &quot;good recoveries gone 
  bad.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">At RemoteDBAExperts, 
  we have dozens of customers that we have to support. We test recoveries and 
  failovers on a regular basis. Not four hours ago, we had three of our folks 
  perform a cold database backup and recovery on a Linux platform. Ensuring our 
  recovery skills are sharp is that important to us. I still do test recoveries. 
  Its important to me to ensure that I am ready to go when the time comes. If 
  it were up to me, I would have our receptionist test her recovery skills too.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>RELAX and Plan 
  Your Attack</b><br>
  When you are notified of a database failure, take a deep breath and relax. Don't 
  immediately begin to paste the database back together without a plan. Create 
  a recovery plan, put it on paper, have others review it if you can, and then 
  execute it. You shouldn't be trying to determine what the next step is in the 
  middle of the recovery process. I will plan my attack on paper for all recoveries, 
  no matter how simple they are.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Don't Be Afraid 
  to Ask Others</b><br>
  I have over 20 years of experience using Oracle and have done my fair share 
  of database backups and recoveries. During my career as an Oracle instructor, 
  I have assisted in hundreds (and hundreds) of database recoveries in Oracle's 
  classroom environments. If possible, I still have others review my recovery 
  strategy and recovery steps before I begin the recovery process. A second opinion 
  may prevent you from making a mistake or overlooking a key part of the recovery 
  process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Don't be afraid 
  to ask others and don't be afraid of calling Oracle support if you have to. 
  That's what they get paid by your company to do - support you. Don't make a 
  database unrecoverable by &quot;guessing.&quot; When I first took over as the 
  Database Group Manager for a large financial organization many years ago, I 
  viewed the execution of over 70 different commands in an alert log after a botched 
  recovery performed by a junior DBA. An ego that was too big to allow that person 
  to ask questions created a database that was almost unrecoverable. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Importance 
  of Formal Education</b><br>
  Read the Oracle Backup and Recovery Guides before reading third-party books. 
  The manuals will provide you with a firm foundation of knowledge on backup and 
  recovery strategies and procedures. Then move on to third-party books (like 
  this one) for helpful hints and tips that may assist you in the recovery process. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Take the Oracle 
  classes! Oracle's instructors understand the importance of backups and recoveries. 
  You will receive days of instruction and hours of hands-on labs. You'll learn 
  everything from simple O/S cold backups to RMAN incomplete recoveries using 
  backup control files.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oh, and now that 
  I'm retired from teaching, you won't have to worry about me yelling at you.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Application Design Review Meetings</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-08-09.0916922652</link>
                      <description>Let's continue our discussion on the Non-Technical Art of Being a Successful DBA.  The intent of this blog is to help administrators design and standardize on a formalized design review process. The goal of the design review process is to identify and address application design, process flow, program logic and SQL statement problems early in the development lifecycle. Identifying these issues early in the development lifecycle allows them to be more easily addressed than if they were to be identified during later stages.</description>
                      <pubDate>Mon, 14 Aug 2006 06:46:55 -0500</pubDate>
                              
      <content:encoded><![CDATA[<P><font face="Arial, Helvetica, sans-serif" size="2">One of the overlooked duties 
  of an Oracle DBA is to inform, educate and assist the application development 
  staff during the application development process. Although these responsibilities 
  may not be formally assigned to the DBA, the DBA unit often finds that they 
  are providing these services by default. The DBA is often considered to be a 
  seasoned veteran who spends most of their time learning the subtle eccentricities 
  of the Oracle database management system.</font></P>
<P><font face="Arial, Helvetica, sans-serif" size="2">It is the DBA’s responsibility 
  to ensure that the overall design and implementation of the new application 
  is proceeding according to expectations. Although application developers may 
  be experts in SQL, procedural languages (Java, PL/SQL, C variations, etc.), 
  they still turn to the DBA for help with standards, procedures, performance 
  design, error recovery and complex SQL.</font></P>
<P><font face="Arial, Helvetica, sans-serif" size="2">A continuous and effective 
  dialogue between the DBA unit, system support personnel and application developers 
  is of utmost importance throughout the entire application design and implementation 
  process. One method to foster effective communications is for the DBA unit to 
  create a series of new application design review meetings. These meetings can 
  be organized in a manner that promotes efficient application usage of the Oracle 
  database environment. The design review meetings can be scheduled during logical 
  break points between the different stages of the application development process.</font></P>
<P><font face="Arial, Helvetica, sans-serif" size="2">The database administration 
  team should invite representatives from the development and business units to 
  assist in the creation (and enforcement) of the standardized review process. 
  Application development teams will be able to help tailor the design review 
  process to satisfy their specific design and implementation needs. Business 
  users who will be impacted by the production turnover will provide valuable 
  input on implementing new applications for their specific business areas. Customized 
  checklists are created to ensure that all application and business specific 
  issues are addressed during each meeting of the design review process.</font></P>
<P><font face="Arial, Helvetica, sans-serif" size="2">It is recommended that the 
  database administration team then communicate to all application development 
  and business areas that any internal applications created without following 
  the standardized review process will not be migrated to production. Having the 
  application teams and business units participate during the creation of the 
  standardized review process allows the DBA team to enforce the policy without 
  being viewed as dictatorial or making rules in a vacuum. In addition, every 
  effort should be made to “sell” the standardized design review process in all 
  communications to application development teams and business units.</font></P>
<P><font face="Arial, Helvetica, sans-serif" size="2">The following list of meetings 
  can be used as a starting point in the creation of a structured application 
  design review process:</font></P><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Initial Overview of Proposed 
System</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">The kickoff meeting is held 
  with datacenter operations support managers, operating system administrators, 
  application team leaders, system analysts, end-user management and data administrators 
  to discuss the application’s general purpose and function. This information 
  will allow support technicians to determine the impact the new application will 
  have on existing systems and allow them to begin planning the application design 
  implementation process. The following information should be covered in this 
  meeting:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">General description 
        of purpose and function</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Application scope 
        (enterprise wide application that affects all business units, intra-departmental 
        that affects several business units or departmental)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">General application 
        size (estimated number of programs, data objects)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Criticalness of the 
        application (mission critical, application critical, non-critical)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Application availability 
        requirements and downtime windows</font></LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Application type 
          (decision support, business intelligence, data warehouse, data mart, 
          online transaction processing)</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Architecture design 
          (web server, application server, N-tier, distributed database environment)</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Advanced features 
          required (replication, advanced queuing)</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Data feeds required 
          from other architectures</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Load processing</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Batch processing</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Online transaction 
          processing</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Development tools 
          used to build front-end application screens</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Third-party tools 
          used to provide Ad-Hoc query access</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Procedural language 
          used to build business logic (Java, PL/SQL)</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Application development 
          methodology to be used (JAD, RAD)</font></DIV>
      </LI>
      <LI> 
        <DIV><font face="Arial, Helvetica, sans-serif" size="2">Number of concurrent 
          users</font></DIV>
      </LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Disk storage and 
        data growth estimates</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Highly available 
        architecture discussion (RAC, Oracle Fail Safe, Data Guard, hardware vendor 
        clustering and failover)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Performance expectations</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Criteria used to 
        judge performance</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Security and auditing 
        requirements</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Hardware platform, 
        O/S preferences/selection and sizing discussion</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Hardware platform, 
        O/S installation, operation and administration</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Division of duties 
        between the DBA, application development and business units</font></LI>
    </UL>
  </UL>
</UL><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Logical Data Model Review</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">This meeting is convened 
  as soon as the logical data model is complete. The major emphasis of this meeting 
  is to determine if the logical data model is complete and correct. The application’s 
  process model (if one is available) can also be verified at this time. Volume 
  statistics, object growth rates, purge criteria, referential integrity needs 
  and application-naming conventions are also discussed. Knowing your data before 
  hand is essential to designing processes to manipulate that data. The following 
  topics are covered in this meeting:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Determine if the 
        data model is fully documented (entities, attributes, relationships)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Attributes have correct 
        datatype, length, NULL status, default values</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">General discussion 
        of business rules that are to be enforced by database level constraints</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Not null constraints</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Check constraints</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Unique constraints</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Primary key constraints</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Foreign key constraints</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Business rules to 
        be enforced by triggers and procedures</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Business rules to 
        be enforced by application code</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Logical/process model 
        comparison</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Volume statistics</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Growth rates and 
        purge criteria</font></LI>
    </UL>
  </UL>
</UL> <BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Designing for Performance</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">This meeting is held with 
  the application development units before any physical DDL is generated by the 
  DBA. Proper transaction design and efficient SQL coding results in less performance-oriented 
  database alterations being made during the latter stages of the design and implementation 
  process. Determining predicate usage will allow the DBA to create additional 
  database objects (indexes, materialized views, index organized tables) to increase 
  SQL, and subsequently, application performance. The following information is 
  discussed:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Normalization vs 
        denormalization</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Table access requirements 
        and predicate usage</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Database objects 
        used to increase SQL performance including:</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">B-Tree Indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bitmap Indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bitmap join indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Function-Based 
            indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Materialized 
            views</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index organized 
            tables</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">External tables</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Data partitioning 
        algorithms</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Range partitioning</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Hash partitioning</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">List partitioning</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Composite partitioning</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Process parallelism 
        (parallel query, parallel DML, parallel load)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Transaction modeling</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle SQL performance 
        features</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Full table scan 
            vs index access</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Hash joins</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Star joins</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index skip scans</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index fast full 
            scans</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Cursor sharing 
            (SQL statement reuse and soft parse vs hard parse)</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bind variables</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Reinforcement of 
        effective SQL coding techniques</font></LI>
    </UL>
  </UL>
</UL><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Setting up a Successful 
Test System in Oracle</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">This meeting is held as 
  soon as the application developers are ready to begin the actual coding process. 
  The ultimate goal of this meeting is for application developers to have a firm 
  understanding of what is required to create and maintain a successful Oracle 
  test environment. Discussions on Oracle utilities, SQL statements, procedural 
  code, Oracle security, batch script testing, benchmarking, testing and monitoring 
  are of prime importance at this time. The DBA must make it clear to all involved 
  that the DBA unit is always available to answer questions and troubleshoot poorly 
  performing SQL throughout the entire application development life cycle. It 
  is imperative that the DBA make every effort to find and correct problems during 
  this stage of the development process. Maintaining a proactive stance instead 
  of a reactive one will always prove to be beneficial when it comes to correcting 
  design problems. There are always enough potential problems lurking in the system 
  for the DBA to solve without adding any additional ones through faulty application 
  design. Topics to be discussed in this meeting include:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Division of duties 
        between DBA, systems, application development and business units</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Test hardware platform, 
        O/S installation, configuration and administrationD</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Data feeds required 
        from other architectures</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Data load and update 
        processing and scheduling</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">SQL Loader control 
        cards</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Test system availability 
        requirements</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Test system backup 
        and recovery requirements</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle security authorization</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Tools to aid in application 
        development</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle Enterprise 
        Manager toolset</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">In-house monitoring 
        tools</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Third-party vendor 
        products</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Benchmarking and 
        performance measurements</font></LI>
    </UL>
  </UL>
</UL><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Monitoring Performance During 
Testing</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">Because this meeting and 
  the previously discussed Setting Up a Successful Test System are closely related, 
  they may be discussed together to save time and provide greater clarity. The 
  DBA and developers need to have an understanding of what information is required 
  to effectively monitor the performance of the Oracle application throughout 
  the entire testing process. The DBA can offer to show developers how to use 
  the various toolsets provided by Oracle (Oracle Enterprise Manager, SQL Trace, 
  explain plan, BSTAT/ESTAT, autotrace, Oracle traces, V$ tables and Statspack) 
  so that developers can play an active role in performance measurement. Suggested 
  discussion topics are as follows:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Names of all SQL 
        Loader control cards and batch scripts</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Performance measurement 
        goals and expectations</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Determine the test 
        load volume (data volume, concurrent users) required to accurately predict 
        production performance</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Comparison of test 
        system load to estimated production load</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle performance 
        measurement tools. Suggested tools include:</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Explain</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">SQL*Plus autotrace</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle SQL trace</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Statspack</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle Enterprise 
            Manager with Tuning Pack option</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">&nbsp;V$ performance 
            tables</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Index utilization 
        monitoring via ALTER INDEX MONITORING statement</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Third party performance 
        monitoring tools</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">LAN performance monitoring 
        tools</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Operating system 
        performance monitoring tools</font></LI>
    </UL>
  </UL>
</UL><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Performance Design Reviews</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">Information collected from 
  the various performance monitoring tools is discussed at this time. One meeting 
  may be sufficient, but large application development efforts usually require 
  several discussions. If the DBA has maintained good communications throughout 
  the initial stages of application design, there should be few surprises when 
  these meetings are held. SQL tuning and tweaking recommendations are covered 
  in this meeting. Depending on the length of the development process, follow-up 
  meetings can be held to ensure that the application is performing as expected. 
  Some suggested topics include:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Load testing assessment: 
        Is the load being placed on the test system large enough to accurately 
        predict production performance?</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Review performance 
        statistics collected during the testing process</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Assess SQL coding 
        techniques by reviewing explain plan output for performance critical transactions</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index usage</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Local/join predicates</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Join methods</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Subselects</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">View materialization</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Determine if additional 
        Oracle objects need to be created to enhance SQL performance</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">B-Tree Indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bitmap Indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bitmap join indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Function-Based 
            indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Materialized 
            views</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index organized 
            tables</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">External tables</font></LI>
        </UL>
      </UL>
    </UL>
  </UL>
</UL><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Preparation for Production 
Turnover</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">This meeting is held to 
  determine if there are any last-minute questions and to make certain that everyone 
  knows what is expected of them during the final turnover process. All units 
  that have participated in the application design or application design review 
  process are invited to attend. To ensure that all steps necessary for a successful 
  migration to production are executed, the use of a standardized Oracle migration 
  checklist is highly recommended. This document will allow the DBAs and developers 
  to concern themselves with topics that are related to this specific turnover 
  rather than spending time on the more mundane turnover tasks that are just as 
  important, but easily forgotten. Having a complete, well thought-out migration 
  checklist produces a less stressful and less error prone production migration 
  process. Topics include:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Division of duties 
        between DBA, systems, application development and business units</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Production hardware 
        platform, O/S installation, configuration and operation</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Data feeds required 
        from other architectures</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Data load and update 
        processing and scheduling</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">SQL Loader control 
        cards</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Backup and recovery</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Oracle security authorization</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">DBA forms and turnover 
        procedures</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Contact information 
        and escalation procedures</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Post-production monitoring 
        tools to be used</font></LI>
    </UL>
  </UL>
</UL><BR><BR>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Post-production Turnover</b></font> 
<P><font face="Arial, Helvetica, sans-serif" size="2">This final set of meetings 
  is held after the production turnover is complete. Application logic errors 
  and performance problem resolution are the prime topics of discussion. A comparison 
  of the actual performance to the anticipated performance of the application 
  is also discussed. The review and correction process, by its nature, is iterative. 
  The problems are identified, a plan of attack to solve them is agreed upon and 
  additional meetings are scheduled to review the results. As additional problems 
  are identified, they are added to the list of problems to be solved. This iterative 
  process continues until all major performance issues and application logic errors 
  are addressed. The post production turnover meetings should include discussions 
  on:</font></P>
<UL>
  <UL>
    <UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Review performance 
        statistics collected (Oracle Enterprise Manager, SQL Trace, explain plan, 
        BSTAT/ESTAT, autotrace, Oracle traces, V$ tables and Statspack)</font></LI>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Assess SQL coding 
        techniques by reviewing explain plan output for transactions experiencing 
        performance problems</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index usage</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Local/join predicates</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Join methods</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Subselects</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">View materialization</font></LI>
        </UL>
      </UL>
      <LI><font face="Arial, Helvetica, sans-serif" size="2">Determine if additional 
        Oracle objects need to be created to enhance SQL performance</font></LI>
      <UL>
        <UL>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">B-Tree Indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bitmap Indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Bitmap join indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Function-Based 
            indexes</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Materialized 
            views</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">Index organized 
            tables</font></LI>
          <LI><font face="Arial, Helvetica, sans-serif" size="2">External tables</font></LI>
        </UL>
      </UL>
    </UL>
  </UL>
</UL><BR><BR>
<b><font face="Arial, Helvetica, sans-serif" size="2">Oracle Database Design Review 
Meetings - Conclusion</font></b> 
<P><font face="Arial, Helvetica, sans-serif" size="2">These recommendations are 
  not intended to coerce readers into using the Oracle application design review 
  meeting examples verbatim but to emphasize the importance of a structured approach 
  to the design review process. The seemingly endless combinations of application 
  architectures and software products used for application development may require 
  the creation of a fully customized design review process for each application 
  development project. The overall goal of design review meetings is to ensure 
  the involvement of technical support units during the application’s design and 
  implementation. When Oracle design issues are addressed early in the development 
  lifecycle, problems are minimized and the migration from test to production 
  is more easily accomplished.</font></P>
<P><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></P>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot<br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"><br>
  </font></p>
<P>&nbsp;</P>
<P align=center>&nbsp; </P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Data Administration - Laying the Foundation for High Quality Applications </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-08-05.8820375239</link>
                      <description>I absolutely and firmly believe that Data Administrators are the unsung heroes of the Information Technology profession. This blog will be shorter than most. The reason is that I don't consider myself qualified to instruct others in the Data Administration function. I will state that after twenty years of working as DBA, I can perform the basic functions fairly well when I need to. The intent of this blog is to provide readers with a launching point to start their education and stress the importance of effective data resource management.</description>
                      <pubDate>Mon, 07 Aug 2006 06:19:46 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I use the title 
  &quot;Data Administrator&quot; loosely to describe the functions these IT specialists 
  provide. I use it for clarity only in this blog because I think it oversimplifies 
  the important role they play. Data Administrators are more aptly titled &quot;Protectors 
  of the organization's key data assets.&quot; From establishing proper naming 
  conventions to ensure a common language is used to implementing corporate-wide 
  data management policies, the services they provide range the spectrum. I could 
  easily spend the rest of this year's blog expanding upon the services they perform 
  and still do them an injustice.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data administrators 
  view data from the business perspective and must have an understanding of the 
  business to be truly effective. Their expertise allows them to define, describe, 
  organize and categorize data. DAs build models of the data that are a based 
  upon data entity relationships and the business rules that govern them. Data 
  administrators provide the framework that allows disparate business units within 
  an organization to share timely and accurate data. The end result is: 
  higher quality data = better business decisions. Enough said. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Because folks in 
  this profession must understand the business itself to perform their duties, 
  I have never met a DA that didn't know more about the overall business than 
  any one else in the organization. That includes the business personnel that 
  were responsible for providing that service. You know what surprised me the 
  most after watching a DA interview business unit personnel about data meaning 
  and business rules and processes? How much more that businessperson learned 
  about the service they were providing to their internal and/or external customers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As a result, if 
  I were a CIO and I wanted to learn more about a particular business function 
  my organization provides, I would include the Data Administrator in the list 
  of people I needed to talk to. No doubt about it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have had the 
  good fortune of working with many excellent Data Administrators during my career. 
  I made every effort to learn as much as I could from them. Rebecca Duffy and 
  Jim McQuade come to mind when I think about top-notch Data Administrators that 
  have made an impact on me. I have also had the good fortune of working with 
  Craig Mullins who I feel is one of the few database experts that firmly understands 
  the Data Administration function. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The greatest positive 
  impact I think these folks had upon me was that they were the conduits that 
  allowed me to understand and appreciate the benefits that high quality data 
  driven design provides. They taught me the importance of their chosen profession.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Like all DBAs, 
  I know that the key to creating a high quality database environment is to build 
  it upon a firm foundation. A foundation that consists of a well-designed hardware 
  platform and an operating system and database that were tailored and configured 
  for high performance, high availability and protection against unauthorized 
  access.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I came to understand 
  that high quality data driven design, led by a competent Knowledge Management 
  Worker (Data Administrator to simplify) was the foundation for an application 
  that was easily administered, easily changed, less error prone, needed less 
  rework to add new functionality, and the list goes on and on and on&#133;.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Because Data Administration 
  maps the business rules into constraints that can be enforced by the database 
  and turns raw data into information stored in tables, the Data Administrator 
  acts as the intermediary between the business and Database Administration units.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can plop me 
  down into any database and within 15 minutes I will be able to tell you if the 
  application objects and business rules were designed by someone who understood 
  Data Administration best practices. Since I work for a Remote Database Services 
  provider, I am provided with that opportunity on a daily basis. When I assess 
  a new customer's database, one of the items on my assessment document is adherence 
  to Data Administration best practices. When I see poor naming conventions, the 
  same piece of data named 10 different ways and stored using every different 
  data type Oracle provides, I immediately begin to become highly concerned about 
  the quality of the rest of the database ecosystem (hardware platform, O/S, database, 
  application). I also know that we are in for a lot of complex data changes in 
  the future.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All this being 
  said, the data administration role, although important, is often undefined in 
  many IT organizations. The smaller the shop, the more prevalent this becomes. 
  Those responsibilities, by default, are usually awarded to the shop's database 
  administration unit. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are employed 
  at an organization that does not have a full-time Data Administration unit, 
  the first question you need to ask is why not? Here's my two cents. Any organization 
  that is large enough to employ a staff of DBAs, operating system administrators, 
  network engineers and application developers is being shortsighted if it doesn't 
  have a full service Data Administration Unit.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We previously learned 
  that the services a DA provides ranges the spectrum. As a DBA/DA, the scope 
  of services you can provide will be severely limited by time constraints and 
  knowledge. Most of your time will be spent understanding the Data Modeling process 
  as opposed to defining enterprise-wide information frameworks. You must have 
  the basic understanding of how data is modeled and the logical to physical transformation 
  process. Your responsibilities will require that you work closely with the business folks and application developers.  This must be a team effort.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are dozens 
  of data modeling tools to help you perform the data modeling process. Personally, 
  I am a neophyte Erwin user. Here's a <a href="http://database.ittoolbox.com/topics/t.asp?t=349&p=356&h2=355&h1=349&h3=356">web 
  page</a> with a more comprehensive listing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I fully understand 
  that small shops can't afford to employ a full time Data Administrator. So what 
  happens if you are the &quot;chosen one&quot; to perform these services for 
  your organization?</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Here's my quick-start 
  listing:</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Realize that 
    the data administration function you are providing is just as important as 
    any database administration service you can perform. You need to spend as 
    much time, if not more, learning this trade. Even if it is only a part-time responsibility, it is a highly important part.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Don't allow 
    yourself to become overwhelmed. As with anything, start by learning the basics. 
    I'll provide some resources later in this blog to jumpstart you.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Understand that 
    this topic is complex. I have run across few Data Administrators that didn't 
    have a passion for their job and weren't highly intelligent. They will also 
    speak a different language than you do. My first meeting with Jim McQuade 
    started at the same intellectual level and ended by him slowly saying &quot;DO&#133;. 
    YOU&#133;.. UNDERSTAND&#133;?&quot; after each sentence. I shook my head in 
    several different directions and said &quot;NOOOO.&quot; But I kept trying 
    and kept learning from him.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to 
    learn the basics. Start by beginning to understand the Data Modeling process: 
    normalization, naming conventions, entity relationships, business rules. The 
    book I often refer to is &quot;Data Modeling Essentials 2nd Edition: A Comprehensive 
    Guide to Data Analysis, Design, and Innovation&quot; by Graeme C.Simsion. 
    A introductory book I think highly of is &quot;Data Modeling Made Simple: 
    A Practical Guide for Business &amp; Information Technology Professionals&quot; 
    by Steve Hoberman.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sign up for 
    <a href="http://www.dama.org/public/pages/index.cfm?pageid=1">DAMA</a> and 
    attend their conferences. As I stated previously, start with the basic presentations.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Spend dedicated 
    time on the <a href="http://www.tdan.com/">The Data Administrator Newsletter 
    website</a>. This is the FIRST site I would go to. I can't stress this recommendation 
    highly enough. The folks that contribute to this site are top notch.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">While you are 
    on that site, go to the Book Center page and read some of their reviews.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Read Jim McQuade's 
    excellent article titled <a href="/ofinterest/oi_articles/mcquade1/index.html">&quot;Loving 
    to Hate the Data Administrator&quot;</a> on DBAzine. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Many of my personal 
    Data Administration books are outdated, so I have asked Jim McQuade to respond 
    to this blog with his personal book recommendations. I hope that once word 
    gets about about this blog, other DAs will chime in too.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The key to your 
  success is to start with the basics and understand that there is much to learn 
  before you can perform the DBA/basic DA functions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Good Documentation is Essential</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-07-29.5624951938</link>
                      <description>Let’s start our series on the Non Technical Art of Being a Successful DBA by covering the art of good documentation.  Although the importance of a well thought out and detailed documentation library is blatantly obvious, creating documentation is the task most often postponed by an overworked DBA unit.  </description>
                      <pubDate>Mon, 31 Jul 2006 15:22:53 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Documenting processes, 
  procedures and best practices is a task that is often considered to be boring 
  and mundane. Most DBAs would rather perform virtually any other activity than 
  sit in front of a screen using a word processor. As a result, creating documentation 
  is often postponed until the DBA has a little free time to kill. Today's database 
  administration units are operating with smaller staffs, tighter budgets and 
  ever-increasing workloads. The end result is that the documentation is either 
  never created or created and not kept current. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But a robust detailed 
  documentation library creates an environment that is less complex, less error-prone, 
  reduces the amount of time DBAs spend learning new database environments and 
  reduces the overall time spent on day-to-day support activities. DBAs are able 
  to spend more time administering the environment than finding the objects they 
  are trying to support and the processes and programs used to administer them.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The nature of my 
  business as a remote services provider demands excellent documentation. The 
  majority of environments we administer weren't designed by my organization. 
  The only way that we can ensure high quality and high-speed administration of 
  these environments is to document them thoroughly. We document everything, from 
  initial connectivity and customer contact sheets to detailed information on 
  batch job streams and individual program execution. If we need to be aware of 
  it, we have it documented.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Documentation is 
  also the foundation of many of the other disciplines I will be discussing in 
  future blogs. Let's continue our discussion with a few helpful hints to get 
  you started.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Understanding 
  the Important Role Good Documentation Plays</b><br>
  We all generally understand the benefits that documentation provides. I 
  think that all readers will see the importance I personally place on documentation 
  in upcoming blogs. Virtually every topic that I will discuss, from repeatable 
  processes to paranoid administration best practices, I will be mentioning what 
  to document and the important role that documentation plays.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let me reaffirm 
  my opinion in this one sentence:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Documentation is 
  one of the foundations for virtually everything I will be discussing in this 
  series on The Non Technical Art of Being a Successful DBA. Enough said.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Creating an 
  Organizational Environment That Fosters Good Documentation</b><br>
  I've been a database group lead off and on for 15 years now. It is my responsibility 
  as manager to create an environment that fosters the production of robust and 
  high quality documentation. Let me describe some of the challenges that I have 
  faced in the past and how I have overcome them. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since I view high 
  quality documentation to be my responsibility as a database unit manager, I 
  ensure that it becomes part of every DBA's performance appraisal criteria, including 
  my own. If it isn't on my, and my unit's, performance appraisal forms, I will 
  ask to have it added or make my own personal addendum and notify both the DBA 
  team and management that I have done so. I will dedicate an entire blog on tailoring 
  performance appraisals to what DBAs do for a living in this series. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I will add time 
  for documentation when I estimate the amount of time it will take me to perform 
  an administrative task during project planning meetings. I don't settle for 
  &quot;we can do that after the project is complete&quot; as an answer from an 
  application project manager. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I get overruled 
  and lose one battle, I still make sure I document my activities after the project's 
  critical path is complete. And I don't let a single setback prevent me from 
  telling everyone in the next planning meeting that I need so many hours to document 
  what I have done.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you continuously 
  sell the importance of documentation sooner or later you will begin to wear 
  your opponent's down. Although I prefer to call it &quot;being relentless&quot;, 
  I'm sure that many of the application development managers (and my own managers) 
  viewed it as &quot;being a &#133;.&quot; (insert your favorite description here). 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Every document 
  I have created that provides a list of activities I , or my unit, needs to perform 
  during a project has documentation included. It helps to integrate it into the 
  fabric and culture of my organization's environment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Making Documentation 
  Second Nature</b><br>
  You also need to ensure that generating documentation becomes a natural part 
  of your daily activities. You must continuously remind yourself that documentation 
  is a primary and integral part of providing high quality support services to 
  your customers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You must also remind 
  yourself that it makes your job easier and benefits your fellow DBAs. You know 
  what has really irritated me the most during my career? When a fellow DBA needs 
  to be out of the office for a time and asks me to &quot;help them out&quot; 
  by performing a complex, application specific administrative activity and then 
  tries to verbally tell me how to perform the 300 steps it takes to do it. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Ever try to refresh 
  an ERP application test environment from production when that test environment 
  doesn't have enough space to hold all of production's data? 4,000 steps later 
  and you begin to second-guess your choice of professions. That was the exact 
  request from one of my fellow DBAs a few years ago. Not only did he get me to 
  do the refresh but I also had to document the process for him along the way. 
  Some call that being a good coworker; I would view that as having a big sucker 
  taped to my forehead. Live and learn, I guess.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The moral of this 
  story is: If you don't want to be the only one that can perform that 900 step 
  ERP Application production to test refresh, document it! If you don't want to 
  be called by the on-call DBA because he doesn't know exactly where to add a 
  datafile in an emergency situation (like an application developer forgetting 
  to tell youu that they were loading 10 million additional rows into that 100 
  row table), document it! The more you document, the easier your life as a DBA 
  becomes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I've never had 
  a great memory. It makes documentation easy for me. I also like to write and 
  that helps. But I will admit that there are times that I would rather perform 
  virtually any other activity than document.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But it has become 
  easier because I continuously reaffirm to myself the importance of documentation. 
  The more you reinforce that to yourself, the more second nature (and easier) 
  it becomes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Making Documentation 
  Easy </b><br>
  I'm a huge fan of documentation templates. Here at Remote DBA Experts we have, 
  or are in the process of creating, templates for everything we document. We 
  have templates for documenting connections to our customer's environments, their 
  backup and recovery environments, their application specific processes to name 
  a few. If it needs to be documented on a regular basis, we have a template for 
  it. We also have generic templates for documenting environments and activities 
  that don't fit into other templates. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Microsoft Word 
  document templates provide many features that streamline the documentation process 
  and help to improve the quality of the content they store. I try to take advantage 
  of as many features as I can. I use drop down selection menus, check boxes and 
  radio push buttons to improve the speed and quality of the documentation process. 
  I also take advantage of the help pop-up feature that Microsoft Word provides 
  to create a detailed description of what information is to be entered into that 
  field, check box or radio button.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I created my first 
  template close to 15 years ago. It wasn't created to document a process, but 
  to document a change request. I'll be covering change management in an upcoming 
  series in this blog. Was the document crude? You bet. But it did the job. It 
  has gone through numerous iterations and migrations from one Word release to 
  the next. I continue to use it at organizations that don't have a formalized 
  and documented change management process. And you can't believe how many I have 
  come across that don't.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are dozens 
  of software companies that offer content management solutions. Database vendors 
  have also recognized this as a lucrative market. All of the major database vendors 
  now offer advanced content management software, each one trying to outdo the 
  other in the number of bells and whistles that their product's offer. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Do a quick search 
  on Google for documentation content management software and you will find out 
  just how many competing products there are.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Content management 
  products offer check-in/check-out features, document versioning, web portal 
  access and advanced workflow capabilities to name just a few of the features 
  desgined to improve content management. The competition in the content management 
  market space is fierce to say the least. Content management vendors know that 
  continuously adding new bells and whistles to their products is not just important 
  for increasing market share; it is critical for their survival. Product costs 
  can range from thousands to tens of thousands of dollars (or more).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you have the 
  funds and your management understands the benefits that a full-blown content 
  management package provides, by all means begin a content management product 
  analysis. But if you don't have the funds, create a shared drive on your network 
  and declare it to be the &quot;DBA Documentation Portal.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What to Document</b><br>
  By all means this is not an all-inclusive list of what can be documented. Consider 
  it as a starter kit to help you begin your quest for &quot;documentis nirvanas&quot;. 
  Is some of this overkill for your particular environment? Maybe, but just consider 
  this a general, high-level list.</font></p>
<p><br>
  <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Database Environment 
  Documentation</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Naming conventions</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Servers (server 
    names, operating system release, hardware vendor)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Databases (vendor, 
    database version, features enabled)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Directories 
    (everything from Oracle software installations that don't follow Oracle standards, 
    application code storage to personal script locations). If you, or a fellow 
    DBA needs to find it, document where it is!</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Application 
  Specific Documentation</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Application 
    type (i.e. data warehouse, online transaction processing, decision support, 
    third-party application name and functionality it provides).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Business unit 
    requirements and related information for supported databases</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Uptime requirements 
    (i.e. 24 X 7, 8 X 5)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database downtime 
    windows</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Critical job 
    processes</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Business unit 
    and application developer contact lists</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Turnover windows 
    for database changes</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Problem notification 
    and escalation procedures</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Security Sensitivity. 
    How sensitive is the data?</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Process Documentation 
  </b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Repeatable administrative 
    processes (covered in an upcoming blog)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Backups - Probably 
    the most critical set of documentation you will ever create. Document how 
    it is backed up, what scripts back it up, where the back up is going to, tape 
    retentions and backup message directories. If it is involved with a backup, 
    DOCUMENT IT. Review the document with other units that are involved in the 
    backup and recovery process. It is your responsibility to ensure that you 
    don't hear an operator say &quot;What retention period? Nobody told me we 
    were to have a retention on these tapes.&quot; when you are in a recovery 
    situation. Remember that Oracle states that human error, including miscommunications, 
    is responsible for over 90% of failed recoveries. If you want to reduce recovery 
    failures DOCUMENT THE PROCESS AND REVIEW IT.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle utilities. 
    Document Oracle Import/Export input and output directories and where the files 
    are that execute the utilities. The same with Oracle's load utility. Document 
    the execution scripts and input and output directories. A short note on why 
    you are running it is also required</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Anything else 
    you run on a regular basis to support a specific application</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Change Management. 
    I'll be spending an entire blog, or two, on this</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A daily monitoring 
    activity checklist to ensure that no activity is missed. We have daily, weekly 
    and monthly activities that are to be performed for each of our customers</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Complex administrative 
    activities performed regularly</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Test and reporting 
    database refreshes</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data reorganizations</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Disaster recovery 
    tests. The processes required to perform the recovery AND the criteria that 
    will be used to evaluate whether it was successful or not</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Object Documentation</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBA specific 
    stored PL/SQL programs</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Day-to-day support 
    scripts (where they are and what they do)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Monitoring scripts 
    (where they are and what they do)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Scripts used 
    to perform database administrative changes. I have specific directories that 
    provide output from critical database changes that I have performed and other 
    directories containing the SQL used to make that change</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Operating system 
    scripts. Document what the script does in the beginning of each of your scripts. 
    Ever try to determine what a 400 line script does that was created by someone 
    that knows much more about UNIX scripting than you do? We have all been in 
    that position at one time or another during our career. I'm personally still 
    not good at it. Which is why I never was a great developer (all that IF-THEN-ELSE-OTHERWISE-GOTO-EXIT 
    stuff bored me to tears). Make it easy on your coworkers to understand what 
    the script does by putting comments at the top of the script as well as in 
    the body. Also keep a running history of script changes. What they were and 
    the time they were made</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Database Administration 
  Unit Organizational Documentation</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Contact Information</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBA responsibilities. 
    Which databases and tasks they are responsible for</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBA unavailablity. 
    Allows application developers to plan for a DBA not being available</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is a good practice 
  to distribute this information to all business units supported by the database 
  administration unit</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I hope you enjoyed 
  this blog on documentation and the important role it plays in the Non Technical 
  Art of Being a Successful DBA.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Non-Technical Art of Being a Successful DBA</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-07-22.2204956318</link>
                      <description>One of the benefits of my 20-year career  (I think) is that most of the jobs I have held can be described as somewhat “unforgiving”, shall we say… What these jobs taught me is that I needed more than just technical expertise to become successful in my chosen profession.   I quickly learned that becoming proficient at the various disciplines I will be discussing in upcoming blogs was just as challenging to me as honing my technical skill sets. &lt;br&gt;&lt;br&gt;I’ve been able to learn from my mistakes and make changes in my technical and non-technical approach to database administration to overcome my shortcomings.  I’d like to cover some of my personal best practices that have made my life as a DBA more productive and my customers and co-workers happier.</description>
                      <pubDate>Mon, 24 Jul 2006 16:48:05 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> I'd like to take 
a minute to describe some of the jobs I've held and how they have taught me to 
learn the value of becoming proficient at both the technical and non-technical 
disciplines required to become a successful DBA. I'll continue this week's discussion 
with what I think is probably the most beneficial set of recommendations I could 
provide to you as readers. Some of the information is certainly &quot;intuitively 
obvious&quot; as my old boss used to say but it never hurts to have a refresher. 
In upcoming blogs, I'll remove the personal stuff and get down to the business 
of providing you with information on The Non-Technical Art of Being a Successful 
DBA. We will then return to the wonderful world of 10G administration. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are numerous 
  jobs where you have to be on top of your game at all times. The medical profession 
  and police work come to mind when I think about folks that have to be &quot;mistake 
  free&quot; to keep us all safe and healthy. I often remind myself that the stress 
  I let my job generate for me is nothing compared to what these aforementioned 
  folks must experience. Knowing that there is an 18 year old somewhere fighting 
  and trying to stay alive in a foreign land helps me to keep my own career's 
  stress in perspective.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As Oracle database 
  administration goes, being an Oracle Instructor is about as unforgiving as it 
  gets. You get dropped into a classroom that has twenty PCs running Oracle and 
  twenty students depending upon you to teach them. My first attempts at teaching 
  a dozen years or so ago could be described as &quot;less than stellar.&quot; 
  I had a review from my first class state &quot;this was the most boring person 
  I have ever met.&quot; I felt bad about that until my senior instructor showed 
  me one of his first reviews. It had in big red letters at the top of the page 
  &quot;I HATED YOU.&quot; I felt better after reading that.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I must admit I 
  was a little timid when I started, but those students that attended later classes 
  know that I decided to let my own bombastic personality show through. Let's 
  say that none of my subsequent classes were ever boring after that. I'm sure 
  that previous statement will generate a comment or two from my fellow blogger 
  and lifetime buddy Craig Mullins and possibly a few from my students. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">After that less 
  than glorious start, I worked hard to become a better instructor, eventually 
  winning one of Oracle's top instructor awards with a 95% student approval rating. 
  How I ever ended up in a teaching profession where the students graded the teacher, 
  I'll never know. Just as a joke I started one class by stating &quot;Oracle 
  has instituted a new procedure that will allow me to grade your participation 
  and learning skills and send them to your employers.&quot; The look on everyone's 
  faces was priceless. I still view being asked by Oracle to certify fellow instructors 
  as one the greatest achievements of my career. I took that job very seriously.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I can tell you 
  one thing about Oracle DBA students, they are a rough bunch. I started 
  a DBA I class by blowing up a database create and couldn't get it to work correctly 
  after a second attempt This after doing it successfully hundreds of times. A 
  corrupt drive on my PC was the culprit. After turning around and seeing the 
  &quot;who is this idiot&quot; look on my student's faces, I suddenly felt like 
  a wounded fish in the middle of a pack of hungry piranha. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle instructors 
  describe that problem with a single phrase &quot;losing creditability with the class.&quot; 
  You did that and you were lunchmeat. But I never let that potential loss of 
  creditability prevent me from saying &quot;I don't know, I'll get back to you.&quot; 
  Or I would look up the information for the student on the spot. That provided 
  two benefits: answering the question and showing students the importance of 
  knowing where to look for the answers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Assisting a class 
  of twenty students through backup and recovery labs certainly helped my debugging 
  skills. If you ever want to find out how bullet proof an Oracle database can 
  be, watch 20 installations being abused by students in a backup and recovery 
  class. I always started my backup and recovery class with this statement &quot;The 
  fastest way to lose your job in this profession is to lose data for your company. 
  You can be a Tom Kyte and a Jonathan Lewis X 2, but if you can't recover a database, 
  you aren't of any use to your employer.&quot; That always seemed to ensure that 
  they paid attention during the remainder of the class. That was one class where 
  I absolutely pounded information and best practices into their collective heads. 
  We were all worn out by Friday.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I enjoyed teaching 
  and became friends with each and every group of students I taught. I always 
  felt sad when we parted and always worried that I missed that one tidbit of 
  information that could help them. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">On-site consulting 
  is also a tough profession. The customer brings you into an environment that 
  you know nothing (or little) about and expects you to be productive and solve 
  their problems - immediately. That is as it should be. They pay a premium and 
  expect good service. It is the consultant's fault if that doesn't happen. I 
  liked that job because it was very challenging and forced me to continuously 
  refine my skill sets and talents to keep my customers happy.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But I have had 
  my fair share of sweaty palms at many a client site. I didn't have the luxury 
  of being an Oracle consultant. They always seemed to have an endless stream 
  of people to draw from for support. I usually ended up in a wiring closet with 
  a manual in one hand and a keyboard in the other. I actually spent three weeks 
  in a wiring closet at one client's site. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Remote database 
  administration also requires excellent technical and non-technical skills. You 
  must continuously strive to keep your customers happy, all of which hold you 
  to a high standard. Describing competition in the remote DBA industry as fierce 
  is like describing the Titanic as &quot;having a small leak.&quot; To reinforce 
  this point - right now I'm concerned that others will view this as me using 
  this blog as a sales pitch, which often leads to a competitive firestorm. It 
  is not intended that way. I admire everyone that works in the remote DBA profession. 
  It is a very challenging job. I'm just describing the work that we do and what 
  is expected of all remote services providers. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You become successful 
  as a remote services company by providing a superior level of support to your 
  customers. As a technician, it's a great job! You can be installing a RAC/LINUX 
  environment in the morning and be debugging an Oracle Applications concurrent 
  manager problem in the afternoon. From warehouses to HUGE web databases having 
  thousands of concurrent users and from manufacturing to financials, you work 
  on it all. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Non-Technical 
  Art of Being a Good DBA</b><br>
  I started off this blog describing some of my jobs not to impress you with my 
  background but to hopefully help you understand how important it is to me to 
  provide you with this new series of non-technical recommendations. These jobs 
  quickly laid bare every hole in both my technical and non-technical approach 
  to database administration. They not only laid them bare but also amplified 
  their negative results. I found that becoming lax in the non-technical areas 
  of database administration and not following my own best practices could create 
  just as much havoc as a technical problem. As I have stated numerous times, 
  some of us are brilliant and some of us are lucky. The rest of us have to be 
  thorough. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To ensure that 
  I did not allow a failure in non-technical areas to complicate my life as a 
  DBA, I needed to learn how to document, communicate and follow my own best practices. 
  I learned the tricks of the trade to reduce the amount of time it took me to 
  administer my environments and ensure I didn't get paged at night. I found that 
  I could trust some author's information and not others. I learned that by keeping 
  my recovery skills sharp, I reduced my level of anxiety when I got one of those 
  two in the morning &quot;I think we just formatted one of your Oracle disks 
  by mistake&quot; calls (actually the caller stated they accidentally formatted 
  the entire array consisting of dozens of disks by mistake). The list goes 
  on and on&#133;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To continue, here's 
  a laundry list of what will be covered in upcoming blogs:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Why good documentation 
    is so essential and documentation best practices</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Naming conventions</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The benefits 
    of Data Administration or &quot;Loving to Hate the Data Administrator&quot;. 
    A reprise from Jim McQuade's excellent article here on DBAZine.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The key to successful 
    application implementation - Design Review Meetings</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Improving the 
    speed and quality of database administration by keeping your environments 
    organized and uncluttered</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Creating and 
    maintaining tips, tricks and problem resolution libraries</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Script foraging</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Reducing stress 
    and preventing failed recoveries by keeping recovery skills sharp</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The benefits 
    of repeatable processes. If it worked that way once, it'll probably work that 
    way again</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Proceduralizing 
    the change management and production turnover process</font></li>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Time Management and the art of project and process time estimation</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Maintaining 
    good relationships with customers, end-users and fellow technical personnel</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Foot Rule 
    of Thumb</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Knowing where 
    to look when you don't know the answer (reprise from earlier blog)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Using Service 
    Level Agreements to ensure your internal and external customers know what 
    to expect from you</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Monitoring by 
    day so you don't get called at night</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Monitoring space 
    growth and performance statistics historically</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Paranoid administration 
    best practices. Many of which are stolen from probably the most paranoid (and 
    error free) DBA I have ever met. Jeff &quot;I never met a problem prevention 
    method I didn't like&quot; Kondas. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Preventing errors 
    from reoccurring by creating and following Corrective Action Procedures </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Some of the topics 
  will require an entire blog to cover while other blogs may group many topics 
  together. The intent of this series of upcoming blogs is to help beginners create 
  an approach to improving in non-technical areas and act as a refresher to those 
  of us that have been in this profession for a while. Some of these recommendations 
  come from problems that have occurred as a result of me not placing the same 
  emphasis on non-technical areas as I did the technical ones. Many of the recommendations 
  come from my experiences working as a mainframe DBA that, as we all know, is 
  a very structured environment that demands rigorous adherence to best practices. 
  The remainder comes from my experiences working as an educator, consultant and 
  services provider.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot <br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Bigfile Tablespaces</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-07-14.6086076172</link>
                      <description>Oracle 10G introduced a new type of tablespace called a Bigfile Tablespace.  When I read the 10G New Features manual and found out that you could create a terabyte sized datafile using the Bigfile option, I wanted to immediately find an environment that had enough free disk to allow me to create my first terabyte datafile. That was over a year ago and I still haven't found a server with a free terabyte of disk that I can use for testing. Even though I haven't made it into the terabyte datafile club yet, I thought I would discuss Bigfile tablespaces in this blog. </description>
                      <pubDate>Mon, 17 Jul 2006 03:31:09 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Administrators 
  now have the option of choosing between Bigfile and Smallfile tablespaces. Oracle 
  database environments can contain a combination of Bigfile and Smallfile tablespaces. 
  Oracle uses the term &quot;Smallfile&quot; to designate the tablespaces we have 
  been using since Scott's tiger was a cub. Let's take a look at Bigfile tablespaces 
  in this blog and learn about some of the benefits that they offer.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Readers of this 
  particular blog entry have the added benefit of an Oracle expert's opinion that 
  I think highly of. Howard J. Rogers, author of the <a href="http://dizwell.com/main/component/option,com_frontpage/Itemid,173/">Dizwell 
  Informatics Site</a>, has made some additional points that are important to 
  consider when contemplating the use of Bigfile tablespaces. I have added them 
  to this blog after the fact. It's important for me to provide as much pertinent 
  information on the topic being discussed in all of my blogs. You can find much 
  of his helpful information in this <a href="http://my.opera.com/dizwell/blog/show.dml/40242">blog 
  entry</a>. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle manuals 
  state that a single Bigfile tablespace file can be up to 128 terabytes for a 
  32K block tablespace and 32 terabytes for an 8K block tablespace. Now THAT is 
  a big data or temp file! </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A key point to 
  remember is that a Bigfile tablespace can only contain one file. A traditional 
  Smallfile tablespace can contain up to 1,022 files. With Smallfile tablespaces, 
  administrators have the option of expanding an existing tablespace file or adding 
  a new file to accommodate application data growth. </font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since Bigfile tablespaces 
  can not contain multiple files, administrators must ensure that there is enough 
  free disk available to allow the single file to grow to its capacity when mature. 
  As a result, Oracle recommends that Bigfile tablespaces be used with Automatic 
  Storage Management (ASM) or logical volume managers that support RAID and dynamically 
  extensible logical volumes. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Rogers adds that 
  ASM is not only recommended, but a requirement because of inode issues: &quot;If 
  you create a truly large bigfile tablespace on a traditional file system, you 
  will suffer from horrendous inode locking issues. That is why ASM is not really 
  an optional extra with these things.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For those of you 
  that would like to know what inodes are, please refer to this <a href="http://en.wikipedia.org/wiki/Inode">Wikipedia 
  definition</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Rogers also adds 
  that if you use a single Bigfile temporary tablespace, you could be negatively impacting 
  database performance for sort operations. He states &quot;the number of tempfiles 
  is one factor that affects the ability of the optimiser to parallelise a sort.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Rogers' <a href="http://my.opera.com/dizwell/blog/show.dml/40242">blog 
  entry</a> provides this additional information to reinforce his point: &quot;But 
  parallel operations in 9i derive a lot of their performance benefits from the 
  fact that their slaves can sort to different tempfiles within the one temporary 
  tablespace, thereby distributing I/O (potentially across different hardware 
  devices) and not blocking each other at the O/S-inode level. If, therefore, 
  in 10g we are going to prevent you from having multiple tempfiles, because you've 
  chosen to implement bigfiles, then your parallel query performance is going 
  to be stuffed to buggery, putting it bluntly. Hence the temporary tablespace 
  group: it restores the 'multiple tempfile' capability of parallel query slaves 
  by allowing them to write to multiple different temporary tablespaces. But if 
  you have a single temporary tablespace comprised of multiple tempfiles (because 
  you chose to go smallfile), then you already have precisely that capability, 
  and tablespace groups provide you with nothing extra, except a management headache 
  arising from the additional level of redundant complexity you've added to your 
  databa</font>se.<font face="Verdana, Arial, Helvetica, sans-serif" size="2">&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">So before you even 
  consider creating one of these things, make sure that your environment is able 
  to support its expansion. If not, you could have a tablespace that is not able 
  to accommodate the normal growth of the application data it contains. In addition, 
  heed Rogers' recommendation to use ASM for large Bigfile tablespaces.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">An interesting 
  benefit of using a Bigfile tablespace is the ability to run file alteration 
  operations without specifying a file name. The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_07_146086076172/bft.out">attached 
  file</a> shows a Bigfile tablespace creation and alteration. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll notice that 
  when I increased the size of the file from 500 MEGs to 1 GIGs and from 1 GIGs 
  to 2 GIGs that I did not use the data file specification. I only used the tablespace 
  name to alter the size of the datafile. Since the Bigfile tablespace can only 
  contain one datafile, the file specification is not required.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Bigfile data tablespaces 
  must be created as locally managed with automatic segement space management. 
  These are the default specifications and don't have to be specified in the CREATE 
  BIGFILE TABLESPACE DDL statement. Oracle will return an error if either EXTENT 
  MANAGEMENT DICTIONARY or SEGMENT SPACE MANAGEMENT MANUAL is specified. But administrators 
  can create locally managed undo and temporary Bigfile tablespaces, both of which 
  use manual segment management.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The DDL statement 
  below creates a Bigfile tablespace called bigtbs that is 80 GIGs in size:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CREATE BIGFILE 
    TABLESPACE bigtbs <br>
    DATAFILE '/u01/oradata/orcl10g/bigtbs01.dbf' SIZE 80G</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Administrators 
  are able to specify the SIZE specification in kilobytes (K), megabytes (M), 
  gigabytes (G), or terabytes (T).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 10G allows 
  administrators to set the default tablespace size type during database creation. 
  Administrators use the &quot;SET DEFAULT BIGFILE/SMALLFILE TABLESPACE&quot; 
  specification in the database create statement. SMALLFILE is the default specification. 
  All tablespaces that don't have the BIGFILE or SMALLFILE option specified during 
  creation will default to the database level specification. The database level 
  specification can be overriden by specifying either BIGFILE or SMALLFILE during 
  tablespace creation. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBA_TABLESPACES, 
  USER_TABLESPACES AND V$TABLESPACE contain a new column called BIGFILE that allows 
  administrators to determine if the tablespace is a Smallfile or Bigfile tablespace.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The last thing 
  I would like you to consider when you are deciding whether you should be using 
  Bigfile tablespaces is the time required to recover it. The larger the file 
  size, the longer it will take to recover. The smaller the size, the faster the 
  recover and the fewer the number of tapes you have to use during that recovery. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The less tapes 
  I have to rely upon during a recovery, the better. I personally have a tape 
  phobia. I have had my fair share of recoveries go haywire because of bad blocks 
  on a tape (must be my magnetic personality). I especially liked the advice our 
  O/S admin gave my team during our last recovery that was affected by tape I/O 
  problems &quot;tell the operator to yank it out of the tape reader, shake it 
  around a bit and put it back in. He'll know what to do.&quot; It worked. Its 
  hard to believe we rely upon these things for data recovery. Disk backups here 
  I come.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Rogers also adds 
  that Oracle's recovery utilities provide additional features to reduce the time 
  to recover &quot;Sure, backing up and restoring a 128TB datafile is not something 
  to look forward to, but they invented block level media recovery in 9i for a 
  reason (and bigfiles are it). Similarly, they've invented the ability to use 
  incremental backups to 'refresh' rarely-taken image copies in 10g for a reason, 
  and 128TB datafiles are similarly it. By all means, 'handle with care' -but 
  when you do, use the entire 10g technology stack to address some of the issues 
  they bring.&quot;<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  Bigfile tablespaces will have a future in many Oracle environments but they 
  must only be implemented with much forethought. If any of you have a spooled 
  output showing a terabyte tablespace create, feel free to send it to me! Additional 
  comments are always welcome!<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot (with 
  much help from Howard J. Rogers)<br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Finding Information Quickly - The Key to Success </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-29.5435751381</link>
                      <description>I have taught hundreds of people how to administer Oracle during my career as an Oracle instructor.   For those of you just entering this profession, here is my most sage piece of advice:&lt;BR&gt;&lt;BR&gt;"The hallmark of a good DBA is not knowing everything, it's knowing where to look when you don't." &lt;BR&gt;&lt;BR&gt;I thought it might be beneficial for us to review some of the various technical resources currently available to us. You'll find a listing of my favorite authors, bloggers and websites in this blog. The list will also include my favorite educational website of all time, the Oracle Knowledge Center.   I'll be off on vacation next week, so I'll see you in two weeks!</description>
                      <pubDate>Mon, 03 Jul 2006 05:31:36 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have a LOT of 
  books on Oracle. I am an avid Oracle book collector. I buy them, publishers 
  send me them to me to review and I receive them as presents from family members. 
  I have been working with Oracle for over 18 years now.   I have been using Oracle since Version 5 and I 
  have kept every Oracle book, manual and instructor's guide I crossed paths with 
  during that time. Remember the old paper back manuals that Oracle sent to you 
  with the software? I've got LOTS of them! I was certified by Oracle to teach 
  virtually the entire DBA admin track and I have kept every version of every 
  instructor's guide I used (Version 7 to Version 10). As a result, my library 
  consists of dozens and dozens (and dozens) of books on Oracle.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is so much 
  information available on Oracle that it tends to become overwhelming. How do 
  you find that one facet of information, that one explanation you are looking 
  for when you are confronted with seemingly endless sources of information? Here's 
  a hint, GO TO THE MANUALS FIRST. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Call me old school, 
  but I still read the entire set of documentation for every new Oracle release. 
  The order of the first few books is always the same: &quot;New Features&quot;, 
  &quot;Concepts&quot;, &quot;Administrators Guide&quot;, &quot;Reference&quot;, 
  &quot;SQL Reference&quot;, &quot;Performance Tuning Guide&quot; and &quot;Data 
  Warehousing Guide&quot;. The remaining books are read in no particular order. 
  It's pretty much what I feel like reading at the time. When I was teaching, 
  I always reinforced to my students that they needed to reference the Oracle 
  manuals before moving on to other forms of documentation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A very experienced 
  co-worker of mine was at a customer site installing an Oracle9i database on 
  LINUX. He was reading the installation manual when the customer demanded to 
  know why he was reading the manual when he was supposed to be &quot;the high-priced 
  expert.&quot; He quickly replied &quot;I'm reading the manual because I am an 
  expert.&quot; As your experience grows, you'll find that you'll become just 
  like my co-worker, an avid user of the reference guides and not afraid to admit 
  it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Reference Manuals</b><br>
  It is good practice to keep a set of reference manuals for each major release 
  of the database you are administering. Oracle does have a tendency to change 
  default values for object specifications. In addition, each new release contains 
  new parameters that affect the database's configuration. When you receive the 
  latest and greatest version of Oracle's database (one of the benefits of purchasing 
  support), turn straight to the &quot;OracleX New Features&quot; section to find 
  out what impact the new release will have on your daily administrative activities. 
  You'll also find many new features that haven't been covered by Oracle's new 
  release whitepapers and marketing propaganda. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Internal 
  Resources</b><br>
  The Oracle websites contain a wealth of information on the Oracle product sets. 
  </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The following 
  Oracle websites are favorites of mine:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://metalink.oracle.com">metalink.oracle.com</a> 
    - Oracle's premier web support service is available to all customers who have 
    current support service contracts. Oracle MetaLink allows customers to log 
    and track service requests. Metalink also allows users to search Oracle's 
    support and bug databases. When you experience an Oracle problem, look up 
    the return code (if one is provided) in the Oracle reference manuals. If you 
    are unable to solve the problem, search Metalink using the 
    return code or error message as the search criteria. The website also contains 
    a patch and patchset download area, product availability and life-cycle information 
    and technical libraries containing whitepapers and informational documents. 
    </font><br>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">I've been able 
    to solve 80% of my problems using the search feature. Here's a couple of tips: 
    make sure you <a href="/blogs/blog_cf/chrisfoot/blogentry2006_06_295435751381/search.gif">specify 
    &quot;ALL SOURCES&quot;</a> when searching for problems, use the Advanced 
    feature to narrow your search to specific products and remember that Oracle 
    now adds a listing of products and asks you if you want to limit your search 
    to them at the top of each search result set.<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">While you are on Metalink, click on the &quot;Knowledge&quot; and &quot;Forum&quot; tabs. You will find 
    that they provide a wealth of information. You will need to drill down into the 
    different sections under the &quot;Knowledge&quot; tab to retrieve all of the gems of information available. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <a href="http://technet.oracle.com">technet.oracle.com</a> 
    - Technet's software download area allows visitors to download virtually any 
    product Oracle markets. This website stores technical reference manuals for 
    Oracle database releases 7 through 10, Oracle RDB, Oracle Gateways, Oracle 
    Applications, Oracle Application server - the works. </font><br>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">The site contains 
    links to many Oracle blogs (including this one) and has forums, sample code 
    and tutorials. A quick and easy way to get access to the information you need. 
    Visitors are also able to view Oracle discussions, download product whitepapers 
    and obtain information on Oracle education. Can you tell that I love this 
    site? YOU BET!<br>
    <br>
    </font></li>
  <li><a href="http://partner.oracle.com"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">partner.oracle.com</font></a><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - If you are an Oracle partner, (and there are a lot of us), then this is 
    the website for you. Oracle's partner website contains information on partner 
    initiatives and provides customized portlets categorized into partner activity 
    and job role. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://education.oracle.com">education.oracle.com</a> 
    - Oracle University's web site contains information on Oracle education including 
    course descriptions, class schedules, self-study courses and certification 
    requirements. <br>
    <br>
    When you go to education.oracle.com, look on the left side of the screen. 
    You will see a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_06_295435751381/knowledge.gif">link 
    to the Knowledge Center</a>. The Knowledge Center is Oracle's online education 
    portal. You can take dozens of online courses from Oracle's experts. Want 
    to learn from the people that wrote the code? This is the place that will 
    allow that to happen.</font><br>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is a link 
    on the right side of the Knowledge Center that says &quot;Take a Test Drive&quot;. 
    Do yourself a favor - <b>TAKE THE TEST DRIVE</b>. You will have to pay for 
    a full-blown subscription, but the benefits the Knowledge Center provides 
    is well worth the cost. Take the test drive and then weasel the money out 
    of your company for a full subscription. Tell them you'll work late, wash 
    the boss's car. It's well worth it.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://www.oracle.com">www.oracle.com</a> 
    - Oracle's home page on the web. Contains white papers on Oracle features, product descriptions, etc.. Good place to get a high-level overview of the Oracle 
    database's bells and whistles.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>External Resources</b><br>
  Non-Oracle websites are also excellent sources of information. The Internet 
  has an abundance of web sites containing hundreds of scripts, tips, tricks and 
  techniques. I often find myself heading straight to Google when I can't quickly find the information I need on Metalink.  Some of my favorites are: </font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <a href="/index.html">www.dbazine.com</a> 
    - How can you not love this website? The contributing authors list reads like 
    a &quot;who's who&quot; of the database industry. Topics range from entry-level 
    discussions to information that even the most experienced database user would 
    find enlightening. Experts like Mullins, Inmon, Ensor, Celko, Nanda and Lewis 
    provide readers with articles that are topical and interesting. Great articles 
    and a pleasing, easy-to-navigate website makes DBAZine the place to go for 
    database information. Am I biased? You bet. But I would still go to this site 
    whether I wrote for it or not.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://www.orafaq.com">www.orafaq.com 
    </a>- Orafaq discussion forums are excellent sources of information. Post 
    a question to hundreds of experienced Oracle DBAs and you'll find out just 
    how helpful Orafaq can be. Orafaq provides an intelligent search engine that 
    visitors can use to search the discussion forums for topics of interest. The 
    website also provides hints, tips, script and whitepapers.<br>
    <br>
    </font></li>
  <li><a href="http://www.oracle.com/oramag"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">www.oracle.com/oramag</font></a><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Oracle Corporation's own technical magazine. Oracle Magazine provides readers 
    with product announcements, customer testimonials, technical information and 
    upcoming events. Oracle magazine is available in hardcopy and on the web. 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://asktom.oracle.com">asktom.oracle.com</a> 
    - Kyte maintains an Oracle Q&amp;A website aptly tiled &quot;Ask Tom&quot;. 
    If you scan the Ask Tom website, you'll quickly find that his primary method 
    of simplifying complex technical concepts is to use a snippet of code as an 
    example. Based on the positive responses he receives, the code examples work. 
    They also work for me too. A great website.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Blogs and Wikis</b><br>
  Blogs and Wikis are a fairly recent phenomenon when compared to other information sources. 
  What I like about blogs is that their free-form style makes them interesting 
  to visit. Some blogs contain small snippets of information, while others are 
  more like articles. I've always been grammatically long-winded by nature, so 
  my blog is often longer than most. <br><br>Wikis are collections of information that can be added and edited by the internet community. They are similar to a blog in structure but can contain the works from many different contributors.  Personally, I find blogs to be more to my liking.  I pick a blogger who I find to be interesting and noted for technical correctness and stick with them. I know that Wikis are supposed to be "self policing" but I just seem to gravitate to blogs.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Blogs that I like 
  are:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="http://www.rittman.net">Mark 
    Rittman's Blog </a>- Warehousing and general Oracle information. His writings 
    are so easy to read, that no matter what he writes on, it is a fun and interesting 
    read.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <a href="http://www.petefinnigan.com">Pete 
    Finningan's Blog</a> - Oracle Security blog and general Oracle information. 
    More than just a blog, the website has whitepapers, discussions, scripts, 
    Oracle news.... <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <a href="http://oracle-wtf.blogspot.com/">Oracle 
    WTF</a> - Not real fond of the name but very fond of the content. General 
    Oracle information. Great content.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <a href="http://feuerthoughts.blogspot.com/">FeuerThoughts</a> 
    - Oracle PL/SQL language. I'm absolutely terrible at coding anything (all 
    that IF-THEN-ELSE-OTHERWISE-GOTO-EXIT stuff drains me). I go to his site to 
    attempt to improve my PL/SQL skill sets. If his teachings can't help, no one's 
    will. Excellent writer and creator of some pretty neat tools. Make sure you 
    traverse the link to his <a href="http://www.oracleplsqlprogramming.com/">Oracle 
    PL/SQL Programming site</a>. Tons of great information.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <a href="http://dizwell.com/main/component/option,com_frontpage/Itemid,173/">Dizwell 
    Informatics</a> - Probably one of my favorite Oracle blogs. Excellent writer, 
    always entertaining, never know what you'll find when you visit. Intelligent and 
    humorous which is a good combination for a technical expert. Unafraid to express 
    his opinions.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Book Recommendations</b><br>
  Third-party books are another excellent source of information. The big advantage 
  third-party books have over the technical reference manuals is that technical 
  reference manuals must provide all of the information on the entire Oracle environment 
  while third-party books are able to focus on just what the author felt was important. 
  If you choose a good author, you'll learn quickly. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Instead of listing 
  books, I'll provide you with my favorite authors. You'll have the best chance 
  of buying a great book if you select one from the following authors: Thomas 
  Kyte, Jonathan Lewis (his book titled &quot;Cost Based Oracle Fundamentals&quot; 
  is one of my favorites), Arup Nanda, Craig Mullins, Michael Abbey, Michael Correy, 
  George Koch, and Kevin Loney. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle Press Books 
  provides a lot of great Oracle titles and Appress Publishing also comes to mind 
  as having a great set of Oracle literary offerings.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><B>Wrapup</B><br>
  I hope you enjoyed this brief discussion on where to find Oracle information. 
  Don't attempt to remember everything about Oracle just try to remember the best 
  place to look when you need information. Its out there!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for Reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot<br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>SQL*PLUS Tips and Tricks</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-22.9332221251</link>
                      <description>I thought I’d provide you with a couple of quick SQL*PLUS tips and tricks this week.   Some of the features are new in 10G, while others are available in earlier releases.  I think you’ll find them all to be very helpful.</description>
                      <pubDate>Tue, 27 Jun 2006 09:41:37 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What Database 
  Are You Working In?</b><br>
  Working in the wrong database is a common problem for database experts as well 
  as their less experienced counterparts. How many times have YOU found yourself 
  running statements in the wrong environment? Feel free to include me in that 
  not so select group. The operating system command SET can be used in Windows 
  systems to display environment variables. The ENV command can be used to display 
  the environment variables in UNIX. Many seasoned database administrators change 
  their UNIX shell prompt in their.profile to display the current Oracle SID. 
  Displaying the current Oracle SID in the shell's prompt provides a continuous 
  reminder to the DBA of the database they are working in.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>GLOGIN.SQL and 
  LOGIN.SQL </b><br>
  Administrators are able to use two operating system files, GLOGIN.SQL and LOGIN.SQL 
  to customize their SQL*PLUS environment (including the prompt). When SQL*PLUS 
  starts, it will look for GLOGIN.SQL in $ORACLE_HOME/SQLPLUS/admin and will execute 
  its contents as soon as the connection to the database is complete. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Once the GLOGIN.SQL 
  file has been executed, the LOGIN.SQL file will be executed. Oracle will look 
  for the LOGIN.SQL file in the current working directory (where you started SQL*Plus) 
  and the operating system environment variable SQLPATH. Remember that LOGIN.SQL 
  can overwrite the actions of GLOGIN.SQL. The exact names of these files may 
  be different on some operating systems. Check the Oracle installation and administration 
  guides provided for your operating system for the exact names. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here's an example 
  of my GLOGIN.SQL file on my PC that displays the time and instance name in my 
  SQL*PLUS prompt. The file also contains a few formatting commands to format 
  SQL*PLUS output. In this example, I'm using a SELECT statement to populate a 
  variable that is displayed in the prompt. I'll show you how to use a SQL*PLUS 
  pre-defined variable to do the same thing later in this blog. </font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">COLUMN file_name 
    FORMAT a44<br>
    COLUMN tablespace_name FORMAT a20<br>
    COLUMN owner FORMAT a15<br>
    COLUMN segment_name FORMAT a20<br>
    set lines 132 <br>
    set pages 100 <br>
    set termout off<br>
    col dbname new_value prompt_dbname<br>
    select instance_name dbname from v$instance; <br>
    set sqlprompt &quot;&amp;&amp;prompt_dbname&gt; &quot; <br>
    set termout on <br>
    set time on</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Problem 
  in Releases Prior to 10G</b><br>
  When I first tested this feature many years ago, I thought to myself &quot;hey, 
  this is a pretty cool feature.&quot; A fellow administrator walked by and saw 
  that I was changing my prompt. He told me &quot;you'll have to watch that because 
  if you connect to another database, you won't execute the GLOGIN.SQL file again. 
  That means you'll still have the original database name displayed in the prompt 
  but you will be connected to the new database. There's a few other tricks you 
  can do but just putting the display commands in GLOGIN won't work and its actually 
  kind of dangerous.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G SQL*PLUS comes 
  to the rescue. GLOGIN.SQL and LOGIN.SQL are now executed after each successful 
  connection to a target database. This is in addition to the files being run 
  during the initial execution of the SQL*PLUS tool. Each time you connect to 
  a different database in 10G SQL*PLUS, the prompt will change accordingly. The 
  two demos below will show you the differences between 10G and 9I SQL*PLUS. Both 
  9I and 10G installations have the script above embedded in the GLOGIN.SQL file.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>10G SQL*PLUS DEMO</b></font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL*Plus: Release 
    10.2.0.1.0 - Production on Thu Jun 22 07:14:10 2006</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Copyright (c) 
    1982, 2005, Oracle. All rights reserved.</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Connected to:<br>
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production<br>
    With the Partitioning, OLAP and Oracle Data Mining options<br>
    JServer Release 9.2.0.6.0 - Production</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">07:14:11 orcl9i&gt; 
    <b>* Prompt shows database I connected </b><br>
    07:14:17 orcl9i&gt; *<b> to when I activated SQL*PLUS</b><br>
    07:14:18 orcl9i&gt; <br>
    07:14:18 orcl9i&gt; <br>
    07:14:18 orcl9i&gt; <br>
    07:14:18 orcl9i&gt; connect system/maxwell@orcl<br>
    Connected.<br>
    07:14:26 orcl&gt; <br>
    07:14:28 orcl&gt; <b>* Prompt changes when I connect</b><br>
    07:14:28 orcl&gt; * <b>to a different database</b><br>
    07:14:28 orcl&gt;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  9I SQL*PLUS DEMO</b></font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL*Plus: Release 
    9.2.0.6.0 - Production on Thu Jun 22 07:16:01 2006</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Copyright (c) 
    1982, 2002, Oracle Corporation. All rights reserved.</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Connected to:<br>
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production<br>
    With the Partitioning, OLAP and Oracle Data Mining options<br>
    JServer Release 9.2.0.6.0 - Production</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">07:16:02 orcl9i&gt; 
    <b>* Prompt shows database I connected</b><br>
    07:16:03 orcl9i&gt; * <b> to when I activated SQL*PLUS</b><br>
    07:16:03 orcl9i&gt; <br>
    07:16:04 orcl9i&gt; <br>
    07:16:04 orcl9i&gt; <br>
    07:16:04 orcl9i&gt; <br>
    07:16:04 orcl9i&gt; connect system/maxwell@orcl.com<br>
    Connected.<br>
    07:16:14 orcl9i&gt; <br>
    07:16:15 orcl9i&gt; <b>* Notice that the prompt doesn't change</b><br>
    07:16:16 orcl9i&gt; <br>
    07:16:16 orcl9i&gt; select name from v$database;</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">NAME<br>
    ---------<br>
    ORCL</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">07:16:23 orcl9i&gt;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Pre-Defined Variables</b><br>
  Pre-defined SQL*PLUS variables can also be used to customize a user's prompt. 
  Currently, SQL*PLUS provides the following pre-defined variables (variables 
  that are new in 10G are highlighted in bold):</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">_CONNECT_IDENTIFIER 
    - Connection identifier used to establish the database connection<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>_DATE - Current 
    date, or a user defined fixed string<br>
    </b><br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">_EDITOR - Specifies 
    the editor that will be used when the EDIT command is executed<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">_O_VERSION - 
    Oracle database version<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">_O_RELEASE - 
    Full release number of the Oracle Database<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>_PRIVILEGE 
    - The privilege level the current user has assigned to them</b><br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">_SQLPLUS_RELEASE 
    - Full release number of the SQL*PLUS program being used<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>_USER - Account 
    name used to make the connection</b></font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For example, the 
  command below could be embedded in GLOGIN.SQL or LOGIN.SQL to display the account 
  used to connect to the database and the connection string:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SET SQLPROMPT 
    &quot;_USER'@'_CONNECT_IDENTIFIER &gt; &quot;</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The demo below 
    shows the results:</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">&gt;<br>
    &gt;<br>
    &gt;<br>
    &gt;SET SQLPROMPT &quot;_USER'@'_CONNECT_IDENTIFIER &gt; &quot;<br>
    SYSTEM@orcl &gt; <br>
    SYSTEM@orcl &gt; <br>
    SYSTEM@orcl &gt;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I don't care how 
  experienced of a DBA you are, you are always in danger of working in the wrong database. It takes but a momentary distraction to lay the groundwork for a catastrophic error. 
  Anything I can do to reduce my anxiety when I execute that 'DROP USER&#133;. 
  CASCADE&quot; command, makes me a more efficient and more productive administrator. 
  Taking five minutes to customize my prompt is well worth the effort - when you 
  compare it to the disastrous results that can occur as the result of administering 
  the wrong database. Now I can finally quit executing &quot;SELECT NAME FROM 
  V$DATABASE&quot; to tell me what database I'm in.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Enhancements to the SPOOL Command</b><br>
  The SPOOL command tells SQL*PLUS to send all output to the specified flat file. 
  Think how many times you have used the SPOOL command to save your output for 
  later review. Well, 10G improves the usablity of the SPOOL command by adding 
  the following syntax:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">APPEND - Appends 
    output data to an existing file. The command will create a new file if the 
    specified file is not found<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CREATE - Creates 
    a new output file and will return an error if the file already exists<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">REPLACE - This 
    is the default option. REPLACE will replace an existing file or create it 
    if it is not found</font></li>
</ul>
<p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  DBMS_OUTPUT Line Length and Output Limit Increases</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  Oracle provides the DBMS_OUTPUT package to display debugging information from 
  PL/SQL code. The package was not designed to display reports or format output 
  to standard output. But there are times when developers need to pump out large 
  amounts of diagnostic information to help them debug their programs. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But developers 
  using 10G R1 and earlier versions were frequently constrained by DBMS_OUTPUT's 
  255 byte single line limit and total session limitation of 1 million bytes. 
  As a result, when using SQL*PLUS to debug their PL/SQL code, developers often 
  received the following error messages:<br>
  <br>
  ORA-20000: ORU-10028: line length overflow, limit of 255 bytes per line<br>
  Single line limit of 255 bytes exceeded.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ORA-20000: ORU-10027: 
  buffer overflow, limit of 1000000 bytes<br>
  Maximum amount of 1 million bytes per session exceeded.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G R2 increases 
  the single length line limit to 32,767 bytes and the overall session limit is 
  removed altogether. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Using PUPBLD.SQL</b><br>
  PUPBLD.SQL can be used for more than stopping those irritating &quot;PRODUCT 
  PROFILE TABLE NOT LOADED&quot; messages from occurring when you log on to SQL*PLUS. 
  PUPBLD.SQL creates a product profile table that is read by SQL*PLUS when users 
  log on to the product. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Front-end applications 
  can be designed to prevent users from updating data incorrectly. Other applications 
  don't require database accounts because the user logs on the application and 
  not the database. But there are still numerous applications that require database 
  defined accounts and passwords. What happens if the user logs on to the database 
  using their database account and password using SQL*PLUS? The application code 
  is not available to prevent them from making incorrect or unwarranted changes 
  to the database data. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Administrators 
  can prevent this from happening by inserting rows into the product profile table 
  to disable a SQL*PLUS user's ability to execute:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL*PLUS commands 
    - COPY, EDIT , EXECUTE, EXIT, GET ,HOST (or your operating system's alias 
    for HOST, such as $on VMS, and ! on UNIX),QUIT, PASSWORD, RUN, SAVE, SET, 
    SPOOL, START <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL statements 
    ALTER, ANALYZE, AUDIT, CONNECT, CREATE, DELETE, DROP, GRANT, INSERT, LOCK, 
    NOAUDIT, RENAME, REVOKE, SELECT, SET ROLE, SET TRANSACTION, TRUNCATE, UPDATE<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">PL/SQL commands 
    - BEGIN, DECLARE</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SQL*PLUS reads 
  restrictions from PRODUCT_USER_PROFILE when a user logs on using SQL*PLUS and 
  maintains those restrictions for the duration of the session. To disable a SQL 
  or SQL*PLUS command for a given user, insert a row containing the user's username 
  in the USERID column, the command name in the ATTRIBUTE column, and DISABLED 
  in the CHAR_VALUE column.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Conclusion</b><br>
  I hope you enjoyed this blog on SQL*PLUS.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot<br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"></font></p>
<p>&nbsp;</p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Importance of Soft Skills</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-16.6580435609</link>
                      <description>I thought I would deviate from my usual discussion on 10G technical topics for one blog.  I’d like to talk about non-technical skill sets and the important role they play in our careers.  &lt;BR&gt;&lt;BR&gt;It used to be that you could get by with a total lack of interpersonal skills in our profession.  Well those days are long gone.  If you want to succeed, you’ll need to learn how to communicate effectively and play well with others.  This blog contains a few pearls of wisdom, and a story or two, to help you become a well-rounded technician that is on the fast track to a successful career.</description>
                      <pubDate>Mon, 19 Jun 2006 05:37:05 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <b>The DBA's Evolving 
Role</b><br>
You have read numerous articles on the changing role of the DBA. How the various 
database vendors are making their products so easy to administer that, sooner 
or later, DBAs will no longer be required to be expert technicians (or be required 
at all). If you have been reading this blog, you'll know that I totally disagree. 
</font> 
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">It is my opinion 
  that database administrators will always need to just as technically proficient 
  as they had to be in the past. I will agree that database environments are becoming 
  easier to administer. Oracle Grid Control allows us to administer, monitor, 
  tune and troubleshoot an Oracle database without having to go as deep technically 
  as we had to in the past. Although we won't have to know as much about the internals 
  as we used to, our skill sets will become much more broad in scope.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The database engine 
  is taking on a much more strategic role in most organizations. It provides the 
  mechanism to store physical data along with business rules and executable business 
  logic. The entire application environment (data storage, business rule enforcement, 
  application program storage, communication, system monitoring) is now controlled 
  by the database. Over time, the database engine will store more information 
  related to the understanding of the business, the meaning of the data stored 
  (metadata) and the mechanisms to control and track versions of the database, 
  access programs and related software. As the database's area of influence expands, 
  so does the DBA's. Can any one of us predict what IBM, Oracle and Microsoft 
  have up their sleeves in their next &quot;latest and greatest&quot; release? 
  Not me. But THAT is what makes this job exciting. Our area of technical influence 
  will be expanding, not contracting.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>The Importance 
  of Soft Skills</b><br>
  Now that I have expressed my opinion on the expanding role of the DBA, let''s 
  talks about the importance of soft skills. Before we begin, I define soft skills 
  as the ability to communicate in both written and verbal forms and the ability 
  to interact with fellow employees in a positive manner. In the past, a technicians' 
  lack of interpersonal skills was often overlooked. The more technically proficient 
  the technician was, the more leeway they were given. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Let me provide 
  you with a couple of quick examples. When I first started in this profession, 
  I attended a meeting at a large financial institution that included some pretty 
  high-level representatives from both the business and technical areas. One of 
  the technicians that attended the meeting was a mainframe operating system support 
  technician. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The guy was well 
  known to be very good at as his job and as nasty a person as you would want 
  to meet. The meeting started and it quickly became apparent that most of the 
  issues being discussed would be about business processes. The O/S expert slammed 
  his pen and pad down on the table and declared &quot;It looks like this is going 
  to be a waste of my time. I have work to do. Call another meeting with me when 
  you need technical advice.&quot; He then promptly walked out. Being a junior 
  level programmer, I was in awe. I asked my boss after the meeting who he was. 
  He stated &quot;one of our mainframe gurus, don't act like he does until you 
  get as good as he is.&quot; </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> A dozen years 
  later, I saw a technician raise his hand at an enterprise-wide IT meeting when 
  the CIO asked (rhetorically I think), who was the most important person in the 
  organization. I think the CIO thought the answer would be &quot;the CEO.&quot; 
  The techie who raised his hand said &quot;I am.&quot; I think every manager 
  attending that meeting shrunk down in his or her seat. When the CIO asked why, 
  he stated, &quot;when my computers go down, all business stops.&quot; Just a 
  few months ago, I had a 20-minute conversation with a UNIX admin who never bothered 
  to turn around from her screen to look at me.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Although my examples 
  may be over the top, they show you the mindset that often plagues our profession. 
  I have been guilty of falling into that trap myself. In the past, I could be 
  described as being &quot;somewhat temperamental&quot;. I can also say that once 
  you get a reputation for being &quot;somewhat temperamental&quot;, it becomes 
  hard to shake. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">As the years have 
  gone by, I have migrated from DBA to DBA Unit Manager and now DBA Operations 
  Manager. I have seen too many excellent technicians end up with a mediocre career 
  because they achieved a reputation for &quot;not playing well with others.&quot; 
  I talk from experience. If you want to excel as a technician, you will need 
  to be technical, but you will also need to work well with others.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Verbal and Written 
  Communication Skills</b><br>
  I think people read this blog because they take pride in their work and want 
  to become better at their chosen profession. So here's my second piece of non-technical 
  advice. The importance of improving your communication skills can not be understated. 
  I don't care how strong of a technician you are, if you can't communicate effectively 
  with your peers, you won't be able to succeed in this profession. In the old 
  days, you might have been able to get by with just your technical skills. That 
  is definitely not the case in today's business world. <br>
  <br>
  Take a look at your last performance appraisal forms, I'm betting that most 
  of the criteria you are being judged upon depends upon communications. The key 
  words and phrases to look for are &quot;ability to work in a team environment&quot;, 
  &quot;keep supervisors informed&quot;, &quot;maintain good communication with 
  the user community&quot;, &quot;ensure the content of the communication is at 
  the appropriate level for the intended audience&quot;, &quot;provide system 
  and user documentation for projects and system enhancements.&quot; I pulled 
  all of the aforementioned phrases verbatim from one of my own recent performance 
  appraisals. I reviewed all of the criteria that I was being evaluated upon and 
  found that almost ninety percent of the items depended upon verbal or written 
  communications.<br>
  <br>
  If you don' have good communication skills, all is not lost. Like anything else, 
  these skills can be learned. I still consider myself to be only a fair writer. 
  I am in awe of people like Craig Mullins (a fellow blogger here on DBAZine) 
  who can just sit down and let the words flow. I often find myself agonizing 
  over every word and sentence. <br>
  <br>
  When I first started working in a corporate environment, my writing skills were 
  terrible. My original career was not database administration, it was construction. 
  A job that didn't require you to excel at written and verbal communications. 
  One on the job accident, 9 operations and 11 months of vocational rehabilitation 
  training later and I had a new career as a COBOL programmer. I went from working 
  with a construction crew to working with computer programmers. My first employer 
  was a very large and somewhat stuffy financial institution. When I was employed 
  there, men couldn't leave their floor without wearing their suit coat. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I quickly learned 
  that getting caught wiping your computer screen off with your tie didn't really 
  show your managers that you were good at thinking &quot;outside of the box.&quot; 
  That was about the only thing I thought that piece of knotted cloth around my 
  neck was good for. For the first six months, I refused to tie them. Being the 
  non-conformist that I was, I just loosened them up, slipped them off and hung 
  them up. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Saying that my 
  communication skills were rough around the edges when I started my carrer would 
  be an understatement. But I had the good fortune of having a manager that understood 
  the importance of both verbal and written communications. I would write a memo, 
  she would correct it with her red pen and send it back to me for a rewrite. 
  Many of them had a &quot;Nice Try!&quot; and a smiley face on top. After becoming 
  exasperated because of the numerous rewrites (and seeing all of those smiley 
  faces), I thought I had better improve my writing skills. I read books, practiced 
  writing and became involved with as many company newsletters and related communications 
  as I could. When I asked to join a newsletter, I always started with &quot;I'm 
  not the greatest writer, but I'm trying to learn.&quot; I also asked my peers 
  that worked on the newsletter to critique my work. The more I was critiqued, 
  the better I became. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Same way with public 
  speaking. My first speech could be described as being &quot;somewhat less than 
  stellar.&quot; Craig Mullins would gently prod me from time to time until he 
  finally convinced me that speaking was something I should be doing from time 
  to time. Craig promised to sit in the back of the room for my first speech and 
  give me hand signals if I was speaking too fast, too slow, too loud or too soft. 
  Halfway through the speech, my knees were knocking and his hands were in constant 
  motion. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I found that like 
  anything else, experience helps. But I will say that my speaking career was 
  not without excitement. I learned that you really shouldn't drink a carbonated 
  beverage wearing a tie mike that is attached to a set of 6 12-foot speakers. 
  When I was done chugging the pop before the speech, I looked around and saw 
  everyone laughing at the noises I had just made. I then found out that a tie 
  mike doesn't help when you try to stifle a burp. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I also learned 
  that some podiums are on wheels and those wheels aren't always locked. I started 
  my first sentence, leaned against the podium and it began to move. I tripped 
  a little trying to stop the podium from moving and ended up heading for the 
  end of the stage at a very rapid rate. It was a raised stage too, about six 
  feet higher than the first row of seats. As I quickly approached the end of 
  that raised stage, I noticed that the people in the first row were making motions 
  just like the extras did in the old Godzilla movies- right before they got stomped
  on. Lucky for me one of my work buddies in the first row had the good sense 
  to jump to his feet and stop the podium (and me) from killing a few members 
  of my audience. I got over those little snafus and kept plugging away. With 
  each subsequent speech, I started to improve. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The point I am 
  trying to make is that you can improve upon your communication skills. IT shops 
  are no longer evaluating technicians purely on their technical skills. I have 
  seen the soft skill evaluation pendulum swing a little more each year.. It is 
  the total package of skills that you bring to the table that you are being evaluated 
  upon. We all know the importance that our technical skill sets have upon our 
  success in this field. But you also need to be well rounded in all of the skill 
  sets your managers are looking for.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Thanks for reading, 
  <br>
  Chris Foot</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Data Pump Import</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-08.1893574515</link>
                      <description>Let’s finish this series on 10G Data Pump by investigating the Data Pump Import utility.  In this blog, we'll learn how to execute 10G Data Pump Import and take advantage of some of its more popular features.</description>
                      <pubDate>Mon, 12 Jun 2006 05:54:29 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> We learned in 
  a previous blog that Data Pump Export is used to transfer data from an Oracle 
  database into a flat file. <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_06_02.2786242018">The 
  blog</a> also contained a few quick examples of the benefits that transferring 
  data from an Oracle database to a flat file provides. Now that we have the data 
  in that flat file, we need to learn how to run the Data Pump Import utility 
  to transfer the data back into an Oracle database. </font> 
<p><b>Data Pump Import<br>
  </b>Let's begin our discussion with a quick review of a sample Data Pump Import 
  command:</p>
<blockquote>
  <p>impdp foot/foot directory=data_pump_dir1 dumpfile=expfull.dmp logfile=impfull.log 
    full=y<br>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">&quot;impdp&quot; 
    tells the operating system to run the Data Pump Import utility. The parameters 
    that follow are used to control the job's execution. In our example, the account 
    and password are both &quot;foot&quot;, the file that will contain the input 
    data is &quot;expfull.dmp&quot;, the logfile is&quot;impfull.log&quot; , and 
    a full database import will be performed</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We learned previously 
  that you must precreate a directory using a SQL DDL statement on the database 
  being accessed. If you don't pre-create the directory, Oracle provides a default 
  directory called DATA_PUMP_DIR. That means that users are unable to fully qualify 
  the output file and log file as they were able to do in the non Data Pump versions 
  of Export and Import. You specify a fully qualified directory on the server 
  when you create the new database directory object and then you must grant access 
  to that directory. <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_06_02.2786242018">My 
  last blog</a> contains more information on the creation and administration of 
  Oracle directories.</font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data Pump provides 
  the following import modes:</font></p>
<ul>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Full</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Activated by specifying &quot;FULL=Y&quot;. Notifies Import to import the 
    entire content of the input file. The amount of data actually imported is 
    dependent upon the data contained in the input file. If the input file contains 
    all of the objects and data from a full database export, all of those objects 
    will be imported. If the input file contains a schema export, all of the objects 
    in that schema will be imported. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Schema Import</b> 
    - Activated by specifying &quot;SCHEMAS=schema, schema, schema&#133;.). Imports 
    the entire schema and all dependent objects (tables, indexes, grants, synonyms, 
    PL/SQL programs, views). The problem with the older version of Import was 
    that because it didn't recreate the user (just the user's objects), the administrator 
    was forced to save the user creation and grant statements to recreate the 
    user with the same privileges it had before the drop was performed. A Data 
    Pump schema import will recreate the user and execute all of the associated 
    grants, user password history, etc..<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Table Import</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Activated by specifying &quot;TABLES=[schemas].tablename, [schemas].tablename,&#133;. 
    Imports a table and all dependent objects.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Tablespace 
    Import</b> - Activated by specifying &quot;TABLESPACES=tablespacename, tablespacename, 
    tablespacename&#133; All of the objects contained in the specified tablespace 
    are imported. If a table is imported, its dependent objects are also imported 
    regardless of the tablespace they were stored in.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Transportable 
    Tablespace Impor</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">t 
    - Activated by specifying &quot;TRANSPORT TABLESPACES=tablespacename&#133; 
    Here's how this feature works. The administrator first runs Data Pump Export 
    with the Transportable Tablespace feature activated. Data Pump exports only 
    the metadata for the objects contained in the specified tablespaces. The objects 
    in the tablespace set being exported can not have any references to objects 
    contained in tablespaces outside of the tablespace set. In addition there 
    can't be any objects in the tablespace set that are referenced by objects 
    outside of the tablespace set being exported. Having a index in a tablespace 
    that is not contained in the same tablespace set that contains the table it 
    is built upon would be an example of a dependency reference problem. Administrators 
    use the TRANSPORT_FULL_CHECK parameter to perform the dependency verification.<br>
    <br>
    The administrator then uses an operating system command to copy the tablespace 
    datafile(s) to the target database. The transportable tablespace import feature 
    is then used to attach the datafile (and its contents) to the database. Transferring 
    the datafile using operating system commands is much faster than exporting 
    and importing the data using the traditional Data Pump Export and Import operations. 
    Administrators are only limited by hardware and network performance.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is important 
  to note that you are not forced into using the same import mode as you did for 
  the export. You can use the schema and table option using an export file that 
  was created by a full database export. You can also import one table from a 
  schema level export (and so on&#133;). Lastly, Data Pump Import can only 
  read data that was created by a Data Pump Export.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's continue by reviewing a few of the 10G Data Pump Import parameters that you may find interesting. Many of these parameters will be the same as for Data 
  Pump Export.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Data Pump Import 
  Parameters</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>JOB_NAME=jobname_string</b> 
    - You are able to assign a job name of up to 30 bytes to a Data Pump operation. 
    This allows the job to be more easily identified when querying the DBA_DATAPUMP_JOBS 
    and DBA_DATAPUMP_SESSIONS data dictionary views that provide information on 
    Data Pump operations. If you do not specify a job name, Oracle will create 
    a default job name for you. The form will be SYS_IMPORT_mode_nn, where mode 
    is the type of export (FULL, TABLE, etc.) and &quot;nn&quot; is a incrementing 
    number starting at 01. The job name is used in the ATTACH command (shown below) 
    to attach, and reattach, to running jobs.<br>
    <br>
    </font> </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>ATTACH [=[schema_name.]job_name]</b> 
    - Used to attach a client session to an existing Data Pump operation. An example 
    of the ATTACH command is provided below:<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">&gt; impdp 
    foot/foot ATTACH=foot.importfulljob<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DIRECTORY=directory_object</b> 
    - All of the dumpfile set I/O is generated by Data Pump processes that run 
    within the constructs of the database engine. As a result, the O/S account 
    performing the I/O is Oracle, which usually has a higher level of privileges 
    than most other accounts. Oracle attempts to prevent unwarranted operations 
    from occurring by using Oracle directory objects that require read and write 
    privileges granted by the DBA. Users running Data Pump operations are only 
    able to read and write files in the directories that they have been granted 
    access to.<br><br>
    Before a user is able to run any Data Pump operation, the administrator must 
    pre-create a directory and grant privileges to the user on that directory. 
    This means that users are unable to fully qualify the output file and log 
    file as they were able to do in the non Data Pump versions of Export and Import. 
    If you don't pre-create the directory, Oracle provides a default directory 
    called DATA_PUMP_DIR.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DUMPFILE=[directory_object:]file_name 
    [, ...] </font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- 
    Contains the metadata and/or data output from a Data Pump Export operation 
    that Data Pump Import is using as input. The directory object specification 
    is not required to be specified if a directory is specified in the DIRECTORY 
    parameter. If one is specified in the DIRECTORY parameter and the DUMPFILE= 
    parameter, the DUMPFILE=directory: specification will take precedence. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>ESTIMATE={BLOCKS 
    | STATISTICS}</b> - Used to estimate the amount of data a Data Pump Import 
    network operation will generate. This differs from the estimate option that 
    is used with Data Pump Export. Using the ESTIMATE parameter with Data Pump 
    Export will ask Data Pump to estimate how large the output dumpfile will be. 
    I'll provide more information on Data Pump network import operations later 
    in this blog. <br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Fine Grained 
    Selectivity Parameters (Exclude, Include, Query, Flashback, Content)</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Allows the administrator to include or exclude objects. For more information 
    on these parameters, please turn to my previous blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_19.6918984141">&quot;10G 
    Data Pump Part 1&quot;</a>.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">HELP = {y 
    | n} </font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- 
    Displays a listing of all the parameters that can be specified for the Data 
    Pump operation. For example:<br>
    <br>
    &gt; impdp help=y <br>
    <br>
    Would provide a listing of parameters for a Data Pump Import operation.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">LOGFILE=[directory_object:]file_name 
    </font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- Contains 
    work-in-progress, work completed and errors generated during a Data Pump Operation. 
    For a real time update on a Data Pump operation's activities, you are able 
    to attach to a running Data Pump operation using the ATTACH command and then 
    execute the STATUS command. Like its dumpfile counterpart, The directory object 
    specification is not required to be specified if a directory is specified 
    in the DIRECTORY parameter. If one is specified in the DIRECTORY parameter 
    and the DUMPFILE= parameter, the DUMPFILE=directory: specification will take 
    precedence. <br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">NETWORK_LINK=database_link_name</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - OK, I must admit that this is one of my favorite new features provided by 
    Data Pump Import. The network transfer option allows administrators to attach 
    to any source database that can be accessed from the network, transfer the 
    data and write it to the target database. No dumpfile required! Administrators 
    use the NETWORK_LINK parameter to specify a pre-created database link that 
    points to the source database.<br>
    <br>
    This parameter must be specified when using the FLASHBACK_SCN, FLASHBACK_TIME, 
    ESTIMATE, or TRANSPORT_TABLESPACES parameters.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>PARALLEL=intege</b>r 
    - Multiple worker processes are able to perform inter-table and inter-partition 
    work in parallel. This allows administrators to load and unload database tables 
    using parallel processing. Data Pump Import takes advantage of parallelism 
    to build indexes and load package bodies. <br>
    <br>
    The most beneficial aspect of Data Pump's parallel processing feature is that 
    it is dynamic. Administrators are able to attach (connect) to a Data Pump 
    job that is currently executing and dynamically alter the number of parallel 
    processes it uses. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 
    documentation states that the parallel option may cause file contention if 
    too many parallel processes are used to read the same input dumpfile. As a 
    result, you'll need to be careful when specifying the level of parallelism. 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>REUSE_DATAFILES={y 
    | n}</b> - Tells Data Pump Import to reinitialize existing tablespace datafiles. 
    Specifying &quot;N&quot; tells Data Pump Import to generate an error message 
    from the failing create tablespace execution. The Import will then continue 
    executing. Specifying &quot;Y&quot; tells Import to issue a warning and reinitialize 
    the tablespace datafile(s) which results in a total loss of existing data 
    in the target tablespace.<br><br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>STATUS=[integer] 
    </b>- Specifies the number of seconds between each status information display.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>TABLE_EXISTS_ACTION={SKIP 
    | APPEND | TRUNCATE | REPLACE}</b> - Provides Data Pump Import with instructions 
    to perform when it finds a table in the target database with the same name 
    as a table contained in the input file.</font> 
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=SKIP 
      - Existing tables are bypassed if they already exist. No action is taken. 
      </font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=APPEND 
      -Data Pump Import will append rows to the existing table. </font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=TRUNCATE 
      - Data Pump Import will truncate the existing table and load rows from the 
      source. </font></p>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=REPLACE 
      - Existing tables will be dropped, recreated and then loaded from the source.<br>
      <br>
      </font></p>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>TRANSFORM 
    = transform_name:value[:object_type]</b> - Allows the administrator to alter 
    object creation DDL for specified objects . For more information on these 
    parameters, please turn to my previous blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_19.6918984141">&quot;10G 
    Data Pump Part 1&quot;.</a></font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Commands Available 
  in Interactive Mode</b><br>
  We learned previously that administrators are able to attach and detach from 
  actively running Data Pump operations. Administrators use the ATTACH and EXIT_CLIENT 
  commands to connect and disconnect from an active Data Pump job. This <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_196918984141/data_pump2.txt">output 
  file</a> provides a demonstration of detaching and attaching from an active 
  Data Pump operation. You'll notice that I dynamically change the parallel setting 
  after I reattach. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at some of the other parameters for Data Pump Import that you can dynamically 
  change during its execution:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>CONTINUE_CLIENT</b> 
    - Switches from interactive mode to status (logging) mode. An example of this 
    command follows:</font><br>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">impdp&gt; CONTINUE_CLIENT<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>EXIT_CLIENT 
    </b>- Detaches the client from an active Data Pump operation. The job continues 
    to run. The administrator is then able to use the ATTACH command to reattach 
    to the job at any time. The attach can be performed if the job is executing 
    or in a stopped state. An error message will be returned if an attempt is 
    made to attach to a completed Data Pump Operation.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>HELP</b> 
    - Provides help on interactive mode Data Pump commands.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">KILL_JOB</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Kills the active Data Pump operation and detaches all client sessions. This 
    command differs from the STOP_JOB command which is discussed below. The KILL_JOB 
    will remove DUMPFILEs that were created which prevents the user from taking 
    advantage of Data Pump's restart capabilities. The log files will remain.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">PARALLEL=integer</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Change the number of parallel processes for a Data Pump operation.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">START_JOB 
    / STOP _JOB</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Restarts and stops the Data Pump operation the client is currently attached 
    to. Data Pump jobs update a master table with all pertinent information pertaining 
    to the job being executed. The master table knows about the objects being 
    exported or imported and their location in the dump file set. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As a result, 
    a Data Pump job can be restarted in the event of a planned or unplanned stoppage. 
    The Data Pump job accesses the master table to determine where to start and 
    picks up right where it left off. Administrators are able to use the STOP_JOB 
    AND START_JOB commands on the client to temporarily stop jobs and restart 
    them when desired.<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle 
    provides the SKIP_CURRENT option of the START_JOB parameter to allow administrators 
    to restart a Data Pump Import operation that failed to restart because of 
    a failing DDL statement. SKIP_CURRENT tells Data Pump Import to skip the object 
    having the problem and restart processing on the next object.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>STATUS=[integer]</b> 
    - Specifies the number of seconds between each status information display.</font></li>
</ul>
<p><BR><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>WRAPUP </b><br>
  I think after reading these last four blogs, we should all have a pretty good 
  understanding of 10G Data Pump. We can finally retire Data Pump's ancestors 
  Export and Import. As we now know, they just can't compete with the features 
  and functionality provided by Data Pump Export and Import.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot<br>
  Oracle Ace <img src="http://www.remotedbaexperts.com/ace_2.gif"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Data Pump Export</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-02.2786242018</link>
                      <description>This is part three of a series on 10G Data Pump. In part one, we reviewed a few of the new features that make Data Pump Export and Import attractive alternatives to their ancestors, Export and Import. Part two focused on the 10G Data Pump architecture. We continue the discussion in this blog by learning how to use 10G Data Pump Export to "pump" data out of an Oracle database. </description>
                      <pubDate>Mon, 05 Jun 2006 05:33:12 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
<b>Data Pump Export</b><br>
The ability to transfer data out of an Oracle database to a flat file provides 
numerous benefits. A couple of the more common benefits are as follows:</font>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database Backup 
    - Export can be used to take a time consistent snapshot of the data in an 
    Oracle database. The data contained in the flat files can be reloaded back 
    into the database at any time. A common question I received from students 
    during my classes was if redo logs could be used to roll the database forward 
    to the current point-in-time after using Import to reload the data. Sorry, 
    Export and Import work within the database data files. The synchronization 
    information required by Oracle during a database restore and recovery relies 
    upon the data contained in the control files and data file headers. Since 
    Export/Import does not change any of the synchronization data in the file 
    headers, the utility can not be used to perform traditional Oracle recoveries 
    executed using the RECOVER statement.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data Archival 
    - I have seen several shops that used the transportable tablespace feature 
    to archive data to offline storage. If the data was required for reporting 
    purposes, the tablespace was reattached to a reporting database for quick 
    access.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database Upgrades 
    - Export/Import is one of the upgrade options that is almost always specified 
    in the Oracle migration manuals. It is often the only method if the difference 
    between the old source release and the new target release is substantial. 
    Since it requires that a new database be created using the new release, backoff 
    is certainly simplified.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data Transfer 
    - Administrators have been using FROM USER/TO USER to transfer data from one 
    schema to another since SCOTT/TIGER was a cub.</font><br>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's begin our 
  discussion with a quick review of a sample Data Pump Export command that I provided 
  in a previous blog:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">expdp foot/foot 
    directory=export_dir dumpfile=expfull.dmp logfile=expfull.log full=y </font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  &quot;expdp&quot; tells the operating system to run the Data Pump Export utility. 
  The parameters that follow are used to control the job's execution. In our example, 
  the account and password are both &quot;foot&quot;, the file that will contain 
  the output data is &quot;expfull.dmp&quot;, the logfile is&quot;expfull.log&quot; 
  , and a full database export will be performed. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We learned previously 
  that you must precreate a directory using a SQL DDL statement on the database 
  being accessed. If you don't pre-create the directory, Oracle provides a default 
  directory called DATA_PUMP_DIR. That means that users are unable to fully qualify 
  the output file and log file as they were able to do in the non Data Pump versions 
  of Export and Import. You specify a fully qualified directory on the server 
  when you create the new database directory object and then you must grant access 
  to that directory. You will need to do this for both Data Pump Export and Import 
  operations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Creating the directory:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CREATE DIRECTORY 
    data_pump_dir1 as '/u01/oradata/prod1/datapump';</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We can then view 
  all of the directories by executing the select statement below:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
    SQL&gt; r<br>
    1* select directory_name, directory_path from dba_directories<br>
    <br>
    <font face="Courier New, Courier, mono">DIRECTORY_NAME DIRECTORY_PATH<br>
    --------------- -------------------------------------------------------------<br>
    SUBDIR /app/oracle/product/10.2/db/demo/schema/order_entry//2002/Sep<br>
    XMLDIR /app/oracle/product/10.2/db/demo/schema/order_entry/<br>
    MEDIA_DIR /app/oracle/product/10.2/db/demo/schema/product_media/<br>
    LOG_FILE_DIR /app/oracle/product/10.2/db/demo/schema/log/<br>
    WORK_DIR /ade/aime_10.2_lnx_push/oracle/work<br>
    DATA_FILE_DIR /app/oracle/product/10.2/db/demo/schema/sales_history/<br>
    DATA_PUMP_DIR /app/oracle/product/10.2/db/admin/ctitst/dpdump/<br>
    ADMIN_DIR /ade/aime_10.2_lnx_push/oracle/md/admin<br>
    DATA_PUMP_DIR1 /u01/oradata/prod1/datapump</font></font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before we are able 
  to begin using the directory for Data Pump Operations, we'll need to grant access 
  to it:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">GRANT READ, WRITE 
    ON DIRECTORY data_pump_dir1 TO foot;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is one important 
  point to remember. Even though you have granted the database user the authority 
  to read and write to that directory, the user does not have the authority to 
  access those files outside of the Oracle database. If the only task the user 
  needs to do is execute the Data Pump Export and Import utilities, the database 
  privileges will suffice. But if the user needs to view or manipulate the output 
  and log files after they are created, they will need to have an operating system 
  account created on the database server with the proper operating system privileges 
  granted to it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In addition, you 
  will have to ensure that the Oracle server itself has the appropriate read/write 
  operating system privileges on the directory structure used in the CREATE DIRECTORY 
  statement. If the Oracle engine can't access the directory, the Data Pump Export 
  and Import won't be able to access it.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data Pump provides 
  the following export modes:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Full Export</b> 
    - Activated by specifying &quot;FULL=Y&quot;. Notifies Export to export the 
    entire database. Everything you need to recreate all of the application data 
    objects will be included in the output file including tablespaces, tables, 
    indexes, views, synonyms, PL/SQL programs, users, grants - the works.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Schema Export 
    </b>- Activated by specifying &quot;SCHEMAS=schema, schema, schema&#133;.). 
    Exports the entire schema and all dependent objects (tables, indexes, grants, 
    synonyms, PL/SQL programs, views). The problem with the older version of Import 
    was that because it didn't recreate the user (just the user's objects), the 
    administrator was forced to save the user creation and grant statements to 
    recreate the user with the same privileges it had before the drop was performed. 
    A Data Pump schema import will recreate the user and execute all of the associated 
    grants, user password history, etc..<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Table Export</b> 
    - Activated by specifying &quot;TABLES=[schemas].tablename, [schemas].tablename,&#133;. 
    Exports a table and all dependent objects.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tablespace 
    Export</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Activated by specifying &quot;TABLESPACES=tablespacename, tablespacename, 
    tablespacename&#133; All of the objects contained in the specified tablespace 
    are exported. If a table is exported, its dependent objects are also exported 
    regardless of the tablespace they are stored in.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Transportable 
    Tablespace Export </b>- Activated by specifying &quot;TRANSPORT TABLESPACES=tablespacename&#133; 
    Only the metadata is exported for objects contained in the specified tablespaces. 
    The administrator then uses an operating system command to copy the tablespace datafile(s) to 
    the target database. The transportable tablespace Import feature is then used 
    to attach the datafile (and its contents) to the database.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I provided a listing 
  of parameters that I thought readers might find interesting in a previous blog 
  titled &quot;10G Data Pump Part 1&quot;. It may be beneficial for those of you 
  that haven't read that blog to do so before continuing.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here are a few 
  other parameters I thought you may find to be beneficial during your day-to-day 
  usage of Data Pump Export:</font></p>
<ul>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">JOB_NAME<i>=jobname_string</i></font></b><i><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    </font></i><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- You 
    are able to assign a job name to a Data Pump operation. This allows the job 
    to be more easily identified when querying the DBA_DATAPUMP_JOBS and DBA_DATAPUMP_SESSIONS 
    data dictionary views. 
    If you do not specify a job name, Oracle will create a default job name for 
    you. The form will be SYS_EXPORT_mode_nn, where mode is the type of export 
    (FULL, TABLE, etc.) and &quot;nn&quot; is a incrementing number starting at 
    01. The job name is used in the ATTACH command below to attach, and reattach, 
    to running jobs.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>ATTACH <i>[=[schema_name.]job_name]</i></b><i> 
    </i>- Used to attach a client session to an existing Data Pump operation. 
    An example of the ATTACH command is provided below:<br>
    <br>
    &gt; expdp foot/foot ATTACH=foot.export_full<br>
    <b><br>
    </b></font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DIRECTORY<i>=directory_object</i></font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - All of the dumpfile set I/O is generated by Data Pump processes that run 
    within the constructs of the database engine. As a result, the O/S account 
    performing the I/O is Oracle, which usually has a higher level of privileges 
    than most other accounts. Oracle attempts to prevent unwarranted operations 
    from occurring by using Oracle directory objects that require read and write 
    privileges granted by the DBA. Users running Data Pump operations are only 
    able to read and write files in the directories that they have been granted 
    access to.<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before 
    a user is able to run a Data Pump operation, the administrator must pre-create 
    a directory and grant privileges to the user on that directory. This means 
    that users are unable to fully qualify the output file and log file as they 
    were able to do in the non Data Pump versions of Export and Import. If you 
    don't pre-create the directory, Oracle provides a default directory called 
    DATA_PUMP_DIR.<br>
    <b><br>
    </b></font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DUMPFILE<i>=[directory_object:]file_name 
    [, ...]</i></font></b><i><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    </font></i><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- Contains 
    the metadata and/or data output from a Data Pump Export operation. The directory 
    object specification is not required to be specified if a directory is specified 
    in the DIRECTORY parameter. If one is specified in the DIRECTORY parameter 
    and the DUMPFILE= parameter, the DUMPFILE=directory: specification will take 
    precedence. <br>
    <b><br>
    </b></font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ESTIMATE<i>={BLOCKS 
    | STATISTICS}</i></font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Used in conjunction with the ESTIMATE_ONLY parameter to estimate the amount 
    of space a Data Pump Export dumpfile will consume. For more information on 
    these parameters, please turn to my previous blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_19.6918984141">&quot;10G 
    Data Pump Part 1&quot;</a>.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Fine Grained 
    Selectivity Parameters (Exclude, Include, Query, Flashback, Content)</b> - 
    Allows the administrator to include or exclude objects. For more information 
    on these parameters, please turn to my previous blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_05_19.6918984141">&quot;10G 
    Data Pump Part 1&quot;</a>.<br>
    <br>
    </font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">HELP<i> = 
    {y | n}</i></font></b><i><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    </font></i><font face="Verdana, Arial, Helvetica, sans-serif" size="2">- Displays 
    a listing of all the parameters that can be specified for the Data Pump operation. 
    For example:<br>
    <br>
    &gt; expdp help=y<br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
    Would provide a listing of parameters for a Data Pump Export operation.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>LOGFILE<i>=[directory_object:]file_name</i></b> 
    - Contains work-in-progress, work completed and errors generated during a 
    Data Pump Operation. For a real time update on a Data Pump operation's activities, 
    you are able to attach to a running Data Pump operation using the ATTACH command 
    and then execute the STATUS command. Like its dumpfile counterpart, The directory 
    object specification is not required to be specified if a directory is specified 
    in the DIRECTORY parameter. If one is specified in the DIRECTORY parameter 
    and the LOGFILE= parameter, the LOGFILE=directory: specification will take 
    precedence. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>PARALLEL<i>=integer</i></b> 
    - Multiple worker processes are able to perform inter-table and inter-partition 
    work in parallel. This allows administrators to load and unload database tables 
    using parallel processing.<br>
    <br>
    The most beneficial aspect of Data Pump's parallel processing feature is that 
    it is dynamic. Administrators are able to attach (connect) to a Data Pump 
    job that is currently executing and dynamically alter the number of parallel 
    processes it uses. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SAMPLE<i>=[[schema_name.]table_name:]sample_percent</i></b> 
    - Allows an administrator to sample a percentage of the object specified. 
    If you don't specify a table name, the percentage will be applied to the entire 
    Data Pump operation.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>STATUS<i>=[integer]</i></b><i> 
    </i>- Specifies the number of seconds between each status information display.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Commands Available 
  in Interactive Mode</b><br>
  We learned previously that administrators are able to attach and detach from 
  actively running Data Pump operations. Administrators use the ATTACH and EXIT_CLIENT 
  commands to connect and disconnect from an active Data Pump job. This <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_196918984141/data_pump2.txt">output 
  file</a> provides a demonstration of detaching and attaching from an active 
  Data Pump operation. You'll notice that I dynamically change the parallel setting 
  after I reattach. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at some of the other parameters you can dynamically change:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>ADD_FILE<i>=[directory_object]file_name 
    [,...] </i></b>- This feature allows the administrator to add additional files 
    to a Data Pump Export operation. The ability to add data files &quot;on the 
    fly&quot; would come in very handy when the first dumpfile's target drive 
    begins to fill up. The administrator would be able to add a new file on a 
    different drive.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>CONTINUE_CLIENT</b> 
    - Switches from interactive mode to status mode. An example of this command 
    follows:<br>
    <br>
    export&gt; CONTINUE_CLIENT<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>EXIT_CLIENT</b> 
    - Detaches the client from an active Data Pump operation.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>HELP</b> 
    - Provides help on interactive mode Data Pump commands.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>KILL_JOB 
    </b>- Kills the active Data Pump operation and detaches all client sessions. 
    This command differs from the STOP_JOB command which is discussed below. The 
    KILL_JOB will remove DUMPFILEs that were created which prevents the user from 
    taking advantage of Data Pump's restart capabilities. The log files will remain.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>PARALLEL<i>=integer</i></b><i> 
    </i>- Change the number of parallel processes for a Data Pump operation.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>START_JOB 
    / STOP _JOB </b>- Restarts and stops the Data Pump operation the client is 
    currently attached to. Data Pump jobs update a master table with all pertinent 
    information pertaining to the job being executed. The master table knows about 
    the objects being exported or imported and their location in the dump file 
    set. <br>
    <br>
    As a result, a Data Pump job can be restarted in the event of a planned or 
    unplanned stoppage. The Data Pump job accesses the master table to determine 
    where to start and picks up right where it left off. Administrators are able 
    to use the STOP_JOB AND START_JOB commands on the client to temporarily stop 
    jobs and restart them when desired.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>STATUS<i>=[integer] 
    </i></b>- Specifies the number of seconds between each status information 
    display.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  WRAPUP </b><br>
  I think after reading these three blogs on 10G Data Pump, we should have a pretty 
  good understanding of Data Pump Export. In my last blog of this series, we'll 
  turn our attention to DATA Pump Import.</font></p>
<p></p>
<p> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Data Pump Design and Architecture</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-05-26.3042156388</link>
                      <description>Now that we have a general understanding of some of the features that 10G Data Pump provides, let’s peel back a few of the layers and see how this utility works.   In this blog, we’ll take an in-depth look at the Data Pump architecture. </description>
                      <pubDate>Tue, 30 May 2006 05:38:36 -0500</pubDate>
                      
     
        <category>data pump, Oracle utilities, expdp, impdp</category>
             
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have created 
  two diagrams that should help us to better understand the Data Pump utility. 
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_263042156388/arch1.gif">first 
  diagram</a> shows all of the components that make up the Data Pump Architecture. 
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_263042156388/arch2.gif">second 
  diagram</a> shows the data flows between the different processes, files and 
  memory areas. </font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Data Pump Components</b><br>
  Let's take a look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_263042156388/arch1.gif">first 
  diagram</a>. Data Pump provides four client utilities that execute the procedures 
  provided in the DBMS_DATA_PUMP PL/SQL package. The client utilities accept input 
  in the form of parameters which are passed to the DBMS_DATA_PUMP PL/SQL package 
  to enable the exporting and importing of metadata and data into and out of an 
  Oracle database. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A brief overview 
  of the four client utilities is provided below:</font></p>
<ul>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EXPDP</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Client interface to the Data Pump Export utility. The interface closely 
    resembles its predecessor, Oracle Export.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>IMPDP</b> 
    - Client interface to the Data Pump Import utility. The interface closely 
    resembles its predecessor, Oracle Import.</font></li>
  <li><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">OEM Interface</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    - Provides access to the DBMS_DATA_PUMP PL/SQL package from the DB and Grid 
    Control web interfaces.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Custom Interface</b> 
    - Allows for the movement of complex data mining models.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Because Data Pump 
  is made available through the DBMS_DATA_PUMP PL/SQL package API, users are able 
  to call Data Pump natively from application programs. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Data Access 
  Methods</b><br>
  Data Pump provides two access methods to load and unload data:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Direct Path</b> 
    - Direct Path unload has been available since Oracle 7.3 and its direct load 
    counterpart has been around since Oracle 8i. Oracle will attempt to use the 
    Direct Path first but there are a few situations that can force Data Pump 
    to switch to the External Tables access method. Oracle documentation provides 
    a listing of all the reasons why Data Pump was unable to use the Direct Path 
    data access method. Since Data Pump will automatically switch from the Direct 
    Path access method to External Tables, it is transparent to the client.</font><br>
    <br>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>External 
    Tables </b>- The capability of reading data from external sources has been 
    available since Oracle9i. Oracle10G also support writing data to external 
    destinations. Data Pump provides the ORACLE_DATAPUMP access driver that allows 
    it to read and write to external files. Data Pump is required to use this 
    access method if parallel processing is activated to increase performance.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The user is not 
  required to determine which data access method best fits each job's requirements. 
  The Data Pump utility itself will automatically choose the most appropriate 
  data access method for each table being accessed. No user intervention required! 
  The output created by both the Direct Path and External Table data access methods 
  has the same external format. This allows Data Pump to choose the best access 
  method to load data, regardless of which data access method created the output. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Metadata API</b><br>
  Data Pump uses the DBMS_METADATA package to load and unload metadata. The Metadata 
  API stores the metadata as XML documents. This differs from the original Export 
  utility which stored the metadata as DDL. The Data Pump Import utility takes 
  advantage of the flexibility provided by the XML format by allowing users to 
  change object ownership, storage characteristics and tablespace destinations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Data Pump Data 
  Flow</b> <br>
  In order for us to truly understand how data pump works; we need to learn how 
  the processes and memory structures interact with each other. The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_263042156388/arch2.gif">second 
  diagram</a> closely resembles the one that Oracle uses in many of its presentations 
  on the Data Pump Export data flow. Let's break down the data flow diagram into 
  its individual components:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Shadow Processes</b><br>
  This should be an easy one for us to understand. The shadow process is the foreground 
  process that is created when a client logs on to an Oracle database. The shadow 
  process creates most of the other components found on this diagram. After receiving 
  the Data Pump initiation request, the shadow process creates the master table, 
  advanced queue structures for the command and control and status queues and 
  the master control process. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">After the Data 
  Pump job is executing, the shadow process is delegated the responsibility of 
  services the GET_STATUS requests from the client. If the client detaches, the 
  process is no longer needed and is removed. We learned previously that detaching 
  a client from Data Pump does not cause the Data Pump job to stop executing. 
  Users are able to reattach to a Data Pump operation as often as required during 
  the job's life cycle. Each time the reattach is performed, Oracle will start 
  a new shadow process on the client's behalf. In addition, multiple clients can 
  be attached to the same Data Pump job concurrently, with each client having 
  its own shadow process.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Status Queue</b><br>
  Oracle takes advantage of its Advanced Queuing (AQ) feature to provide communication 
  paths between the different Data Pump processes. The Data Pump master control 
  process writes work progress and error messages to the status queue. Shadow 
  processes subscribe to this queue to retrieve the status information. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Master Control 
  Process</b><br>
  The master control process is the &quot;traffic cop&quot; of the Data Pump environment. 
  It controls the execution of Data Pump jobs by delegating work requests to worker 
  processes based on the particular execution phase (metadata capture, data unloading, 
  data loading, etc.) the job is currently performing. The master control proces 
  updates the master table with high-level information (job's description, state, 
  restart and dumpfile info.) required to restart stopped Data Pump jobs. The 
  process is also responsible for communicating to the clients through the status 
  queue and performing logging operations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Master Table</b><br>
  The master table contains information about the details of the current Data 
  Pump operation being performed. You can equate it to a running log book that 
  provides information on each object being exported or imported and their locations 
  in the dumpfile set. In addition, the master table also records the parameters 
  supplied by the calling program, worker status information and output file information. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The table provides 
  all of the information required to restart a Data Pump job that has stopped 
  because of a planned, or unplanned, failure. The table is owned by the account 
  running the Data Pump job and is written to the dump file at the end of each 
  Data Pump Export operation. Data Pump Import read's the master table and loads 
  it into the user's schema during the initial phase of execution. The table is 
  then used to keep track of the Data Pump Import operation (job status, object 
  being imported, etc.).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Command and 
  Control Queue</b><br>
  The command and control queue provides an avenue of communications between the 
  master control process and worker processes. All of the work requests created 
  by the master process and the associated responses are passed through the command 
  and control queue. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Worker Process</b><br>
  During the initial phases of a Data Pump job, the master control process creates 
  worker process to perform the actual data and metadata load and unload operations. 
  The worker processes are responsible for updating the master table with information 
  on the status (pending, completed, failed) of each object being processed. This 
  information is used to provide the detailed information required to restart 
  stopped Data Pump jobs.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Parallel Query 
  Process</b><br>
  For those of you that have used Oracle's Parallel Query Option (PQO), these 
  processes should be familiar to you. Data Pump's Parallel Query Processes are 
  standard parallel query slave processes that are controlled by the worker process 
  which assumes the role of the parallel query coordinator. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Dump Datafile</b><br>
  Data Pump dump files are created by EXPDP and used as input by IMPDP. Since 
  their format is incompatible with their predecessors, Export and Import, the 
  utilities are not interchangeable. Import can only read a file created by Export 
  and IMPDP can only read a file created by EXPDP. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The dumpfile contains 
  data and/or metadata and the master table which is written to the dumpfile at 
  the end of each EXPDP operation and read at the beginning of each IMPDP operation. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">All of the dumpfile 
  set I/O is generated by Data Pump processes that run within the constructs of 
  the database engine. As a result, the O/S account performing the I/O is Oracle, 
  which usually has a higher level of privileges than most other accounts. Oracle 
  attempts to prevent unwarranted operations from occurring by using Oracle directory 
  objects that require read and write privileges granted by the DBA. Users running 
  Data Pump operations are only able to read and write files in the directories 
  that they have been granted access to.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before a user is 
  able to run a Data Pump operation, the administrator must pre-create a directory 
  and grant privileges to the user on that directory. This means that users are 
  unable to fully qualify the output file and log file as they were able to do 
  in the non Data Pump versions of Export and Import. If you don't pre-create 
  the directory, Oracle provides a default directory called DATA_PUMP_DIR. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You specify a fully 
  qualified directory on the server when you create the new database directory 
  object and then grant access on that directory to the user running the data 
  pump operation:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> CREATE DIRECTORY 
    data_pump_dir1 as '/u03/oradata/datapump';</font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> GRANT READ, 
    WRITE ON DIRECTORY data_pump_dir1 TO foot;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The user running 
  the Data Pump Operation must specify the directory in one of two ways:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">By specifying the 
  DIRECTORY parameter on the command line:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EXPDP foot/foot 
    DIRECTORY=data_pump_dir1 dumpfile=users.dmp schemas=eul, kap, mal logfile=users.log</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Or by specifying 
  it in the dumpfile and logfile parameters:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">EXPDP foot/foot 
    dumpfile= data_pump_dir1:users.dmp schemas=eul, kap, mal logfile=data_pump_directory:users.log</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Notice that in 
  the above command I have chosen to write the logfile to a different directory 
  than the Data Pump output file. If you specify the DIRECTORY parameter, the 
  directory specifications embedded in the dumpfile and logfile parameters are 
  optional. Directory specifications embedded in the file parameters override 
  the directory specified in the DIRECTORY parameter.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Up Next</b><br>
  In the next blog, we'll learn how to run the Data Pump Export and Import Utilities.<br>
  </font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/data+pump,+oracle+utilities,+expdp,+impdp"
                      rel="tag">data pump, Oracle utilities, expdp, impdp</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Data Pump Part 1 - Features and Benefits</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-05-19.6918984141</link>
                      <description>Describing the Oracle Export and Import utilities as slow is like saying the Titanic sprung a small leak. Stories of Export and Import executions running for hours (and sometime days) are commonplace. Oracle 10G provides a new data movement utility, called Data Pump, to increase the performance of data transfers. &lt;BR&gt;&lt;BR&gt; Now that I've used Data Pump, I found out that the improvements go far beyond mere performance enhancements. In part 1 of this multi-part series on the Data Pump toolsets, I'll cover some of the new features and functionalities the utility provides. In upcoming blogs, we'll take a look at the data pump architecture and compare the toolset to its ancestors Export and Import.</description>
                      <pubDate>Mon, 22 May 2006 06:05:11 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I 
  thought I would start the series off by providing you with a laundry list of 
  benefits the new utility provides. This is only a partial set of features. If 
  you would like to chime in with a few of your own or you have some helpful hints 
  (or warnings) to provide, please feel free to respond with a comment. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The intent of this 
  blog is to generate interest in the Data Pump utilities. In my next blog, I'll 
  continue our discussion on Data Pump by providing you with a general overview 
  of its architecture and finish the series by showing you how to use Data Pump. 
  I'll provide a few examples and screen shots to enhance the learning process 
  along the way.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before we begin 
  let's look at a very quick example of a Data Pump Export command line:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">expdp foot/foot 
    directory=export_dir dumpfile=expfull.dmp logfile=expfull.log full=y </font> 
  </p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">&quot;expdp&quot; 
  tells the operating system to run the Data Pump Export utility. The parameters 
  that follow are used to control the job's execution. In our example, the account 
  and password are both &quot;foot&quot;, the file that will contain the output data 
  is &quot;expfull.dmp&quot;, the logfile is&quot;expfull.log&quot; , and a full 
  database export will be performed. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Most of the parameters 
  are simple, but a further explanation of the DIRECTORY parameter is in order. 
  Because a Data Pump job is executed in the database, you must 
  create a directory using a SQL statement on the database being accessed. If 
  you don't pre-create the directory, Oracle provides a default directory called 
  DATA_PUMP_DIR. That means that users are unable to fully qualify the output 
  file and log file as they were able to do in the non Data Pump versions of Export 
  and Import. You specify a fully qualified directory on the server when you create 
  the new database directory object and then you must grant access to that directory. 
  I'll show you examples of this in next week's blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Oracle manual 
  provides an entire listing of parameters that can be used as input to the Data 
  Pump Export and Import utilities. I can choose to export a single table, an 
  entire schema, parallelize the job's execution to name just a few of the options 
  available. I can exclude objects, include only a set of objects and transfer 
  data across the network directly from one database to another. Let's get started 
  by looking at just a few of the benefits Data Pump provides. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Performance 
  Benefits</b><br>
  Oracle documentation states that Data Pump's performance on data retrieval is 
  60% faster than Export and 15 to 20 times faster on data input than Import. 
  I have run some simple tests to roughly compare the performance of the older 
  versions of Export and Import to their Data Pump counterparts (also called Export 
  and Import) and have found the claims to be pretty close. But like all claims 
  &quot;your performance may vary - as mine did.&quot; I will say that Data Pump 
  is very fast compared to its ancestors. To keep the discussion from getting 
  confusing, I'll refer to the 10G Versions of Export and Import as Data Pump 
  Export and Data Pump Import.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle documentation 
  states that the following factors contribute to the performance improvements:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Parallelism 
    - Multiple worker processes are able to perform inter-table and inter-partition 
    work in parallel. This allows administrators to load and unload database tables 
    using parallel processing. Data Pump Import takes advantage of parallelism 
    to build indexes and load package bodies. <br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The most 
    beneficial aspect of Data Pump's parallel processing feature is that it is 
    dynamic. Administrators are able to attach (connect) to a Data Pump job that 
    is currently executing and dynamically alter the number of parallel processes 
    it uses. I'll show you how to dynamically activate parallelism in the demo 
    at the end of this blog.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DBAs that ran 
    Export and Import remotely (not logged on to the target server) were required 
    to transfer data to their local machines. Data pump Export reads and writes 
    files directly to the server and does not require any data movement over the 
    network to the client machine. Data Pump jobs are scheduled and processed 
    within the database engine as opposed to being a separate client-side process.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The format of 
    the Data Pump Export output files is very similar to the format of the data 
    stored in the Oracle tablespace datafiles. Sounds pretty logical to me. If 
    you want to transfer data from a table to a flat file and back into another 
    table, it makes sense to keep the format of the output datafile as close to 
    the format of a database datafile as possible. <br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Attaching and 
  Detaching</b><br>
  Because Data Pump runs in the database, you can detach the client from a Data 
  Pump job and reattach it at any time to monitor and/or change execution parameters. 
  The reattach can be performed as often as required during the job's lifecycle. 
  If there are numerous jobs running, you attach to a specific job by specifying 
  the job's name in the ATTACH command. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This feature allows 
  administrators to start a Data Pump job, detach from it and attach to it from 
  time to time to monitor its execution. Detaching from an active Data Pump job 
  will be a little strange at first because you have to hit the CONTROL- C combination 
  that we all use to try and break out of something that is stuck. First time 
  I did it, I thought &quot;I'll break out of this and the job will stop.&quot; 
  Wrong, as you will see in the demo, you can attach and detach as often as you 
  would like.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Job Status Information</b><br>
  Oracle provides the STATUS command to allow administrators to view the status 
  of the job they are attached to. It provides virtually all of the information 
  needed to monitor the job's execution. In addition you can use the STATUS="seconds" 
  command to obtain a status at timed intervals.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can also use 
  DBA_DATAPUMP_JOBS to view general information on all active Data Pump jobs and 
  DBA_DATAPUMP_SESSIONS to view information on user sessions that are attached 
  to active Data Pump jobs. In addition, administrators are able to use the tried-and-true 
  V$SESSION_LONGOPS to review how much work the Data Pump job has completed and 
  how much more work it needs to perform.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Space Estimation</b><br>
  Administrators are able to estimate the size of a Data Pump's Export output 
  file by using the ESTIMATE and ESTIMATE_ONLY parameters. I have heard comments 
  from some administrators that the estimates can be time consuming. Although, 
  I haven't performed this command on very large sets of data, it seemed to work 
  pretty well for me. The ESTIMATE parameter has two options:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ESTIMATE=STATISTICS 
    - Estimates the size of the output file by using the data dictionary statistics 
    associated with the objects being exported. The statistics will need to be 
    current for this option to be accurate.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ESTIMATE=BLOCKS 
    - Estimates the size of the output file by multiplying the number of blocks 
    each object being exported consumes times the database block size.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You would place 
  the parameter above on the command line. But if you only want to estimate the 
  size of the output file, you'll need to remember to use the &quot;ESTIMATE_ONLY=y&quot; 
  parameter in conjunction with the ESTIMATE parameter. If you don't you will 
  estimate the size of the output file and perform the export.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Interruptible 
  and Restartable</b><br>
  Data Pump jobs update a master table with all pertinent information pertaining 
  to the job being executed. The master table knows about the objects being exported 
  or imported and their location in the dump file set. As a result, a Data Pump 
  job can be restarted in the event of a planned or unplanned stoppage. The Data 
  Pump job accesses the master table to determine where to start and picks up 
  right where it left off. Administrators are able to use the STOP_JOB AND START_JOB 
  commands on the client to temporarily stop jobs and restart them when desired. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Database to 
  Database Transfers</b><br>
  Data Pump Import allows users to transfer data directly from a source database 
  to a target database without using disk as a temporary staging (and stopping) 
  point. You use the NETWORK_LINK command to specify a pre-created database link 
  that points to the source database. The server connects to the source database 
  specified in the database link, retrieves the data and writes it directly to 
  the target database. No dump files required!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recreates Schema 
  Users and Grants in Schema Mode</b><br>
  As stated previously, users have the option of choosing to export an entire 
  schema. Let's say you wanted to refresh an entire schema in a target database 
  from an export file you have available. The easy way to create all of the tables 
  from scratch is to drop the user with the cascade option, recreate the user, 
  grant the user the privileges they used to have and use Import utility to recreate 
  the schema objects. The problem with the older version of Import was that because 
  it didn't recreate the user (just the user's objects), the administrator was 
  forced to save creation and grant statements to recreate the user with the same 
  privileges it had before the drop was performed. A Data Pump schema import will 
  recreate the user and execute all of the associated grants, user password history, 
  etc.. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Fine-Grained 
  Selectivity</b><br>
  Being able to narrow the scope of the work performed is critical to most of 
  the administrative functions we perform. The tighter we can focus on the set 
  of objects we are administering, the more efficient and safer our administrative 
  activities will be. Data Pump provides several parameters that help administrators 
  narrow the scope of objects being processed: </font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Exclude - Notifies 
    Data Pump to exclude the specified object type from the export or import operation. 
    Multiple excludes can be used together to exclude more than one object type 
    from the operation. For example, &quot;EXCLUDE=function&quot; would exclude 
    all of the functions from a Data Pump operation. SQL-like syntax can be used 
    to provide even greater selectivity.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">INCLUDE - Notifies 
    Data Pump to include only those object types specified. All other object types 
    will not be included in the export or import operation. Like its EXCLUDE counterpart, 
    a SQL-like syntax can be used to provide greater selectivity.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CONTENT - Notifies 
    data pump to include only the metadata (CONTENT=METADATA_ONLY), only the data 
    (CONTENT=DATA_ONLY) or both metadata and data (CONTENT=ALL).<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">QUERY - Provides 
    users with the ability to use SQL statements to limit the rows processed by 
    the Data Pump operation. A limited version of this feature was available in 
    the older releases of Export and Import. The QUERY feature has been improved 
    by allowing the statement to be qualified with a table name to apply the statement 
    to a specific table. In addition the QUERY option can now be used in both 
    Data Pump Export and Import operations. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">FLASHBACK - 
    Allows Data Pump Export and Import to restrict data to a specific time in 
    the past. Being able to go &quot;back in time&quot; and retrieve data seems 
    to be an extremely valuable Data Pump feature to me. One example would be 
    to view before images of data that was changed incorrectly. If an application 
    program runs amok and changes data erroneously, the Data Pump utility could 
    be used to go back in time and populate data in a different schema to allow 
    the development team to identify the differences at their leisure.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Transformations</b><br>
  Older versions of Export and Import did not provide users with the ability to 
  change an object's storage characteristics. For example, there wasn't a real 
  simple way to export a set of object from one tablespace and import them into 
  another tablespace. There were a few tricks that could be performed to make 
  this happen but they certainly weren't as easy or as straightforward as Data 
  Pump's transformation features. <br>
  <br>
  Data Pump allows users to easily change the target tablespace that the objects 
  will be created in (REMAP_TABLESPACE), migrate objects from one schema to another 
  (REMPAP_SCHEMA) and move databases across platforms that have different file 
  system symantics (REMAP_DATAFILE).<br>
  <br>
  The TRANSFORM parameter can also be used to alter object creation DDL for specific 
  objects. For example, this synax:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TRANSFORM=SEGMENT_ATTRIBUTES:n:table</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Could be used to 
  change this object creation statement:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CREATE TABLE 
    foot.dept<br>
    (emp_id NUMBER(9), <br>
    first_name VARCHAR2(40), <br>
    last_name VARCHAR2(50))<br>
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING<br>
    STORAGE(INITIAL 10240 NEXT 10240 MINEXTENTS 1 MAXEXTENTS 500<br>
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)<br>
    TABLESPACE hr_data1 ;</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To this one when 
  running a Data Pump Import operation:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">CREATE TABLE 
    foot.dept<br>
    ( emp_id NUMBER(9), <br>
    first_name VARCHAR2(40), <br>
    last_name VARCHAR2(50));</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The transformation 
  feature provides numerous variations to allow administrators to tailor each 
  object's storage characteristics to meet their specific needs. <br>
  <br>
  <b>Generating DDL Files</b><br>
  Data Pump's Import utility can be used to create an output file containing DDL 
  that is ready for execution. The DDL statements are not executed during the 
  Data Pump operation so the target system will not be changed. <br>
  <b><br>
  Target Table Exists Operations</b><br>
  DBAs have been using Export and Import to populate existing tables with data 
  since the Export and Import utilities have been available. I was using Oracle 
  when the original Export and Import utilities first became available. I used 
  to be proud of this, now it makes me feel like I'm ready to retire. I have used 
  Export and Import dozens of times to load existing data tables. These new existing 
  object features are certainly helpful.<br>
  <br>
  Oracle has improved upon this functionality by providing administrators with 
  four different options when loading preexisting tables:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=SKIP 
    - Existing tables are bypassed if they already exist. No action is taken. 
    <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=APPEND 
    -Data Pump Import will append rows to the existing table. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=TRUNCATE 
    - Data Pump Import will truncate the existing table and load rows from the 
    source. <br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">TABLE_EXISTS_ACTION=REPLACE 
    - Existing tables will be dropped, recreated and then loaded from the source.<br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Demo!</b><br>
  Let's take a quick look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_196918984141/data_pump2.txt">attached 
  file</a> that shows a few of the new features that Data Pump provides. I've 
  added some comments along the way.</font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Wrapup</b><br>
  As I stated previously, the intent of this blog was not to be a primer on Data 
  Pump administration and execution. Rather, it was intended to provide you with 
  a laundry list of interesting and beneficial features to pique your curiosity. 
  Hopefully this curiosity will spur your to learn more about these utilities 
  (and read my upcoming blogs!). <br>
  <br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Redo Log File Sizing Advisor</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-05-12.4552485084</link>
                      <description>Correctly sizing online redo log files is critical if you want to achieve ‘maximus database performis’.  10G Grid Control provides a redo log file sizing advisor that provides administrators with an initial sizing recommendation.  I’ll begin this blog by showing you how to use the automatic sizing advisor and continue our discussion by explaining the manual process of determining the size of your online redo logs.</description>
                      <pubDate>Mon, 15 May 2006 05:10:42 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Checkpoints</b><br>
  Oracle's checkpoint mechanism ensures that data contained in the buffer cache 
  is safely written to disk on a regular basis. During a checkpoint, the DBWR 
  background process flushes dirty blocks contained in the buffer cache to the 
  database datafiles and the CKPT background process updates the datafile headers 
  with checkpoint information. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Data 
  that has been transferred to the data files no long requires redo for recovery. 
  The modified data buffers that have been flushed are marked as free and can 
  be reused for new data.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The two types of 
  Oracle checkpoints are full and incremental. Full checkpoints will occur when 
  the administrator manually issues a checkpoint command or the database is shutdown 
  using the normal, transactional or immediate options. A full checkpoint ensures 
  that all of the dirty blocks contained in the buffer cache are written to the 
  data files. The database is thought of as being in a synchronized state at this 
  time. Although a normal, or incremental, checkpoint does write blocks that have 
  been dirty the longest time to disk, it does not ensure that all of the dirty 
  blocks contained in the cache are written to the data files. Oracle technicians 
  coined the phrase &quot;lazy checkpointer&quot; to describe incremental checkpoints. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">One (out of several) 
  reasons Oracle can fire an incremental checkpoint is when it switches from one 
  log group to another. When Oracle fills a log group, a checkpoint is fired and 
  Oracle then begins writing to the next redo log group. This continues in a circular 
  fashion; when all log groups are filled, Oracle reuses the first group. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A common rule of 
  thumb is to adjust the redo log file's size so that Oracle performs a log switch 
  every 15 to 30 minutes. Log switches that occur more frequently may have a negative 
  impact on performance. Log switches that occur several times a minute have a 
  definite impact on database performance. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Using the Redo 
  Log File Size Advisor in Oracle 10G</b><br>
  If you have the FAST_START_MTTR target parameter set for your database, you 
  will be able to use 10G Grid Controls' redo log file advisor to help you determine 
  the initial size of your redo log files.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We start by activating 
  10G Grid Control or 10G Database Control and navigating to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_124552485084/01_admin_panel.gif">Administration 
  Home page.</a> Since I'm using an early version of Database Control in this 
  exercise, those of you using a later version of Grid or Database Control may 
  see something a little different. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When 
  I click on the Redo Log Group navigation link, Database Control responds by 
  displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_124552485084/02_activate_advisor.gif">Redo 
  Log Groups Main Administration page</a>. Notice that I have selected &quot;Sizing 
  Advice&quot; from the drop down menu. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When I do that, 
  you'll notice that Database Control responds by <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_124552485084/03_advisor_error_2.gif">displaying 
  an error message</a> telling me that setting FAST_START_MTTR target is required 
  to be set before the tool will offer advice on the proper sizing of the online 
  redo logs. If you would like to learn more about FAST_START_MTTR_TARGET, please 
  refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_04_20.2949600305">&quot;A 
  Few More of Oracle 10G's Automatic Features.&quot;</a></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_124552485084/04_advisor_message.gif">next 
  screenshot</a> shows sizing advice from 10G Grid Control for a database that 
  does have FAST_START_MTTR_TARGET set. 10G Grid Control is advising me that the 
  optimal size for the online redo log group files is 104 megabytes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You don't have 
  to use the 10G Database/Grid Control SGTs (Sissy GUI Tools) to provide this 
  advice. If you have FAST_START_MTTR target set, the sizing advice will be contained 
  in the OPTIMAL_LOGFILE_SIZE column in the dynamic performance table V$INSTANCE_RECOVERY.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you look at 
  the Oracle documentation, every section that discusses the Redo Log File Size 
  Advisor provides the same advice &quot;It is recommended that the user configure 
  all online redo logs to be at least this value.&quot; I think the key words 
  are &quot;at least this value.&quot; Personally, I use the recommended value 
  as a starting point and then double-check the advisor's advice by performing 
  a manual sizing review of the redo log files.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Manually Determining 
  the Optimal Redo Log File Size</b><br>
  Checking messages in the alert log is another easy way to determine how fast 
  Oracle is filling and switching logs. Here's an example of a production database's 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_05_124552485084/alert_log.gif">alert 
  log</a> that shows redo log switches occurring too frequently. Notice that the 
  timestamps show that the logs are switching every minute or so.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the following 
  messages are found, you can be sure that performance is definitely being affected:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thread 1 advanced 
  to log sequence 248 <br>
  Current log# 2 seq# 248 mem# 0: /orant/oradata/logs/redolog2a.log<br>
  Thread 1 cannot allocate new log, sequence 249<br>
  <b>Checkpoint not complete</b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The &quot;checkpoint 
  not complete&quot; messages are generated because the logs are switching so 
  fast that the checkpoint associated with the log switch isn't complete. During 
  that time, Oracle's LGWR process has filled up the other redo log groups and 
  is now waiting for the first checkpoint to successfully execute. It can't overwrite 
  the contents of the redo log until the information covered by that log is flushed 
  to the data files. Oracle will stop processing until the checkpoint completes 
  successfully. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Performance can 
  be dramatically improved by increasing the log sizes so that logs switches occur 
  at the recommended interval of 15 to 30 minutes. Identify the current size of 
  the redo log members from V$LOG, record the number of log switches per hour 
  and increase the size of the log to allow Oracle to switch at the recommended 
  rate of one switch per 15 to 30 minutes. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For example, if 
  the database log size is 1 megabyte and you are switching logs every 1 minute, 
  you will need to increase the log size to 30 megabytes in size to allow it to 
  switch every 30 minutes.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The problem is 
  that many applications have workloads that vary dramatically throughout each 
  24-hour time-period. In addition, application-processing workloads may vary 
  according to the days of the calendar month. Month-end and mid-month processing 
  may increase the number of changes occurring in the database. This higher level 
  of activity may cause the redo logs to be filled much more quickly than during 
  off-peak times. The DBA must make sure that the on-line redo logs don't switch 
  too often during periods of high activity and switch often enough during times 
  of low processing workloads. In addition, administrators must also be concerned 
  about how the size of the online redo logs affect instance recovery. The less 
  checkpoints taken, the longer instance recovery will take.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The LOG_CHECKPOINT_TIMEOUT, 
  LOG_CHECKPOINT_INTERVAL and FAST_START_MTTR_TARGET parameters can help to decrease 
  the time of instance recoveries. For more information, please refer to my blog 
  titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_04_20.2949600305">&quot;A 
  Few More of Oracle 10G's Automatic Features.&quot;</a> </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Data Loss</b><br>
  It is important to note that these parameters will not reduce the amount of 
  data lost in certain database recovery scenarios. For example, let's say we 
  lose a single database datafile. We restore the datafile from the backup and 
  begin the recovery process. Since we will be recovering the datafile up to the 
  current point-in-time, we'll need all of our archived and online redo logs that 
  were active since the backup was taken. We'll use all of the information contained 
  in the archived and online logs to &quot;redo&quot; all of the changes that 
  took place. The only data that will be lost will be from transactions that were 
  in-flight (active) when the failure occurred.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If a lost or damaged 
  archived or online redo log is used as input to our database recovery, the amount 
  of data lost will be directly proportional to the amount of time that redo log 
  or logs were active. We will be forced to restore all of the database datafiles 
  from the backup and recover the database up to the bad or missing archived or 
  online redo log. All data after that point will not be recovered.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In case of a bad 
  archive log, the farther back in time the bad archive log corresponds to, the 
  more data that will be lost. Since we now know that the size of the redo logs 
  determine how long the log will be active, the larger the log, the more data 
  loss there will be if we use a bad or missing log as input to our recovery.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">That's why administrators 
  multiplex both their online and archived redo logs. They ensure that their online 
  redo log groups have multiple members on different disk drives and send their 
  archives off to more than one destination. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have seen administrators 
  size their online redo logs to accommodate their highest periods of activity 
  and create PL/SQL programs to ensure that the logs switch every 15 to 30 minutes 
  during times when activity is low. The intelligence in the programs vary from 
  just waking up and doing a log switch to checking to see when the last log switch 
  occurred before executing the log switch command. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I have also seen 
  the initialization parameter ARCHIVE_LAG_TARGET be used to force log switches 
  at regular intervals. Although the parameter is intended to control the amount 
  of data that is lost in a standby database environment during a catastrophic 
  failure scenario, some savvy administrators set their online redo logs to accommodate 
  peak activity and set ARCHIVE_LAG_TARGET to ensure the logs switch at regular 
  intervals during lower activity time periods.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Whatever method 
  you use, one of the keys to good database performance is to ensure that you 
  aren't switching logs at too fast of a rate. Use the sizing advice provided 
  above to help you on you way.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading 
  (and happy sizing),</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot</font></p>
<p></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>SQL Access Advisor Revisited</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-05-05.3335525140</link>
                      <description>Although I provided a quick demo on how to use 10G Grid Control’s SQL Access Advisor in an earlier blog, I think it may be beneficial for us to take a more in-depth look at this powerful utility.  We’ll peel back the covers to find out what the SQL Access Advisor actually does when you activate it as well as the benefits it provides. I think you will find that the SQL Access Advisor is a strong analysis tool that deserves your consideration.   </description>
                      <pubDate>Mon, 08 May 2006 06:09:57 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>Activating 
  the SQL Access Advisor by Grid Control vs Command Line</b><br>
  I highly suggest you read my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_06.5201081269">&quot;10G SQL Access Advisor&quot;</a> before you continue. It provides a step-by-step 
  instruction guide on how to run the SQL Access Advisor using 10G Grid Control. 
  I also describe the various types of workloads that can be used as input to 
  the advisor. Lastly, I review the different types of recommendations generated 
  by the utility. </font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G Grid Control 
  automates the entire process. Administrators are able to quickly and easily 
  capture or generate workloads, use them as input to the SQL Access Advisor and 
  view the recommendations, along with their associated benefit ranking. The output 
  also contains links to the DDL statements that administrators can use to implement 
  the recommendations. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Like most of the 
  advisors in Oracle, you can also activate the SQL Access Advisor by executing 
  the PL/SQL package DBMS_ADVISOR. The Oracle10G Database Performance Tuning Guide 
  dedicates an entire chapter to the SQL Access Advisor. After comparing the steps 
  necessary to run the advisor using the command line interface to the quick and 
  easy GUI interface provided by 10G Grid Control, I think I'll 
  make every effort to use the 10G Grid Control tool to activate the SQL Access 
  Advisor. Stating that the command line interface is more labor intensive than 
  its Grid Control counterpart is like stating that the Titanic &quot;sprung a 
  small leak.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But the command 
  line interface does provide users with the ability to tune a single SQL statement. 
  The DBMS_ADVISOR.QUICK_TUNE procedure allows administrators to quickly and easily 
  create a task for a workload that consists of one statement. The SQL Access 
  Advisor will perform the same analysis and generate the same recommendations 
  as it does with larger workloads. The Quicktune utility accepts a user-defined 
  task name that identifies the task and a SQL statement to be analyzed. Here's 
  an example of how to run Quicktune on a single SQL statement:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
      EXECUTE DBMS_ADVISOR.QUICK_TUNE(DBMS_ADVISOR.SQLACCESS_ADVISOR, 'my_first_quicktune', 
      'SELECT * from scott.dept where dept_id=140'); </font> </p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  In addition, the command line method allows you to import Oracle Database 9i 
  Summary Advisor workloads using the IMPORT_SQLWLD_SUMADB procedure.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Advice from 
  your friendly ex-Oracle Instructor</b><br>
  Please remember that the quality of the output produced by the SQL Access Advisor 
  will depend upon the quality of input. Make sure that the tables and indexes 
  being analyzed have up-to-date statistics. You do this by generating statistics 
  using the Oracle supplied package DBMS_STATS. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In addition, we 
  know that an index has the possibility of influencing all SQL statements that 
  access the table that the index is built upon. An index that provides fast access 
  for one query may negatively impact other statements. Analyzing larger workloads 
  will produce index and materialized view recommendations that take all of the 
  queries contained in the representative workload into consideration. The larger 
  the workload you use as input to the SQL Access Advisor, the more high-quality 
  the recommendations will be. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is important 
  to note that the SQL Access advisor does generate some overhead during analysis. 
  You need to balance the size of the workload with the impact the analysis 
  process will have on database performance. My personal preference is to schedule 
  my larger workload analysis during off-peak hours. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Access Advisor 
  Input</b><br>
  Before we continue, we need to understand what a task and a workload is. They 
  are used together to generate SQL Access Advisor recommendations and can be 
  created using either Grid Control or the command line interface.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Tasks </b><br>
  A task is an object that contains the setup and execution options of a particular 
  SQL Access Advisor job. It allows administrators to tailor an evaluation to 
  meet their specific requirements and can be used over and over again. A task 
  can be created using Grid Control or by command line by executing the DBMS_ADVISOR.CREATE_TASK 
  procedure. Command line users would then use the DBMS_ADVISOR.SET_TASK_PARAMETER 
  to set attributes that control the workload collection, tuning analysis and 
  final reporting.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">These attributes 
  provide a myriad of customization options to the administrator. You are able 
  to establish default owner names, tablespaces and naming conventions for object 
  creation recommendations. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The attributes 
  also allow administrators to use workload filters to restrict the tuning analysis 
  to a set of SQL statements that meet a given criteria. Administrators are able 
  to filter on the module name, SQL statement syntax, table and schema names or 
  the account executing the statement. In addition, administrators have the 
  option of limiting the analysis to the top &quot;n&quot; resource consumers 
  based on buffer gets, disk reads, executions, etc.. There are multiple filter 
  options available that can be combined to narrow the scope of the analysis and 
  recommendations. For a complete list of task attribute settings, please refer 
  to the DBMS_ADVISOR package description contained in the 10G Oracle Database 
  PL/SQL Packages and Types Reference Documentation Manual.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Workloads</b><br>
  Workloads consist of SQL statements and statistics and attributes that describe 
  those statements. Workloads are classified as either full (representative of 
  the entire application) or partial (representative of a portion of the application's 
  entire workload). One important difference between full and partial workloads is the SQL Access Advisor will not 
  generate drop recommendations for partial workloads. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you read my 
  previous blog on the SQL Access Advisor, you'll know that the advisor is able 
  to accept several different types of workloads as input. The input workload 
  can consist of a single SQL statement, SQL statements currently in the SQL Cache, 
  a user defined set of SQL statements contained in a workload table or a Grid 
  Control generated SQL Tuning Set. The SQL Access Advisor is also able to generate 
  a hypothetical workload for a specified schema.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Templates</b><br>
  Once you fine tune your task and workload, you can create a template to simplify 
  future operations. Both tasks and workloads can be used to create templates. 
  The template can be created using either Grid Control or command line.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Analysis</b><br>
  The SQL Access Advisor performs an in-depth analysis on each statement contained 
  in the workload that is not eliminated by the workload filtering options. The 
  utility reviews every clause contained in the statement for efficiency. If it 
  identifies that a statement accesses a table using a particular column, it will 
  review the statistics on the accessed table to determine if a new index is warranted. 
  Conversely, if it finds an index that is not used, it may generate a recommendation 
  to drop the index in question. The SQL Access Advisor will also review the index 
  types. If it finds that an index should be a B-Tree, as opposed to a bitmap, 
  it will make a recommendation to change the type of the index. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The SQL Access 
  Advisor will also evaluate the workload for queries that would benefit from 
  materialized views. In releases previous to Oracle8i, administrators used summary 
  tables to increase SQL performance for data warehousing applications. A summary 
  table stores the pre-computed results of data calculations, such as sums, counts, 
  averages and data table joins. It is more efficient to access a pre-computed 
  result instead of computing the desired result from detail data every time a 
  query is executed. In Oracle8i and later releases, administrators are able to 
  use materialized views to provide the same benefits as summary tables. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Access Advisor 
  Output</b><br>
  The output the advisor produces depends upon the extent of analysis performed. 
  Administrators are able to choose from:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Comprehensive 
    - The SQL Access advisor reviews materialized views, materialized view logs 
    and indexes. The advisor will assume that the SQL being analyzed is representative 
    of the application's general workload that is being processed during the course 
    of normal day-to-day operations.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Limited - The 
    SQL Access Advisor will assume that the workload consists of poorly performing 
    SQL statements. The advisor will provide advice for improving the performance 
    of that portion of the total workload.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The types of recommendations 
  provided depend upon the extent of analysis performed:</font></p>
<table width="75%" border="1" align="center">
  <tr bgcolor="#CCCCCC"> 
    <td width="57%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b></font></div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Comprehensive 
        </b> </font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Limited</b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create 
        new index </font></div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create 
        new materialized view</font></div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Create 
        new materialized view log</font></div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%" height="22"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Drop 
        unused index</font></div>
    </td>
    <td width="11%" height="22"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%" height="22"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">No</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%" height="20"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Drop 
        unused materialized view</font></div>
    </td>
    <td width="11%" height="20"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%" height="20"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">No</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Change 
        type of existing indexes</font></div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">No</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add 
        columns to end of existing indexes</font></div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
  </tr>
  <tr> 
    <td width="57%"> 
      <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add 
        columns/clauses to materialized view</font> log</div>
    </td>
    <td width="11%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
    <td width="32%"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></div>
    </td>
  </tr>
</table>
<P></P>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For those running 
  the SQL Access Advisor via command line, Oracle provides a series of data dictionary 
  views that allow administrators to view the output generated from the SQL Tuning 
  Advisor. The view that contains the actual recommendations is DBA_ADVISOR_RECOMMENDATIONS. 
  Oracle also provides the GET_TASK_SCRIPT procedure that produces the output 
  in a easy to read, graphical display. The display contains links to individual 
  SQL statements which allows administrators to quickly see which SQL statements 
  benefit from a recommendation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Grid Control users 
  are able to view the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/acess_advisor_output_1.gif">Summary 
  Output page</a> to view recommendations that are sorted by the benefit they 
  provide. Clicking on the number on the far left side of the tabular output drills 
  down into the specific recommendation. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Grid control's 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/acess_advisor_output_2.gif20">recommendation 
  details page</a> displays links for the specific objects that will be created 
  if the recommendation is implemented. The bottom of the page displays the SQL 
  statements that will be improved by the recommendation. Notice that the output 
  DDL uses the table schema as default if none is specified. The page also displays 
  the space that will be consumed if the object is created. Finally, users can 
  hit the OK button to begin creating the recommended objects or save the DDL 
  for execution at a later time. When you click on the materialized view link, 
  10G Enterprise Manager displays the DDL for the recommended object.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  I think you'll find that the SQL Access Advisor provides administrators with 
  a powerful performance analysis tool. The intent of this blog was to pique your 
  curiosity on the tool and the benefits it provides. The Oracle documentation contains a wealth of knowledge 
  to continue your education.<br>
  </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Automatic Tuning Optimizer</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-04-28.3742757902</link>
                      <description>In a few of my previous blogs, I provided instructions on how to use 10G Grid Control to run the SQL Tuning Advisor and the SQL Access Advisor.   In this next couple of blogs, we’ll peel back the layers and find out exactly what happens when these utilities are executed. &lt;BR&gt;&lt;BR&gt;In part one of this multi-part blog on the advisors, we take a look at how the SQL Tuning Advisor uses the optimizer to generate its tuning recommendations.  We’ll also cover the types of recommendations it provides and how it comes to those conclusions.</description>
                      <pubDate>Mon, 01 May 2006 05:27:24 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Could manual SQL 
tuning become a thing of the past? I hope so. When Oracle documentation describes 
the benefits that the SQL Tuning Advisor provides, it states &quot;the automatic 
process replaces manual SQL tuning, which is a complex, repetitive, and time-consuming 
function.&quot; </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I 
agree wholeheartedly. I have been tuning SQL for a looonnng time. I also enjoy 
the tuning process. But the more tools that Oracle can provide me to reduce the 
amount of time I spend tuning SQL, the happier I will be.</font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle has integrated 
  a new feature into the optimizer that allows it to provide automatic SQL tuning. 
  The optimizer has been enhanced to perform in-depth tuning of SQL statements 
  that are fed to it by the SQL Tuning Advisor. For more information on how to 
  run the SQL Tuning Advisor, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">&quot;The 
  SQL Tuning Advisor.&quot; </a> </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In that blog, I 
  stated that it is the optimizer's job is to create the most high performance 
  access path in the shortest time possible. It's easy to understand how these 
  two objectives can be viewed as &quot;mutually exclusive.&quot; In a perfect 
  world, you would give the optimizer as much time as it needs to create the most 
  optimal access path. In the real world, you need to get the statements executing 
  as quickly as possible. That includes optimization. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since the SQL Tuning 
  Advisor does not have time constraints, the tool can take as much time as necessary 
  to optimize the statement. This allows the optimizer to generate high-quality 
  recommendations. The premise is the more time it spends performing the analysis, 
  the higher the quality of recommendations it will provide. The SQL Tuning Advisor 
  Home Page provides a drop down menu that allows the administrator to &quot;throttle&quot; 
  the amount of time the utility spends optimizing the statement.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In tuning mode, 
  the optimizer is able to perform a higher level of analysis than in normal mode 
  where it is required to generate access paths as quickly as possible. The output 
  the optimizer produces in normal mode is an access path. The output the optimizer 
  produces in tuning mode is a series of recommendations. Those recommendations 
  include information justifying why it generated those recommendations. This 
  prevents the advisor from becoming a &quot;black hole&quot; that pumps out advice 
  without supporting information. The recommendations may include collecting statistics 
  on objects, new index creation, restructuring the SQL statement or the creation 
  of a SQL Profile to create a more optimal access path. When the optimizer is 
  called by the SQL Tuning Advisor, Oracle refers to the optimizer as the Automatic 
  Tuning Optimizer or ATO.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>The Four Types 
  of Analysis Performed by the ATO</b><br>
  When the SQL Tuning Advisor activates the ATO, the optimizer performs four types 
  of in-depth analysis:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Statistics Analysis</b><br>
  Craig Mullins, well known DB2 Guru, provides an excellent description of a database optimizer in <a href="http://www.craigsmullins.com/cm-book.htm">The 
  DB2 Developer's Guide</a> &quot;the optimizer is equivalent to an expert system. 
  An expert system is a standard set of rules when combined with situational data 
  can return an expert opinion.&quot; </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The cost based 
  optimizer uses statistics generated by the DBMS_STATS procedure as the situational 
  data when creating its expert opinion on which access path to the data is most 
  optimal. These statistics are stored in the data dictionary and describe the 
  data object's space characteristics, data uniqueness and data distribution.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The cost-based 
  optimizer is only as good as the statistics it uses as input. Statistics collections 
  should be run on a regular basis to ensure that the statistics are current (representative 
  of the data being accessed). The optimizer is then able to create a highly accurate 
  access path that is based on the least cost. If statistics are not available, 
  the optimizer uses an algorithm to calculate the statistics, which often leads 
  to &quot;less than optimal&quot; access paths. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The ATO checks 
  all of the objects accessed by the SQL statement evaluated for missing or stale 
  statistics. The ATO will make recommendations to generate statistics for objects 
  that have statistics that are missing or stale. In addition, the ATO will collect 
  auxiliary information to compensate for substandard statistics.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Profile 
  Generation Analysis</b><br>
  Before we begin discussing how the ATO creates a SQL Profile, a quick comparison 
  between Stored Outlines and SQL Profiles is in order. A common misconception 
  is that a SQL Profile is like a Stored Outline. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A Stored Outline 
  is a set of optimizer hints that are attached to a SQL statement that freezes 
  its access path. When the Stored Outline is enabled, Oracle uses the stored 
  hints to generate the access path. Administrators are able to manually change 
  the access path of a given statement by using the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_04_277298144282/outline_editor2.gif">Outline 
  Management Editor</a> in Oracle Enterprise Manager. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Another method 
  to change the access paths is to manually update the hints that are attached 
  to the SQL statement. Since the hints are stored in a table, administrators 
  are able to use SQL DML statements to alter them. I just find the SGT (Sissy 
  GUI Tool) method to be so much easier that I use Oracle Enterprise Manager religiously 
  to change a Stored Outline's access path. For more information on Stored Outlines, 
  please refer to my blog appropriately titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_04_27.7298144282">&quot;Optimizer 
  Plan Stability in Oracle9i&quot;</a>. Although the title says Oracle9i, the 
  information is still pertinent in 10G.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A SQL Profile is 
  a collection of information gathered by the ATO that is specific to a particular 
  SQL statement. The information is stored in the data dictionary and is used 
  by the optimizer to make more informed, and more intelligent, access path decisions 
  for that statement.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As stated previously, 
  we expect the optimizer to generate access paths as quickly as possible. As 
  a result, the optimizer often makes estimates on cardinality and selectivity 
  to generate the access path. During the SQL Profile analysis phase, the ATO 
  will verify predicate selectivity, cardinality and optimizer settings. The ATO 
  accomplishes this by:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Dynamically 
    sampling the data being accessed and applying the predicates used in the SQL 
    to the sampled data. If the ATO determines that the difference between its 
    original estimates and the statistics generated by the dynamic sampling is 
    large enough to warrant a correction, it will change its original estimates 
    to more accurately reflect the data being accessed.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Decomposing 
    the SQL statement into fragments and executing the fragments to gather access 
    path and performance related information.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Evaluating the 
    SQL statement's past execution history. One of the outcomes of this evaluation 
    could be a change in the optimizer mode (first rows vs all rows) for the statement 
    being analyzed</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you take a look 
  at this <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/7_recommendations_page_2.gif">screenshot</a> 
  from my blog on the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">SQL 
  Tuning Advisor</a>, you will see the ATO recommending that I accept a SQL Profile.If 
  I accept the tool's recommendation, the optimizer will use the information contained 
  in SQL Profile in addition to the normal database statistics to generate an 
  optimal execution plan. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Unlike its Stored 
  Outline counterpart, a SQL Profile does not freeze a statement's access path. 
  As the data in the objects being accessed changes as a result of normal database 
  operations, the information contained in the SQL Profile may become outdated. 
  This could result in less than optimal access paths being generated. This problem 
  can be corrected by running the SQL Tuning Analyzer again to regenerate fresh 
  information or removing the SQL Profile altogether.<br>
  <br>
  <b>Access Path Analysis</b><br>
  When the SQL Tuning advisor activates the ATO to perform detailed SQL analysis, 
  it also provides advice on indexes. When the SQL Tuning Advisor generates an 
  index recommendation, the output usually includes a recommendation to run the 
  SQL Access Advisor. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We know that an 
  index has the possibility of influencing all SQL statements that access the 
  table that the index is built upon. An index that provides fast access for one 
  query may negatively impact other statements. The scope of analysis the ATO 
  performs does not include a global review of how the new index will affect the 
  entire SQL workload. As a result, the SQL Tuning Analyzer will often recommend 
  that the SQL Access Advisor be run on a representative SQL workload along with 
  the query that is being analyzed. The result is a much more global set of index 
  recommendations that takes all of the queries contained in the representative 
  workload into consideration.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>SQL Structure 
  Analysis</b><br>
  The ATO also examines the structure of the statement being analyzed to determine 
  if it can be coded differently to obtain a more optimal access path. During 
  analysis, the ATO compares the structure of the SQL statement against a set 
  of coding best practices. The ATO does not rewrite the query, but will provide 
  a recommendation for an alternative SQL statement structure that it thinks would 
  generate a more optimal access path. The ATO attempts to identify design mistakes 
  such as Cartesian products, predicates that don't match the datatype of indexed 
  columns, UNION vs UNION All etc.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  The SQL Tuning Advisor, SQL Access Advisor and the ATO combine to make a powerful 
  tuning tool that database administrators can use to ensure optimal SQL execution 
  performance. The future of Oracle database tuning will be administrators interpreting 
  and implementing the recommendations generated by the advisors and ADDM. I absolutely 
  and firmly believe that the advisors and ADDM will become more intelligent in 
  their recommendations. As their intelligence increases, the usage of statistics 
  dumps to attempt to improve database performance will decrease. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading,<br>
  Chris Foot<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>A Few More of Oracle 10G's Automatic Features </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-04-20.2949600305</link>
                      <description>10G provides so many automatic features that it should have been called 10A for Automatic. Over the course of this blog, I have covered many of the automated features that were introduced in Oracle's latest and greatest release. There are a couple of automatic features that I haven't covered yet that warrant further investigation. We'll discuss automatic undo retention tuning, automatic checkpoint tuning and automatically tuned multi-block reads.</description>
                      <pubDate>Mon, 24 Apr 2006 05:43:49 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Before 
  we begin our discussion of these three features, I thought it might be beneficial 
  to provide you with a few links to some of my other blogs that discuss 10G's 
  automatic features:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_02_11.0939245208">10G 
  Automatic Statistics Generation</a> - Discusses how the 10G database automatically 
  generates performance statistics and stores them in a repository for analysis.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_11_24.2858305991">Automatic 
  Tuning Recommendations</a> - I create a not-so mythical performance problem 
  and use the output from ADDM and the advisors to provide the diagnostic information 
  and recommendations I need to solve the issue.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2006_01_28.5061385140">Automatic 
  Storage Management</a> - An overview on Oracle's disk management system.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_19.0090015270">Automatic 
  Shared Memory Management</a> - A detailed discussion on 10G's Automatic Shared 
  Memory management feature and memory advisors.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_19.0090015270">10G 
  OEM Grid Control's Automatic Alert Notification System</a> - Information on 
  how to create automatic notifications that allow database administrators to 
  identify (and correct) performance and availability issues before they negatively 
  impact the database environment.<br>
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry.2005_11_20.132916373920">The 
  Changing Role of the DBA</a> - My opinion on the notion that all of these automated 
  features will be reducing the need for experienced DBAs blogs. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Automatic Retention 
  Tuning</b><br>
  Most of us thought that automatic undo would be the solution to all of our before 
  image management problems. Certainly, before image administration has been simplified 
  by reducing the number of tuning knobs to one (UNDO_RETENTION). The UNDO_RETENTION 
  parameter specifies the length of time that undo data for committed transactions 
  will be kept available to provide read consistency. But sizing the UNDO_TABLESPACE 
  to hold the amount of before images generated during the time period specified 
  in the UNDO_RETENTION parameter can still be a challenge.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The goal we are 
  trying to accomplish is to set the UNDO_RETENTION parameter and size the undo 
  tablespace to ensure that we don't run out of space in the undo tablespace and 
  our queries don't receive the dreaded ORA-01555 &quot;Snapshot too old&quot; 
  error messages.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ORA-01555 errors 
  occur when a transaction is unable to successfully read a before image of data 
  to maintain read consistency. Read consistency ensures that all data returned 
  by a query comes from the same point-in-time (query start time). If a block 
  of data changes after the query has started, Oracle will read the before, or 
  undo, image of the data to maintain a read consistent view. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To guarantee read 
  consistency, Oracle returns the ORA-01555 error if it cannot retrieve the before 
  image of the changed data block. This occurs because the undo block has been 
  flushed out of the system to allow more current before images to be stored. 
  The less undo space you have and the lower your UNDO_RETENTION period is, the 
  more often this problem will occur.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The trick is to 
  balance the size of the undo tablespace with the amount of undo retention you 
  need to satisfy your long-running queries. But this is easier said than done. 
  Database applications, by their nature, are very dynamic. It is hard to predict 
  how much undo will be generated for a particular time period. Sizing the undo 
  tablespace and setting the UNDO_RETENTION time period is certainly simpler for 
  small databases that don't have a lot of activity. But the problem becomes much 
  more complex on systems that have a high level of update activity and long-running 
  queries.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle10G automatically 
  tunes the amount of undo data kept available. It is important to note that the 
  automatic tuning process will take place even if the UNDO_RETENTION parameter 
  is set. The database will use the value contained in the UNDO_RETENTION parameter 
  as input to the tuning process. Oracle10G records the times of the longest-running 
  queries and the amount of undo generated to automatically tune the UNDO_RETENTION 
  parameter. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The value of the 
  UNDO_RETENTION parameter also depends on the undo datafile's AUTOEXTEND setting:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Undo datafile 
    is autoextensible</b> - The undo retention period is set to a time that is 
    slightly longer than the longest-running query.  The UNDO_RETENTION parameter must be set when using the autoextend option.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Undo datafile 
    is fixed </b>- The undo retention period is set to obtain the maximum amount 
    of undo retention allowed by the amount of free space available in the undo 
    tablespace datafile. Oracle will ignore the UNDO_RETENTION initialization 
    parameter setting unless retention guarantee is enabled. If retention guarantee 
    is enabled, Oracle will not let the undo retention time period fall below 
    the value specified in the UNDO_RETENTION parameter. If undo space becomes constrained, Oracle will let the transactions fail before it will flush before images out that are within the undo retention time period.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Checkpoints, 
  Performance and Instance Recovery</b><br>
  Oracle's checkpoint mechanism ensures that data contained in the buffer cache 
  is safely written to disk on a regular basis. During a checkpoint, the DBWR 
  background process flushes dirty blocks contained in the buffer cache to the 
  database datafiles and the CKPT background process updates the datafile headers 
  with the checkpoint information.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The point-in-time 
  identified by the last successful flush of the buffer cache is called the Checkpoint 
  Position. Oracle knows that all of the data past the point in time identified 
  by the Checkpoint Position does not need to be replayed during instance recovery. 
  That data has already been flushed to the datafiles. If the database crashes 
  and an instance recovery is required, the instance recovery process will begin 
  at the Checkpoint Position. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
  If you would like to learn more about how instance recovery is performed, please 
  refer to an <a href="/oracle/or_articles/foot1/index.html">article</a> 
  I wrote on the database synchronization process. Scroll through the article 
  until you see the title 'Oracle Internals'. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are a handful 
  of parameters that manually control when a checkpoint is performed in Oracle10G:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>LOG_CHECKPOINT_TIMEOUT 
    </b>- Specified in seconds. This parameter ensures that the Checkpoint Position 
    does not lag beyond the last write to the redo log (sometimes called the tail) 
    by the value specified. For example, a LOG_CHECKPOINT_TIMEOUT value of 300 
    will tell Oracle to keep the Checkpoint Position no more than 300 seconds 
    behind the last write to the redo log. Setting this parameter to 0 disables 
    time-based checkpoints.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>LOG_CHECKPOINT_INTERVAL</b> 
    - Specified in system blocks, not Oracle blocks. It ensures that the Checkpoint 
    Position does not lag beyond the last write to the redo log by the specified 
    value. For example, a LOG_CHECKPOINT_VALUE of 500 will tell Oracle to keep 
    the Checkpoint Position no more than 500 blocks behind the last write to the 
    redo log. Setting this parameter to 0 disables block-based checkpoints.<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>FAST_START_MTTR_TARGET</b> 
    - Specifies the amount of time, in seconds, that Oracle will take to perform 
    instance recovery. The database will adjust the frequency of checkpoints to 
    ensure that instance recovery will take no longer than the value specified. 
    This parameter is the more optimal method of defining instance recovery time 
    because it sets the actual amount of time the instance recovery will take. 
    Oracle currently recommends that you use this parameter, as opposed to the 
    previous two parameters to define the amount of time instance recovery takes. 
    <br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A checkpoint is 
  a relatively expensive process. Checkpoints that are taken too frequently have 
  a tendency to &quot;monopolize finite database resources&quot; (one of my favorite 
  terms). The key to optimal database performance is to balance fast instance 
  recovery with optimal database performance. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G Automatic 
  Checkpoint Tuning</b><br>
  If you do not set FAST_START_MTTR_TARGET, or set it to a very large value, Oracle10g 
  will provide automatic checkpoint tuning. The database will write out dirty 
  blocks from the cache as fast as possible without negatively impacting database 
  performance. The DBA is no longer required to set any of the aforementioned 
  checkpoint parameters. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Automatic DB_FILE_MULTIBLOCK_READ_COUNT 
  Tuning</b><br>
  The Oracle database improves the performance of tablescans by increasing the 
  number of blocks read in a single database I/O operation. If your SQL statement 
  is going to read all of the rows in a table, it makes sense to return as many 
  blocks as you can in a single read. In releases prior to Oracle10G R2, administrators 
  used the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter to tell Oracle 
  how many block to retrieve in the single I/O operation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But setting the 
  DB_FILE_MULTIBLOCK_READ_COUNT parameter too high can affect access path selection. 
  Full table scans use multi-block reads, so the cost of a full table scan depends 
  on the number of multi-block reads required to read the entire table. The more 
  blocks retrieved in a single multi-block I/O execution, the more favorable a 
  tablescan looks to the optimizer. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In releases prior 
  to Oracle10G R2, the permitted values for DB_FILE_MULTIBLOCK_READ_COUNT were 
  platform-dependent. The most common settings ranged from 4 to 64 blocks per 
  single multi-block I/O execution.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle 10G R2, 
  Oracle defaults the DB_FILE_MULTIBLOCK_READ_COUNT to the maximum number of blocks 
  that can be effectively read. Although this value is also platform-dependent, 
  Oracle documentation states that it is 1 MB for most platforms. This 1 MB size 
  allows much more data to be read in a single operation in 10GR2 than previous 
  releases. In addition, this larger value does not make tablescans look more 
  favorable to the optimizer. As a result, it is now recommended to not set the 
  DB_FILE_MULTI_BLOCK_READ_COUNT parameter and let the database determine the 
  number of blocks read in multi-block I/O operations. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  As you can see, Oracle10G automates many of the features we used to have to 
  wrestle with on a daily basis. The automated features reduce the amount of time 
  we spend performing mundane administrative actvities and allows us to spend 
  more time on higher ROI activities. <br><br>  Thanks for reading,<br>
  Chris Foot<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Temporary Tablespace Groups </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-04-14.0082403220</link>
                      <description>Temporary tablespaces are used to store transient data, which Oracle defines as data that is only available for the duration of the session. The two main types of transient data is data stored in temporary tables and data that is generated by sort operations. Oracle provides temporary tablespaces that are optimized for storage of transient data.&lt;BR&gt;&lt;BR&gt;Oracle10G allows administrators to group multiple temporary tablespaces together and assign them to users as a single unit. We'll begin our discussion on temporary tablespace groups by reviewing sort operations and temporary tablespaces, then continue with a discussion on 10G temporary tablespace groups.</description>
                      <pubDate>Mon, 17 Apr 2006 05:33:52 -0500</pubDate>
                      
     
        <category>optimizer, statistics, analyze</category>
     
     
        <category>temporary tablespace groups</category>
             
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Temporary Tablespaces</b><br>
  When administrators discuss transient data they focus their conversation on 
  either temporary tables or sort operations. Temporary tables differ from their 
  permanent counterparts in that they are only available for the duration of the 
  user's transaction or session. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But data generated 
  by sort operations is by far the most common topic of discussion. Administrators 
  new to Oracle quickly learn that efficient management of sort data is critical to achieving and maintaining good query performance.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sort data is generated 
  explicitly when the user executes a statement that contains an ORDER BY or a 
  GROUP by and implicitly generated by the database for joins, bitmap merges, 
  index creation operations, etc.. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Sorting in Memory</b><br>
  The key to fast sort operations is to sort as much data as possible in memory. 
  As I used to tell my students in my Oracle Admin I classes, &quot;memory fast 
  (both hands raised high)- disk slow (both hands pointing to the floor).&quot; 
  Silly, but it worked. Depending on the release, Oracle provides a different 
  set of parameters to allocate memory for sort operations. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In releases previous 
  to Oracle9i, DBAs were required to manually set the SORT_AREA_SIZE, HASH_AREA_SIZE, 
  BITMAMP_MERGE_SIZE initialization parameters to control the amount of memory 
  allocated to sort operations. The SORT_AREA_SIZE parameter allocated memory 
  specifically for sort operations generated by user SQL statements.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is important 
  to note that SORT_AREA_SIZE defined the amount of memory allocated to sort operations 
  for each individual user. It was not shared amongst all users. User processes 
  requiring sort work areas did not immediately consume all of the memory allocated 
  to them by the SORT_AREA_SIZE parameter. They allocated chunks of memory until 
  they reached the total amount of memory allocated to them by SORT_AREA_SIZE. 
  If the user's sort work areas consumed all of the memory allocated to them by 
  SORT_AREA_SIZE, they began writing sort data to the temporary tablespace that 
  was assigned to them.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We know that each 
  platform has a finite amount of system resources (disk, memory and CPU) available. 
  The problem with defining memory areas at a per user level was that the total 
  amount memory allocated to sort operations at any one time was very dynamic 
  by nature. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The 
  more users that required sort work areas, the more total memory Oracle consumed. 
  That's the one thing I like about Oracle, it'll consume every system resource 
  it can if you let it. That's what makes tuning Oracle exciting, I think.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Back to the discussion&#133; 
  A large SORT_AREA_SIZE parameter setting that worked wonderfully when only a 
  few users were sorting often impacted the database server's performance when 
  dozens of users were sorting. As a result, DBAs were often very conservative 
  when setting the SORT_AREA_SIZE parameter. Better to let users sort to disk 
  than lock up an entire box.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle9i, Oracle 
  introduced two new parameters called PGA_AGGREGATE_TARGET and WORKAREA_SIZE_POLICY 
  to automate and improve the process of allocating memory for sort work operations.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">PGA_AGGREGATE_TARGET 
  defines a global pool of memory that all users performing sort operations share. 
  Both PGA_AGGREGATE_TARGET and WORK_AREA_SIZE_PARAMETER must both be set to activate 
  automatic management of sort work areas. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">WORK_AREA_SIZE_POLICY 
  can be set to 'MANUAL' or 'AUTO'. Setting it to 'MANUAL' disables the automatic 
  adjustment of sort areas while 'AUTO' enables the automatic adjustment of sort 
  work areas in memory. The DBA then must set the various parameters that allocate 
  sort areas manually.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When the WORK_AREA_SIZE_PARAMETER 
  is set to 'AUTO', Oracle will automatically allocate and adjust memory used 
  for sorting to ensure that each user's sort operations are fully optimized without 
  exceeding the value defined by PGA_AGGREGATE_TARGET. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The two key words 
  in that last sentence were &quot;automatically adjust&quot;. Oracle will adjust 
  the amount of memory allocated to each, individual user based on the amount 
  of total memory available in the global pool defined by PGA_AGGREGATE_TARGET. 
  The more memory that is available, the more memory the individual user gets. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle's Metalink 
  website has numerous articles on the monitoring and administration of both manual 
  and automatic sort work areas. If you are interested in furthering your education 
  on how to ensure that your database environment is configured optimally for 
  sorting, start with the Oracle documentation for your release and then move 
  on to Metalink.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Sorting to Disk</b><br>
  When your user populations exhaust the amount of memory available for sorting, 
  Oracle will begin to write sort data to disk. Oracle introduced temporary tablespaces 
  in 7.3, but true temporary tablespaces (created using the CREATE TABLESPACE&#133;.TEMPFILE 
  command) were introduced in Oracle8i. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The TEMPORARY keyword 
  in the CREATE TABLESPACE command tells Oracle to create a tablespace that manages 
  segments differently than those stored in permanent tablespaces. When you create 
  an object in a permanent tablespace, it allocates a segment and extents within 
  that segment. A temporary tablespace contains a single segment that all users 
  share. Although multiple transactions share the same sort segment in a temporary 
  tablespace, they do not share extents. The first sort operation allocates the 
  sort segment. Future sort operations do not incur the additional overhead required 
  by segment allocation, which improves performance.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The temporary tablespace 
  should be created as locally managed and with a uniform size extent allocation. 
  You'll see an example of the syntax in the demo contained at the end of this 
  blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The first time 
  I created a true temporary tablespace that used the TEMPFILE parameter, I immediately 
  went to V$DATAFILE and DBA_DATA_FILES to view the information the data dictionary 
  provided on them. I said to myself, &quot;Hey, this database has a bug already 
  - where's the information on my datafile?&quot; I should have read the new features 
  manual first, I think. It took me a while to figure out that tempfile information 
  is recorded in v$TEMPFILE and DBA_TEMP_FILES. If you are looking for information 
  on tempfiles, those are the views that you'll need to access.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are looking 
  for information on sort operations, Oracle provides the V$SORT_SEGMENT and V$TEMPSEG_USAGE 
  (Oracle 9.2 and above) views to provide that information. You'll need to remember 
  that if your sorts are contained entirely in memory, you won't see any entries 
  in these views. The sorts must overflow to disk. You can also run this statement 
  to see how much data is being sorted in memory vs disk:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT NAME, 
      VALUE<br>
      FROM V$SYSSTAT<br>
      WHERE NAME IN ('sorts (memory)', 'sorts (disk)');</font></p>
  </blockquote>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You assign temporary 
  tablespaces to accounts during their creation. You can also use the ALTER USER 
  DDL statement to change an account's temporary tablespace. One of the problems 
  in releases prior to Oracle9i was that if administrators did not explicitly 
  assign a temporary tablespace during account creation, Oracle assigned the System 
  tablespace as the user's temporary tablespace. This oversight allowed user processes 
  to create sort work areas in the System tablespace, which impacted database 
  performance and had a tendency to fragment the tablespace.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle9i, administrators 
  could create a default temporary tablespace at the database level. Accounts 
  that were not explicitly assigned a temporary tablespace during creation were 
  assigned the default temporary tablespace defined at the database level.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Temporary Tablespace 
  Groups</b><br>
  Oracle10G allows administrators to create temporary tablespace groups, which 
  can consist of one, or more, temporary tablespaces. There is no upper limit 
  on the number of temporary tablespaces that can be a member of a tablespace 
  group. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tablespace groups 
  allow administrators to provide a large pool of disk storage to users that sort 
  large volumes of data. With data warehouses continuing to increase in size, 
  it is easily understandable why this amount of disk space is often required. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is interesting 
  to note that there is no CREATE TEMPORARY TABLESPACE GROUP DDL statement. The 
  group is implicitly created when the first tablespace is assigned to it. Administrators 
  have the option of assigning a temporary tablespace to a group during tablespace 
  creation or by altering the tablespace at a later time. The group name cannot 
  match an existing group or tablespace name.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Oracle provides 
  the DBA_TABLESPACE_GROUPS view to provide information on tablespace groups. 
  In addition, temporary tablespace groups can also be assigned as the database's 
  default temporary tablespace.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A temporary tablespace 
  can be a member of a group, which is assigned to users and also be assigned 
  as a single temporary tablespace to other users.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The benefits that 
  tablespace groups provide are:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A single user 
    that is assigned to a tablespace group is able to use multiple tablespaces 
    in different sessions.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Child sessions 
    in a single parallel operation are able to use multiple tablespaces.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Enables multiple 
    tablespaces to be defined as the default temporary tablespace at the database 
    level. Oracle will assign users to the tablespaces in the group in a round-robin 
    fashion.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>DEMO </b><br>
  Let's finish the blog with a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_04_140082403220/demo.txt">brief 
  demo</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I hope you enjoyed 
  this blog on temporary tablespaces and temporary tablespace groups. Thanks for 
  reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot<br>
  </font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/optimizer,+statistics,+analyze"
                      rel="tag">optimizer, statistics, analyze</a></strong>
           
           |&nbsp;
                      <strong><a
    href="http://www.technorati.com/tag/temporary+tablespace+groups"
    rel="tag">temporary tablespace groups</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Using 10G’s V$SESS_TIME_MODEL and V$SYS_TIME_MODEL Performance Views to Evaluate Database Performance </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-04-08.0966928498</link>
                      <description>We all know that the desired result of any tuning exercise is to reduce the amount of time that users spend performing database activities.    Good tuners understand that the tuning process starts with an understanding of the problem then continues with the DBA collecting statistical information. Information collection begins at a global level and then narrows in scope until the problem is pinpointed. &lt;BR&gt;&lt;BR&gt;

Experienced DBAs often start their tuning efforts by selecting data from the V$ dynamic performance tables to view system-wide performance indicators. Thanks to Oracle 10G, we have two new views to add to our tuning arsenal.  We’ll take a look at these two time model views in this blog and learn how we can use them to determine where the user processes are spending their time.</description>
                      <pubDate>Mon, 10 Apr 2006 06:00:18 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Recording and comparing 
performance-related information based on time is a pretty common practice in our 
profession. The granularity of performance statistics we use ranges the spectrum, 
from database-wide statistics to the measurement of a single componet used during 
the execution of a SQL statement. </font> 
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">One of the common 
  mistakes that is often made during a tuning exercise is not gathering enough 
  high level information during the initial stages of the problem determination 
  process. As I stated in my introduction, the key to success is to begin the 
  analysis at a high level and then narrowing the scope of information collection 
  until the problem is identified. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Once the problem 
  is identified, we tune and tweak, record the same statistics we used to identify 
  the problem and compare the before and after information. This iteration of 
  recording/changing/recording/comparing is done again (and again) until the problem 
  is corrected.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Almost every component 
  in Oracle that has an affect on database performance is measured by the database 
  system. One of the most common measurements is the amount of time the user processes 
  and system spend performing a particular operation. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>V$SESS_TIME_MODEL 
  and V$SYS_TIME_MODEL Statistics Views</b><br>
  V$SESS_TIME_MODEL and V$SYS_TIME_MODEL views provide information on exactly 
  that - where the user processes are spending their time. All of the 
  timings are recorded in microseconds. One of the key indicators recorded in 
  the time model views is DB Time, which is the total amount of time spent performing 
  database operations. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The time model 
  views differ from each other in that the V$SESS_TIME_MODEL view stores timing 
  information for individual sessions while the V$SYS_TIME_MODEL view provides 
  information at instance level. As a result, you won't find the column for SESSION_ID 
  in the V$SYS_TIME_MODEL view. In addition, V$SYS_TIME_MODEL records information 
  historically from instance startup, so don't be concerned if you add up all 
  of the time spent by the current indiviudal sessions and it doesn't match the 
  DBTIME value in V$SYS_TIME_MODEL view. One last thing, use the timings as 
  a relative reference, they may not add up exactly because of the way they 
  are recorded by Oracle.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Let's take a look 
  at the contents of these views:</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>V$SESS_TIME_MODEL 
  and V$SYS_TIME_MODEL Contents</b></font></p>
<ul>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>SID (NUMBER)</b> 
    - Session Identififer. This is the same value that you will find in all views 
    that record information about individual sessions. This column is useful if 
    you want to join V$SESS_TIME_MODEL to V$SESSION to retrieve additional information 
    on the session being evaluated. As stated previously, since V$SYS_TIME_MODEL 
    records information at the instance level, you won't find this column in the 
    view.<br>
    <br>
    </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>STAT_ID (NUMBER) 
    </b>Statistic identifier for the time statistic.<br>
    <br>
    </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>STAT_NAME 
    (VARCHAR2 64)</b> Name of the statistic being recorded. A listing of all of 
    the statistics is provided below.<br>
    <br>
    </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>VALUE (NUMBER) 
    </b>- Amount of time, in microseconds, the session has spent performing the 
    operation identified in the STAT_NAME column. </font></li>
</ul>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Values for STAT_NAME:</b><br>
  <br>
  Knowing the hierarchy of the the contents is important. I have included a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_04_080966928498/hierarchy.gif">hierarchy 
  chart</a> that will tell you what timings consist of sub-timings.</font></p>
<ul>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <b>DB Time</b> 
    - Amount of time spent performing operations in the database. The V$SYS_TIME_MODEL 
    view does not record and add any time spent by the database background processes. 
    As a result, the V$SYS_TIME_MODEL view records the total user workload, while 
    the V$SESS_TIME_MODEL view records information about the workload produced 
    by the individual session identified in the SID column. You compare this value 
    against all of the other values contained in this table to determine where 
    the bulk of the time is being spent. <br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">DB CPU</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Amount of CPU time spent performing operations in the database. Like DB 
    TIME, DB CPU only records user workload. If you see a relatively high value 
    in this time look for complex calculations and poor SQL plans that perform 
    a high level of buffer gets.<br>
    <br>
    </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Connection 
    Management Call Elapsed Time</b> - This value represents the amount of time 
    processes spent performing CONNECT and DISCONNECT calls. This time should 
    be much lower than most of the other values contained in this table. If it is high in V$SYS_TIME_MODEL, review program code to ensure that the application isn't attempting to make a connection and disconnection for each interaction with the database. This is a very common problem for applications built using a middle tier application 
    server.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Sequence 
    Load Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Amount of time spent obtaining the next sequence number from Oracle's Data 
    Dictionary. If the sequence is cached, the time is not recorded. A sequence 
    is a user created object that generates numbers according to a specific pattern. 
    It is most often used to generate unique identifiers to identify a specific 
    object.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">SQL Execute 
    Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - This is a very important measurement. It records the amount of time that 
    SQL statements are executing. This will also record the amount of time SELECT 
    statements spend fetching the query results. Typically, user processes spend 
    the bulk of their time accessing data. If it is extremely high, look for poorly 
    performing SQL statements. If the user process is having performance problems 
    and this indicator does not make up the majority of overall DB Time, check 
    for poorly written programs, parsing problems, poor connection management, 
    network issues.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Repeated 
    Bind Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Elapsed time spent on re-binding.<br>
    <br>
    </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Parse Elapsed 
    Time</b> - This records the amount of time the process spent hard parsing 
    and soft parsing SQL statements. Oracle parses each statement before it is 
    executed. The parse process includes syntax checking (making sure you spelled 
    &quot;WHERE&quot; right), ensuring the objects being accessed are actually 
    in the database, security checking, execution plan creation and loading the 
    parsed representations into the shared pool.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Hard Parse 
    Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - The amount of time spent hard parsing a SQL statement before execution. 
    Before a statement enters the parse phase, Oracle matches the statement being 
    executed to statements that are already parsed and stored in the shared pool. 
    When Oracle finds a matching statement in the shared pool, it will do a soft 
    parse on the SQL statement. If Oracle does not find any matching SQL in the 
    shared pool, it will perform a hard parse, which requires that more steps 
    be performed than its soft parse counterpart. As with almost everything else, 
    fewer steps = faster performance. <br>
    <br>
    The key to obtaining a high number of soft parses 
    is to match as many incoming statements to statements already stored in the 
    shared pool as possible. This is trickier than it sounds and requires vigilant 
    and rigorous SQL coding standards. When Oracle looks for a matching SQL statement 
    in the shared pool, the statements must match exactly. <br>
    <br>
    If you see a high percentage of hard parses being performed, the most common 
    culprit is SQL statements that don't use bind variables. A bind variable holds 
    values that are passed from application programs. It allows the programs to 
    change the search values in the WHERE clauses without having to perform a hard parse.  Application programs that don't take advantage of bind variables continues to be a common problem. <br>
    <br>
    </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Hard Parse 
    (Sharing Critieria) Elapsed Time </b>- This value represents the amount of 
    elapsed time the database was forced to hard parse a SQL statement because 
    it was unable to find an existing cursor in the SQL Cache. It is a subset 
    of the Hard Parse Elapsed time. If this value is high, look for programs that 
    don't use bind variables.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Hard Pase 
    (Bind Mismatch) Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Signifies the amount of elapsed time spent performing hard parses because 
    the bind variable's type or bind size did not match existing cursors in the 
    cache. Oracle documentation also states that bind type mismatches often causes 
    indexes not to be used. If this value is high, look for poor programing standards.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Failed Parse 
    Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Records the time spent attempting, and ultimately failing, to parse a statement 
    before execution. Check the program code to ensure that the statements are 
    syntactially correct and review Metalink notes for issues.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Failed Parse 
    (Out of Shared Memory)</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Pretty self explanatory. The amount of elapsed time recorded when a parse 
    failed because of a lack of adequate resources allocated to the shared pool. 
    If this time is high, you need to add more memory to the shared pool, identify 
    if bind variables are being used, etc. <br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">PL/SQL Execution 
    Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Amount of elapsed time spent running the PL/SQL interpreter. It does not include the time executing and parsing SQL statements or the amount of 
    time the process spent recursively executing the Java VM. <br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">PL/SQL Compilation 
    Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Elapsed time spent running the PL/SQL compiler. It is the compiler's job 
    to transform PL/SQL source code into machine-readable code (m-code).<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Inbound PL/SQL 
    RPC Elapsed Time </font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">- 
    Records the elapsed time PL/SQL remote procedure calls spent executing including 
    executing SQL and JAVA.<br>
    <br>
    </font></li>
  <li><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Java Execution 
    Elapsed Time</font></b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    - Amount of time spent running the JAVA machine. This time does not include 
    the time spent executing and parsing SQL statements or recursively executing 
    PL/SQL.</font></li>
</ul>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Quick Demo</b><br>
  If you look at this attached <a href="/blogs/blog_cf/chrisfoot/blogentry2006_04_080966928498/time_model_views2.txt">text file</a>, you'll see a series of statements that I executed against the 
  time model views to analyze a performance problem. </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I hope you enjoyed 
  reading this article on Oracle's time model views.<br>
  </font> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G DB Console Administration Toolset</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-03-29.0050872616</link>
                      <description>Readers of this blog know how important I think 10G Grid Control is to the future of Oracle database administration. DBAs must learn to leverage the intelligence built into the Grid Control product set to reduce the amount of time they spend administering, monitoring and troubleshooting Oracle databases. &lt;BR&gt;&lt;BR&gt;That being said, there are times when you don't have access to a full blown, enterprise-wide Grid Control environment. Not to worry, Oracle also provides the 10G Database Control administration toolset. 10G Database Control can be used to effectively administer a single Oracle database. Although 10G Database Control might not have the enterprise-wide scope that Grid Control does, it does provide a very robust set of features and functions that are guaranteed to make database administrators more productive.  This blog will provide you with a brief overview of the 10G Database Control product set. We'll also compare and contrast Database Control to its big brother, Grid Control. </description>
                      <pubDate>Mon, 03 Apr 2006 05:18:59 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle 
Grid Control</b><br>
Those of you that have been reading this blog are aware that Grid Control is architected 
as a<b> </b><a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/concepts.gif">multi-tier 
architecture</a> consisting of the HTML console, a management service with an 
integrated information repository and management agents running on all monitored 
targets. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The management 
  service receives monitoring data from the various agents and loads it into the 
  management repository. The management console retrieves data from the management 
  repository, organizes it and then displays it as information to the administrator 
  via the HTML console interface.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The agents are 
  programs that run continuously on all servers that are controlled by the Enterprise 
  Manager architecture. Examples of the more popular targets found on the servers 
  are databases, application servers and listeners. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The number of components 
  that Grid Control manages and monitors continues to grow as the product matures. 
  10G Grid Control is now able to monitor and/or administer listeners, databases, 
  RAC environments, Application Servers, Collaboration Suite implementations, 
  and hardware servers. In addition, Oracle also provides plug-ins that allow 
  Grid Control to monitor non-Oracle databases, non-Oracle middleware, network 
  devices and storage systems. As Grid Control matures, its area of influence 
  can only continue to expand.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Database 
  Control</b><br>
  The environment that Database Control manages is much more limited in scope 
  than its more robust counterpart, Grid Control. But it does provide a full set 
  of administration and monitoring tools that allow administrators to quickly 
  and effectively monitor and administer a single Oracle database environment 
  (host server, listener and database). When I began to review Database Control 
  for the first time, I was surprised at how robust the tool actually was.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database control's 
  architecture can be loosely compared to Grid Control's. It consists of the following 
  components:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A web-based 
    console that provides a GUI interface. </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A local version 
    of the management service that works with the local database.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A local version 
    of the management repository. The repository is installed in the local database. 
    Unlike Grid Control's repository, which can be used to manage many databases, 
    the repository for Database Control is used to contain configuration and historical 
    information for one, single database environment.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A local version 
    of the management agent that sends monitoring data to the local management 
    service.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Notice that the 
  key word is local? Database Control provides DBAs with a web based toolset that 
  allows them to administer and monitor a single database environment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Database 
  Control Installation</b><br>
  If you intend to register the database with Grid Control, installing Database 
  Control is really not necessary. But if you do not have a Grid Control environment 
  available, then I highly recommend that you install and use Database Control. Database 
  Control can be installed <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/installation1a.gif">during 
  the installation</a> of the database binaries or can be done separately if so 
  desired. One of the installation panels <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/installation2.gif">will 
  ask you</a> if you prefer to administer the database with Grid control or Database 
  Control. If the Grid Control agent is not installed on the server, the Grid 
  Control option will be unavailable and you will be forced to use Database Control 
  for database management.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">After the installation 
  is complete, a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/login.gif">Database 
  Control log in panel</a> will pop up in a browser window that allows users to 
  immediately log in to the local database being managed. Unlike Grid Control's 
  installation, which requires user input during the installation, installing 
  Database Control requires virtually no input from the end-user. It installs 
  everything (web interface, management repository, management service and management 
  agent) that is needed on the database server.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Automatic installation 
  of the local agent also differs from Grid Control which requires that separate 
  agent installations be performed on all managed targets. </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If 
  you use DBCA to create your database, one of the panels that will appear during 
  the configuration asks you if you want to use Grid Control or Database Control 
  to administer the new database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10g Database 
  Control Demo</b><br>
  Let's begin our review of Database Control by activating the web interface. 
  Activating Database Control will differ according to the operating system you 
  are running it on. For the purposes of this demo, I installed a database and 
  Database Control on a Windows environment. The icon for the Database Control 
  toolset was found in the standard Oracle10G program grouping that can be found 
  when you click on START - ALL PROGRAMS on the desktop.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">A <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/login.gif">standard browser window</a> will pop up that prompts you for your account and password. You will need to enter a valid database account and password to continue. Once 
  you enter the account and password, Database Control will respond by displaying the Database Control Administration Home page.  You'll note that this page looks pretty close to <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_home.gif">10G 
  Grid Control's Database Home page</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/home_page.gif">Database 
  Control Home page</a> begins with a brief overview of system performance. If 
  you click on the host name, in this case CFOOTE, 10G will respond by displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/host_home_page.gif">Host Environment Home page</a>. The Host Environment Home page allows administrators 
  to view performance and configuration information for the host server. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">At the bottom of 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/home_page.gif">Database 
  Control Home page</a>, you see the same alert and job activity information that 
  is displayed on Grid Control's Database Home page. Below the alert and job information, 
  10G Database Control provides links to various utilities and informational panels. 
  These are the same utilities that are provided by Grid Control. You can establish 
  metrics for the database, run advisors, view ADDM data, etc.. You can also establish 
  notification policies for alerts and metric violations, blackouts, etc. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we go to the 
  top of the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/home_page.gif">Database 
  Control Home page</a> and click on the performance tab, Database Control responds 
  by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/performance_page.gif">Database 
  Performance Home Page</a>. If you would like to learn what features this panel 
  provides, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_22.3884573887">Database 
  Performance Monitoring using 10G Enterprise Manager</a>. 10G Database Control 
  and 10G Grid Control are almost identical in navigation and information that 
  is displayed.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">It is important 
  to note that you have a robust AWR repository available to you. The AWR repository 
  is the center of the Common Manageability Infrastructure and provides services 
  to collect, store, maintain, process and provide access to statistics for self-tuning 
  and problem detection. In addition, Database Control also provides Oracle10g's 
  Automatic Database Diagnostic Monitor (ADDM) which automatically identifies 
  performance bottlenecks and makes recommendations to resolve them. Lastly, you 
  have access to all of the intelligent advisors (SQL Tuning Advisor, SQL Access 
  Advisor, Segment Advisor, etc.) that will allow you to quickly identify and 
  resolve database performance problems. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we click on 
  the Administration tab that is displayed at the top of the Database Control 
  Home page, Database Control responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/administration_page.gif">Database 
  Administration Home page</a>. The Database Administration Home page provides 
  links to virtually any administrative task you can perform in an Oracle database. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The last home page 
  is the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_290050872616/maintenance.gif">Database 
  Maintenance Home Page</a>. Once again, Database Control provides a tab that 
  links to the Database Maintenance Home Page at the top of each Database Control 
  panel. Like its big brother, Grid Control, there is a complete set of maintenance 
  activities available to you.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  If you don't have access to a full blown Grid Control support infrastructure, 
  using 10G Database Control is certainly an excellent alternative. Although it 
  doesn't allow you to view your entire environment from a single web interface, 
  it will provide you with all of the functionality you need to monitor, administer 
  and troubleshoot your 10G database environment.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are using 
  Database Control, you'll find that most of the Grid Control topics I have been 
  blogging about will apply to Database Control.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.<br>
  Chris Foot</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Administering RAC Environments - An Interview with RAC expert Scott Rupnik</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-03-25.7835630163</link>
                      <description>I thought it might be interesting for those of us that don’t administer RAC environments on a daily basis to talk to someone that does.  Scott Rupnik is one of our senior-level RAC administrators.   Since we administer RAC implementations for many different customers, Scott has experience administering RAC ecosystems that use many different hardware, operating system and disk storage combinations.&lt;BR&gt;&lt;BR&gt;This provides Scott with a unique skill set this is pretty rare in our profession.  In addition, since Scott has a strong background in both database and operating system administration, he is able to provide us with insight on both of these two tightly coupled RAC components.</description>
                      <pubDate>Mon, 27 Mar 2006 05:30:56 -0600</pubDate>
                      
     
        <category>RAC, ASM, OPS, Cache Fusion, Portable Clusterware</category>
             
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> Before we begin the interview. 
Scott and I agreed that it would be beneficial to provide readers with a high-level 
description of a RAC environment. </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">RAC stands for Real Application 
  Clusters. The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_257835630163/grid.gif">optimal 
  RAC environment</a> uses an interconnected set of servers with each server containing 
  one to four CPUs. The servers are connected to a shared disk system using network-attached 
  storage (NAS) or a storage area network (SAN) technologies as the connectivity 
  mechanism. High-speed network connections between the hardware servers themselves 
  and from the hardware servers to the shared disk system allow end-users and 
  administrators to view the environment as single application architecture. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Real Application Cluster 
  enhancements in Oracle10G allow hardware servers to be seamlessly added to an 
  application. Oracle10G enhances Oracle Grid Control functionality to manage 
  RAC environments with a single interface. Oracle's Grid Control is a web-enabled 
  toolset that allows administrators to group hardware platforms, databases, and 
  application server installations and manage them as a single entity. Administrators 
  are able to call other utilities (Data Pump, Transportable Tablespace, Oracle's 
  new job scheduler) from within Grid Control to modify, monitor and tune databases 
  contained in the RAC environment. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Grid Control also simplifies 
  RAC administration by automating the installation, configuration and cloning 
  of Application Server 10G and Database 10G implementations across multiple nodes. 
  Grid Control monitoring views the entire grid as a single unit and provides 
  drill down capabilities to identify problems with individual components.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 1</b><br>
  How long have you been working with RAC?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I have been working with 
  RAC environments for about two years now. My last employer was building a very 
  large OLTP application on 9iRAC running on Sun Solaris servers. But, we were 
  only using part of the functionality that RAC provides. We set up multiple instances 
  and used our application server tier to do all of the load balancing and network 
  hardware for failover. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">At Remote DBA Experts, building 
  and administering RAC environments is one of the most popular services that 
  we offer. I currently provide primary remote database administration services 
  for several clients that have RAC implementations. These implementations include 
  Oracle 9i, 10.1 and 10.2 releases running on Windows and LINUX. The job is challenging 
  and requires a lot of knowledge in many different areas of technology. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 2</b><br>
  RAC seems to be receiving a lot of good trade press lately. What is your personal 
  opinion of RAC?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">It really does provide a 
  lot of benefits. The primary ones are availability and scalability. I'd say 
  RAC, and the Cache Fusion technology that improves its performance, has been 
  a huge success for Oracle. This is especially true with the 10.x releases. With 
  RAC technology and commodity server hardware both rapidly evolving and maturing, 
  RAC is becoming not only a viable alternative for smaller enterprises but also 
  a preferred method of achieving their availability requirements.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 3</b><br>
  What is Cache Fusion?<br>
  Cache Fusion is essentially a memory-to-memory transfer of data between the 
  nodes in the RAC environment. Before Cache Fusion, a node was required to write 
  some of the data to disk before it could be transferred to the next node in 
  the cluster. Cache Fusion does a straight memory-to-memory transfer. In addition, 
  each node's SGA has a map of what data is contained in the other node's data 
  caches. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The performance improvement 
  is phenomenal. Oracle leverages the vendor's high speed interconnects between 
  the nodes to achieve the cache-to-cache data transfers. Before Cache Fusion, 
  when you added a node to the cluster to increase performance of the application, 
  it didn't always provide you with the performance improvement that you hoped 
  for. With Cache Fusion, you can easily cost justify the addition of another 
  node into a RAC cluster to increase the performance of the application running 
  on it. Oracle sales pitches describe it as 'near linear horizontal scalability'. 
  <br>
  <br>
  <b>Question 4</b><br>
  What are the three greatest benefits that RAC provides?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The three main benefits 
  are availability, scalability, and the ability to use low cost commodity hardware. 
  As I stated earlier, RAC is quickly finding its way into enterprises of all 
  sizes to meet their availability and scalability requirements. RAC provides 
  fault tolerance at a level that was out of reach for many organizations just 
  a few years ago. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Prior to RAC, many organizations 
  would run standbys to minimize outages in case of a hardware or operating system 
  failure. The problem with standby database technology is that you will most 
  likely lose transactional data during a failover. In addition, the failover 
  itself can be time-consuming. RAC overcomes both of those problems.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In a RAC environment, if 
  a node in the cluster fails, the application continues to run on the surviving 
  nodes contained in the cluster. If your application is configured correctly, 
  most users won't even know that the node they were running on became unavailable. 
  <br>
  <br>
  The scalability of a RAC environment goes hand in hand with the ability to utilize 
  low cost commodity hardware. The x86/x86_64 platforms have achieved phenomenal 
  price/performance ratios over the last couple of years. The problem was that 
  they couldn't scale like their big iron proprietary UNIX server competitors.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">RAC allows an application 
  to scale vertically, by adding CPU, disk and memory resources to an individual 
  server. But RAC also provides horizontal scalability, which is achieved by adding 
  new nodes into the cluster. RAC also allows an organization to bring these resources 
  online as they are needed. This can save a small or midsize organization a lot 
  of money in the early stages of a project. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The key to achieving this 
  level of scalability is Oracle's Cache Fusion technology, which we just talked 
  about Now that Oracle is able to leverage the hardware vendor's high speed interconnect 
  technology, the cache-to-cache data transfer provides near linear horizontal 
  scalability. If your application needs more horsepower, you add another low 
  cost node into the RAC environment.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 5</b><br>
  What areas of RAC do you think need to be improved?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Although Oracle has made 
  great progress in both of these areas over the last few years, I'd say installations 
  and tools. I'd like to see an installation, including Oracle Clusterware, ASM, 
  and the database be performed in an hour or two. I would also like to see the 
  installer be more intelligent. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle is doing a very good 
  job on RAC administration tools. They are maturing pretty quickly. But like 
  all technicians, I am impatient. I want the most robust administration tools 
  I can as quickly as possible. Oracle is certainly making headway. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The new 10.2 Grid Control 
  tool has a robust reporting mechanism, which I think you covered in one of your 
  blogs. Grid Control now provides administrators with a good view into ASM. In 
  addition, the Oracle Clusterware, OCFS2.0, has just been included in the latest 
  LINUX kernel. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I'd like to see Grid Control 
  provide a more robust cluster-wide performance dashboard and an interface for 
  creating and managing services. I think that would help a lot with getting to 
  a true Grid computing environment. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 6</b><br>
  What is Clusterware?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">One of RAC's requirements 
  is that clustering software (sometimes called clusterware) be used to connect 
  the hardware platforms together. This underlying clustering software was purchased 
  either from the hardware vendor or a third-party clustering software provider. 
  RAC is installed on top of the cluster environment and works in conjunction 
  with the underlying clustering software to allow the application programs to 
  view the multiple instances as a single entity. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">One of the problems using 
  previous releases of RAC was identifying exactly whose software it was causing 
  the problem in the first place. Was it the RAC software or was it the clustering 
  software provided by the hardware or third-party vendor? Oracle10G solves this 
  problem by providing its own clustering software called Portable Clusterware. 
  Portable Clusterware can now be used in place of the hardware or third-party 
  vendor's clustering software. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 7</b><br>
  How complex is RAC to administer?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">RAC certainly bring its 
  own set of challenges with it. You not only have multiple instances to administer 
  but you may also have to administer multiple services. In addition, the DBA 
  is increasingly being called upon to perform operating system and storage administration 
  tasks for RAC environments. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The DBA needs to know more 
  than just the Oracle database to be effective. I have the good fortune of being 
  trained and previously employed as a LINUX and UNIX operating system administrator. 
  That experience provides me with both hardware and operating system administration 
  expertise. I found that knowledge to be invaluable. Operating system, disk storage 
  and database administrators must work together to achieve a successful RAC implementation. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle has been providing 
  new and better tool sets for these tasks, from OCFS and ASM to Grid Control. 
  It is very important for an organization considering a RAC implementation to 
  perform an in-depth analysis to understand and plan for this added complexity 
  early in the design and implementation process. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 8</b><br>
  Is Grid Control required for RAC administration?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Technically no, but it's 
  difficult to be effective without it. It's hard enough to troubleshoot enterprise 
  applications let alone RAC implementations that are far more complex. If you 
  have an application that uses multiple instances, each running on a separate 
  node, you can easily spend as much time jumping from one node to another as 
  you do viewing and analyzing diagnostic and performance information. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Grid Control software 
  provides an overview of the complete cluster. In addition it provides administrators 
  with the ability to drill down into each of the nodes and database instances 
  in the cluster If Grid Control did nothing more than aggregate the information 
  from multiple instances, it would be worth installing. It really provides a 
  lot more features and functionality than reporting. Grid Control facilitates 
  and simplifies RAC administration. You'll be wasting a lot of precious time 
  if you use the command line interface. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 9</b><br>
  What is the most challenging aspect of RAC? </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">There are really two areas 
  that make RAC a challenging environment to administer. First, there are a lot 
  more moving parts. You need to understand the shared storage environment and 
  the cluster layer to be able to troubleshoot them. You need to know where the 
  cluster logs are, how to execute FSCK on an OCFS drive, etc..</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Second, you need to realize 
  that you have multiple instances to administer. In order to create an environment 
  that provides the highest availability possible, you will have to implement 
  Transparent Application Failover (TAF). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">TAF automatically transfers 
  application user connections to surviving nodes when their primary node, the 
  node they were connected to, fails. Depending on how you configure TAF, users 
  won't even know that their connection and work have been transferred to another 
  server.<br>
  <br>
  <b>Question 10</b><br>
  How much operating system expertise is needed?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">RAC is fundamentally just 
  a clustering solution, albeit a highly specialized and tuned one. Even if you're 
  lucky enough to have operating system and/or SAN administrators to help you, 
  you'll still be required to have a basic understanding of all of the components.  You must be able to understand what your operating system and disk storage administrators are talking about and what questions you need to ask during the installation 
  and configuration process. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 11</b><br>
  What operating system do you prefer for RAC?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The most popular environment 
  of our current clients is most definitely LINUX. We have several RHEL3 clients 
  and have recently been adding RHEL4 to the mix. I definitely prefer LINUX and 
  UNIX over Windows, and am happy with RHEL3-4, but I'm looking forward to getting 
  a test RAC environment set up on Solaris 10 now that Oracle has indicated that 
  Sun, once again, is one of their preferred hardware vendors.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 12</b><br>
  Can RAC be installed by an experienced DBA with no previous RAC experience?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Sure, but a traditional 
  DBA will face a steep learning curve. It's important that the DBA have a fundamental 
  understanding of all of the different components that comprise a clustered environment. 
  Your success will also depend on the support staff you have available to you 
  as well. If you're lucky enough to have a SAN and operating system administrator 
  that understands clustering, it's a lot easier. If not, be prepared to do a 
  lot of research up front to ensure that you understand all of the technologies 
  involved and how they interface with each other. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">It is certainly a lot easier 
  if you have someone to help jumpstart your knowledge in this environment. That 
  is why our RAC implementation and administration offerings are so popular. Our 
  customers realize that RAC requires a unique knowledge set that combines database, 
  disk storage and operating system administration expertise. We have people on 
  staff that have extensive experience in all three of those disciplines. It makes 
  the installation and administration of RAC environments easy for us. In addition, 
  this expertise helps us when we are required to perform tuning and problem determination 
  analysis, which is more complex in RAC environments. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 13</b><br>
  If you could provide advice to someone just getting started in RAC administration, 
  what would it be?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The recommendations at the 
  top of my list are to use the tools Oracle provides, use the Internet to learn 
  as much as you can about RAC administration and don't be afraid to learn how 
  the operating and disk storage systems work. If you don't have the experience 
  or expertise, call in someone to help that does. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Grid Control product 
  is the best tool available for viewing your systems at the cluster level. You 
  must install the product and learn how to use it. There are a few administration 
  tasks that are better suited to using a command line interface but the Grid 
  Control tool should be your first choice when administering and troubleshooting 
  a RAC environment. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Internet, both official 
  Oracle sites and sites like this one, contain a wealth of information on RAC 
  installation, configuration, and administration. There are detailed guides to 
  help you with most of the tasks you will be required to perform. Be sure to 
  read as many Oracle Best Practices documents as you can. These will help you 
  to solve problems in the planning stages of your project. The earlier you find 
  potential issues during the project the better off you will be. You certainly 
  don't want to find out that you missed a critical configuration step after you 
  implement a RAC environment in production. I will state that RAC can be unforgiving 
  at times.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Finally, depending on the 
  size and staffing of your organization, you must involve personnel that have 
  operating system and disk storage administration expertise. The cluster and 
  shared storage are the foundation of RAC, you need to understand and be comfortable 
  with both of them.<br>
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question 14</b><br>
  What do you think the future will be for RAC?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">RAC has gained a solid foothold 
  and will be around for many years to come. Obviously the individual pieces, 
  both the cluster services and shared storage systems, will get more mature and 
  become more efficient. I also look for a more intelligent Grid Control product 
  that will have the ability to not only monitor resources but also intelligently 
  reassign them within a large enterprise GRID containing many RAC databases. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">RAC is the foundation for 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_257835630163/grid2.gif">Grid</a>, 
  which Oracle views as the future of enterprise computing. Instead of connecting 
  multiple nodes together to support one, individual application, you connect 
  multiple nodes together to support many different applications. Whether Grid 
  becomes a popular implementation is immaterial, as RAC continues to mature it 
  can only gain in popularity.</font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/rac,+asm,+ops,+cache+fusion,+portable+clusterware"
                      rel="tag">RAC, ASM, OPS, Cache Fusion, Portable Clusterware</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>New Job Leads to Exciting New Topics.  A Preview of Upcoming Blogs.</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-03-18.8819580696</link>
                      <description>One of the benefits of working for a remote database services provider is the caliber of people you get to work with.  We have some very talented people here at Contemporary Technologies (CTi) and I fully intend to leverage their expertise to improve the quality of this blog. &lt;BR&gt;&lt;BR&gt;In addition, I now have access to a wide range of technologies and Oracle features.  Since we provide services to many different companies, I will be able to expand the scope of this blog to cover a much wider spectrum of topics. &lt;BR&gt;&lt;BR&gt;
I’ll provide you with a quick preview of what is coming in the future.  In my next blog, I’ll interview Scott Rupnik.  Scott is our resident 10G RAC expert.  We’ll discuss the benefits of 10G RAC and Scott will provide some helpful hints and tips on 10G RAC installation and administration.
</description>
                      <pubDate>Mon, 20 Mar 2006 05:40:20 -0600</pubDate>
                      
     
        <category>10G RAC, Data Guard, SARBOX, regulatory complaince, LINUX, WINDOWS, UNIX</category>
     
     
        <category>optimizer, statistics, analyze</category>
             
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This is a hard 
  blog for me to write. I'm attempting to tell you what we do here without this 
  blog coming across as a blatant sales pitch. I am just very excited about the 
  benefits that my new job will provide to readers of this blog. The scope of 
  topics will be much more broad and I have access to technicians that are truly 
  experts in the various database disciplines and advanced database features.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>What We Do</b><br>
  I am finally beginning to get settled in here at Contemporary Technologies' RemoteDBA Experts. CTi RemoteDBA 
  Experts provides remote database administration services for Oracle, Microsoft 
  and IBM databases to customers across the globe. We provide both complete and 
  supplemental database outsourcing services.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">One of our more 
  popular offerings is database project work. This set of services includes upgrading 
  databases and applications (database vendor and third-party), installing and 
  configuring highly available environments for all three major database products 
  (RAC, Failsafe, Data Guard, SQL Server Clustering, etc.), database tuning and 
  architecture design. We also provide remote operating system support for Windows, 
  Linux and all flavors of UNIX. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Broadening the 
  Scope of this Blog</b><br>
  When you work for one company, the technologies that you work with are limited 
  to what is implemented there. You can certainly create your own test environments 
  to learn new technologies and database features but you can't really become 
  an expert until you administer that environment on a daily basis.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Working for a remote 
  database services provides me with access to many different database features 
  and technologies. Our customer's environments range the spectrum, from data 
  warehouses to OLTP environments that have thousands of active connections. The 
  range of technologies and third-party applications utilized is also broad. Name 
  a database feature, third-party product, operating system or technology and 
  I would be surprised if we didn't support it.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Leveraging In-House 
  Experts</b><br>
  Customers who &quot;give&quot; their environments to you to administer remotely 
  are doing so because they feel your organization has the expertise to provide 
  a superior level of support. That takes a lot of trust on the customer's part. 
  When you promote yourselves as &quot;the experts&quot;, you better have the 
  talent to back it up. I'm pleased to say that my fellow technicians at CTi RemoteDBA 
  Experts have that high level of expertise required to keep our customers happy. </font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">My new company 
  has recognized that no single technician can become an expert in everything, 
  so they are have created silos of expertise. All technicians here have strong 
  expertise in day-to-day administration, but we also have identified certain 
  database features that require a high level of expertise to administer successfully. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We have identified 
  these silos of expertise and assign administrators to them. We have personnel 
  that focus on security, regulatory compliance (SARBOX), highly available architectures 
  (RAC, Failsafe, Data Guard), Oracle applications support, advanced administration 
  tactics, monitoring, database/operation system interoperability, etc.. When 
  a person comes on board at RemoteDBA Experts, we determine what areas of database 
  support they are most interested in. We understand that technicians will be 
  the best at doing things they like. We then assign them to that silo.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since I am certainly 
  not an expert in all of facets of technology, I intend to leverage my fellow 
  technician's expertise to improve the quality of this blog. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <b>A Preview of 
  What's Coming in the Near Future </b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G RAC</b><br>
  One area that we specialize in is highly available architectures. We support 
  numerous RAC environments for our customers. My next blog will be an introduction 
  to one of our resident RAC experts, Scott Rupnik. Before we delve into the 
  technical details of installing and administering RAC environments, I thought 
  it would be interesting to interview Scott to obtain a high level perspective 
  of RAC, the benefits it provides and how to install and administer it effectively.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Data Guard</b><br>
  Data Guard is another feature that is often used to improve the availability 
  of Oracle database environments. Oracle's Data Guard is becoming a popular solution 
  to the problem of providing highly available architectures at a reasonably low 
  cost. Oracle Data Guard is a failover environment that uses a single system 
  to run the user applications until a failure occurs. Then the backup system 
  is engaged and takes over for the primary system. The primary system can then 
  be repaired or replaced. I'm pretty well versed in setting up and administering 
  Data Guard but we have technicians here that have much more expertise than I 
  do.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle Applications 
  Support</b><br>
  One of our more popular offerings is Oracle Applications Support. This includes 
  Oracle applications as well as Peoplesoft. Joseph Greene, Bob Kline and Sandi Starr are 
  three of our senior-level experts. I'll start the series of blogs on supporting 
  Oracle Applications with another high level interview and then hopefully &quot;turn 
  the keys&quot; over to them for a couple of blogs</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Converting Oracle 
  Applications from UNIX to LINUX</b><br>
  One thing that surprised me when I came here was how popular this conversion 
  is becoming. Once I began to talk to the folks here, I understood why. The costs 
  of supporting an Oracle application on LINUX are so much lower than supporting 
  the same application on UNIX that companies are able to justify the conversion 
  costs. This is a very popular service for us. I intend to write a blog that 
  provides the details on the lower support costs and the tricks of the trade 
  we use to make the transition as seamless as possible.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Oracle on Windows, 
  LINUX, UNIX</b><br>
  One of the great benefits of Oracle is that it runs on many different operating 
  systems. If you have worked with Oracle for any length of time you know that 
  the standard interfaces to the environment are not dependent on the operating 
  system. You execute the same SQL statements to administer a database on LINUX as you do UNIX and Windows. But 
  you must also have a firm understanding of the operating system the database 
  runs on to administer it effectively. DBAs don't have to be full-blown operating 
  system administrators but they must know how the operating system works. In addition, DBAs should be able to write operating system scripts 
  and understand the operating system's command line interface.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Several of our 
  administrators here are not only database administrators but ex-operating system 
  support technicians. We have folks that administer LINUX, most flavors of UNIX 
  and all versions of Windows. I'll provide a few blogs on database/operating 
  system tips and tricks for some of the more popular operating systems we support.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Regulatory Compliance 
  and Security</b><br>
  My last task at Giant Eagle was to work with the SARBOX auditors. Although Giant 
  Eagle isn't a publicly traded company, they felt it was important to comply 
  with SARBOX regulations. One of my fellow employees, Sandi Starr has extensive 
  experience in SARBOX and helps our customers put the proper practices and procedures 
  in place to ensure that they comply with the numerous regulations SARBOX requires.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  It looks like I'll have a lot to blog about in the future. I've covered only 
  a few of the technologies and database features that are now available to me. 
  I intend to mix the content up to keep the blog fresh. I don't intend to stop 
  blogging about Oracle 10G Grid Control. Although my next blog will be on RAC, 
  the one after that will be on 10G R2's DBConsole. I'm using it quite heavily 
  here and I'm impressed with its capabilities. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/10g+rac,+data+guard,+sarbox,+regulatory+complaince,+linux,+windows,+unix"
                      rel="tag">10G RAC, Data Guard, SARBOX, regulatory complaince, LINUX, WINDOWS, UNIX</a></strong>
           
           |&nbsp;
                      <strong><a
    href="http://www.technorati.com/tag/optimizer,+statistics,+analyze"
    rel="tag">optimizer, statistics, analyze</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>New Challenges</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-03-12.7540418839</link>
                      <description>Readers of this blog know that I rarely stray off topic.  The intent of this blog to provide technical information to readers that is hopefully both informative and interesting. &lt;BR&gt;&lt;BR&gt;

That being said, I thought I would write one blog on my personal career path.   A career path that will be different by the time my next blog is released.  Rest assured that I intend to get back on topic as soon as ppssible. </description>
                      <pubDate>Mon, 13 Mar 2006 12:25:15 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> I have held many jobs during 
my career; I started as a COBOL programmer 20 some years ago. During the past 
20 years, I have worked as a database administrator, database architect, alternative 
architecture specialist, high-priced Oracle consultant, and Oracle certified instructor. 
</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">I've been employed as the 
  database unit manager and database architect at Giant Eagle for close to two 
  years now. A great job for a great company. Although Giant Eagle has always 
  had a good reputation locally, my fellow consultants teased me about going to 
  a supermarket. When I came to Giant Eagle, I was amazed when I realized how 
  high-tech the company was and how efficient the technicians were at deploying 
  and utilizing new technologies.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I certainly enjoyed my career 
  at Giant Eagle and made many great friends during my stay there. But I always 
  missed the entrepreneurial attitude and freedom that a smaller company provides. 
  Working for a small company requires that one become involved in a wide variety 
  of activities. As a result, the job roles are less rigidly defined, which offers 
  greater flexibility to those that work there. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In addition, I have always 
  enjoyed consulting. I like being technically challenged on a daily basis. Consulting 
  certainly offers that. You can be working on a RAC implementation one day and 
  tuning SQL the next. Your customers hold you to a higher standard than they 
  do their own internal employees. They are paying you for you expertise, so they 
  expect you to be an expert. I also like that type of challenge. You are judged 
  solely on your talents (both technical and soft skills). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">After much deliberation, 
  I've decided to return to the consulting field and my old company, Contemporary 
  Technologies Inc. (CTi). CTi is a <a href="http://www.remotedbaexperts.com/">remote   database services provider</a> based in Pittsburgh, Pennsylvania. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">CTi specializes in providing remote database administration services 
  for DB2, Oracle, Microsoft SQL Server and Oracle Rdb. CTi is a well-rounded 
  organization with multiple lines of business that will allow me to become involved 
  in many different technologies and Oracle features. The company's services range 
  the spectrum, from architecture design to database and application upgrades.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Having a senior-level position 
  there will allow me to assist them in many different areas. I'm hoping to become 
  involved in everything from day-to-day support and improving day-to-day operations 
  to sales and marketing. The broader the scope, the more challenging the position 
  will be. Exactly what I am looking for at this point in my career.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Since I've worked with CTI's 
  technicians before; I know that the team is highly skilled. They will help me 
  learn new skills that I will be able pass on to readers of this blog. I have 
  long-established relationships with their DBAs, having worked with them at other 
  companies in Pittsburgh. They are a group of no-nonsense, motivated IT professionals 
  who want to do what is best for their customers. When they assume responsibility 
  for a customer's database, they do just that. It becomes their database. You 
  don't see that kind of attitude in many remote services outfits. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">CTi is well aware of my 
  penchant for writing. I now have the advantage of not only transferring my own 
  knowledge to readers of this blog, but the knowledge of more than a dozen senior-level 
  database experts. I will also have access to a much wider range of technologies 
  and Oracle features. I intend to leverage both my fellow technician's expertise 
  and my ability to work with new technologies and Oracle features to broaden 
  the scope of this blog. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The result will be a higher 
  quality blog that covers a wider range of topics.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Chris</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G R2 Grid Control Hang Analyis Feature</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-03-04.9606206243</link>
                      <description>I was going to show you how to schedule statistics gathering jobs manually in 10G Grid Control, but I just used a neat feature that I'd like to show you. 10G Grid Control R2 provides a Hang Analysis tool that helps administrators easily identify contention problems.&lt;BR&gt;&lt;BR&gt;We recently used the Hang Analysis feature to quickly identify an application transaction that was blocking other transactions from successfully executing. I thought it might be beneficial for us to deviate from our intended topic of discussion to review 10G R2 Grid Control's Hang Analysis tool. This is one feature that I think you'll find to be VERY worthwhile! </description>
                      <pubDate>Mon, 06 Mar 2006 08:00:51 -0600</pubDate>
                      
     
        <category>hang analysis, contention, row lock</category>
             
      <content:encoded><![CDATA[<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Creating the 
  Contention Problem</b><br>
  To show you how the Hang Analysis feature works in 10G R2 Grid Control, I created 
  a table called FOOT. EMP and inserted a row that contains the value 'abc' in 
  the column titled COL1 (I've never been known for my creativity in my naming 
  conventions). I created <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/00a_sql_blocking_screen.gif">two 
  SQL*PLUS sessions</a> that used the following statement to update the same row 
  in the table:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> UPDATE foot.emp 
    SET col1='123' where col1='abc'</font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We know that Oracle 
  locks at the row level. The first session that executed the update statement 
  will hold the row level lock until I execute a COMMIT or a ROLLBACK. The second 
  session I created is unable to obtain the row level lock until the first session 
  commits or rolls back its unit of work. We have successfully created our first 
  deadlock.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Problem Analysis</b><br>
  Let's begin our problem determination by navigating to 10G R2's Hang Analysis 
  screen. We accomplish this by selecting the 'Hang Analysis' link displayed on 
  the bottom of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/001_hang_navigation_link.gif">10G 
  R2 Grid Control's Performance Administration Home page</a>. 10G EM R2 responds 
  by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/02z_hang_anlysis_graphic.gif">Hang 
  Analysis Home page</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Hang Analysis 
  home page displays a graphical representation of the blocking and blocked session. 
  The blocking session is shown at the top of the diagram, while the blocked session 
  is shown at the bottom. This simple graphic representation may not seem very 
  worthwhile to you now, but the benefits become readily apparent when you the 
  contention problem becomes more complex. The more complex the locking problem, 
  the greater benefit the Hang Analysis diagram provides. I'll show you some complex 
  blocking diagrams later in this blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We can see on the 
  diagram that the blocking session has an ID of 128. When we click on the block, 
  10G R2 Grid Control responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/02a_session_summary_128.gif">Session 
  Summary Page</a>. The Session Summary Page provides basic information pertaining 
  to the session. The panel also provides a 'View Session Details' link on the 
  center of the panel.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Clicking on the 
  link displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/03_session_details_128.gif">Session 
  Details page</a>. This page contains a wealth of information on the session. 
  Let's review some of the most important information provided on this page:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Server</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Status of the 
    server process (in our case inactive).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Serial number 
    of the server process.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> USERID of the 
    server process. I know I'm using SYS, but it is my own little toy database.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> OS Process 
    ID.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Logon time 
    and duration.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Connection 
    Type (our connection is dedicated).</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Contention<br>
  <br>
  </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Since 
  session 128 is the blocking process, there is no contention information to be 
  displayed. We'll take a look at the blocked session contention information later 
  in this blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Client Information</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> OS user name 
    - Name of the account that is running the Oracle client software (in our case 
    SQLPLUS).</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Host - Name 
    of the machine that is running the client software.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Wait Event </b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Current Wait 
    Event - What resource the session is currently waiting for. In our case, we 
    are waiting from a response from the client. It is expecting me to either 
    execute another SQL Statement or perform a COMMIT or ROLLBACK. Until I perform 
    the COMMIT or ROLLBACK, session 128 will continue to block session 118.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Wait Duration 
    - How long the session has been waiting.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Application</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Current SQL 
    - This column is blank because the SQL statement I executed has completed 
    processing.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Current SQL 
    Command - This column is also blank because of the reason stated above.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Previous SQL 
    - If I click on the link, Oracle will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/04_sql_details_128.gif">SQL 
    Details page</a> for this statement. The page displays the SQL statement, 
    performance statistics, access path information and also provides a link to 
    run the SQL Tuning advisor.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Program - The 
    application program that executed the SQL statement (in our case SQLPLUS)</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/03_session_details_128.gif">Session 
  Details page</a> also provides a series of tabs across the top. Since we already 
  found most of the information we need to determine what work session 128 is 
  performing, let's click on the Blocking Tree tab at the top of the page. 10G 
  R2 Grid Control responds by displaying the<a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/05_blocking_tree_128.gif"> 
  Blocking Tree panel</a>. This panel provides information on the problem session 
  128 is creating. The panel displays session 128 at the top of the hierarchy 
  stating that it is the blocking session and displays session 118 below it telling 
  us that it is being blocked by session 128. The output panel provides links 
  to view session 118's SQL statement and also displays wait information for both 
  sessions. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at the wait information for session 118. It shows that it is experiencing row 
  lock contention. Lastly, the Blocking Tree panel contains a 'Kill Session' navigation 
  button that will allow us to kill one, or both, sessions. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We'll conclude 
  our investigation of session 128 by reviewing wait history information. We accomplish 
  this by clicking on the 'Wait Event History' tab at the top of the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/03_session_details_128.gif">Session 
  Details page</a>. 10G R2 Grid Control responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/05a_wait_analysis_128.gif">Wait 
  Event History page</a>. The Wait Event History page displays a running history 
  of all the events that session 128 waited for during its execution life cycle. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Continuing our 
  Analysis </b><br>
  Let's continue our problem determination by reviewing session 118, which we 
  now know is being blocked by session 128. I start the analysis by navigating 
  back to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/02z_hang_anlysis_graphic.gif">Hang 
  Analysis Home page</a> and clicking on the green block titled '118' at the bottom 
  of the panel. 10G R2 responds as it did previously by displaying session 118's 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/06_session_summary_118_blocked.gif">Session 
  Summary page</a>. Nothing out of the ordinary here, so let's continue. I'll 
  use the 'View Session Details' navigation link to ask 10G R2 Grid Control to 
  display session 118's <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/07_session_details_118_blocked.gif">Session 
  Detail page</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Session 118's Session 
  Detail page contains much of the same information as session 128's did except 
  for a few VERY important details. We see that session 118's Contention column 
  shows that it is being blocked by session 128 and it displays the file that 
  contains the row that both sessions are attempting to update. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The Wait column 
  for session 118 also shows the resource that it is waiting for. In this case, 
  it shows that it is experiencing row lock contention on a row contained in the 
  FOOT. EMP table. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If I click on 'Current 
  SQL' link on the top right hand side of the page, 10G R2 Grid Control will respond 
  by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/08_sql_details_118_blocked.gif">SQL 
  Details page</a> for this statement. The page displays the SQL statement, performance 
  statistics, access path information and also provides a link to run the SQL 
  Tuning advisor.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We'll conclude 
  our investigation of session 118 by reviewing wait history information. We accomplish 
  this by clicking on the 'Wait Event History' tab at the top of the Session Detail 
  page. 10G R2 Grid Control responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/09_wait_history_118_blocked.gif">Wait 
  Event History page</a>. The Wait Event History page displays a running history 
  of all the events that session 118 waited for during its execution life cycle. 
  Notice that the information displayed for session 118 is quite different than 
  for session 128. The information shows that session 118 is experiencing row 
  lock contention.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Solving the 
  Problem</b><br>
  We can easily solve this problem by executing a COMMIT or ROLLBACK command in 
  session 128 or killing the process which will automatically roll back the work 
  it has performed. Problem Solved!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>More Complex 
  Problems</b><br>
  We have already reviewed a simple graphical lock diagram that showed one session 
  blocking another. Let's try something more complex and see how 10G R2 Grid Control 
  responds.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/10_3_sql_sessions.gif">created 
  a third session</a> and executed the same SQL that the previous two sessions 
  did. Here is the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/11_3_sessions_hang_analysis.gif">new 
  graphical lock diagram</a> for the three sessions. Notice that we now have two 
  blocked sessions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's finish this 
  exercise by increasing the complexity once again. I created another table called 
  FOOT. DEPT that contains one row. I created a fourth session and executed the 
  following two statements:</font></p>
<blockquote> 
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> UPDATE foot.dept 
    SET col1='123' where col1='abc' <br>
    Notice that this is updating my new table. </font></p>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">UPDATE foot.emp 
    SET col1='123' where col1='abc'<br>
    Updating the same row that session 128 is holding the row lock on. </font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/12_5_sql_sessions.gif">created 
  one more session</a> and executed this statement:</font></p>
<blockquote>
  <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">UPDATE foot.dept 
    SET col1='123' where col1='abc' <br>
    Notice that this is also updating my new table. </font></p>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Let's take a look 
  at 10G R2 Grid Control's <a href="/blogs/blog_cf/chrisfoot/blogentry2006_03_049606206243/13_5_sessions_hang_analysis.gif">blocking 
  diagram</a>. Our first session (session 128) is blocking our fourth session 
  (session 149). But session 149 is also holding a lock on our new FOOT.DEPT table, 
  which our fifth session (session 104) is waiting for.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We have created 
  a situation where the fourth session is being blocked and is also blocking other 
  sessions. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  I think you'll agree that 10G R2 Grid Control's Hang Analysis feature will provide 
  great benefits when debugging contention problems. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris</font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/hang+analysis,+contention,+row+lock"
                      rel="tag">hang analysis, contention, row lock</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Configuring 10G R2 Grid Control Statistics Gathering Job Default Options</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-02-26.6820456598</link>
                      <description>Now that we understand how to set up maintenance windows, let’s take a look at 10G Grid Control’s (Enterprise Manager), default statistics gathering options.   It is important that we understand what the options are and how to configure them.   Only then can we determine if the automatic and manually executed statistics gathering jobs are configured to meet the needs of our individual database applications.</description>
                      <pubDate>Mon, 27 Feb 2006 07:04:13 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Maintenance 
  Windows</b><br>
  There are two critical components in 10G R2 Grid Control that affect statistics 
  gathering. First, we need to make sure that Oracle's maintenance windows are 
  configured optimally. In <a href="/blogs/blog_cf/chrisfoot/blogentry.2006_02_18.8379309049">my 
  last blog</a>, we learned how to set 10G R2 Grid Control's maintenance windows 
  to ensure that Oracle's routine maintenance tasks don't compete with application 
  programs for finite system resources. You don't want to be forced to tell an application 
  manager that his nightly batch job stream is running long and will be competing 
  with his application's on-line transactions because your statistics gathering 
  job made them run longer. Trust me, that happens. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Manual and Automatic 
  Statistics Gathering Options</b><br>
  Creating an optimal statistics gathering environment also requires us to review 
  the default statistics gathering options. These options will be used for Oracle's 
  automatic statistics gathering jobs. In addition, these options will be used 
  if you do not specifically set them in manually scheduled statistics gathering 
  jobs. We'll learn how to schedule statistics gathering jobs manually in my next 
  blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Navigating to 
  the Options Page</b><br>
  Let's begin by activating 10G R2 Grid Control and navigating to the Manage Optimizer 
  Statistics Home page. We accomplish that by selecting the 'Manage Optimizer 
  Statistics' link displayed on the middle, left hand side of 10G R2 Grid Control's<a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/01a_home_page.gif"> 
  Database Administration Home page</a>. 10G EM R2 responds by displaying the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_266820456598/02b_manage_optimizer_statistics_home.gif">Manage 
  Optimizer Statistics Home page</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">On the right hand 
  side of the panel, there will be a column name in blue titled 'Related Links'. 
  Under that panel you'll see a navigation link titled 'Statistics Options'. When 
  we click on the link, 10G R2 Grid Control responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_266820456598/06a2_stats_default_options.gif">Gather 
  Optimizer Statistics Default Options page</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Some General 
  Advice</b><br>
  Before we begin reviewing the options on this page, let me provide you with 
  some general advice. A lot of the options provide an Oracle recommended setting 
  called &quot;Auto&quot;. I would suggest that you leave the options set to &quot;Auto&quot; 
  and only change them when you feel that a manual setting will produce a more 
  desirable result. Remember that Oracle is building more and more intelligence 
  into the 10G Grid Control tool set. The product is really becoming an expert 
  system. But the default settings are intended to create the most desirable statistics 
  gathering environment for the general database population. It could be that 
  these generic settings may need to be adjusted to fit your environment's specific 
  needs.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You monitor the 
  efficiency of the automatic statistics jobs by looking at the statistics displayed 
  on the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_266820456598/02b_manage_optimizer_statistics_home.gif">Manage 
  Optimizer Statistics Home page</a>. The information on this panel tells us: 
  </font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the database's 
    automatic statistics gathering job is enabled</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">When the statistics 
    gathering job is scheduled to run next </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The total number 
    of previous runs </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The date of 
    the last run </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the last 
    run was successful </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Elapsed time 
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The number of 
    objects it analyzed </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you look closely 
  at the number displayed in the Objects Analyzed display line (in this case 344), 
  you'll notice that it is also a link. Clicking on the link will tell Oracle 
  to display the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/02b_why_stats_were_run.gif">Objects 
  Analyzed report</a>, which lists all of the objects that have been analyzed 
  in the last run. The report also provides the reason why each object was analyzed 
  (stale or missing statistics). You can use this report as well as the information 
  provided by the LAST_ANALYZED column in DBA_TABLES and DBA_INDEXES to determine 
  if Oracle's automatic statistics gathering job is analyzing your tables as often 
  as you would like.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the automatic 
  statistics gathering job is running longer than you would like, or not gathering 
  statistics as often as you would like, it may be beneficial to set some of the 
  options manually.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Option Review</b><br>
  Let's begin our review at the top left hand side of the page. As I stated previously, 
  I will provide you with general advice for each option. As we know, there are 
  a myriad of configuration combinations available. If the database has been upgraded 
  from a previous release, a common practice in the field is to set the options 
  to match the manual statistics gathering jobs that were run previously. Administrators 
  feel safe knowing that the automatic statistics gathering job's configuration 
  closely resembles the old manual statistics gathering jobs that worked for them 
  in the past.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Retention Period</b><br>
  The first setting we see is for the Retention Period. Retention period determines 
  how many day's worth of optimizer statistics will be retained in the repository. 
  In an upcoming blog, I'll show you how to restore a set of saved statistics. 
  If your SQL statement's performance degrades due to access paths changes, you 
  can restore the statistics to a day when you know the statements were running 
  normally to determine if statistics changes were the cause.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Estimate Percentage</b><br>
  Seasoned DBAs know that statistics gathering jobs run on large tables can take 
  a loooonnng time. It is a very common practice to reduce the amount of time 
  the jobs take by reducing the amount of data they analyze. It is important to 
  note, that in most cases, the higher the percentage of the object you analyze, 
  the more intelligent the optimizer's decisions will be. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can choose 
  Auto if you would like Oracle to choose for you. Many DBAs choose 20% as the 
  percentage of estimation. If the database consists of many small tables, you 
  can set the percentage higher to ensure that the optimizer knows as much about 
  the data as possible. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - Choose Auto and monitor SQL statement performance. If the optimizer begins 
  to make poor access path decisions, set the percentage manually and monitor 
  again.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Granularity</b><br>
  The granularity determines what type of partitioned objects will be analyzed. 
  The options are Auto, Global, Global and Partition, All, Partition and Sub-Partition. 
  Do you want to analyze just the partitions and sub-partitions or do you want 
  to analyze just global objects, like indexes, that access more than one partition? 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - Choose auto. Oracle will determine which partitioned objects have had enough 
  data changes made to them to warrant their analysis.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Cascade</b><br>
  Cascade determines if just the table will be analyzed or the table and all of 
  its indexes. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - Choose Auto or True. In most cases, Oracle will choose to analyze the indexes 
  along with the table when Auto is chosen. If you want to make sure that all 
  of the table's indexes are analyzed, choose TRUE.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Histograms</b><br>
  This is the only option that I am a little hesitant to make a recommendation 
  on. Histograms is a complex topic that I can't cover in a few paragraphs. Oracle's 
  default setting is to build histograms. Histograms improve SQL statement plans 
  that access skewed data. Before you begin deviating from Oracle's recommendation, 
  you need to fully understand what histograms are. I recommend that you start 
  your education by reading the Oracle documentation. If highly recommend that 
  you also buy Jonathan Lewis's book titled <a href="/oracle/or_articles/foot14/index.html">Cost 
  Based Oracle Fundamentals</a>. I have learned more about histograms from that 
  one book than I have from all other sources combined. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - If you are experienced in Histograms and know you have skewed data, build 
  the histograms. If you don't have skewed data, don't build them. If you don't 
  have enough experience or education, build the Histograms, read the Oracle manuals, 
  buy Jonathan's book and make an educated decision at a later time.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Degree of Parallelism</b><br>
  Determines how many parallel processes that will be generated. Oracle's statistics 
  gathering jobs can create multiple child processes that analyze the data in 
  parallel. The child processes access the data and report back to the parent 
  process when complete. The more parallel processes that are generated, the faster 
  the statistics job will run and the more system resources it will consume. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The administrator 
  must balance statistics gathering job performance with the amount of resources 
  the job consumes. DBAs use the parallel setting in conjunction with the Estimate 
  Percentage option to maximize statistics gathering job performance. <br>
  <br>
  The options are Auto (Oracle chooses), Default (based on initialization parameters), 
  Table Default (parallel option set at the object level), Degree (number of parallel 
  processes set manually). </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - Choose Auto once again. Many DBAs feel more comfortable setting the value manually (Degree option) because that is what it was set to before.
  We have manually set our Degree to 12 on most of our data warehouse databases. 
  We have historical performance statistics that tell us that generating that 
  number of parallel processes to gather statistics provides an optimal balance 
  between the statistics gathering job's performance and the percentage of resources 
  it consumes on the host platform.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Cursor Invalidation</b><br>
  A cursor is invalidated when one of the objects it depends on is changed. This 
  causes the cursor to be reparsed. New statistics may change access paths and, 
  as a result, the statements accessing those newly analyzed objects will need 
  to be reparsed.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - Choose Auto or Immediate. I don't have enough information yet to determine 
  the quality of Oracle's Auto option. Most of our statistics gathering jobs run 
  during the application's nightly maintenance windows, so the performance degradation 
  that occurs as a result of cursor invalidation does not have a significant impact. 
  We have chosen Immediate for most of these environments.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Target Object 
  Class</b><br>
  The cost-based optimizer is only as good as the statistics it uses as input. 
  Statistics collections should be run on a regular basis to ensure that the statistics 
  are current (representative of the data being accessed). In Oracle9i, the GATHER 
  AUTO option of the DBMS_STATS procedure could be used to help determine if statistics 
  generation was required. If more than 10% of the rows changed in the table since 
  the last analyze was performed, the DBMS_STATS procedure (with the GATHER_AUTO 
  option activated) analyzed the table. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you choose Auto, 
  10G R2 Grid Control uses the same methodology. It will identify the percentage 
  of data that is changed for each object under analysis and determine if new 
  statistics are warranted. Choosing All will gather statistics for all objects 
  in the database and choosing Oracle will gather statistics for system component 
  schemas only.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b> 
  - Choose Auto or All in most cases. If the application has numerous tables (our 
  Peoplesoft application has tens of thousands of database objects), use the auto 
  option to ensure that you only gather statistics on objects that have changed. 
  Other applications that have a smaller number of objects or have the majority 
  of objects changed by application programs and are performance sensitive, choose All.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  I hope you enjoyed this blog. Please remember that my personal recommendations 
  are just that - my personal opinion. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Configuring 10G OEM Grid Control Maintenance Windows</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-02-18.8379309049</link>
                      <description>Now that we have a general understanding of the important role that statistics play in query optimization, let's forge ahead with our discussion on statistics administration best practices.   In this blog, we'll learn how to configure 10G Grid Control R2's maintenance windows to tailor them to meet our application's business processing requirements. In the next blog, we'll examine the optimizer statistics gathering default options page and discuss what some of the recommended settings should be.    &lt;BR&gt;&lt;BR&gt;In the last blog of this series, we’ll complete our discussion on 10G Grid Control R2 optimizer statistics administration by learning how to schedule optimizer statistics gathering jobs manually.</description>
                      <pubDate>Mon, 20 Feb 2006 07:06:55 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Let's begin by 
  activating 10G Grid Control R2 and navigating to the Manage Optimizer Statistics Home 
  page. We accomplish that by selecting the 'Manage Optimizer Statistics' link 
  displayed on the middle, left hand side of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/01a_home_page.gif">10G 
  Grid Control R2's Database Administration Home page</a>. 10G Grid Control R2 responds by displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/02_manage_optimizer_statistics_home.gif">Manage 
  Optimizer Statistics Home page</a>. <br>
  <br>
  <b>Manage Optimizer Statistics Home Page</b><br>
  This is the panel that provides all of the information and links we need to 
  administer optimizer statistics for our Oracle 10G databases. The information 
  on this panel tells us: </font></p>
<ul>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">If the database's 
    automatic statistics gathering job is enabled </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">When the statistics 
    gathering job is scheduled to run next </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The total number 
    of previous runs </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The date of 
    the last run </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">If the last 
    run was successful </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Elapsed time</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The number of 
    objects it analyzed</font></li>
</ul>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">If you look closely 
  at the number displayed in the Objects Analyzed display line (in this case 344), 
  you'll notice that it is also a link. Clicking on the link will tell Oracle 
  to display the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/02b_why_stats_were_run.gif">Objects 
  Analyzed report</a> which lists all of the objects that have been analyzed in 
  the last run. The report also provides the reason why each object was analyzed 
  (stale or missing statistics). You can use this report as well as the information 
  provided by the LAST_ANALYZED column in DBA_TABLES and DBA_INDEXES to determine 
  if Oracle's automatic statistics gathering job is analyzing your tables as often 
  as you would like. We'll discuss this topic in-depth in the next blog.<br>
  <br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/02_manage_optimizer_statistics_home.gif">Optimizer 
  Statistics Home page</a> provides links that allow administrators to:</font></p>
<ul>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Adjust automatic 
    maintenance window start and duration times </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Edit the parameter 
    defaults for optimizer statistics tasks. The defaults affect both automatic 
    and manually scheduled statistics gathering jobs</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Schedule manual 
    statistics gathering jobs </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Restore statistics 
    to a previous time in the past. VERY helpful if you have access paths that 
    have changed</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Lock and unlock 
    optimizer statistics. To learn more about why you would want to lock statistics 
    for a set of database objects, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_25.6154655837">Oracle 
    10G R2 New Features Part 3</a> </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Delete optimizer 
    statistics</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Review statistics 
    gathering jobs already scheduled</font></li>
</ul>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Application 
  Job Scheduling and Maintenance Windows</b><br>
  One of the challenges that DBAs face is that every application we work with 
  is different. For many of us (include me in this group), the opportunity to 
  work with many different applications is one of the reasons we became database 
  administrators. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each application 
  has its own unique processing flows. As a result, you often need to alter a 
  database's default maintenance window to ensure that Oracle's routine maintenance 
  tasks don't compete with application programs for finite system resources. In 
  other words, you don't want Oracle running the automatic Segment Advisor at 
  the same time your heavy batch processing programs are running. The only way 
  to prevent these conflicts from occurring is to adjust the times on the weekday 
  and weekend maintenance windows and throttle the amount of resources they use. 
  </font> </p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">We know that 10G 
  will schedule Segment Advisor and statistics gathering jobs to run during the 
  maintenance windows. I'm currently reviewing the Oracle documentation to determine 
  what other routine maintenance tasks are run during the maintenance windows. 
  Its important for us to know all of the routine maintenance tasks Oracle runs 
  during those times.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Managing Maintenance 
  Windows and Windows Groups</b><br>
  Oracle provides the 'Maintenance_Window_Group' navigation link on the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/02_manage_optimizer_statistics_home.gif">Manage 
  Optimizer Statistics Home page</a> to allow administrators to configure the 
  settings for the GATHER_STATS_JOB that is automatically run on objects with 
  outdated or missing statistics.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">When I click on 
  the 'Maintenance_Window_Group' navigation link, 10G Grid Control responds by displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/03_maintenance_window_group_edit_1.gif">Edit 
  Window Group: Maintenance_Window_Group panel</a>. This panel allows administrators 
  to:</font></p>
<ul>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Enable and disable 
    the Maintenance Window Group</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Edit individual 
    Maintenance Windows</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Add Windows 
    to the Maintenance Window Group</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Remove Windows 
    from the Maintenance Window Group</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Apply this Maintenance 
    Window Group to multiple databases</font></li>
</ul>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">It's pretty easy 
  to remove a Maintenance Window from Maintenance Window Group. But in order to 
  add a new Window, you have to create it first. For example, our application 
  may have different batch processing job streams for each day of the week. In 
  that case, it may be beneficial for us to create a different Maintenance Window 
  for each day. You also may want to have a separate Maintenance Window for Saturday. 
  </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The majority of 
  applications I have worked with in the past usually had a pretty standard processing 
  schedule for each day of the workweek. But as we discussed previously, each 
  application is different and you may want to tailor the Maintenance_Window_Group 
  to ensure that the database's routine maintenance tasks do not conflict with 
  application programs.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">In order to create 
  a Maintenance Window, I need to go back to of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/01a_home_page.gif">10G 
  Grid Control R2's Database Administration Home page</a>. On the upper, right hand side 
  of the page, you'll see a column heading titled 'Oracle Scheduler'. In that 
  column, there are two navigation links titled 'Windows' and 'Window Groups'. 
  The links point to panels that allow us to administer Windows and Window Groups. 
  </font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Before we continue, 
  some clarification is in order. There are two ways to navigate to the Windows 
  and Windows Group administration panels that will allow us to administer our Maintenance Windows and Maintenance 
  Window Group. We can click on the the 'Maintenance_Window_Group' navigation 
  link on the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/02_manage_optimizer_statistics_home.gif">Manage 
  Optimizer Statistics Home page</a> as we learned how to do previously in this 
  blog (about 3 paragraphs up) or I can go back to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/01a_home_page.gif">10G 
  Grid Control R2's Database Administration Home page</a> and click on the 'Windows' and 
  'Windows Groups' links.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">But there is only 
  one way to navigate to the panel that allows me to create a new Window that 
  I can add to a Window Group. I have to go back to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/01_home_page.gif">10G 
  Grid Control R2's Database Administration Home page</a> and select the 'Windows' navigation 
  link. When I do this, 10G Grid Control R2 responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/05b_create_window.gif">Scheduler 
  Windows page</a>. This panel allows me to edit, alter and delete Windows. I'll 
  create a new Window by selecting the 'Weeknight Window' radio button and then 
  selecting the 'Create Like&quot; navigation button. 10G Grid Control R2 responds by displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/05c_configure_window.gif">Create 
  Window administration panel</a>. I chose the following options for the new Window:</font></p>
<ul>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The name of 
    our Window will be Monday_Window</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">The new Window 
    will use the INTERNAL_PLAN resource plan. Resource plans allow administrators 
    to throttle the amount of CPU resources used. To learn more about resource 
    plans, please refer to Kimberly Floss's article titled <a href="http://www.oracle.com/technology/oramag/oracle/04-nov/o64tuning.html">Database 
    Resource Manager</a>. I didn't need to choose a resource plan to control CPU 
    resources. We'll learn in an upcoming blog how we can control the level of 
    CPU utilization our statistics gathering jobs consume by adjusting the number 
    of parallel processes they create. </font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I chose the 
    default low priority. A high priority Window takes precedence over a low priority 
    Window if the times of the two Windows overlap. If our new Window overlaps 
    another Window that has a high priority, the high priority Window's configuration 
    will take precedence.</font></li>
  <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I configured 
    the Monday_Window to be a weekly Window that repeats every week. The day for 
    this Window to be active is every Monday starting at 12:00 midnight. The Window's 
    duration is 8 hours.</font></li>
</ul>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">When I select the 
  'OK' navigation button to continue, Oracle takes me back to the calling panel. 
  The Scheduler Windows page shows the new window I have just created. As we learned 
  previously, I can edit our Maintenance Window Group by navigating either to 
  10G Grid Control R2's Database Administration Home page and clicking on the 'Window Groups' 
  navigation link or by navigating back to our Manage Optimizer Statistics Home 
  page and selecting the 'Maintenance_Window_Group' navigation link.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Regardless of which 
  way we choose, 10G Grid Control R2 will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/05e_edit_window_group.gif">Scheduler 
  Windows Group panel</a>. I only have one Windows Group to choose from. It's 
  the Maintenance_Window_Group that Oracle automatically created for us during 
  database creation. I selected 'Edit' from the drop down menu to edit the Maintenance 
  Window Group. 10G Grid Control R2 responds by displaying the<a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/05f_add_remove_windows.gif"> 
  Edit Window Group: Edit Maintenance Window Group panel</a>. Since I want to 
  add our newly created Monday_Window to the Maintenance_Window_Group, I continue 
  by clicking on the 'Add/Remove' navigation button.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">10G Grid Control R2 displays 
  a <a href="/blogs/blog_cf/chrisfoot/blogentry2006_02_188379309049/05g_add_remove_windows_2.gif">listing 
  of Windows</a> that can be added to the Maintenance_Window_Group. Notice that 
  I have deactivated the Weeknight Window and selected the Monday_Window. I can 
  complete the process by clicking on the 'Select' navigation button.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">If I want, I can 
  add the remaining days by creating a specific Window for each day. Or I can 
  choose to deactivate Monday from the Weeknight Window. In that case, all other 
  weekdays will use the Weeknight Window's configuration. I'll have to remember 
  to add the Weeknight Window back to the Maintenance_Window_Group if I choose 
  to use that configuration.</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Summary </b><br>
  It is important to note that this was just a quick example of how to configure 
  Maintenance Windows. The intent of this blog was to show you that you have a 
  myriad of configuration options available to you. You can choose to use the 
  default Maintenance Windows and Maintenance Windows Group or you can create 
  a totally unique set of Maintenance Windows for your database. As I stated, 
  the options are endless. In my next blog, I'll show you how to configure the 
  default options for the gathering statistics jobs. </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Optimizer Statistics Gathering</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-02-11.0939245208</link>
                      <description>10G Grid Control provides an optimizer statistics administration panel that allows administrators to gather, restore, delete, lock and unlock object statistics.  Before we learn how to use 10G Grid Control R2’s object statistics administrations panels, let's take a quick look at object statistics and find out why they are so important to effective query optimization.&lt;BR&gt;&lt;BR&gt; Part 1 of this three part series will provide a high-level overview of optimizer statistics. Part 2 will focus on maintenance windows that control when automatic statistics gathering jobs run. In part 3, we’ll learn how to use 10G Grid Control R2 to ensure that the optimizer has the correct statistical information it needs to generate optimal access paths.</description>
                      <pubDate>Mon, 13 Feb 2006 07:23:20 -0600</pubDate>
                      
     
        <category>optimizer, statistics, analyze</category>
             
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> This blog in not intended to be an all encompassing primer on the Oracle optimizer. That goal 
is far beyond the scope of a single blog. There are a few good books on the subject. 
If you want to learn how the optimizer works, I highly suggest that you read Jonathan 
Lewis's book titled <a href="http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html"><i>Cost-Based 
Oracle Fundamentals</i></a>. It is one of the most educational and informative 
books I have ever read on the cost-based optimizer. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">So little is known 
  about the inner-workings of the cost based optimizer that is often called the 
  Oracle database's &quot;little black box.&quot; The optimizer's job is to analyze 
  the statement being executed and determine the most efficient access path to 
  the data for that statement. Craig Mullins provides an excellent description 
  of a database optimizer in <a href="http://www.craigsmullins.com/cm-book.htm"><i>The 
  DB2 Developer's Guide</i></a> &quot;the optimizer is equivalent to an expert 
  system. An expert system is a standard set of rules when combined with situational 
  data can return an expert opinion.&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The cost based 
  optimizer uses statistics generated by the DBMS_STATS procedure as the situational 
  data when creating its expert opinion on which access path to the data is most 
  optimal. These statistics are stored in the data dictionary and describe the data object's space characteristics, data uniqueness and data distribution. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The cost-based 
  optimizer is only as good as the statistics it uses as input. Statistics collections 
  should be run on a regular basis to ensure that the statistics are current (representative 
  of the data being accessed). The optimizer is then able to create a highly accurate 
  access path that is based on the least cost. If statistics are not available, 
  the optimizer uses an algorithm to calculate the statistics, which often 
  leads to &quot;less than optimal&quot; access paths. In other words, Oracle 
  guesses and it is usually not a very good guesser.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can start your 
  education on the different access paths that are available to the optimizer 
  by reading Oracle's Database Performance Tuning Guide that is provided in each 
  <a href="http://www.oracle.com/technology/documentation/database10gr2.html">Oracle 
  release's documentation</a>. Before you buy third-party books on any topic, 
  I highly suggest that you read Oracle's documentation first. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>CPU and I/O 
  Performance Statistics</b><br>
  Before we begin our discussion on object statistics, let's spend a few minutes 
  discussing the system performance statistics that are used as input to the optimizer. 
  Don't confuse system performance statistics with database performance statistics 
  that are accessed using the V$ tables. We are discussing the system's CPU and 
  I/O performance and utilization. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle 10G, the optimizer takes CPU and I/O costs into consideration during query optimization.    If the optimizer understands what the performance characteristics are 
  for I/O and CPU, it will be more effective at query optimization. 
  Current system statistics allow the optimizer to make more intelligent decisions 
  during the optimization process, which ultimately results in higher quality 
  access paths being generated.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Unlike object statistics, 
  administrators must continue to gather system statistics manually in Oracle 
  10G. This is done by executing the DBMS_STATS.GATHER_SYSTEM_STATS procedure. 
  The key to gathering good system statistics is to run the procedure when a normal 
  workload is being executed. Running it when the workload is light, or too heavy, 
  can result in poor access paths being generated.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you would like to learn more about how system statistics affect the Oracle optimizer, please refer to Jonathan Lewis's excellent article titled 
<a href="http://www.oracle.com/technology/pub/articles/lewis_cbo.html"> Understanding System Statistics</a> on Oracle Technet.  Please pay special attention to Lewis's information pertaining to each release of the database.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Object Statistics</b><br>
  As we learned previously, object statistics describe the contents of the data and how it is stored in 
  the physcal database objects. Before we continue, it may be beneficial for me 
  to provide you with a few examples of how these statistics could affect query performance. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If a table only 
  contains a few hundred rows, queries may run faster if the optimizer chooses 
  to read all of the blocks in the table as opposed to using an index. The I/O 
  generated traversing the index blocks to get to the table row entries would 
  be higher than if Oracle read just the blocks allocated to the table being accessed.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">What if we access 
  a table using a column with poor cardinality? Cardinality describes the uniqueness 
  of a particular value stored in a column. Poor cardinality means that the column 
  has many values that are the same. If our statement contains a WHERE clause 
  that searches for a column value that is contained in 90% of the table's rows, 
  it is best that Oracle, once again, read each and every row in that table. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Conversely if a 
  WHERE clause searches for a column value that appears in 1% of the table rows, 
  it would be beneficial for the optimizer to choose an index. The optimizer also 
  uses object statistics to determine which join method should be used and the 
  order in which the joined tables are accessed. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Here are just a 
  few of the object statistcs that the optimizer uses as input during access path 
  generation:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of rows 
    in the tables being accessed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of blocks 
    allocated to the table</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Average table 
    row length</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of distinct 
    values for a column</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of nulls 
    in a column</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of leaf 
    blocks allocated to indexes</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Number of leveles 
    in the B-Tree</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Clustering factor 
    - how the order of the index matches the order of the table rows</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">As I stated previously, 
  the intent of this blog is to not be an all-inclusive primer on the optimizer, 
  but we should now understand why current object statistics are so important 
  to the generation of efficient query access paths.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Gathering Object 
  Statistics</b><br>
  Oracle provides the DBMS_STATS package to allow administrators to gather, modify, 
  view, export, import, and delete statistics. The DBMS_STATS package gathers 
  statistics on columns, tables, indexes and partitions and stores the results 
  in Oracle's data dictionary. The optimizer reads the object statistics stored 
  in the data dictionary durinq query optimization.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">After DBMS_STATS is executed, current statements in the shared pool that access the newly analyzed tables are invalidated. This 
  forces the statement to be re-parsed which will allow the optimizer to generate 
  access paths based on the new statistics.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There are many 
  different options available in DBMS_STATS. Administrators are able to select 
  which objects to analyze, how much of each object to analyze (large tables may 
  take a loooonng time to analyze), select the number of parallel processes that 
  will perform the analyze, etc. To learn more about all of the options available, 
  please refer to Oracle's Database Performance Tuning Guide and PL/SQL Packages 
  and Types reference manuals that are provided in each Oracle release's documentation.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G Automatic 
  Statistics Generation</b><br>
  In releases prior to Oracle10G, administrators were required to schedule DBMS_STATS 
  jobs on a regular basis to ensure that valid statistics were available to the 
  optimizer. In releases prior to Oracle9i, it was necessary to &quot;guess&quot; how much of the 
  data changed to determine if statistics collection was necessary. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle9i, the 
  GATHER AUTO option of the DBMS_STATS procedure could be used to help determine 
  if statistics generation was required. If more than 10% of the rows changed 
  in the table since the last analyze was performed, the DBMS_STATS procedure 
  (with the GATHER_AUTO option activated) analyzed the table. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">By default, Oracle10G 
  automates these tasks by evaluating the statistics for all of the tables in 
  the database and running analyze when required. Oracle10G's default maintenance 
  window is nightly from 10 PM to 6 AM and all day on weekends. During these time 
  periods, statistics are automatically collected using the GATHER_STATS_JOB procedure. 
  The maintenance window time-periods can be adjusted to tailor them to each individual 
  application's business processing requirements.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In Oracle Database 
  10g, Automatic Optimizer Statistics Collection reduces the likelihood of poorly 
  performing SQL statements due to stale or invalid statistics and enhances SQL 
  execution performance by providing optimal input to the query optimizer.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To ensure that 
  10G is automatically gathering statistics for data objects, you'll need to verify 
  that:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The statistics 
    job is running by executing the following SQL statement:<br>
    <br>
    </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">SELECT 
    * FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'GATHER_STATS_JOB';<br>
    <br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The modification 
    monitoring feature that identifies stale statistics is enabled. This feature 
    is enabled when the STATISTICS_LEVEL parameter is set to TYPICAL (default) 
    or ALL.</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Gathering Statistics 
  Manually in Oracle10G</b><br>
  Now that I have described how wonderful 10G's automatic statistics gathering 
  feature is, why would you ever want to schedule a statistics job manually? Let 
  me describe one real-life example from a recent project here at Giant Eagle. 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We previously learned 
  that automatic object statistics gathering runs during the database's maintenance 
  window. We have a warehouse system that contains an extremely volatile table. 
  Hundreds of thousands of rows are added and removed around the clock. The table 
  is loaded and literally hundreds of SQL statements are run to allow our marketing 
  personnel to make critical business decisions.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The level of activity 
  is based on the particular business process taking place. At one particular 
  time, the table can contain hundreds of thousands of rows and at other times 
  it can contain dozens. OK, so when do you generate statistics? If you run DBMS_STATS 
  at the same time each day, in most cases you would think you would get a predictable 
  set of statistics generated. Not so in this table's case, sometimes you get 
  hundreds of rows and some times you get hundreds of thousands. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If we are unlucky 
  and generate statistics on the table when it has hundreds of rows, access paths 
  suffer when the table grows to hundreds of thousands. To prevent poor access paths from being generated (a big problem in a data warehouse), we run the DBMS_STATS utility immediately after the table is loaded. The optimizer has current statistics 
  to use as input and generates optimal access paths for our critical business 
  queries. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control R2 Manage 
  Optimizer Statistics Panel</b><br>
  A new link titled 'Manage Optimizer' statistics has been added to the database 
  administration home page in Enterprise Manager. Clicking on the link displays 
  the new Manage Optimizer Statistics home page. The new home page provides wizards 
  and templates that facilitate and automate optimizer statistics management. 
  In 10GR2 administrators are able to use Enterprise Manager to gather, restore, 
  delete, lock and unlock statistics. We'll learn how to use this panel in my 
  next blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading,<br>
  Chris Foot<br>
  </font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/optimizer,+statistics,+analyze"
                      rel="tag">optimizer, statistics, analyze</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Our ASM Test Plan</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-02-05.5499110760</link>
                      <description>We are moving forward with our ASM evaluation.   We recently held a facilitated brainstorming session that was led by Giant Eagle’s ace data administrator Jim McQuade.   Jim has extensive training and experience in meeting management and did an excellent job leading the meeting.  I thought I would spend a few minutes on effective meeting management and show you the rough draft of our high-level ASM test plan.</description>
                      <pubDate>Wed, 08 Feb 2006 13:54:49 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> I am a big proponent 
of effective meeting management. I am a huge proponent of having brainstorming 
sessions led by people who are formally trained in the principles of planning 
and conducting business meetings. There is a noticeable difference in 
the quality of work produced from a facilitated brainstorming session when you compare it to the output from a meeting 
that is not led by an experienced meeting manager. </font> 
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In an upcoming 
  blog, I'll discuss how important soft skills are to technicians. It is my personal 
  opinion that no matter how strong of a technician you are, you must have strong 
  inter-personal, communication and organizational skills to excel in our profession. 
  Gone are the days when you could get by with just being a good "techie". I've 
  been in the profession for twenty years now and continue to work on my soft 
  skills. I just signed myself up for a class titled &quot;Communicating with 
  Diplomacy and Tact&quot;. I could always use a refresher on how to communicate 
  in difficult and stressful situations. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> You must communicate clearly in both verbal and written form.   In addition, you also need to learn how to interact with your fellow employees in a professional manner.  All jobs are stressful at times and disagreements in our profession are common.  Being viewed as someone who "doesn't play well with others" will not help you advance your career.  Trust me on this one.   As I stated, I will be spending a blog, or two, on soft skills in the near future.  But if you would like to start your soft skill education early, here's a link to an <a href="http://certification.about.com/od/certificationsbytopic/a/softskills.htm">excellent article</a> on the importance of soft skills for computer professionals.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The intent of our 
  facilitated brainstorming session was to create an ASM test plan. The test plan 
  will be decomposed into a set of detailed ASM test cases. Once we have our detailed 
  test cases documented, I'll be sure to provide them to you in a future blog.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You'll notice that 
  the term &quot;PowerPath&quot; shows up in the test plan. EMC is our storage 
  vendor of choice. PowerPath is EMC's technology that provides multiple path 
  I/O, automatic load balancing and path failover capabilities for servers connected 
  to EMC Symmetrix and Clariion disk subsystems.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In addition, I 
  have recently freed up enough time to begin reading the Oracle documentation 
  on ASM. We have several large projects consuming a lot of my time, so I wasn't 
  able to complete my personal education on ASM before Jim McQuade led our brainstorming 
  session. I'm sure I'll rule out some of the bullets below (and add a few others) 
  as I read the mountain of documentation I have amassed.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Administration</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ASM product 
    installation</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ASM product 
    configuration</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ASM instance 
    startup</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ASM instance 
    shutdown</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database instance 
    startup</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Database instance 
    shutdown</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Operating system 
    shutdown</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Operating system 
    restart </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Migrating a 
    database's files from a file system to ASM</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Migrating database's 
    files from ASM to a file system</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Migrating additional 
    databases to ASM without impacting existing ASM managed databases</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Detaching additional 
    databases from ASM without impacting existing ASM managed databases</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Moving ASM managed 
    databases and disk from one ASM instance to another ASM instance on a different 
    hardware server</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Configuration 
    changes while ASM is active</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Adding 
        disk</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Removing 
        disk</font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Upgrades</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> ASM</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Managed 
        database (Oracle release)</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Operating 
        system</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> EMC PowerPath</font></li>
    </ul>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Monitoring </b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I/O performance</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I/O distribution</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hot spot monitoring - General hot spot monitoring output </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hot sport monitoring 
    - Does the execution of infrequent heavy workloads (SQLLDR, heavy batch updates) 
    activate balancing or can it be set to not monitor?</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G EM reports/graphs 
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Archive log 
    processing</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Performance reports,  
    alerts and notifications</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I/O thresholds</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Impact on 
        segment statistics</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Impact on 
        file I/O statistics</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I/O waits</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Statspack</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10G EM I/O 
        performance reporting</font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Availability 
    alerts and notifications</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> ASM instance 
        failure</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Unplanned 
        disk removal</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Disk failure</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Disk path 
        outage</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Single 
        ASM instance process failure</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Bad database 
        block</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> SAN zoning 
        changes</font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ASM provided 
    reports</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Performance 
        statistics</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Object 
        growth</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Environment details - Disk and file layout maps
        and related information<br>
        </font></li>
    </ul>
  </li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Balancing</b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Identify time 
    when rebalance is actually performed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Manually activating 
    rebalancing</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Establishing 
    time windows when rebalancing should not be performed</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Determine if 
    rebalancing can be &quot;throttled&quot; to ensure application performance 
    is not affected</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Rebalance override 
    at disk level</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 10G R2's capability 
    of supporting ASM/non-ASM managed disk in a single database instance</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Impact on server 
    CPU, I/O and memory during balancing </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Performance </b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Validate quality 
    of the balancing algorithm</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> ASM vs. non-ASM 
    performance</font> 
    <ul>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Batch workloads</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Online workloads</font></li>
      <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">1st time 
        vs. ongoing (allow ASM to rebalance)</font></li>
    </ul>
  </li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Hot spot rebalancing</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Disk addition/disk 
    removal</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Effects of 
    wholesale disk additions</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Different types 
    of disk (Symmetrix and Clariion)</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Backup/Recovery</b><br>
  For those of you that read my blog on <a href="/blogs/blog_cf/chrisfoot/10grmanpart1/index.html">10G 
  RMAN testing Part 1</a>, you know I am highly concerned about the affect that 
  a new database release has on our ability to successfully backup and recover 
  our Oracle database environments. If there is one topic that will make me lie 
  awake nights, it is backup and recovery. Considering we have several multi-terabyte 
  warehouses, you can understand my concern. Well, you can now add ASM to my list 
  of concerns. I intend to find out EXACTLY what impact ASM has on our backup 
  and recovery strategies. I intend to execute the complete RMAN test plan contained 
  in the <a href="/blogs/blog_cf/chrisfoot/10grmanpart2/index.html">10G 
  RMAN testing blog</a>. A couple of the test cases that are related just to RMAN 
  may not be included, but the majority of the test plan will be executed and 
  the results documented. I'll let you know how it goes once the test plan is 
  complete.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><br>
  Interoperability </b></font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Access from 
    existing Oracle administration tools (10G EM)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> EMC PowerPath 
    path availability and load balancing</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Recovery from 
    EMC PowerPath reconfiguration/rediscovery (e.g. devices change names) </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Netbackup </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Veritas Clustering 
    Services</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Operating System 
    utilities (NMON, SAR, IOstat, etc) <br>
    </font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br>
  <b>Conclusion</b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">I think our high-level test plan is a good start. I'm sure that I'll be tweaking the contents 
  of the detailed test cases as I continue my education on ASM.  If you would like us to add a test case for you, let me know. 
  If I can test something for you, I will.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Thanks for reading,</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Chris Foot</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Passing of Lex de Haan</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-02-05.3923516070</link>
                      <description>The Oracle community lost a valued contributor.  Oracle author, presenter and educator Lex de Haan passed away after a battle with cancer.  I intended to write about our Giant Eagle ASM test plan but it is important for me to take a few minutes to talk about Lex first.  Look for my blog on our test plan in a day or two.</description>
                      <pubDate>Sun, 05 Feb 2006 08:36:01 -0600</pubDate>
                              
      <content:encoded><![CDATA[<FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>Let me begin by stating that I never had the good fortune of knowing Lex personally. I only knew him professionally from his contributions to the Oracle community and the great reviews I read about him from others. I recently proposed that DBAZine ask him if he would like to contribute some additional articles for us. I was very impressed by his <A href="/top_auth/top_auth_haan/index.html"><U>articles on SQL joins</U></A> that were published in DBAZine last year. I wanted DBAZine to have more content on the SQL language and thought that Lex would be an excellent contributor. </FONT>
<P><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>Lex had the perfect background, having worked for the Oracle Corporation for fourteen years. For four of those years, Lex worked as the senior curriculum manager for Oracle's education division. In 2004, Lex left Oracle to start his <A href="http://www.naturaljoin.nl/">own consulting company</A> specializing in data modeling, SQL tuning, database design and database internals. What better background could I offer to DBAZine readers? </FONT></P>
<P><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>As I said, I knew Lex from his body of work and his reviews. Lex was an international presenter, a member of the Dutch national body of the ANSI/ISO standards committee and a founding member of the<A href="http://www.oaktable.net/main.jsp">Oaktable Network</A>. Lex was also the author of a book titled <A href="http://www.apress.com/book/bookDisplay.html?bID=385"><I>Mastering Oracle SQL and SQL*Plus</I></A> from Apress Publishing. An excellent book written by someone who had the knack for teaching.</FONT></P>
<P><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>I have a personal history with cancer. My wife has had the misfortune of being diagnosed with it twice. I know the road that is followed during that time is not an easy one. My sincere sympathies to Lex's family and friends. From those that knew him personally and those of us that didn't, he will be missed. I'm sure his comrades at the Oak Table will keep a place open for him...</FONT></P>
<P><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>Look for my blog on ASM in a day or two.</FONT></P>
<P><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>Chris Foot.</FONT><BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle ASM Kickoff</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-01-28.5061385140</link>
                      <description>Let’s deviate from 10G EM R2 for a blog or two.  As I mentioned in an earlier discussion, we are in the beginning stages of testing Oracle ASM here at Giant Eagle.  I thought I would provide you with some general information on ASM and why we are interested in it.  In my next blog, I’ll show you our ASM test plan.</description>
                      <pubDate>Mon, 30 Jan 2006 06:50:14 -0600</pubDate>
                      
     
        <category>10G New Features</category>
     
     
        <category>Oracle 10G, 10G, Automatic Storage Management,</category>
     
     
        <category>Oracle, ASM, disk storage, EMC,</category>
             
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> <b>Automatic Storage Management 
(ASM) </b><br>
Oracle10G provides its own disk storage management system. Database administrators 
are no longer required to use hardware vendor or third-party (Veritas, EMC, etc) 
disk volume managers to provide striping and mirroring functionality. ASM manages 
the raw disks within the Oracle database architecture. Administrators are able 
to assign disks to disk groups, which can then be striped and/or mirrored to provide 
high performance and high availability. During tablespace creation, the administrator 
assigns the tablespace datafile to a disk group. This differs from non-ASM environments which require that administrators place datafiles on the individual disks or file systems. 
</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">Interestingly enough, Oracle's 
  default stripe size is one megabyte. This differs from most disk storage management 
  systems, which often utilize 32K or 64K stripe sizes. Oracle found that one-megabyte 
  stripes on disks provided a very high level of data transfer and best met the 
  needs of disk intensive applications. One can only assume that advancements 
  in disk storage technology have allowed Oracle to access the data in one-megabyte 
  chunks and not drive disk utilization to unacceptable levels.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">One of the reasons why we 
  are interested in ASM is its ability to reduce hot spots. A hot spot occurs 
  when one particular area of disk (or disks) are accessed more heavily than others. 
  The heavy I/O concentration acts like a funnel and slows the data transfer to 
  a point where performance degradation occurs.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle documentation states 
  that ASM is able to identify hotspots and move data from one disk to another 
  during off-peak times to prevent them from affecting Oracle application performance. 
  Rest assured that we intend to perform thorough testing on this feature to ensure 
  it works &quot;as advertised.&quot; We are interested in when rebalancing occurs, 
  rebalancing on demand, the ability to prevent rebalancing from occurring during 
  specific time-periods and finally, rebalancing's affect on performance.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Administrators provide disk 
  mirroring by creating failure groups. Failure groups define ASM disks that share 
  a common potential failure mechanism. Multiple disks that use the same SCSI 
  controller would be one example. The DBA creates the appropriate number of failure 
  groups to accommodate the data requiring disk fault tolerance. ASM's mirroring 
  capability ranges from the mirroring of individual datafiles to entire disk 
  arrays, providing administrators with a high level of flexibility when creating 
  fault-tolerant disk subsystems. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Administrators can choose 
  from the following mirroring options in ASM:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">External - No mirroring. 
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Normal - Data is mirrored 
    on two separate disks. This is the default setting.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">High Redundancy - Data 
    is mirrored on there separate disks providing three-way mirroring capabilities.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">ASM requires its own instance, 
  which identifies the various disk groups and files during instance startup. 
  The ASM instance then mounts the disks under its control and creates an extent 
  map, which is passed to the database instances. ASM does not perform the I/O 
  for the database instances; it is only used to manage the various disk groups 
  under its control. ASM is only activated when individual datafiles are created 
  or dropped or disks are added and removed from the disk groups. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We use EMC as our storage 
  system of choice. One of the benefits that ASM provides is the ability for administrators 
  to add disks to diskgroups and remove disks from diskgroups without taking them 
  offline. When disks are added or removed from the disk group, ASM automatically 
  rebalances the files contained in the disk group while the database is open 
  and functioning. In our current configuration, EMC requires us to shut the databases 
  down (for somewhat lengthy time periods) when we need to add or remove disks. 
  Being forced to shut down a database to perform an administrative function is 
  certainly not desirable. Considering that our UNIX, DBA and Disk Administration 
  groups are all involved when we add or remove disk, you can understand our desire 
  to perform these functions while the database is up and functioning. If ASM 
  allows us to do this without forcing us to take an outage, we are all for it.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle Enterprise Manager 
  (OEM) for Oracle10G and the Database Configuration Assisstant (DBCA) have been 
  updated to allow administrators to configure and manage databases using ASM.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  With Oracle data in double-digit terabytes, we are very interested in ASM and 
  are currently kicking off an evaluation project to determine its viability. 
  The ability to have the database pro-actively tune I/O on its own certainly 
  warrants our upcoming evaluation. Does ASM worry me? You bet it does.. Any time 
  I add another product into the mix that has the capability of preventing my 
  databases from running worries me. That's what this upcoming evaluation is all 
  about. <br>
  </font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/10g+new+features"
                      rel="tag">10G New Features</a></strong>
           
           |&nbsp;
                      <strong><a
    href="http://www.technorati.com/tag/oracle+10g,+10g,+automatic+storage+management,"
    rel="tag">Oracle 10G, 10G, Automatic Storage Management,</a></strong>
           
           |&nbsp;
                      <strong><a
    href="http://www.technorati.com/tag/oracle,+asm,+disk+storage,+emc,"
    rel="tag">Oracle, ASM, disk storage, EMC,</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>My Podcast Interview! </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-01-24.9552458073</link>
                      <description>I made the big-time!  Tom Parrish recently interviewed me for a &lt;a href="/podcasts/podcast_foot/index.html"&gt;DBAZine Podcast&lt;/a&gt;.   I think streaming audio Podcast’s are an exciting addition to the web experience.   Tom and I talk about my newly received Oracle Ace title, technology advancements in the retail industry, blogging, outsourcing and the changing role of the DBA.   Oh, and we also talk about what to do, and what NOT to do, when giving presentations.</description>
                      <pubDate>Tue, 24 Jan 2006 12:09:44 -0600</pubDate>
                              
      <content:encoded><![CDATA[ ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G OEM Grid Control R2 Reporting Capabilities</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-01-22.7407970480</link>
                      <description>One of the features that was missing in 10G R1 was a tool that allowed administrators to generate reports on system related information. 9I OEM's reporting feature could be described as somewhat rudimentary but it got the job done. That job was to quickly generate pre-created and AD-HOC reports using one, or more, database targets as input. Although 10G R1 is far superior to its 9I OEM counterpart, its reporting functionalities were limited. &lt;BR&gt;&lt;BR&gt;10G Grid Control R2 comes to the rescue with a new reporting capability that makes 9I OEM's reporting capabilities pale in comparison. Let's face it, DBAs have too much to do. The less time we have to spend retrieving information we need to make decisions, the more time we have to make them. </description>
                      <pubDate>Mon, 23 Jan 2006 07:23:24 -0600</pubDate>
                      
     
        <category>10G Enterprise Manager, enterprise manager</category>
     
     
        <category>10G reporting, 10g advisors, 10g ADDM,</category>
             
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"><b>9I OEM Report Definitions</b><br>
Being the manager of the database group, I use 9I OEM's reporting capabilities 
quite a bit. The tool provides a set of canned reports that work well. In addition, 
9I OEM's AD HOC reporting functionality allows me to build custom reports to fit 
my specific needs. </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">For example, instead of 
  maintaining an Excel Spreadsheet containing information on database releases 
  and versions for all databases in our environment, I created a report that produced 
  this information. 9I OEM's reporting capabilities allow me to generate the report 
  whenever I need to. Hey, I'm a database guy, I try and use spreadsheets as little 
  as possible. 9I OEM also allows me to schedule reports to run on a regular basis 
  and format them using basic HTML commands. We continue to rely upon these features 
  quite heavily here at Giant Eagle. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control R1</b><br>
  When we installed 10G R1, one of the first features we intended to test was 
  the tool's reporting functionality. We were hoping that 10G R1 would usher in 
  a new era of management reporting capabilities. Weren't we surprised when we 
  found that 10G R1 provided little to no reporting features. This lack of reporting 
  functionality became an immediate issue for us. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control R2 to the Rescue</b><br>
  I asked a few of my Oracle contacts to tell me if and when 10G Grid Control was going 
  to provide pre-created and AD-HOC reporting for targets under its control. I 
  was told that the very next release of 10G Grid Control would provide the capabilities 
  I was looking for. When 10G Grid Control R2 became available, we immediately downloaded 
  and installed the product. What was the first feature we looked for? You guessed 
  it&#133;. Reporting! We were pleasantly surprised when we found that 10G Grid Control 
  R2 did indeed provide a robust reporting tool set. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I am always slightly concerned 
  when I review an R1 version of anything. Whether it is an entirely new piece 
  of software or a single software feature, I expect it to be somewhat rudimentary, 
  maybe even a little buggy. This is definitely not the case with 10G R2's reporting 
  feature. I would describe 10G R2's reporting toolset as an excellent first implementation 
  and definitely a step in the right direction.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Using 10G R2's Reporting 
  Features</b><br>
  Let's begin our review by activating 10G Grid Control R2 and navigating to the Reporting 
  Home page. We accomplish that by selecting the Reports tab displayed at the 
  top, right hand side of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/01_home.gif">10G 
  Grid Control R2's Home page</a>. 10G Grid Control R2 responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/02_report_listing.gif">Reporting 
  Home page</a>. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Reporting Home page 
  begins with a set of input boxes that allow users to enter search criteria to 
  quickly find the report they are looking for. Directly below the input boxes, 
  you'll notice a series of buttons that provide users with the capability of 
  creating, deleting and editing the reports. Administrators choose the report 
  they want to customize, perform the customization (including report scheduling) 
  and save it back to the report library under a different name. 10G Grid Control R2 makes 
  it that simple. We'll create a custom report later in this blog. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control R2 Reports</b><br>
  10G Grid Control R2 provides over 110 reports for us to choose from. What really impresses 
  me the most about the reports is not the depth of the reports but the breadth. 
  The scope of these reports is much broader, covering virtually all of the components 
  involved in a database application environment. I certainly can't cover every 
  report that 10G Grid Control R2 provides, but I think it is important to highlight some 
  of the interesting categories and individual reports.</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><b>Deployment and Configuration</b> 
    - 10G Grid Control R2 provides a wealth of information on the infrastructure that supports 
    the Oracle application environment. We are able to view hardware configurations as well as
    operating system, database and application server releases and patches.  In addition, we are also able to generate reports on 
    Oracle database and application configuration information. The benefits that this 
    category of reports provides cannot be understated. </font> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">Instead of us having 
      to log on to the individual targets to retrieve Oracle database and application 
      server configuration data or being forced to ask those pesky operating system 
      administrators to provide us with the O/S and hardware configuration information, 
      we can just log on to 10G Grid Control R2 and retrieve all of the data we need with 
      a few quick points and clicks. I like it!</font></p>
  </li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> <b>Monitoring</b> - 
    One of my favorite report categories of all time and the category that I firmly 
    believe has the most potential. What I find exciting is all of the performance 
    measurement reports in this category. The measurement information ranges the 
    spectrum, providing everything from application web pages that are experiencing 
    poor performance to beacon service tests.</font> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">I think that out of 
      all of the performance enhancements available in 10G R2, I am most excited 
      about the potential that Oracle beacons offer. A beacon is owned by the 
      10G Grid Control central agent and shows up as a separate target type. Here's the 
      cool part. A beacon's job is to run pre-recorded transactions that monitors:</font></p>
    <ul>
      <li><font face="Arial, Helvetica, sans-serif" size="2"> Availability and 
        performance of all network devices including host computers and IP traffic 
        controllers</font></li>
      <li><font face="Arial, Helvetica, sans-serif" size="2"> Availability and 
        performance of web pages and web applications</font> <br>
        <br>
      </li>
    </ul>
    <p><font face="Arial, Helvetica, sans-serif" size="2">We are rapidly becoming 
      a very large Oracle application server shop. Although I haven't had a chance 
      to perform any in-depth evaluations on beacons yet, I have run a simple 
      test or two. Rest assured I intend to provide you with a few blogs on beacons 
      because I am very interested in learning more about beacons and the potential 
      benefits they may provide. </font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control R2 provides a 
      beacon report page that provides performance information for each hop starting 
      from the client desktop to the connection's final destination (usually an 
      Oracle database). Each leg of the journey is displayed along with the amount 
      of time it took to complete the hop. This will allow administrators to quickly 
      identify which component is the cause of the performance/availability problem 
      in complex, multi-tier environments.</font></p>
  </li>
  <li><b><font face="Arial, Helvetica, sans-serif" size="2">Security</font></b><font face="Arial, Helvetica, sans-serif" size="2"> 
    - 10G Grid Control R2 provides a wealth of security reports. With today's security concerns, 
    they are definitely needed. Take a look at the various security reports, I 
    think you'll find that 10G Grid Control R2 is an excellent first step in providing administrators 
    with the security information they need to protect and secure corporate database 
    assets.</font></li>
</ul>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> <b>Storage Reports</b> 
    - Two of my favorites are the Row Chain and Reclaimable Space reports. Another 
    beneficial report is the Monthly Space Usage reports that allow administrators 
    to track database growth historically. Tracking growth historically allows 
    administrators to predict future space requirements. Looks like I will be 
    able to finally retire my Chris Foot special Space Tracker reports. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Report Examples</b><br>
  Let's continue our discussion by running a couple of reports. I chose the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/03_os_report.gif">Operating 
  System Summary report</a> which displays O/S release and patch information for 
  all monitored host targets. I then chose the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/04_inst_details_report.gif">Oracle 
  Database Software Summary report </a>which shows release and patch information 
  for all monitored database targets. Two reports that I intend to run on a pretty 
  regular basis. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Creating and Scheduling 
  Reports</b><br>
  We create custom reports and schedule reports to run on a regular basis using 
  the same process. I begin by selecting the report I want to customize or schedule 
  by checking the radio button displayed at the beginning of each report's row. 
  For this discussion, I chose the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/05_all_db_security.gif">Database 
  Security Report</a>. </font><font face="Arial, Helvetica, sans-serif" size="2">I 
  then click the &quot;Create Like&quot; navigation button to begin the customization. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control R2 responds by displaying 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/06_create_report_1.gif">Create 
  Report Definition General page</a>. The general page provides users with the 
  ability to change the title and category, add targets, etc. I continue the process 
  by clicking on the Elements navigation tab at the top of the page. 10G Grid Control R2 
  displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/07_create_report_2.gif">Create 
  Report Definition Elements page</a> that allows me to alter the report's text 
  formatting and edit the SQL that creates the output. Let's click on the Set 
  Parameters navigation button displayed at the end of the Table From SQL row 
  to look at the SQL.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/08_create_report_2a.gif">Create 
  Report Set Parameters page</a>. This page allows me to change the SQL statement 
  being executed to meet my specific requirements. I also use this page to control 
  the number of rows displayed on a page and add custom column headings.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When complete, I click on 
  the Schedule navigation tab to continue. 10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/09_create_report_3_2.gif">Create 
  Report Schedule page</a>. I use this page to schedule the report to run on a 
  regular basis. I do this by clicking on the Schedule Report and Repeating navigation 
  buttons at the top of the Create Report Schedule page.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control R2 responds by <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/09_create_report_3a.gif"> 
  expanding the Scheduling options</a>. I am now able to choose the frequency, 
  start and repeat until dates. I complete the page by specifying if I want to 
  save copies of the report in the repository, identifying e-mail addresses to 
  mail the report to and setting the report's purge criteria.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The last page I need to 
  complete is the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_227407970480/10_create_report_4.gif">Create 
  Report Access page</a>. The Create Report Access page allows administrators 
  to specify which users are able to execute and view our newly customized report.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The final step is to hit 
  the OK button to create the report. 10G Grid Control R2 executes a quality check to ensure 
  that all of the report's parameters are set correctly. If the customization 
  passes the review, the report is created.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Conclusion</b><br>
  I think you will agree that 10G Grid Control R2's reporting feature is pretty robust for 
  a &quot;V1 release.&quot;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading!</font></p>
<p> </p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <br>
  </font></p> 
     _____<br />
     tags:
     <span class="simpleBlogBylineCats">
           <strong><a href="http://www.technorati.com/tag/10g+enterprise+manager,+enterprise+manager"
                      rel="tag">10G Enterprise Manager, enterprise manager</a></strong>
           
           |&nbsp;
                      <strong><a
    href="http://www.technorati.com/tag/10g+reporting,+10g+advisors,+10g+addm,"
    rel="tag">10G reporting, 10g advisors, 10g ADDM,</a></strong>
           
     </span>
]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Executing SQL Scripts Against Multiple Database Targets Using 10G OEM Grid Control R2 </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-01-14.3116717615</link>
                      <description>Last week, we discussed 10G Grid Control R2’s feature that allows us to run host commands against multiple targets at the same time.   10G Grid Control R2 also provides an easy-to-use panel that allows administrators to run SQL scripts against multiple database targets simultaneously.   Just like its host command counterpart, all we need to do is code up a SQL statement, choose a set of database targets, run the SQL against the multiple targets and review the output.  Simple as can be.</description>
                      <pubDate>Mon, 16 Jan 2006 06:27:14 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> <b>Navigating to the Execute 
  SQL Statement Home Page</b><br>
  Let's begin by activating 10G Grid Control R2 and navigating to the Execute SQL Statement 
  Home page. We accomplish that by selecting the 'Targets' tab at the top of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/01_home.gif">10G 
  Grid Control R2's Home Page</a>. 10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/02_host_execute_link.gif">Hosts 
  Home Page</a>. We continue our navigation by selecting the 'Databases' sub-tab 
  on the top of the Hosts Home page. 10G Grid Control R2 responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/03_sql_execute_link.gif">Database 
  Target Home page</a>. At the bottom left of the database target home page, 10G 
  Grid Control R2 provides a link to let us access the<a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/04_execute_sql_home.gif"> 
  Execute SQL Statement Home page</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Execute SQL Statement 
  Home Page</b><br>
  Let's spend a couple of minutes reviewing this page. You'll notice that it is 
  almost an exact duplicate of the<a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/03_execute_host_main.gif"> 
  Execute Host Command Home page</a> that I discussed in my last blog. If we start 
  at the top of the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/04_execute_sql_home.gif">Execute 
  SQL Statement Home page</a>, you'll notice that I have already entered my first 
  SQL statement:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2"> 'SELECT NAME FROM DBA_TABLESPACES' 
      </font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">in the SQL statement input 
  box. I have purposely chosen the incorrect column name 'NAME' instead of the 
  correct column name 'TABLESPACE_NAME' in the SQL statement. This is to show 
  you the error processing that occurs when you submit an incorrect SQL statement 
  for execution.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Look at the text above the 
  SQL statement's input box. It states that you can execute either SQL or PL/SQL. 
  What is more important to note are the words &quot;Any database changes resulting 
  from the commands must be rolled back manually if the changes are not desired.&quot; 
  This is NOT a sissy SQL*PLUS session, so you can't rollback or undo unwanted 
  data changes with the ROLLBACK SQL statement. The data changes you will make 
  will be permanent. So, watch what you execute on this panel.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Like its Execute Host Command 
  counterpart, the Execute SQL Statement Home page also allows users to <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/10_load_sql_from_file.gif">load 
  a script from their client or from a monitored host target</a> by clicking on 
  the 'Load OS Script&quot; navigation button. 10G Grid Control R2 also allows users to 
  maintain a library of commonly used SQL and PL/SQL scripts in the Enterprise 
  Manager Repository. We navigate to the<a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/11_load_sql_from_library.gif"> 
  library of stored scripts</a> by selecting the 'Load from Job Library' buttons 
  that 10G Grid Control R2 displays at the top and bottom of the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/04_execute_sql_home.gif">Execute 
  SQL Statement Home page</a>. Since this is a very new installation of 10G Grid Control 
  R2, we don't have any scripts stored in the library. But as I previously stated 
  in my blog on Host script execution, I expect us to take advantage of this feature 
  very soon. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Adding Targets</b><br>
  Now that I have entered my incorrect 'SELECT NAME FROM DBA_TABLESPACES' command 
  in the input box, let's add some database targets to execute it on. I do this 
  by clicking on the 'ADD' button that is displayed on the lower right hand side 
  of the Execute SQL Statement Home page. 10G Grid Control R2 responds by displaying the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/05_add_dbs.gif">Add 
  Targets Pop-up Window</a>. I am able to choose one, or all, of the monitored 
  database targets. I select them by clicking on the 'Select' check box at the 
  beginning of each database target's row.</font><font face="Arial, Helvetica, sans-serif" size="2">Once 
  I have selected the desired database targets, I click on the 'Select' navigation 
  button that is displayed on the lower right hand corner of the pop-up. 10G Grid Control 
  R2 returns us back to the Execute SQL Statement Home page. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Executing the SQL Statement</b><br>
  Our next step is to execute the statement by clicking on the 'Execute' navigation 
  button. 10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/06_processing.gif">Processing: 
  Executing SQL Statement status page</a>. The numbers will increment as the command 
  is executed on the different database targets. When the statement is complete, 
  10G Grid Control R2 returns us to the Execute SQL Statement Home page.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Our Error</b><br>
  Notice that we have a series of red 'X's displayed at the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/06a_error_display.gif">bottom 
  of the page</a>. 10G Grid Control R2 is politely telling us that it had a problem processing 
  our statement. We can click on the &quot;Show Details&quot; link on the left 
  side of the page to review the error messages contained in the Execution Results 
  page for each of the database servers. I chose the 'Show Details' link from 
  the first server. The error messages displayed on the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/07_error_message.gif">first 
  server's Execution Results page</a> states that the 'NAME' column was not contained 
  in the DBA_TABLESPACES dictionary table.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Correcting and Rerunning 
  the Statement</b><br>
  I corrected the error by changing 'NAME' to 'TABLESPACE_NAME' in the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/08_fix_sql.gif">SQL 
  statement input box</a>. I clicked on the 'Execute' navigation button to execute 
  the corrected statement. 10G Grid Control R2 displays the processing screen again. After 
  processing is complete, 10G Grid Control R2 returns us to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/08a_output.gif">Execute 
  SQL Statement Home page</a>. The page looks a little different since the last 
  time we viewed it. No more red 'X's. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Statement Command 
  Output</b><br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/08a_output.gif">Execute 
  SQL Statement Home page</a> now displays the output from the SQL statement. 
  Each row in the output table contains a single database's output. We can expand 
  or collapse the output displayed. This allows us to easily navigate through 
  the different database target's output. I clicked on the 'Complete Execution 
  Results' navigation button to view the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/08b_complete_output.gif">entire 
  result set from the first database target</a>. We can also save the output to 
  an <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/08c_save_all_output.gif">HTML 
  file </a>by clicking on the 'Save Results' navigation button.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Execution History</b><br>
  We are also able to review <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_143116717615/09_execution_history.gif">previous 
  SQL statement executions</a> by clicking on the 'Execution History' button that 
  is displayed on the top right hand side of the Execute SQL Statement Home page. 
  The command execution output page allows us to load the results if we want to 
  review them again, or load just the SQL statement/PL/SQL code to execute them 
  to obtain more current information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b><br>
  Summary</b><br>
  I hope you enjoyed my second blog of the New Year. In my next blog, I'll discuss 
  the 10G R2 reporting feature available in Oracle's latest and greatest release 
  of Enterprise Manager, 10G Grid Control R2.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Thanks for Reading!<br>
  </font> </p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G R2 Multi-Host Script Execution and Oracle ASM Intro </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-01-08.4154171355</link>
                      <description>A weird combination of topics to start the New Year on but I think it is important for us to cover a few interesting enhancements contained in 10G R2 Enterprise Manager. &lt;br&gt;&lt;br&gt; In addition, we are starting our official ASM (Automatic Storage Management) evaluation project . The end result of the project would be the conversion of 10.2 Terabytes of disk to Oracle ASM. Could make for a very interesting set of blogs, don't you think?</description>
                      <pubDate>Mon, 09 Jan 2006 08:00:00 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Introduction</b><br>
  This blog may become a little confusing in the future. I want to continue our 
  discussion on 10G Enterprise Manager R2. There are some beneficial enhancements 
  I think everyone needs to know about. As I have said before, the days of command 
  line administration are over. 10G Grid Control R2 is the tool that we should be using 
  to monitor, administer and tune our Oracle environments. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Hard for me to believe that 
  a few short years ago, I was describing the first release of Oracle Enterprise 
  Manager as a SGT (Sissy GUI Tool) to my students. But Database Administrators 
  are facing a future that contains smaller staffs, ever-increasing workloads 
  and muti-vendor database environments. Any feature that we can take advantage 
  of to reduce the amount of time we spend administering databases must be investigated 
  and evaluated. I firmly believe that this blog on multi-host script execution 
  and future blogs on 10G R2's new multi-database SQL execution and reporting 
  features will save us time administering Oracle environments. As a result, it 
  is important for us to cover them.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But we are also starting 
  a rather large ASM project. In case you aren't aware, Oracle10G provides its 
  own disk storage management system. Database administrators are no longer required 
  to use hardware vendor or third-party (Veritas, EMC, etc) disk volume managers 
  to provide striping and mirroring functionality. ASM manages the raw disks within 
  the Oracle database architecture. Administrators are able to assign disks to 
  disk groups, which can then be striped and/or mirrored to provide high performance 
  and high availability. During tablespace creation, the administrator assigns 
  the tablespace datafile to a disk group. This differs from previous Oracle releases 
  which required that datafiles be assigned to the individual disks themselves.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> I would like to provide readers 
  with an in-depth, blow-by-blow analysis of our ASM evaluation and implementation. 
  We intend to perform the traditional style of evaluation activities that technicians 
  have been doing since Scott's tiger was a cub. We will be creating a sand-box 
  test environment that we will use to initially evaluate ASM. If we like what 
  we see, we will convert one of our smaller test warehouse systems. If all goes 
  well, we will ultimately migrate 10.2 TB of storage to ASM. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">So I intend to continue 
  to our discussion on 10G Enterprise Manager but the blogs will have to now &quot;share 
  the spotlight&quot; with our ASM evaluation activities. It should make for a 
  VERY interesting set of blogs. Let's get back to the topic at hand&#133;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Executing Host Commands 
  and Scripts Using 10G Grid Control R2 </b><br>
  10G Grid Control R2 provides an easy-to-use panel that allows administrators to run host 
  commands and scripts against multiple host targets at the same time. The benefits 
  of this feature are only constrained by the DBA's imagination (or lack thereof) 
  . Pick any command or script, choose a set of host targets, run the command 
  against the multiple targets and review the output. It is really that simple. 
  <br>
  <br>
  <b>Navigating to the Execute Host Command Home Page</b><br>
  We first need to weave our way through 10G Enterprise Manager R2 to the Execute 
  Host Command Home page. We do that by first logging on to 10G Grid Control R2 and selecting 
  the Targets Tab at the top of <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/01_home.gif">10G 
  Grid Control R2's Home Page</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/02_host_execute_link.gif">Hosts 
  Home page</a>. The Hosts Home page in 10G Grid Control R2 looks pretty close to its 10G 
  Grid Control R1 counterpart. The page shows an Up/Down status, number of alerts, exceptions, 
  policy violations, etc.. The page also displays the &quot;big three of performance&quot;, 
  which are CPU, memory and I/O performance measurements. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Execute Host Command 
  Home Page</b><br>
  If we scroll down to the bottom of the page, we see a new link titled &quot;Execute 
  Host Command.&quot; Our next step is to click on that link. 10G Grid Control R2 displays 
  th<a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/03_execute_host_main.gif">e 
  Execute Host Command Home page</a>. Let's spend a couple of minutes on the contents 
  of this page. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If we start at the top, 
  you'll see that I have already entered my first host command (ls -ltr) in the 
  Host Command text box. The Execute Host Command Home page also allows users 
  to <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/08_load_os_script.gif">load 
  a script from their client or from a monitored host target</a> by clicking on 
  the 'Load OS Script&quot; navigation button. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control R2 also allows us 
  to maintain a library of commonly used scripts in the Enterprise Manager Repository. 
  We navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/09_load_library.gif">library 
  of stored scripts</a> by selecting the 'Load from Job Library' buttons that 
  10G Grid Control R2 displays at the top and bottom of the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/03_execute_host_main.gif">Execute 
  Host Command Home page</a>. Since this is a very new installation of 10G Grid Control 
  R2, we don't have any scripts stored in the library. But I expect us to take 
  advantage of this feature very soon. Having access to a library of commonly used 
  scripts that is stored, secured and backed up in an Oracle database should provide 
  us with great benefit.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Adding Targets</b><br>
  Now that I have entered my 'ls -ltr' command in the text box, let's add some 
  host targets to execute it on. I do this by clicking on the 'ADD' button that 
  is displayed on the lower right hand side of the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/03_execute_host_main.gif">Execute 
  Host Command Home page</a>. 10G Grid Control R2 responds by displaying the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/04_add_hosts.gif">Add 
  Targets pop-up window</a>. I am able to choose one, or all, of the monitored 
  targets. I select them by clicking on the 'Select' check box at the beginning 
  of each host's row.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Once I have selected the 
  desired host targets, I click on the 'Select' navigation button that is displayed 
  on the lower right hand corner of the pop-up. 10G Grid Control R2 returns us back to the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/05_back_to_main.gif">Execute 
  Host Command Home page</a>. Only this time, it looks a little different. The 
  display table at the bottom of the page contains all of the hosts we have selected. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Executing the Command 
  </b><br>
  Our next step is to execute the 'ls -ltr' command by clicking on the 'Execute' 
  navigation button. 10G Grid Control R2 displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/06_executing.gif">Processing: 
  Executing Host Command status page</a>. The numbers will increment as the command 
  is executed on the different hosts. When the command is complete, 10G Grid Control R2 
  returns us to the <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/07_host_output_2.gif">Execute 
  Host Command Home page</a>. Once again, the home page looks a little different.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Host Command Output</b><br>
  The page now displays the output from the command. Each row in the output table 
  contains a single host's output. We can expand or collapse the output displayed. 
  This allows us to easily navigate through the different host's output. We can 
  also <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/10_save_results.gif">save 
  the output in an HTML file</a> by clicking on the 'Save Results' navigation 
  button.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Execution History</b><br>
  We are able to review <a href="/blogs/blog_cf/chrisfoot/blogentry2006_01_084154171355/11_view_execution_history.gif">previous 
  command executions</a> by clicking on the 'Execution History' button that is 
  displayed on the top right hand side of the Execute Host Command Home page. 
  The command execution output page allows us to load the results if we want to 
  review them again, or load just the command or script to execute them to obtain 
  more current information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  I hope you enjoyed my first blog of the New Year. In my next blog, I'll discuss 
  the multi-database SQL execution feature available in Oracle's latest and greatest 
  release of Enterprise Manager, 10G Grid Control R2.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for Reading!</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>What's Coming in 2006</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-12-17.4923512778</link>
                      <description>This will be my last blog of 2005. I have been blogging on DBAZine for over a year now. I thought I would take one blog to quickly review where we have been and where we'll be going in 2006.&lt;BR&gt;&lt;BR&gt;I intend to broaden our range of discussion topics in the upcoming year. But I also intend to dedicate numerous blogs to previously discussed topics including data warehouse administration, 10G Enterprise Manager and Oracle database 10G R2. </description>
                      <pubDate>Mon, 19 Dec 2005 07:05:19 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font size="2" face="Arial, Helvetica, sans-serif"> </font>
<p><font size="2" face="Arial, Helvetica, sans-serif">Over the course of the last year, we discussed 10G R1 and R2 releases, 
  converting Giant Eagle warehouses to 10G and testing strategies for 10G RMAN 
  and Enterprise Manager to ensure they worked &quot;as advertised&quot; with 
  Oracle's latest and greatest release. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">We also spent a LOT of time 
  covering 10G Enterprise Manager. But you should know by now how important I 
  feel this tool is. DBAs of the future won't need to dive as deeply into the 
  Oracle internals to solve day-to-day problems. The future of Oracle database 
  problem solving will be administrators interpreting and implementing the recommendations 
  generated by the advisors and ADDM. I absolutely and firmly believe that the 
  advisors and ADDM will become more intelligent in their recommendations. Administrators 
  being required to &quot;become one with the optimizer&quot; to tune Oracle workloads 
  are rapidly drawing to a close. I have shown you the future of database administration - DBAs using OEM wizards, advisors and automated recommendations to quicky and effectively administer Oracle environments.</font></p>
<font face="Arial, Helvetica, sans-serif" size="2">That doesn't mean that DBAs 
won't be needed and we'll be out of jobs. We won't lose our technical skill sets; 
we'll just transfer them to different areas.  If I thought that the DBA career path 
was in any kind of jeapordy, I would be the lead rat off the ship. I bet my career 
on Oracle and I'm still glad I did.</font> 
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Collaboration Suite, 
  Portal, OID</b><br>
  Giant Eagle is currently building applications that use some interesting 
  Oracle technologies. One of these applications is a large information portal 
  that uses Oracle Collaboration Suite, Application Server, OID, Portal, Single 
  Sign-On and database product sets. We'll be using everything from Oracle Chat 
  to Advanced Replication. <br>
  <br>
  Members of my unit are rapidly becoming experts at installing, configuring and 
  administering this rather robust environment. Starting this Monday, I'll be 
  installing 10G EM R2 agents on the information portal servers. It will take me 
  a while since there are about a dozen of them. Like I said, the environment 
  is very robust. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>ASM</b><br>
  I'll also be blogging about our 10G ASM testing. We have had numerous discussions 
  on ASM and whether it has a fit here at Giant Eagle. With several of our warehouse 
  databases being multiple terabytes in size, you should understand why we are 
  being cautious. We are currently creating a rigorous ASM test plan. I intend 
  on providing you with a blow-by-blow analysis of our ASM testing. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Data Warehouse</b><br>
  Speaking of warehouses, I'll be blogging more on warehouse-related topics. Giant 
  Eagle contains a wealth of expertise in building, administering and leveraging 
  warehouse databases. We were building them before they became popular, having 
  warehouses that are over a dozen years old now. The idea of blogging is to transfer 
  information to teach others. I think we can compete with anyone in the industry 
  in terms of using and leveraging large data stores. Remember our motto is &quot;we 
  never met a piece of data we didn't like.&quot; There's good reason for that 
  motto. It allows us to compete and win in a very competitive market sector. 
  As a result, none of my blogs will provide any information on how we use the 
  data, just how we build, administer and monitor it.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>10G R2 Testing</b><br>
  We fully intend to upgrade our warehouses to 10G R2 in the first quarter of 
  2006. There are features that we must take advantage of, which will be discussed 
  in an upcoming blog. I don't mind being on the latest release of any product 
  when that product has been tested using a thorough, well thought-out test plan. 
  Some DBAs are smart, some are lucky and the rest of us have to be thorough.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>10G EM R2 Testing</b><br>
  Our ace installer, Ron Berner, has just installed and configured our first 10G 
  EM R2 enterprise-wide administration environment. I'll lead off the new year 
  by showing you the new features and functionalities contained in the latest 
  release of Oracle's premier management product. I performed a quick review of 
  the product yesterday and I am certainly impressed by the new functionality 
  it provides. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Oracle Express Edition</b><br>
  I talked about this product in a previous blog. But one of my job requirements 
  at Giant Eagle is to evaluate new database products and technologies. I have 
  installed and evaluated other lightweight databases, including MYSQL, and I 
  wasn't impressed. I like feature-rich database products. I realize that I may 
  not take advantage of all of the features the database provides, but I can't 
  predict what features my users will require from my database products in the 
  future. I want the database to solve as many business problems as it can. I 
  don't want to be forced to purchase other products or write custom code to provide 
  a solution - I want the database to inherently provide that solution. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">I fully intend to put Oracle 
  Express Edition through its paces. I work with DBAs and developers that are 
  experts at stress testing hardware, software and my management skills. We'll 
  let them loose on the product and see what happens. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Podcasting</b><br>
  For those of you that don't know what podcasting is, here's the <a href="http://en.wikipedia.org/wiki/Podcasting" target="_blank">Wikipedia 
  definition</a>.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Tom Parrish recently interviewed 
  me for DBAZine using Podcast technologies. We talked about my thoughts on receiving 
  the Oracle Ace title, database outsourcing (I spent quite a few years working 
  for a database outsourcer), my career as an instructor and my thoughts on the 
  future of database administration.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">I firmly believe that Podcasting 
  will become just as popular as blogging. I also think that with super-editor 
  Dana Farver and Podcasting expert Tom Parrish at the controls, DBAZine will 
  be the leader in using Podcasting technologies to disseminate information.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Personally, I really enjoyed 
  Tom Kyte's Podcast interview. Being interviewed after him makes me feel like 
  the guy that bats after Sammy Sosa or Barry Bonds. I think my interview tuned 
  out well, though. I have lots of ideas on who we should be interviewing in the 
  future and will work with Dana and Tom to schedule them. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Interviews</b><br>
  I'll also provide you with an interview or two of my own. Giant Eagle has some 
  interesting folks that are truly experts in their chosen profession. Their areas 
  of expertise include BPEL, Oracle SSO/OID, Oracle App Server, warehouse design, 
  enterprise architectures and the list goes on and on&#133; To break things up, 
  I'll intersperse my regularly scheduled blog with a well-placed interview or 
  two.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"> <b>Summary</b><br>
  I appreciate those of you that read this blog. I would also like to thank the 
  folks at DBAZine for giving me this opportunity to contribute to the Oracle 
  community. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Giant Eagle continues to 
  push the Oracle technology envelope and next year we intend to push it VERY 
  hard. It should be an interesting and exciting ride.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Thanks for reading.</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G OEM Grid Control R2 New Features and Oracle’s Newest Ace</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-12-10.1482634220</link>
                      <description>This is a weird combination of topics.  We are currently installing and configuring the latest and greatest release of Oracle’s enterprise-wide monitoring and administration toolset, 10G Grid Control R2.  I am very excited about the new features and functionality that this new release provides.   Before we get into the nitty-gritty details about the release’s new feature set, I thought I would take one blog to discuss some of the features we are interested in.&lt;BR&gt;&lt;BR&gt;The other topic is a quick announcement to let you know that I am Oracle’s newest Ace.  A title that I am very proud to have.</description>
                      <pubDate>Mon, 12 Dec 2005 07:24:06 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font size="2" face="Arial, Helvetica, sans-serif"> <b>Oracle Ace</b><br>
If you go to the <a href="http://www.oracle.com/technology/community/oracle_ace/index.html">Oracle 
Ace Home page,</a> you can see the description of the Oracle Ace program. The 
website states &quot;Oracle has launched the Oracle ACE program, which formally 
recognizes Oracle advocates with strong credentials as &quot;activists&quot; in 
that network. Oracle ACEs are technically proficient and eager to share their 
experience, whether through writing books, articles, or blogs, speaking at events, 
participating in OTN Discussion Forums&#133;&quot; </font> 
<p><font size="2" face="Arial, Helvetica, sans-serif">This is a title 
  I am proud of. I have been working with Oracle for a long time. I kind of view 
  the Ace title as a validation of my life's work. I am hoping that the Oracle 
  Ace and my Oracle Senior Level Instructor's titles help build my credibility 
  with new and returning visitors to this site. I learned during my teaching career 
  that if the folks you are trying to transfer information to don't trust your 
  technical background or technical expertise, you lose both their attention and 
  their enthusiasm to learn. One of the great benefits I had as an instructor 
  was that I did not teach full time. My duties at the training center were split 
  between teaching and doing day-to-day DBA work for our remote DBA services sister 
  company. I made sure to mention that during class by stating &quot;As soon as 
  were done with this class, I'll being doing this exact set of steps in my office 
  for one of our customers.&quot; Note to my ex-students, I actually DID do those 
  things.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">When you look at the DBAs 
  who have the title, it's like the &quot;who's who&quot; of Oracle. You have 
  folks like Tom Kyte, Mark Rittman, Ken Jacobs, Jonathan Lewis and Arup Nanda. 
  These are guys that I view as the absolute experts of our profession. Well, 
  now it is the &quot;who's who&quot; and the &quot;who's he&quot;. When I found 
  out I was nominated I was a nervous wreck. After I found out that I received 
  the title, I was ecstatic. The Oracle ACE, getting my senior-level Oracle instructor 
  title and winning the Oracle Instructor Quality award are the three greatest 
  accomplishments of my career. I know my blog on DBAZine certainly helped. I 
  would like to thank everyone at DBAZine for all of their help, Steve Clark from 
  Oracle for nominating me and the folks that voted to allow me to join the Oracle 
  Ace ranks. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>10G Grid Control R2 New Features</b><br>
  Instead of delving immediately into a feature-by-feature discussion, I thought 
  it might be a good idea to start this series of blogs with a description of 
  some of the features we are interested in here at Giant Eagle. We should have 
  the new release installed and configured in our test environment within the 
  next week. In upcoming blogs, I'll provide you with a step-by-step demonstration 
  on how use the new features. It will be the exact same approach I have taken 
  in past blogs.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Target Groups</b><br>
  R2 allows users to define logical groupings of targets. Administrators are then 
  able to run jobs and tasks across the entire group, as opposed to individual 
  targets as we do in 10G R1. R2 provides a group dashboard that will provide 
  users with the capability of reviewing status information and performing administrative 
  tasks at the group level. The dashboard also provides drill down capabilities 
  to individual targets.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">We have applications that 
  consist of multiple database, listener and application server targets. There 
  are times when we need to shutdown all of the targets for a particular application. 
  The grouping feature will allow us to treat the group of targets as a single 
  unit. In addition, it seems to me that grouping the targets may simplify the 
  presentation of multiple targets to the DBA. Like most shops, Giant Eagle DBAs 
  are responsible for all targets for a given application. We intend to evaluate 
  whether grouping all targets for an application simplifies the administrative 
  process. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">
  <b>Execute SQL/Host Commands Across Multiple Targets</b><br>
  You were able to accomplish this in 9iOEM and 10G R1 by creating a job, embedding 
  a SQL statement in it and having it access multiple databases. R2 provides a 
  SQLPLUS like feature that allows a DBA to run SQL against multiple targets in 
  parallel with near real time feedback. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">I am often asked to provide 
  information for all databases across the enterprise. Our security department 
  performs audits to verify that we have the correct security patches installed,
  users that are no longer active are removed from the systems, database users 
  have the correct authorities, etc.. This feature will allow us to quickly 
  provide information from multiple databases. Sounds like a good feature to me.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">
  <b>Adaptive Thresholds</b><br>
  10G R1 allowed adminstrators to set performance metric thresholds. You were able to freeze 
  a set of performance statistics (called a metric baseline) at a particular instant in time. 
  You then defined a threshold percentage of deviation. If the performance statistics exceeded 
  the threshold, 10GR1 would generate an alert that 
  would notify the DBA of the exception.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">I never found this feature 
  to be enticing enough to implement in a production environment. We ran tests 
  in our labs to determine if it worked and found that the feature &quot;worked 
  as advertised.&quot; But to ensure that the alert was not triggered during peak 
  times, it was necessary for us to capture the statistics to set the baseline
  during those times of peak activity. As a result, the only time the thresholds 
  were helpful was in comparing peak activity to the peak activity threshold. 
  It was not as useful for non-peak times. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">R2 provides adaptive thresholds 
  that make the threshold settings more fluid in nature. The thresholds adapt 
  to changes and usage, which should improve the benefits the feature provides. 
  I'll let you know how it works in an upcoming blog.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>SQL Detail/Session Detail 
  Screens</b><br>
  The SQL Detail and Session Details screens have been updated to be more graphical 
  in nature as well as provide more diagnostic information. The explain plans 
  can be shown in a graphical display. This will be one of the first enhancements 
  that we will test here at Giant Eagle. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>ASH Reports</b><br>
  Since the AWR, by default, takes snapshots every 60 minutes, performance information 
  could be up to 60 minutes old. As a result, snapshots do not contain enough 
  information to allow administrators to perform analysis on the active workload 
  currently being performed in the database system. Oracle10g R1 contained a new 
  internal utility, called Active Session History, to provide administrators with 
  access to current performance information.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Active Session History samples 
  data from the V$SESSION dynamic performance table every second and stores the 
  information in V$ACTIVE_SESSON_HISTORY. The information contains the events 
  for which current sessions are waiting. The information pertains to active sessions 
  only; information from inactive sessions is not recorded. The view contains 
  one row per active session for each one-second sample. Administrators were able 
  to access V$ACTIVE_SESSON_HISTORY as they would any other V$ dynamic performance 
  table. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">R2 contains a panel that 
  allows administrators to generate ASH statistics reports. The report allows 
  a DBA to view ASH statistics, including top SQL, top sessions, top waits, for 
  any time period that has a set of corresponding statistics stored in the repository 
  (default 1 week). This historical information will help administrators finally 
  answer questions like, &quot;My program ran long two days ago; can you fix it?&quot;</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Root Cause Analysis Functionality</b><br>
  R2 provides a new wizard-like feature that helps administrators drill down through 
diagnostic information until they find the root cause of a problem. I am VERY interested 
  in evaluating this feature and will let you know the results as soon as we have 
  them.  Oh, one last thing&#133; Oracle isn't trying to replace us with their administrative 
  tools, they are just trying to simplify our jobs and reduce the amount of time 
  we spend debugging problems. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Enterprise Reporting 
  Features</b><br>
  Yahoo! (no, not the search engine..) I was just very excited when I found out 
  that R2 contains an Enterprise Reporting tool. Oracle describes the feature 
  as providing &quot;Easy-access out-of-box reports for all Oracle components, 
  reports on configuration, performance, service level, and audit&quot;. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The Enterprise Reporting 
  feature is a graphical, report generation tool that allows users to create reports 
  using any data that is stored in the Management Repository. The reports can 
  be secured using the tool's secure publishing features. One of the first enhancements 
  we will be testing.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>SQL Access Advisor Enhancements</b><br>
  A few weeks ago someone asked how they could run the SQL Access Advisor on a 
  single SQL statement. I showed them a way that unfortunately, wasn't straightforward 
  or simple. R2's new single statement tuning feature allows administrators to 
  quickly and easily tune a single SQL statement.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Automatic Segment Advisor</b><br>
  Administrators using R1 that wanted to activate the segment advisor to identify 
  wasted space (and candidates for online segment shrink operations) were forced 
  to manually run the Segment Advisor. R2 proactively idenfifies segments that 
  have significant wasted space due to data fragmentation. As a result, manual 
  execution of the Segment Advisor will only be needed during rare situations. 
  For more information on the Segment Advisor please turn to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_25.8847176467">&quot;The 
  10G Segment Adivisor&quot;</a>. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Host Management</b><br>
  R2 improves Grid Control's ability to administer and monitor hardware platforms by providing 
  file-level monitoring, remote command operations and remote file editing. Here's 
  my personal opinion - the more non-Oracle administrative functions 10G 
  Grid Control provides, the better off we are as administrators. If I can edit files, perform 
  remote shell commands, etc.without leaving 10G Grid Control, why would I leave 10G Grid Control? 
  I don't want to switch to different tools when I am administering an Oracle 
  environment. An environment that includes a database AND an operating system. 
  </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Enterprise Storage Reports</b><br>
  R2 reports on disk allocation, disk utilization and roll-ups by location, line 
  of business, application and vendor. Giant Eagle has many terabytes of disk 
  currently allocated to the Oracle environment. In addition, we have just received another 10.2 terabytes 
  of disk for our newest data warehouse, affectionately known as &quot;Baby Huey&quot;.  Any feature that allows us to better understand our disk 
  allocations will generate a lot of interest here.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Monitoring Support for 
  Non-Standard Targets</b><br>
  R2 now supports network devices and non-Oracle middleware. This includes performance 
  and availability monitoring, reportting and customizable alerts.</font><font size="2" face="Arial, Helvetica, sans-serif">This 
  could be fun. I can't wait to call one of our network geeks and tell them that 
  one of their load balancers is offline. Their response to that question alone 
  would be worth the effort it takes to install and configure this feature.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Collaboration Suite Management 
  Features</b><br>
  I will be spending some dedicated time testing and blogging on this new feature 
  set. We currently have a complex Collab Suite environment that includes multiple 
  (numerous may be a better term) Application, Collab Suite, Portal and OID servers. 
  You look at the data flow diagrams between these servers and you feel a little 
  queasy. I am hoping that the new Collab Suite management feaures help to simplify 
  this environment's administration and monitoring requirements. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Summary</b><br>
  Once again Oracle has provided me with a lot of interesting features that I 
  can blog about. As I stated a few times in past blogs, we all must learn to 
  effectively use 10G Grid Control to monitor and administer our environments - it is the 
  future of database administration.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>You Can’t Improve What You Can’t Compare</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-12-03.3566409131</link>
                      <description>I have always thought that a graphical display utility that compared performance statistics would be a worthwhile tool.  You could compare the statistics captured from two sets of timelines and quickly identify the differences.&lt;br&gt;&lt;br&gt;10G Grid Control provides a comparison utility that allows administrators to compare two sets of ADDM snapshots.   Although it provides a very simple comparison at this time, it is certainly a step in the right direction. This blog will show you how to select the timelines and perform the comparison.</description>
                      <pubDate>Mon, 05 Dec 2005 12:13:47 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Recording and comparing performance-related information is a pretty common practice 
  in our profession. The performance information we compare ranges the spectrum, 
  from elapsed times to access paths, from I/O performance to hard parse/soft 
  parse ratios. The granularity of performance statistics we compare also wildly 
  differs. We may be comparing a single statement's access path changes in the 
  morning and reviewing an entire job stream's elapsed times in the afternoon. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We record performance information, 
  tune and tweak, run whatever it is we are attempting to tune, record the performance 
  information again and compare the before and after informaton. This iteration 
  of recording/changing/recording/comparing is often done again, and again&#133; There are a few third-party tools that provide comparison functionality. 
  Veritas's I3 for Oracle product allows users to to compare performance statistics 
  and access path changes. The performance monitoring features the tool provides 
  are certainly beneficial, but it is the tool's comparison capabilities that 
  I use most. I3 captures access paths and stores them in a repository. Users 
  can determine exactly when the access path change occurred. I3 also tracks object 
  (index creates, index column changes. etc) and statistics changes, both of which 
  influence the Oracle optimizer. But it is a complex tool and you need to spend 
  time learning how to use it before you can maximize the benefits it can provide. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">There are also a couple 
  of tools that compare Oracle performance statistics. The first tool I found 
  years ago was <a href="http://www.geocities.com/alexdabr/spvcomp.html">Statspack 
  Viewer</a>, which is the brainchild of Alexey B. Danchenkov. The second I recently 
  discovered is a product called <a href="http://www.wise-oracle.com/product_wise_professional.htm">Wise</a>. 
  This isn't a plug for either tool because I haven't used them. Just letting 
  you know they are out there. I have used I3 for Oracle and I am a proponent 
  of it. </font> </p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>AWR Snapshot Comparison</b><br>
  10G Grid Control allows two sets of snapshots to be compared to one another. The results 
  of the comparison are displayed graphically using horizontal bars to indicate 
  differences between the two measurements. It is important to note that 10G Grid Control 
  does not compare the hundreds of statistics stored in an AWR snapshot. Oracle 
  has pre-selected key statistics to evaluate which makes the output much easier 
  to review. Since Oracle has selected the statistics for us, it is safe to assume 
  that it views them to be the most critical. The output doesn't provide a lot 
  of information but it is certainly a start. I am hoping that Oracle will continue 
  to build upon this functionality in future releases.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Selecting the Timelines 
  to Compare</b><br>
  Before we learn how to compare snapshot sets, I need to identify two executions 
  of the same workload. I know from experience that our warehouse executes different 
  sets of batch jobs based on the day of the week. I'll use 10G Grid Control's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/03_pick_beginning_time_period.gif">Sessions: 
  Waiting and Working Chart</a> to identify the date and time combinations to 
  compare.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I begin by logging on to 
  10G Grid Control and navigating to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_home.gif">Database's 
  Home page</a>. My next step is to click on the Performance Tab, which can be 
  found on the top left section of the panel. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/01_historical_perf_select.gif">Database 
  Performance Home page</a>. The page displays performance information for the 
  current point-in-time. If you would like to learn more about the information 
  contained on this page, please refer to my blog titled &quot;<a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_22.3884573887">Database 
  Performance Monitoring Using 10G Enterprise Manager</a>.&quot;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Because I am trying to identify 
  workloads that occurred in the past, I need to change the performance page's 
  display from the current point-in-time to a historical one. I do that by clicking 
  on the &quot;View Data&quot; drop down menu on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/01_historical_perf_select.gif">upper 
  right hand side of the page</a>. The &quot;View Data&quot; drop down allows 
  me to change the screen's refresh time to meet specific monitoring requirements 
  but there is also a selection that switches the display from current to historical 
  mode.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I choose historical 
  mode from the drop down menu, 10G Grid Control displays the performance page in historical 
  mode. The historical performance panel p<a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/01_historical_interval_selectiongif/20/index.html">rovides 
  a slider</a> that allows users to select dates in the past. I can drag the slider 
  to the desired date and 10G Grid Control will automatically refresh the screen with the 
  performance data from that time period. I know that the workload is heavy on 
  Tuesdays so I <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/02_pick_beginning_day.gif">moved 
  the slider to November 22</a>. 10G Grid Control refreshed the screen and displayed the 
  performance statistics from that date. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I scrolled down to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/03_pick_beginning_time_period.gif">Sessions: 
  Waiting and Working Chart </a>to identify the beginning and ending times of 
  the first workload to use as input to the comparison utility. It looks like 
  the 12 AM to 6 AM timeframe is a good choice. To verify my selection, I went 
  back to the historical performance page and used the slider to display the data 
  from <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/04_pick_ending_time_period_2.gif">Tuesday, 
  November 29</a>. Hmmm, although the two charts <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/04b_compare_workloads.gif">look 
  different</a>, I know that the same job stream was executed on both days. Hopefully, 
  the comparison utility will tell me us what the differences are.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Performing the Snapshot 
  Comparison</b><br>
  To perform the snapshot comparison, I need to navigate to the Automatic Workload 
  Repository Home page. 10G Grid Control displays a set of navigation tabs on the top of 
  each <a href="/blogs/blog_cf/chrisfoot/performanceoverview/homepage2/index.html">DatabaseTarget's 
  Home page</a>. You click on the administration tab for that database, scroll 
  down and you'll find the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/01a_addm_repository_link.gif">AWR 
  Navigation Link</a> at the center of the panel.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Clicking on the link takes 
  me to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/04a_navigate_to_awr_snapshots.gif">Automatic 
  Workload Repository Home page</a>. The number of snapshots at the bottom of 
  the page is also a link. If I click on the number, in this case 363, I am able 
  to view the Snapshot Home Page. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/05_begin_comparison.gif">Snapshot 
  Home page</a> displays all of the snapshots currently residing in the repository.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The next step is to select 
  the &quot;Compare Timelines&quot; option from the Action drop down menu to notify 
  10G to activate the Snapshot Comparison Wizard. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/06_first_timeline_start.gif">Compare 
  Timelines: First Timeline Start page</a>. I need to scroll through the various 
  snapshot ID/timestamp combinations until I find the starting time of the snapshot 
  I want. The snapshot ID 5926 shows a timestamp of 12:00:58 AM. Looks pretty 
  close to me. I clicked on the radio button next to Snapshot ID 5926 to select 
  it. When I clicked on &quot;Next&quot; to continue the process, 10G Grid Control displays 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/07_first_timeline_end.gif">Compare 
  Timelines: First Timeline End page</a> that allows me to select the ending time 
  period.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the radio button 
  next to Snapshot ID 5932, which has a corresponding timestamp of 6:00:32, to 
  select it as my ending timestamp. When I hit the &quot;Next&quot; navigation 
  button to once again continue the process, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/08_second_timeline_start.gif">Compare 
  Timelines: Second Timeline Start page</a>. I duplicated the steps I previously 
  executed to select the beginning and ending snapshots for the 12:00 AM to 6:00 
  AM timeframes on November 29.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">After I selected my ending 
  snapshot for the second timeline, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/09_final_review.gif">Compare 
  Timelines: Review page</a>. This page allows administrators to perform a last 
  minute check before running the actual comparison itself. Clicking on the &quot;Finish&quot; 
  navigation button tells Oracle to begin the comparison. When the comparison 
  is complete, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_12_033566409131/10_output.gif">Comparison 
  Results page</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Comparison Results Page</b><br>
  The comparison results page tells me that the two workloads are indeed different. 
  Although the screenprint only shows 20 out of 27 comparison points, the ones 
  at the bottom did not provide any earth shattering information so I did not 
  include them. But lets take a look at some of the obvious differences:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><b>Session Logical Reads</b> 
    - BIG difference between the 22nd and the 29th. The 22nd generated a lot more 
    cache reads than the 29th. One possible reason could be that more updates 
    are being done (DB Block Changes and Redo Size on the comparison report). 
    I know from experience that the batch job stream has numerous jobs that run 
    in parallel and they often read data that other jobs are updating. Queries 
    need to retrieve before images from undo segments to maintain read consistency, 
    which can result in higher logical reads.<br>
    <br>
    </font><font face="Arial, Helvetica, sans-serif" size="2">Another reason could 
    be that we have had some queries on the 22nd using some inefficient indexes. 
    Indexes are often stored in the buffer cache and can get beat up by queries 
    that have low selectivity. I also know that our batch runs do use different 
    SQL selection criteria based on the business's processing requirements for 
    that day. Could be that we may have some inefficient indexes. One way we can 
    find that out is to ask 10G Grid Control to run an ADDM <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_11_20.1329163739">Statspack-Style 
    performance report</a>. Better yet, we can ask Oracle do the grunt work for 
    us by generating a <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_06_30.3614041361">custom 
    ADDM task</a> for that time period. In addition, we can run the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">SQL 
    Tuning Advisor</a> and the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_06.5201081269">SQL 
    Access Advisor</a> for more information and recomnmendations.<br>
    <br>
    </font></li>
  <li><b><font face="Arial, Helvetica, sans-serif" size="2">DB Block Changes</font></b><font face="Arial, Helvetica, sans-serif" size="2"> 
    - Total number of changes made to blocks that were part of a DML statement 
    (Insert, Update, Delete). We did a lot more changes on the 22nd. It is important 
    to note that you can't use the number as a counter for the actual number of 
    changes that occurred. Depending on the operation being performed, Oracle 
    may change the block more than once, incrementing the counter and causing 
    it to be higher than the number of changes actually performed by the DML statements.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> <b>Execute Count</b> 
    - Statements (including recursive against the dictionary) that are executed. 
    More statements were executed on the 29th but they did less updates.<br>
    <br>
    </font></li>
  <li><b><font face="Arial, Helvetica, sans-serif" size="2">Parse Count(Total)</font></b><font face="Arial, Helvetica, sans-serif" size="2"> 
    - Number of times a SQL statement was parsed both hard and soft. Once again 
    an indicator that we executed more statements on the 29th.<br>
    <br>
    </font></li>
  <li><b><font face="Arial, Helvetica, sans-serif" size="2">Open Cursors (Cumulative</font></b><font face="Arial, Helvetica, sans-serif" size="2">) 
    - Total number of cursors opened during the monitored time period. Another 
    indicator that the number of statements executed were higher on the 29th.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><b>Redo Size</b> - Total 
    amount of redo generated in bytes. Looks like we made more changes on the 
    22nd than we did the 29th. We can verify that by looking at the numbers in 
    DB Block Changes. <br>
    </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Summary</b><br>
  It seems that we executed more statements on the 29th, but we performed more 
  updates on the 22nd. In addition, it may be informative for us to run some advisors 
  and an ADDM task on both the 22nd and the 29th. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">As I stated, I am hoping 
  that this first iteration of the 10G Grid Control snapshot comparison feature is just 
  that - the first iteration. I am a firm believer that Enterprise Manager should 
  have a robust set of comparison utilities that allows us to look at access path 
  and statistics changes historically.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading.</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>The Future of Database Tuning - Using ADDM Tasks and Intelligent Advisors to Solve Database Performance Problems</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-11-24.2858305991</link>
                      <description>Now that we have learned how to create Statspack-Style performance reports from Automatic Workload Repository snapshots, let’s run an ADDM task and an intelligent advisor or two and let 10G Grid Control do the diagnostic grunt work for us.  As I ranted in my previous blog, ADDM and the intelligent advisors are the future of database performance analysis. The era of relying totally on DBA experience and expertise to tune Oracle is rapidly drawing to a close.&lt;br&gt;&lt;br&gt;
We'll create a not-so mythical performance problem and use the output from an ADDM task to provide us with the diagnostic information and recommendations we need to solve the issue.  Along the way we'll look at some of the different features and functionality that ADDM offers.</description>
                      <pubDate>Mon, 28 Nov 2005 07:31:33 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> <b>The scenario </b><br>
  My unit receives an-email from our data warehouse application team lead. He 
  tells us that a few of the programs in the nightly batch job stream are running 
  longer than usual. The UNIX folks chime in stating that the AIX server's CPU 
  activity is higher than normal during the 4 AM to 8 AM timeframes. The application 
  team lead is concerned that the support units are being asked to analyze a performance 
  problem that occurred in the past. A fellow DBA responds to his e-mail stating 
  that since 10G Grid Control's ADDM task executions are stored in a repository, it is a 
  relatively easy task for us to investigate performance problems that occurred 
  during previous time periods. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Performance Problem Analysis</b><br>
  I begin the investigation by logging on to 10G Grid Control and navigating to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_home.gif20">Database's 
  Home page</a>. My next step is to click on the Performance Tab which can be 
  found on the top left section of the panel. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/01_historical_perf_select.gif">Database 
  Performance Home page</a>. The page displays performance information for the 
  current point-in-time. If you would like to learn more about the information 
  contained on this page, please refer to my blog titled <a href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-05-22.3884573887%20">&quot;Database 
  Performance Monitoring Using 10G Enterprise Manager.&quot;</a><br>
  <br>
  Because I am investigating a performance problem that occurred in the past, 
  I need to change the page's display from the current point-in-time to a historical 
  one. I do that by clicking on the &quot;View Data&quot; drop down menu on the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/01_historical_perf_select.gif">upper 
  right hand side of the page</a>. The &quot;View Data&quot; drop down allows 
  us to change the screen's refresh time to meet specific monitoring requirements 
  but there is also a selection that switches the display from current to historical 
  mode.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I choose historical 
  mode from the drop down menu, 10G Grid Control displays the performance page in historical 
  mode. The historical performance panel <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/02_historical_slider.gif">provides 
  a slider</a> that allows us to select dates in the past. Users can drag the 
  slider to the desired date and 10G Grid Control will automatically refresh the screen 
  with the performance data from that time period. As I stated in an earlier blog, 
  this feature not only helps administrator answer questions like &quot;my program 
  ran long yesterday, can you help me fix it before it runs today?&quot; but also 
  helps to determine exactly when a particular performance problem began to occur. 
  Knowing when performance first &quot;went South&quot; is a critical piece of 
  information that allows you to determine what changes were made since the problem 
  first occurred. This is often all that is needed to identify and solve the performance 
  problem.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We can use the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/03_select_timestamp.gif">Sessions: 
  Waiting and Working Chart</a> in the middle of the screen to determine exactly 
  what resource our batch stream programs are waiting for. The chart allows administrators 
  to quickly determine where the most waiting time is spent. In our example, we 
  are waiting for I/O. Since this is a multi-terabyte data warehouse, no surprises 
  here. It is important to note that the chart itself provides drill down capabilities.   Users can click on any colored area of the chart to show the SQL and Sessions associated with the resource. For more information on the chart's drill down capabilities, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_22.3884573887">&quot;Database Performance Monitoring Using 10G Enterprise Manager.&quot;</a> Before we continue our investigation of last night's performance 
  problems, lets take a quick look at the output from an ADDM task. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>ADDM Task Output</b><br>
  If we look at the chart, we can see that not only is there a spike from 4 AM 
  to 8 AM, but there is another spike that starts at 1 AM, peaks a little before 
  2 AM and then begins to descend into the trough until 4 AM when it picks up 
  again. It may be beneficial for us to also review the output from the 2 AM to 
  3 AM ADDM run. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">At the bottom of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/03_select_timestamp.gif">Sessions: 
  Waiting and Working Chart</a> that we have been reviewing, you'll notice that 
  there are a series of clock icons. We learned previously in this series of blogs 
  that ADDM, by default, takes a snapshot every sixty minutes. If we click on 
  the clock icon above the red arrow I have placed on the graphic, 10G Grid Control will 
  display the ADDM task output for a one hour time period ending at the selected 
  time. In this case it will be the time period that starts at 2 AM and ends at 
  3 AM. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I click on the clock 
  icon that coincides with the 3 AM ending time, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/04a_addm_task_output_page.gif">ADDM 
  Task Output</a> for the 2 AM to 3 AM time period. The selected clock icon for 
  the ending time is now in blue. The &quot;Create ADDM Task&quot; icon on the 
  top right of the page allows me create a custom ADDM task for a given time period. 
  We'll use this icon to generate a custom run to analyze our 4 AM to 8 AM performance 
  problem in a few minutes.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control displays a chart 
  at the top of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/04a_addm_task_output_page.gif">ADDM 
  Task Output page</a> that shows database activity. Once again, 10G Grid Control displays 
  a series of clock icons that allows me to quickly switch to different time periods. 
  To display ADDM task output for a different time period, users click on the 
  clock icon for the sixty-minute time period ending time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The information in the Performance 
  Analysis section shows that the ADDM task started at 2 AM and ran for a little 
  under sixty minutes. The panel then provides 2 additional icons &quot;View Report&quot; 
  and &quot;View Snapshots&quot;. When I click on the &quot;View Report&quot; 
  icon, 10G Grid Control displays the ADDM task output in a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/05_view_text_report.gif">pure 
  text report</a>, which can be saved to a flat file. The report contains information 
  about the ADDM task execution itself, performance statistics, and most importantly, 
  the recommendations generated during that time period.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I click on the &quot;View 
  Report&quot; Icon on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/04a_addm_task_output_page.gif">ADDM 
  Task Output page</a>, 10G Grid Control displays a set of <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/06_snapshot_details.gif">detailed 
  statistics</a> captured during the ADDM task execution. If I click on the &quot;Report&quot; 
  tab highlighted in the red box, 10G Grid Control will display a traditional Statspack-style 
  report, which we discussed in my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_11_20.1329163739">&quot;Generating 
  Workload Repository Performance Reports and the Future of Database Tuning&quot;.</a> 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Continuing The Investigation</b><br>
  Let's return to our tuning analysis. The ADDM task output page displays the 
  ADDM recommendations at the bottom of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/04a_addm_task_output_page.gif">ADDM 
  Task Output page</a>. The listing of findings is categorized (on the far right 
  side of tabular display) and each recommendation is actually a link that allows 
  the user to drill down to more specific information pertaining to that finding. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Do you see the second recommendation 
  that has the text &quot;sbtwrite2&quot; in it? I know that we run an RMAN tape 
  backup during this time period. Because the database is so large, we use a LOT 
  of parallel processes to perform the backup. Our first evaluation is complete. 
  I'll talk to the developers to determine what impact that the tape backup has 
  on their job run performance. They record the elapsed times from all of their 
  batch job executions. If we find that the backup is impacting performance, we'll 
  try and move the backup to an earlier time period.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Since I still want to review 
  the time period between 4AM and 8AM, I'll click on the &quot;Create ADDM Task&quot; 
  button displayed on the top right of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/04a_addm_task_output_page.gif">ADDM 
  Task Output page</a>. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/08_select_beginning_snapshot.gif">Create 
  ADDM Task page</a>. Please notice that the radio button for Period Start Time 
  is already checked. I can use the clock icons at the bottom of the screen to 
  select the 4 AM start time period. After I have selected the start time, 10G 
  EM automatically <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/09_select_ending_snapshot.gif">refreshes 
  the page</a> and shows that I have selected 4 AM as the start time. I must then 
  manually select the &quot;Period End Time&quot; radio button to tell 10G Grid Control 
  that I want to select the ending time period. I always forget to do this and 
  then choose my ending time for my start time. Don't forget to select the &quot;Period 
  End Time&quot; radio button before you choose your period end time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> <b>The Recommendations </b><br>After I choose the period 
  end time, I click the 'OK&quot; navigation button to ask 10G Grid Control to run the ADDM 
  task. When the task execution is complete, 10G Grid Control displays another <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/10_addm_output.gif">ADDM 
  Task Output page</a>. The page's layout is exactly like the one we have been 
  reviewing. No changes here. But the findings are different. I'll click on the 
  top finding (the one stating that &quot;Host CPU was a bottleneck&quot;) to 
  continue our analysis.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/11_perf_finding_details.gif">Performance 
  Findings Details page</a>. The first recommendation states that we should consider 
  &quot;Adding more CPUs&quot;. Actually, 10G Grid Control is correct in this case. We have 
  been aware that CPU capacity is an issue on this platform for some time. But 
  lets see if we can't tune the SQL that was running during that time to reduce 
  CPU consumption.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I continued my investigation 
  by clicking on the &quot;Show&quot; link next to the text &quot;SQL tuning&quot;. 
  10G Grid Control displays the entire text of the SQL statement that generated the recommendation. 
  Clicking on the SQL text takes the user to a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/11b_sql_details2.gif">SQL 
  Details page</a>, which shows the entire text of the SQL statement being reviewed. 
  In addition, 10G Grid Control also displays navigation tabs that allows the users to view 
  the statement's execution plan, current statistics, execution history and tuning 
  history. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I will run the SQL tuning 
  advisor by clicking on &quot;Run SQL Tuning Advisor&quot; navigation button 
  on the top right hand side of the panel. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/13_generate_SQL_tuning_task.gif">SQL 
  Tuning Advisor Status page</a>. This page is displayed until the advisor has 
  completed its analysis activities. If you would like to learn more about the 
  SQL Tuning Advisor, please visit my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">&quot;SQL 
  Tuning Advisor&quot;</a>. Pay special attention to my discussion on the resources 
  the advisor consumes. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Why does the SQL tuning 
  process generate overhead? As I stated in my <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">&quot;SQL 
  Tuning Advisor&quot;</a> blog, the Advisor does not have optimization time constraints. 
  As a result, the tool can take as much time as necessary to optimize each statement. 
  You'll certainly get an educated decision from the optimizer, but you may impact 
  system performance to get it.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">After the analysis is complete, 
  10G Grid Control displays a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/14_SQL_tuning_task_output.gif"> 
  Recommendations page</a>. The series of recommendations are displayed in a tabular 
  format. Each row provides a recommendation category, finding, rationale and 
  percentage of benefit. If an alternate access path is recommended, a set of 
  glasses is displayed which allows users to view the new explain plan. The Recommendation 
  page also provides a button that displays the original explain plan to allow 
  administrators to compare the old access path to the new one. Comparing the 
  new and old explain plans is HIGHLY recommended. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">IF you hit the implement 
  button and you have the SQL Profile recommendation radio button selected, you 
  will implement it. Be very careful when you hit the implement buttons contained 
  on any of the 10G Grid Control panels. Depending on what panel you are on and the type 
  of recommendation, 10G Enterprise Manager may not prompt you again. To learn 
  more about SQL profiles (and backing them out), please refer to the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_11.0227938704">&quot;SQL 
  Tuning Advisor&quot;</a> blog. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you choose to implement 
  the create index recommendation, you will not build the index. Instead, 10G 
  Enterprise Manager will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_242858305991/15_build_indexes.gif">Implement 
  Recommendation: Build Indexes and SQL Profile&quot; page</a>. If you hit the 
  &quot;Show SQL&quot; navigation button, 10G Grid Control will display the SQL that it 
  will use to create and implement the SQL profile and indexes. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Now is when we have to be 
  very careful, I have seen SQL profiles both highly improve and highly degrade 
  performance. I would NEVER implement a SQL profile without testing it in a development 
  environment first. But it goes without saying that we should test every change 
  in a test environment before implementing them in production. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's continue our investigation because those index recommendations are intriguing. 
  When I reviewed the original explain plan, I found that the query was using 
  a B-tree index that did not contain all of the columns in the statement's WHERE 
  clause. After further review, I found that the high CPU was caused by Oracle 
  spinning through an index that did not have sufficient cardinality (number of 
  different values). Indexes, because of their smaller size, are often cached in the database's data buffer cache. 
  The query was thrashing the buffer cache, which can cause high CPU 
  utilization. Chalk one up for DBA expertise.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The most exciting revelation 
  was that the first index recommendation contained two columns at the end that 
  weren't in the WHERE clause. I reviewed the SQL statement's text and found that 
  the last two columns (ITEM_TYP_CD, RUN_DTE) were in the SELECT clause. 10G Grid Control 
  had recommended a index that would generate an Index Only access path, which 
  is one of my favorites. Index Only access paths occur when all of the columns 
  in the SQL statement are contained in the index. You place the columns in the 
  WHERE clause at the beginning of the index and place the columns in the SELECT 
  clause at the end of the index. If the index contains all of the columns in 
  the statement, it does not have to visit the table to retrieve any data. The 
  query can stay within the index structure throughout its execution lifecycle. 
  No table I/O necessary! What I found VERY interesting was that 10G Grid Control was intelligent 
  enough to recommend an index only and placed the columns in the SELECT clause 
  behind the columns in the WHERE clause. An excellent recommendation. Chalk one 
  up for 10G Grid Control ADDM!</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I reviewed the other index 
  recommendations and found them to be only partially beneficial. We need to remember 
  that these tools and advisors are currently in their infancy. We must apply 
  our DBA experience and knowledge to thoroughly evaluate the advisor recommendations. 
  Currently, they are not a total replacement for DBA tuning expertise. A very 
  good start though.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Wrapup </b><br>
  We will test the new index in our development environments. I am sure they will 
  help reduce our CPU consumption during this time period. I'll run another ADDM 
  task on the 4 AM to 8 AM timeframe and I'll let you know the results in an upcoming 
  blog. But I know it will work (applying my own experience here).</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>A Final Recommendation 
  </b><br>
  Take some advice from your friendly ex-Oracle instructor. <b>LEARN HOW TO USE 
  THESE TOOLS</b>. I can't emphasis that statement strongly enough. As I stated, 
  ADDM and the intelligent advisors may not currently be a total replacement for 
  DBA experience and expertise, but sooner or later, they most definitely will 
  be. Don't get left behind - because its only a matter of time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading.<br>
  <br>
  </font> </p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Generating Workload Repository Performance Reports and the Future of Database Tuning</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-11-20.1329163739</link>
                      <description>This blog should be a quick and easy read.   I will admit that this is a weird combination of topics.  We are going to learn how to generate traditional, Statspack-style performance reports from the Automatic Workload Repository.  This blog also contains my thoughts on the future of database tuning.   And the future does NOT include administrators poring over reams of database statistics to tune Oracle databases.&lt;BR&gt;&lt;BR&gt;

I absolutely and firmly believe that ADDM and the intelligent advisors are the future of database performance analysis.   In my next blog, we let Oracle do all of the tuning work for us when we generate an ADDM task from the same set of beginning and ending snapshot IDs.  </description>
                      <pubDate>Mon, 21 Nov 2005 06:38:18 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> You can loosely equate a Workload 
Repository Performance Report to its older counterpart, the Statspack Performance 
Report. These two reports are really just dumps of key performance statistics 
that administrators can use to tune their environments. We can assume that since 
the tuning wizards from the Oracle Corporation selected these statistics, they 
are the key indicators we can use to evaluate and troubleshoot database performance. 
</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">There has been much discussion 
  on the benefits of these types of reports. Many of my fellow technicians feel 
  that a single statistics report, used by itself, does not provide much value. 
  That these reports are only beneficial when they are compared to one another, 
  the differences noted and then investigated.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I agree to an extent, but 
  only to an extent. I will admit that there is an over-abundance of statistics 
  provided in these reports. I will also agree that many of the indicators, used 
  by themselves, do not provide great benefit. That being said, I have used the 
  statistics generated by these reports to tune dozens of databases. But I never 
  use these statistics reports by themselves to generate performance recommendations. 
  I used this information to begin my evaluation process. In addition, some of 
  the statistics provided in these reports were often key ingredients during my 
  analysis.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I was a consultant, 
  one of my primary responsibilities was to perform database assessments for our 
  customers. The assessments were performed on every database that we intended 
  to support remotely. The assessments helped us to determine what we were in 
  for when we began to administer the new environments. After we assumed support 
  for the database, we immediately initiated a project to correct all of the issues 
  that were identified in the assessment. This process resulted in a higher quality 
  database environment for our customers and less administrative problems for 
  us. I guess you could describe it as a &quot;win-win&quot; situation.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We also performed database 
  assessments to generate additional revenue, charging a couple of thousand dollars 
  per database assessment. I would run a dozen or so scripts, spend some &quot;quiet 
  time&quot; reviewing the output and create several recommendation documents 
  that would be bound and delivered to the customer. I have performed literally 
  dozens of these database assessments during my career. The analysis scripts 
  were condensed from my rather large SQL library into six scripts that focused 
  on general database info, database structures, statistics, performance, recovery 
  and security. I collect scripts like some folks collect baseball cards. I also 
  write scripts as a hobby and for articles such as this one. But I often used 
  the statistics generated by Statspack during the tuning process.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let me give you one quick 
  example of the benefit of these statistics. Achieving high Data Buffer hit ratios 
  is often the subject of hot debate. There are two of groups of thought on whether 
  perpetually aiming for that 90% buffer cache hit ratio is a good practice or 
  bad one. Personally, I'm a workload tuner. When I tune, I don't care whether 
  it is a buffer cache hit or a disk read - I am going to make every attempt to 
  reduce them both. The less work a statement does, the better. For sake of discussion, 
  let's say I'm looking at a database for the first time. I will use the Buffer 
  Cache hit ratio as an indicator of performance. If I see a very low cache hit 
  ratio, it tells me I need to look at:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The buffer cache sizing 
    parameter to see if a mistake has been made and it is grossly undersized for 
    this environment.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">SQL statements to determine 
    how much unnecessary work they are performing. A listing of resource consuming 
    SQL statements is also provided in the Statspack and Workload Repository Performance 
    Reports.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The creation of additional 
    database objects (indexes, partitions, materialized views) to improve the 
    performance of SQL statements.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Review key disk performance 
    statistics if the SQL is tuned and the right objects are in place. Hey folks, 
    sometimes SQL statements just need to churn through a LOT of data to get the 
    desired results. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">I also use Parse and CPU 
  indicators from the report to determine parse efficiency, SQL statement workload 
  reports to evaluate general SQL statement efficiency and the disk I/O reports 
  to evaluate disk subsystem performance.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But I don't want to turn 
  this into a statistics debate or a lesson on how to use database statistics 
  to tune Oracle databases. The intent of this article is to show you how to generate 
  the reports. There are numerous articles and white-papers that you can use to 
  become an &quot;Obie-Wan Tunobi&quot; Jedi Oracle Tuner. Here are a few of my 
  favorites:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><a href="http://metalink.oracle.com">Metalink</a> 
    Document 228913.1 - System-wide tuning using Statspack Reports</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><a href="http://metalink.oracle.com">Metalink</a> 
    Document 190124.1 - The Center of Excellence Performance Method</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><a href="http://www.oraperf.com">Oraperf.com</a> 
    - Website that allows visitors to upload Statspack reports to a performance 
    evaluation program. Download the whitepaper on YAPP (Yet Another Performance 
    Profiling Method).</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">But this series of blogs 
  is on 10G Grid Control new features. And two of the most important features that 10G provides 
  are ADDM reports and the database advisors. I want readers of this blog to become 
  experts in using ADDM reports and the 10G Grid Control Advisors to tune Oracle. 10G Grid Control 
  has shown us the future of Oracle performance tuning - and it doesn't include 
  us poring over reams of statistics dumps. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The future of Oracle database 
  tuning will be administrators interpreting and implementing the recommendations 
  generated by the advisors and ADDM. I absolutely and firmly believe that the 
  advisors and ADDM will become more intelligent in their recommendations. As 
  their intelligence increases, the usage of statistics dumps to attempt to improve 
  database performance will decrease. And you heard it here first folks, I also 
  think that SQL traces will be a thing of the past. I can hear the comments from 
  my fellow industry pundits now&#133;. &quot;What? SQL traces no longer needed 
  - BLASPHEMY!&quot;. My crystal ball tells me that its just a matter of time 
  until Oracle's SQL advisors make SQL traces less and less important until they 
  become unnecessary. I also think that Oracle will eventually become self-tuning.  Personally, it can't come soon enough for me.  Don't get me wrong,  I enjoy tuning. I'm actually a fairly accomplished tuner. But as the database unit manager of a group that manages a fairly large Oracle database environment, the less time my unit spends on tuning, the better.     
  And no, we all won't be out of jobs. We'll just be doing different things. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I have listened to various 
  industry pundits proclaim that the next release of so-and-so database was going 
  to no longer require DBAs for support. Bull. I knew it was bull then, it is 
  bull now and it will be bull in the future. Database companies know that they 
  must add new features to be competitive. Every new release contains so many 
  new features that I feel like I have to learn to support the database all over 
  again (which is why I like this job, by the way). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle10G allows us to administer 
  disk, lash multiple computers together to enable grid computing and the list 
  goes on, and on, and on.... It took me four different articles to cover just 
  a subset of the new features available in Oracle's latest release. The database 
  may become easier to administer in some areas, but there are so many new features 
  being incorporated into the product that administrative duties are just migrated 
  to other areas. Oracle ASM now allows me to administer my own disk. How many 
  Oracle DBAs could have predicted that they would have the capability to administer 
  their own disk storage subsystems? Can anyone of us predict what IBM, Oracle 
  and Microsoft have up their sleeves in their next &quot;latest and greatest&quot; 
  release. Not me. But THAT is what makes this job exciting.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Generating The Reports</b><br>
  OK, now that I have stated that the future of database statistics reports is 
  in jeopardy, let's learn how to generate them. We must first navigate to the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/02_addm_repository_main.gif">Automatic 
  Workload Repository Home page</a>. </font><font face="Arial, Helvetica, sans-serif" size="2">10G 
  EM displays a set of navigation tabs on the top of each <a href="/blogs/blog_cf/chrisfoot/performanceoverview/homepage2/index.html">DatabaseTarget's 
  Home page</a>. You click on the administration tab for that database, scroll 
  down and you'll find the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/01a_addm_repository_link.gif">AWR 
  Navigation Link</a> at the center of the panel.<br>
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> </font><font face="Arial, Helvetica, sans-serif" size="2">Clicking 
  on the link takes us to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/02_addm_repository_main.gif">Automatic 
  Workload Repository Home page</a>. The number of snapshots at the bottom of 
  the page is also a link. If I click on the number, in this case 273, I am able 
  to view the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_201329163739/02_snapshot_listing.gif">Snapshot 
  Home Page</a> The Snapshot Home page displays all of the snapshots currently 
  residing in the repository.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I chose &quot;View Report&quot; 
  from the Action drop down menu selection. I scrolled through the various snapshot 
  ID/timestamp combinations until I found starting time of the snapshot I wanted. 
  I <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_201329163739/03_beginning_snapshot.gif">clicked 
  on the radio button</a> next to the snapshot to select it. 10G Grid Control then displays 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_201329163739/04_ending_snapshot.gif">Select 
  Ending Snapshot page</a> that allows me to select the ending time period. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I selected the &quot;OK&quot; 
  button on the page to create the report. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_201329163739/05_processing_report.gif">Processing 
  Report Page</a>. This page will be displayed until the processing is complete. 
  When 10G Grid Control completes the report, it automatically displays the report. The 
  report provides a button that allows me to save the report to an HTML file. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_201329163739/06_report_complete.gif">HTML 
  file</a> contains links that allow you to quickly navigate to the desired section 
  of the report. Since the report is in HTML, it is formatted to improve readability. 
  This makes the report much easier to review than its older brother, the Statspack 
  Report.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  The future of database performance tuning - Automatic Database Diagnostic Monitor 
  Recommendations.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle Database 10G Express Edition </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-11-13.0505801383</link>
                      <description>It looks like I am going to have to deviate from my intended topic of discussion for one blog. Oracle has recently announced 10G Express Edition with great fanfare.  I thought that I would provide you with a quick overview of the product.   We’ll then get back on track next week when I discuss 10G EM performance snapshot reports.
</description>
                      <pubDate>Mon, 14 Nov 2005 07:25:25 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> The Oracle Corporation has 
recently announced an entirely new database product. The most exciting thing about 
10G Express Edition is that it is free. The database is free to download, free 
to develop and deploy on and free to distribute. It can't get any freer than that. 
Before I give you my opinion on why Oracle is providing a free database product, 
let's take a minute to review its features and functionality. </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">Instead of me writing paragraph 
  after paragraph of text to describe the product (which you know I usually love 
  to do), let's perform our review using a bulleted list. That way we can we can 
  quickly grasp what 10G Express Edition is all about.</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">10G Express Edition is 
    built using the same code base as Oracle Database 10G Release 2. Hmmm, that 
    means that applications built using 10G Express Edition can be upgraded to 
    use Standard Edition 1, Standard Edition or Enterprise Edition without changing 
    either the application code or the database definition statements. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">As previously stated, 
    the product is free to download, develop and deploy on. It is also free to 
    embed in third-party ISV software and hardware products. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The database can be installed 
    on any size machine but there are restrictions. The database will use a maximum 
    of 1GB of memory, run on a single CPU and support up to 4 GB of user data.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The database's footprint 
    on disk is only 150 MB. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Supports SQL, PL/SQL, 
    Java, C, PHP, .NET, HTML DB, C++, ODBC, OLE DB.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">10G Express Edition is 
    currently available on 32-bit Linux and Windows platforms.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Product support is provided free by an online community forum hosted by Oracle experts.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">A beta version of the 
    product is currently available for download. The production version is scheduled 
    for release later this year.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you go to Oracle's <a href="http://technet.oracle.com">Technology 
  Network Website</a>, you'll see a paragraph of information on 10G Express Edition prominently 
  displayed at the top of the page. If you click on the link, you are taken to 
  the new <a href="http://www.oracle.com/technology/products/database/xe/index.html">10G 
  Express Edition Information home page</a>. As stated previously, an online community forum provides 
  product support. To access the forum, you are required to first download the 
  product. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle brought out one of 
  its heavy hitters, Tom Kyte, to announce the product at various users groups. 
  In addition, Tom discusses 10G Express Edition in a podcast which can be found 
  at the bottom of the <a href="http://www.oracle.com/technology/products/database/xe/index.html">10G 
  Express Edition Information home page</a>. Tom has also been given the responsibility 
  of hosting the 10G Express Edition discussion forum. Tom was the perfect choice 
  to host a discussion forum on a new product. His <a href="http://asktom.oracle.com">Ask 
  Tom website</a> is well known throughout the Oracle community as the &quot;Go 
  To Forum&quot; for finding answers to tough questions. As I stated in my <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_10_08.8340251555">review 
  of Tom's latest book</a>, Tom's primary method of simplifying complex technical 
  concepts is to use a snippet of code as an example. Tom has the reputation of 
  being a no-nonsense, straight shooter that wants people to become better at 
  administering and using the Oracle product sets.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you read Oracle's sales 
  pitch for 10G Express Edition, you'll quickly identify the intended customer 
  base. The Oracle announcement states:</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><i>Oracle Database XE is 
  a great starter database for: </i></font></p>
<ul>
  <li><i><font face="Arial, Helvetica, sans-serif" size="2"> Developers working 
    on PHP, Java, .NET, and Open Source applications</font></i></li>
  <li><i><font face="Arial, Helvetica, sans-serif" size="2">DBAs who need a free, 
    starter database for training and deployment </font></i></li>
  <li><i><font face="Arial, Helvetica, sans-serif" size="2"> Independent Software 
    Vendors (ISVs) and hardware vendors who want a starter database to distribute 
    free of charge </font></i></li>
  <li><i><font face="Arial, Helvetica, sans-serif" size="2"> Educational institutions 
    and students who need a free database for their curriculum </font></i></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">The strategy makes perfect 
  sense. The more technicians you have testing and using your products, the more 
  popular your products become. Students that learn the product today become the 
  administrators, developers and purchase decision-makers of tomorrow. I personally 
  like the idea of being able to use the product for free on my desktop. In the 
  past, each time I switched departments or jobs I had to cost-justify having 
  a copy of the database on my PC. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">This timing of this new 
  release really benefits my unit and my organization. We just completed evaluations 
  of two other low-end database products MYSQL and Microsoft's MSDB. Maybe I am 
  a big database, big feature bigot because I wasn't impressed by either of them. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle also <a href="http://www.oracle.com/corporate/press/2005_oct/inno.html">recently 
  purchased Innobase OY</a>, the company that makes the MYSQL InnoDB engine. The 
  InnoDB product is what makes MYSQL a database by providing an <a href="http://en.wikipedia.org/wiki/ACID">ACID 
  compliant</a> storage engine that provides referential integrity and row-level 
  locking. Call me old fashioned, but I want my database to provide transactional 
  support. I want to know whether a transaction's data is in there or not. Halfway 
  doesn't count. But I don't think that Oracle's purchase of the InnoDB engine 
  will be the death of MYSQL. They're an intelligent and aggressive company. I'm 
  betting that we'll see some interesting strategic partnering decisions coming 
  from MYSQL in the future. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I have spent a few hours 
  wandering around Oracle's technical website. I took a few of the tutorials and, 
  as I do with all new database products, read the manuals. I thought that the 
  tutorial was well done. What I thought was very beneficial was that the tutorial 
  was interactive. You are prompted to <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_130505801383/tutorial.gif">interact 
  with the product</a> as you would if you were performing administrative functions 
  in a real-world environment. Look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_130505801383/tutorial_db_home.gif">database 
  administration home page</a> that the tutorial provides. It is obvious  that 
  the entire product is built upon a user friendly, graphically oriented display 
  environment. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The documentation for the 
  product is also available from a link on the <a href="http://www.oracle.com/technology/products/database/xe/index.html">10G 
  Express Edition Information home page</a>. This<a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_130505801383/create_table_documentation.gif"> 
  first screenshot</a> is from the section on creating tables while the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_130505801383/add_column_documentation_2.gif">second 
  screenshot</a> shows users how to use the graphical user interface to add a 
  column to an existing table. One quick note, most of the object creation information 
  is contained in the Developer's Guide and not the Administrator's Guide like 
  it is in other Oracle database product documentation sets. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Could this product eventually 
  become a Microsoft Access competitor? I sure hope so. Although I just described 
  myself as a &quot;big database, big feature bigot&quot;, I firmly believe that 
  Microsoft Access has a home in many corporate environments. Oracle needs to 
  have a product that is able to go head-to-head against Microsoft's intuitively 
  obvious, easy to use product. Could Express Edition be that product? </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Closing</b><br>
  Strategically, this was a VERY smart move by the Oracle Corporation. Making 
  a free product available will increase its user base in both breadth and depth. 
  Having one of their ACEs, Tom Kyte, lead the charge was also an excellent idea. 
  I will admit that I am a little wary of not having Oracle support to lean on. 
  I will be spending some dedicated time on the 10G Express Edition discussion 
  forum trying to determine how Oracle's free support via discussion forum is 
  working out. <br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Configuring and Administering Automatic Workload Repository Performance Snapshots</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-11-06.0481421080</link>
                      <description>Now that we have a good overview of 10G AWR snapshots, let’s continue our discussion by learning how to tailor the 10G AWR snapshot environment to meet our specific needs.  &lt;BR&gt;&lt;BR&gt;
If you are like me, I’m sure you would rather learn how to use the performance statistics captured in the snapshots to monitor and tune your databases.  But we must spend one blog learning how to configure 10G Grid Control to ensure that we have the information we need.  We can’t tune if we don’t have adequate performance measurements!
</description>
                      <pubDate>Mon, 07 Nov 2005 11:19:45 -0600</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> Take some advice from your 
  friendly ex-Oracle instructor. If you haven't read my previous blog, which was 
  an overview of the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_10_29.7417919231">10G 
  snapshot environment</a>, I would highly recommend that you do so. It will provide 
  the foundation for the rest of the blogs in this series.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Configuring the 10G AWR 
  snapshot environment is pretty simple. There aren't many knobs that we can tweak. 
  The first thing we need to do is to navigate our way through the various 10G 
  EM panels until we display the Automatic Workload Repository administration 
  home page. 10G Grid Control displays a set of navigation tabs on the top of each <a href="/blogs/blog_cf/chrisfoot/performanceoverview/homepage2/index.html">database 
  target's home page</a>. You click on the administration tab for that database, 
  scroll down and you'll find the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/01a_addm_repository_link.gif">AWR 
  navigation link</a> at the center of the panel. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I click on the Automatic 
  Workload Repository navigation link, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/02_addm_repository_main.gif">Automatic 
  Workload Repository Home page</a>. The home page provides the following information:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The number of days that 
    snapshots are retained.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The time period between 
    snapshots.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The collection level 
    (discussed in my last blog).</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The scheduled time that 
    the next snapshot will be taken.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">The page also displays the 
  number of snapshots that are stored in the repository (notice that the number is actually 
  a link) and the number of stored snapshots. Stored snapshots will be discussed 
  in an upcoming blog. The page then provides the timestamps of the earliest and 
  latest snapshots stored in the repository.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If I click on the EDIT navigation button
  provided on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/02_addm_repository_main.gif">Automatic 
  Workload Repository Home page</a>, 10G Grid Control will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/03_addm_snapshot_edit.gif"> 
  Edit Settings page</a> that allows me to tailor some of the parameters to meet 
  my specific monitoring requirements. The first thing I can change is the number 
  of days of snapshots I would like to store in the repository. AWR snapshots are 
  purged automatically by MMON every night. 10G Grid Control, by default, tries to keep 
  one week's worth of AWR snapshots available. In my last blog we learned that 
  if we try to store too many snapshots in the repository and run out of space 
  in the SYSAUX tablespace, 10G Grid Control will automatically purge the oldest snapshots 
  to make room for the new ones. If I select the &quot;Retain Forever&quot; radio 
  button, 10G  Grid Control will keep as many snapshots as the disk space allocated to the 
  SYSAUX tablespace will allow.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I can also choose to change 
  the time interval between snapshots. I often decrease the time period between 
  snapshots when I am trying to gather information on a specific performance problem. 
  The shorter the duration, the less information I have to wade through during 
  my investigation. If the database isn't experiencing a specific performance 
  problem, I use the default setting of 60 minutes between snapshots.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/03_addm_snapshot_edit.gif">Edit 
  Settings page</a> also allows the user to change the depth of the statistics 
  collected. The parameter has three different possible values: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Basic - The collection 
    of AWR statistics and computation of metrics is deactivated.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Typical (default value) 
    - Partial statistics are collected. AWR collects only those statistics required 
    to provide base-level monitoring capabilities. This is the setting currently 
    recommended by Oracle. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">All - All possible statistics 
    are captured. The additional statistics are used for manual SQL diagnosis. 
    The ALL setting does incur additional overhead. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">My preference is to use 
  Typical, unless I am actively investigating a SQL performance problem. I will 
  then choose ALL to configure the tool to generate a greater depth of performance 
  statistics. Please note that the ALL setting does have a measurable performance 
  overhead associated with it when it is activated. Notice that the collection 
  level itself (in this case Typical) is displayed as a link. When I click on 
  the link, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/04_addm_statistics_level.gif">Initialization 
  Parameter Edit panel</a> that allows me to change the collection level. I'll 
  produce a couple of reports showing you the difference between Typical and All 
  in an upcoming blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's go back to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/02_addm_repository_main.gif">Automatic 
  Workload Repository Home page</a>. The number of snapshots at the bottom of 
  the page is also a link. If I click on the number, in this case 273, I am able 
  to view the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_11_060481421080/05_addm_snapshot_listing.gif">Snapshot 
  Home page</a>. The Snapshot Home page displays all of the snapshots currently 
  residing in the repository. There is a possibility that there could be many 
  hundreds of stored snapshots. The panel provides a 'Select Beginning Snapshot' 
  text box that allows the user to quickly navigate to the snapshots associated 
  with a specific time period. The page also displays a drop-down list of options 
  that allows us to perform specific actions against the snapshots. Although I'll 
  be discussing most of the options in-depth in upcoming blogs, here's a quick 
  overview of what they provide:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> Create Preserved Snapshot 
    Set - Allows the administrator to store snapshot information indefinitely. 
    In an upcoming blog, we'll learn all the different features (such as <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/sql_tuning_sets_homepage_2a.gif20">SQL 
    Tuning Sets</a>) that use preserved snapshot sets as input. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Create SQL Tuning Set 
    - If you want to learn more about SQL Tuning Sets, please refer to one of 
    my previous blogs appropriately titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_02.1208871355">'SQL 
    Tuning Sets' </a>.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">View Report - Generates 
    a very robust and in-depth performance statistics report. Once again, we'll 
    definitely spend a blog or two generating and reviewing Snapshot performance 
    reports.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Create ADDM Task - The 
    Automatic Database Diagnostic Monitor analyzes information contained in the 
    AWR. As we learned previously, AWR Snapshots occur every 60 minutes. After 
    the AWR Snapshot is executed, the Automatic Database Diagnostic Monitor is 
    triggered to analyze the information contained in the AWR for the period pertaining 
    to the last two Snapshots. The Create ADDM task option allows us to execute 
    an ADDM Task manually. For more detailed information on ADDM tasks, please 
    refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_06_30.3614041361">'The 
    10G Automatic Database Diagnostic Monitor (ADDM)'</a> . </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Delete Snapshot Range 
    - Pretty &quot;intuitively obvious&quot; as my old boss Dan Pizzica used to 
    say. This option allows you to specify a range of snapshots to delete. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Compare Timelines - My 
    personal favorite. It allows administrators to compare two snapshot sets. 
    I think this is a VERY beneficial feature and we'll spend dedicated time covering 
    it. We can use this option to compare the performance statistics captured 
    during one workload exection to another. If we have a set of nightly batch 
    jobs that run longer than normal, we can compare that run to previous runs 
    that ran OK. It doesn't provide a lot of information but it is certainly a 
    start. At one time, I almost had one of my previous employers convinced that 
    we should build a product that compares Statspack runs. I have always thought 
    that a comparison tool of this nature would be of GREAT benefit. There is<a href="http://www.geocities.com/alexdabr/spvcomp.html">one company</a> that 
    provides a tool like this. This isn't a plug for the tool. I have never used 
    it but it is a neat idea.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  Well that about covers administration. In my next blog, we'll forge ahead by 
  taking an in-depth look at some of the aforementioned features provided above.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Working with Automatic Workload Repository Performance Snapshots</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-10-29.7417919231</link>
                      <description>Now that we have completed our discussion on the 10G EM Advisors, let’s take an in-depth look at the performance statistics capturing and reporting capabilities provided by 10G EM.   Oracle 10G captures performance statistics on a periodic basis and stores the data in the Automatic Workload Repository.  The individual statistic capture executions are called AWR Snapshots.&lt;BR&gt;&lt;BR&gt;

We’ll begin our discussion with a review of the 10G AWR snapshot environment. In a series of upcoming blogs will learn how to use AWR Snapshots to generate performance reports, compare two sets of performance statistics to one another, compare a captured set of statistics to a baseline and finally, how to preserve snapshot sets for future diagnostic use.  When we are done with this series, you’ll be saying “Statspack, who needs THAT tired old tool anymore?"  
</description>
                      <pubDate>Mon, 31 Oct 2005 06:29:29 -0600</pubDate>
                              
      <content:encoded><![CDATA[<font size="2" face="Arial, Helvetica, sans-serif"> I know that I have covered 
much of this information in previous blogs, but we must review the AWR environment 
before we begin drilling down into AWR snapshots. In this blog, we'll perform 
our review. In my next blog, I'll show you how to tailor the AWR snapshot environment 
to meet your specific needs. Finally, we'll learn how to display and analyze key 
performance information contained in AWR snapshots. </font> 
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>AWR and Statspack Snapshots 
  </b><br>
  For those readers that are familiar with Statspack, you can loosely equate a 
  snapshot stored in the AWR repository to its Statspack predecessor. Statspack 
  is a set of SQL, PL/SQL and SQL*PLUS scripts that collects, stores and reports 
  on Oracle database performance statistics. The utility stores the statistical 
  information in permanent tables, which allows the data to be used for after-the-fact 
  performance analysis as well as performance trending. The administrator collects 
  performance information by running data captures called Statspack Snapshots. 
  Snapshots record key statistics, high resource consuming SQL statements and 
  wait events. To report on this information, users run an Oracle supplied script 
  that prompts them for beginning and ending snapshot IDs. Oracle then displays 
  performance information, which can be spooled to an output file in SQLPLUS. 
  Since the information is stored in permanent tables, the information is available 
  to be viewed at any time.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Oracle 10G's statistics 
  capturing mechanism follows the same snapshot premise. Oracle 10G utilizes a 
  new background process called MMON to capture key performance statistics every 
  60 minutes by default and stores that information in the Automatic Workload 
  Repository (you'll need to remember that). The MMON snapshot mechanism can be 
  loosely compared to its Statspack predecessor. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"> The major differences between 
  Statspack and AWR snapshots are: </font></p>
<ul>
  <li><font size="2" face="Arial, Helvetica, sans-serif">Statspack snapshots must 
    be run by an external scheduler (dbms_jobs, CRON, etc.). AWR snapshots are 
    scheduled every 60 minutes by default. A new background server process called 
    MMON is responsible for initiating the snapshot mechanism. Administrators 
    can manually adjust the snapshot interval if so desired. I'll show you how 
    to adjust the interval in my next blog.</font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">ADDM captures a much 
    greater depth and breadth of statistics than Statspack does. During snapshot 
    processing, MMON transfers an in-memory version of the statistics to the permanent 
    statistics tables. </font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">Statspack snapshot purges 
    must be scheduled manually. When the Statspack tablespace runs out of space, 
    Statspack quits working. AWR snapshots are purged automatically by MMON every 
    night. MMON, by default, tries to keep one week's worth of AWR snapshots available. 
    If AWR detects that the SYSAUX tablespace is in danger of running out of space, 
    it will free space in SYSAUX by automatically deleting the oldest set of snapshots. 
    If this occurs, AWR will initiate a server-generated alert to notify administrators 
    of the out-of-space error condition. Administrators can manually adjust the 
    amount of information retained by invoking the MODIFY_SNAPSHOT_SETTINGS PL/SQL 
    stored procedure and specifying the RETENTION parameter input variable. </font></li>
</ul>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>AWR Repository</b><br>
  We previously learned that MMON captures key performance statistics and stores 
  them in the Automatic Workload Repository. Oracle describes the Automatic Workload 
  Repository as the data warehouse of the Oracle10g database. It is used as the 
  statistics data source for all other components of the Common Manageability 
  Infrastructure (refer to figure 1). </font></p>
<p align="center"><font size="2" face="Arial, Helvetica, sans-serif"><img src="/images/foot11_2.gif"></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>AWR Snapshots</b><br>
  AWR snapshots provide a persistent view of database statistics. They are stored 
  in the system-defined WR schema, which resides in a new tablespace called SYSAUX. 
  A snapshot is a collection of performance statistics that are captured at a 
  specific point in time. The snapshot data points are used to compute the rate 
  of change for the statistic being measured. A unique SNAP_ID snapshot identifier 
  identifies each snapshot.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Storing statistics generated 
  by AWR snapshots in the database allows administrators to analyze problems that 
  occurred in the past. This historical information will help administrators finally 
  answer questions like, &quot;My program ran long two days ago; can you fix it?&quot; 
  <br><br>
  The stored statistics also allow the database to compare its current performance 
  to a stored baseline. The database is then able to initiate its own early-warning 
  performance alerts when baseline measurements are exceeded. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The Automatic Database Diagnostic 
  Monitor (discussed in an earlier blog) uses the snapshot information to automatically 
  identify performance problems and make recommendations to correct them. In addition, 
  administrators are able to use the historical data to create performance reports 
  (discussed in an upcoming blog) and perform performance trending analysis. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Metrics vs. Base Statistics</b><br>
  Base statistics are the raw data points collected by AWR. An example of a base 
  statistic would be the number of reads per second performed on a particular 
  database data object. Metrics are computed statistics derived from base statistics. 
  The MMON server process uses the base statistics as input to calculate their 
  corresponding metrics. These computed statistics are used by internal components 
  for system health monitoring, early warning problem detection, and self-tuning. 
  An example of a metric would be the average number of physical reads per second 
  performed on a database data object within the last 60-minute time period. Pre-computing 
  metrics allows internal components to quickly compute the rate of change of 
  system statistics. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">In the past, administrators 
  who wanted to determine the impact a specific workload had on the database used 
  Statspack to capture baseline statistics before the run, ran the workload being 
  evaluated, ran Statspack again to capture statistics after the run, then manually 
  computed the rate of change for the particular base statistic. With pre-computed 
  metrics, administrators only need to run the workload, then select the desired 
  metric values from the new V$ metric tables. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>AWR Snapshot Statistics 
  Levels</b><br>
  Administrators are able to control the breadth and depth of statistics to capture 
  by setting the STATISTICS_LEVEL initialization parameter. The parameter has 
  three different possible values: </font></p>
<ul>
  <li><font size="2" face="Arial, Helvetica, sans-serif">Basic - The collection 
    of AWR statistics and computation of metrics is deactivated. </font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">Typical (default value) 
    - Partial statistics are collected. AWR collects only those statistics required 
    to provide base-level monitoring capabilities. This is the setting currently 
    recommended by Oracle. </font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">All - All possible statistics 
    are captured. The additional statistics are used for manual SQL diagnosis. 
    The ALL setting does incur additional overhead. </font></li>
</ul>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>AWR Snapshot Baselines</b><br>
  Administrators create snapshot baselines to capture and measure performance 
  statistics for a particular time period. The baseline data can then be used 
  to compare current system performance against a time period when database performance 
  was determined to be optimal. Threshold-based alerts can be set up to notify 
  administrators when current system performance deviates from the statistics 
  and metrics stored in the baseline snapshot. The baseline snapshot is defined 
  on a pair of SNAP_IDs. The CREATE_BASELINE stored procedure accepts the START_SNAP_ID 
  and END_SNAP_ID variables as input to create the snapshot baseline. Administrators 
  use the BASELINE_NAME variable to uniquely identify the baseline snapshot. AWR 
  does not delete snapshots defined as baseline snapshots. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>AWR Snapshot Comparison</b><br>
  10G EM also allows two sets of snapshots to be compared to one another. The 
  results of the comparison are displayed graphically using horizontal bars to 
  indicate differences between the two measurements. It is important to note 
  that 10G EM does not compare the hundreds of statistics stored in an AWR snapshot. Oracle has preselected key statistics to evaluate which makes the 
  output much easier to review. Since Oracle has preselected the statistics, it 
  is safe to assume that it views them to be the most critical.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Conclusion</b><br>
  Now that we have a firm understanding of the AWR snapshot environment, we'll 
  be ready to learn how to tailor it to meet our specific requirements and use 
  its contents to allow us to achieve &quot;Database Performance Maximus&quot;.<br>
  Thanks for reading.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Undo Advisor</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-10-22.6045254612</link>
                      <description>We continue our discussion on the 10G Grid Control advisors.  In this blog, I’ll provide you with a brief review of Automatic Undo Management in Oracle 10G.  I’ll continue the discussion by showing you how to use the 10G Grid Control Automatic Undo Advisor to determine how much space you will need in your undo tablespace for a specified undo retention time period.</description>
                      <pubDate>Mon, 24 Oct 2005 07:00:03 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> <b>Database Managed Undo Segments</b><br>
A transaction uses an undo segment to record before images of data it intends 
to change. If the transaction fails before committing, Oracle uses the before 
images to rollback or undo the uncommitted data changes. Oracle also uses undo 
segments for statement-level read consistency. Read consistency ensures that all 
data returned by a query comes from the same point-in-time (query start time). 
Lastly, undo segments provide before images of data to help the instance roll 
back failed transactions during instance recovery. </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">In earlier releases of Oracle, 
  DBAs were responsible for manually sizing, creating and tuning database objects 
  that were responsible for storing before images of data. These objects, called 
  rollback segments, are still available for use but certainly aren't as popular 
  as their automatic undo segment counterparts. You didn't have to be an Oracle 
  expert to know that rollback segments were &quot;somewhat troublesome.&quot; 
  Out of space conditions, contention, poor performance and the perennial favorite 
  &quot;snap shot too old&quot; errors had been plaguing Oracle database administrators 
  for over a decade. Oracle finally decided that the database could probably do 
  a better job of managing before images of data than we could.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In Oracle9i and later releases, administrators 
  have their choice of continuing to manage rollback segments on their own (manual 
  undo management) or configuring the database to manage its own before image 
  data (automatic undo management). Oracle refers to system managed before image 
  segments as undo segments.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Administrators must create 
  a tablespace to hold undo segments by using the UNDO keyword in the tablespace 
  create statement:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2">CREATE UNDO TABLESPACE 
      undots1<br>
      DATAFILE 'undotbs_1a.dbf'<br>
      SIZE 10M AUTOEXTEND ON;</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  The following initialization parameters are used to activate automatic undo 
  management:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">UNDO_MANAGEMENT - AUTO 
    configures the database is to use automatic undo segments. MANUAL configures 
    the database to use rollback segments.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">UNDO_TABLESPACE - Specifies 
    the tablespaces that are to be used to hold the undo segments. The tablespace 
    must be created using the UNDO keyword. If no tablespace is defined, Oracle 
    will select the first available undo tablespace. If no undo tablespaces are 
    present in the database, Oracle will use the system rollback segment during 
    startup. This value can be set dynamically by using the ALTER SYSTEM statement.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">UNDO_RETENTION - specifies 
    the amount of time that Oracle attempts to keep undo data available. This 
    parameter becomes important when the Oracle9i flashback query option is used. 
    </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">You cannot create database 
  objects in undo tablespaces. It is reserved for system-managed undo data. The 
  view DBA_UNDO_EXTENTS can be accessed to retrieve information relating to system 
  managed undo data. For those of us familiar with V$ROLLSTAT, it is still available 
  and the information reflects the behavior of the undo segments in the undo tablespace. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Tuning Automatic Undo 
  Segments</b><br>
  Most of us thought that automatic undo would be the solution to all of our before 
  image management problems. Certainly, before image administration has been simplified 
  by reducing the number of tuning knobs to one (UNDO_RETENTION). But sizing the 
  UNDO_TABLESPACE to hold the amount of before images generated during the time period specified 
  in the UNDO_RETENTION parameter can still be a challenge.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The goal we are trying to 
  accomplish is to set the UNDO_RETENTION parameter and size the undo tablespace 
  to ensure that we don't run out of space in the undo tablespace and our queries 
  don't receive the dreaded ORA-01555 &quot;Snapshot too old&quot; error messages.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">ORA-01555 errors occur when 
  a transaction is unable to successfully read a before image of data to maintain read consistency. 
  As stated previously, read consistency ensures that all data returned by a query 
  comes from the same point-in-time (query start time). If a block of data changes 
  after the query has started, Oracle will read the before, or undo, image of 
  data to maintain a read consistent view of the data. To guarantee read consistency, 
  Oracle returns the ORA-01555 error if it cannot retrieve the before image of 
  the changed data block. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">There are a couple of reasons why this failure occurs.  One is delayed block cleanout.  A good description of this problem can be found in Note 40689.1 on Oracle's <a href="http://metalink.oracle.com">Metalink</a> website.   Another reason this error happens is when there is 
  insufficient space to hold all of the before images in the undo tablespace. 
  When space becomes constrained, Oracle will remove before images of data from 
  the undo tablespace that are no longer required to maintain transaction-level 
  consistency. Remember, before images of uncommitted data must be kept to provide 
  transaction-level consistency. If a transaction fails, Oracle uses the before images to make the 
  database look like the failed transaction never changed anything. Before images 
  of committed data blocks aren't as important to Oracle because they aren't required 
  to maintain transaction-level consistency. The problem arises when queries and 
  Oracle don't agree on what is, or isn't, important. And that disagreement occurs 
 when a query is looking for a before image 
  that has been flushed out of the undo area.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The trick is to balance 
  the size of the undo tablespace with the amount of undo retention you need to 
  satisfy your long-running queries. But this is easier said than done. Database 
  applications, by their nature, are very dynamic. It is hard to predict how much 
  undo will be generated for a particular time period. Sizing the undo tablespace 
  and setting the UNDO_RETENTION time period is certainly simpler for small databases 
  that don't have a lot of activity. But what if you have an application that 
  is hundreds of GIGs in size with queries that run for hours and hours and hours&#133;.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G Grid Control Undo Advisor</b><br>
  Let's take a look at the 10G Grid Control Undo Advisor to see if it can help. Like all 
  advisors, we access the Undo Advisor by clicking on the Undo Advisor link that 
  is displayed on 10G Grid Control's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/9_advisor_central_home_page_2.gif">Advisor 
  Central Home Page</a>. Clicking on this link notifies10G Grid Control to display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_226045254612/01_undo_management.gif">Undo 
  Management Home Page</a>. The home page displays the following information: 
  </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Current UNDO_RETENTION 
    setting</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Links to administer the 
    undo tablespace</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">A recommendation area</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Undo image consumption 
    and generation</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Links to activate the 
    Undo Advisor</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Notice that Oracle is making 
  a recommendation to increase the size of the undo tablespace. Remember that 
  10G Grid Control will activate various advisors during normal operations. The Undo Advisor 
  is one of them. After reviewing the information on the Undo Management Home Page, 
  I clicked on the Undo Advisor link. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_226045254612/02a_undo_advisor_page.gif">Undo 
  Advisor Page</a>. The Undo Advisor Page displays a graph that allows you to 
  determine the size of the undo tablespace that will be required to successfully 
  store the amount of before images generated for a specified undo retention time 
  period. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you roll the mouse over 
  the graph, Oracle will display undo retention time/undo tablespace size settings. 
  You can now perform numerous &quot;what if&quot; tests to determine what the 
  best combination of undo retention/undo tablespace size values are for your 
  environment. If you click on the graph and hit the OK navigation button, you 
  will be executing the SQL that is generated to change the undo retention to 
  the time period you specified with your mouse click. If you click on the Show 
  SQL navigation button, 10G Grid Control will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_226045254612/03_set_new_threshold.gif">SQL 
  statement</a> that will be executed. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">It seems that the Undo Advisor 
  uses a worst-case scenario to determine the amount of undo generated for a particular 
  time period.   Use the advisor 
  to determine a good starting point and set your UNDO_RETENTION parameter and 
  undo tablespace size settings accordingly. Monitor the enviroment and fine tune 
  it to meet your overall goals.</p> <p><font face="Arial, Helvetica, sans-serif" size="2"><b>Tune the SQL First<br>
  </b>If a statement suddenly returns the infamous ORA-015555<b> </b>&quot;Snapshot 
  too old&quot; error message, don't immediately begin tuning the database's undo 
  management system to fix it. Remember many SQL statements run too long because 
  <u>they aren't properly tuned</u> and some shouldn't be run during daylight 
  hours due to the amount of work they generate. You'll need to tune the poorly 
  running queries and determine which SQL should be run during off-peak processing 
  times. Continue to tune the SQL and tweak the undo setting parameters until 
  you obtain a trouble-free environment.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I hope you enjoyed this 
  blog on the 10G Grid Control Automatic Undo Advisor. Thanks for reading!<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Enterprise Manager Standalone Java Console</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-10-14.3862922689</link>
                      <description>Before we return to our series of blogs on 10G EM features and functionality, I think it is important for us to discuss the 10G Enterprise Manager Standalone Java Console.  Previous blogs have contained information on troubleshooting 10G EM management server to agent communications.  But what happens if the entire environment goes down and you still want to use a GUI version of the tool?   In addition, the management server version of 10G EM currently does not provide the capability of administering some of Oracle’s advanced features such as streams, advanced queuing, etc..  &lt;br&gt;&lt;br&gt;
 This blog will show you how to install and configure the 10G Enterprise Manager Standalone Java Console.  We’ll also compare and contrast the Java Console to its big brother that uses the management server and repository.
</description>
                      <pubDate>Mon, 17 Oct 2005 07:47:58 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> Sorry about the SGT (Sissy 
  GUI Tool) crack&#133; I was around when the migration from command line to Oracle 
  Enterprise Manager first took place. I must admit, it was hard for me to give 
  up the command line interface that I trusted. Every time I entered a command 
  using the new tool, I used the &quot;Show SQL&quot; button to review the SQL 
  that was being executed. I began using the term &quot;SGT&quot; or &quot;Sissy 
  GUI Tool&quot; to describe Oracle's new graphical administrative tool to my 
  students. I thought that real DBAs used command line! I think I'm showing my 
  age here. I still recommend to everyone that they learn how to administer Oracle 
  using a command line interface before they become experts on the &quot;SGT&quot;.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But, like the majority of 
  Oracle DBAs, I am also an avid user of Oracle's graphical administrative toolsets. 
  The toolsets make day-to-day administration so much easier that I actually can't 
  remember the last time I used the traditional command line interface. 10G EM 
  provides so many features and so much advanced functionality that it makes my 
  unit more productive and allows us to provide a higher quality level of support 
  to our customers.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But what happens when the 
  10G management server environment becomes unavailable? Maybe one of your friendly UNIX 
  admins drips jelly from their donut on the main motherboard. Do you immediately 
  resort to command line? You certainly can choose to use a command line interface 
  but 10G EM also provides a Standalone Java Console that will allow you to continue 
  to perform basic database administration tasks using a point-and-click GUI interface. 
  For brevity's sake (there's something new coming from me), I will shorten the 
  name of the 10G Enterprise Manager Standalone Java Console to Java Console in 
  this discussion. I'll continue to call the version that uses a management server 
  and a repository 10G EM. Clear as mud? Good.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Java Console does not 
  use a management server or a repository. If you have experience with previous 
  versions of Enterprise Manager, you'll know that the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/0_9i_OEM_login_2.gif">
  login popup screen</a> gave you the option of either connecting to the product 
  standalone or logging into a management server. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Like previous standalone 
  versions, the Java Console does not require a management server, repository 
  or agents running on the targets. You are making a direct Oracle Net connection 
  to the target databases you intend to administer. If you don't have a management 
  server environment available, you also don't have the capability of taking advantage 
  of the advanced features and functionality it provides. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">More specifically, you won't 
  be able to:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Use any of the features 
    and functionality provided by the ADDM repository </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Take advantage of the 
    advice provided by the Enterprise Manager advisors</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Schedule alerts, events, 
    jobs</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Automate repetitive administrative 
    tasks</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Backup database files 
    using 10G EM's backup toolset</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Customize, schedule or 
    publish reports</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> Use virtually any of 
    the advanced features I have been blogging about</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">But the tool will allow 
  you to perform basic database administration tasks. I'll admit that we were 
  forced to use the Java Console when our 10G EM management server and repository 
  hardware platform &quot;went kaput.&quot; &quot;Went kaput&quot; is putting 
  it mildly. After our UNIX administrators tried virtually every trick in the 
  book to restart it, we were forced to call in the vendor . You know you are 
  in trouble when that happens (must have been extra sticky jelly). You really 
  know you are in trouble when the vendor retries everything your UNIX admins 
  just did and then begins replacing hardware components. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The system was old and really 
  needed replacing. My boss came to the rescue when he stated &quot;Maybe we should 
  just give this thing its last rites and we'll buy your unit a newer and more 
  powerful platform.&quot; Hey, you don't have to ask me twice - new server here 
  we come. We set up manual monitoring scripts to provide proactive monitoring 
  functionality until our new environment was up and running. I then remembered that we could continue to use a GUI tool to 
  administer our 10G databases. Java Console to the rescue!</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In addition, the Java Console 
  allows you to administer some advanced features that have yet to be supported 
  by 10G EM. Take a look at this <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/1a_java_console_uses.gif">screenshot</a>. 
  It is 10G EM's administrative tab for a 10G database. Look at the text in the 
  red block. That is Oracle's hint that if want to use a GUI interface to administer 
  Streams, Advanced Replication, Advanced Queues, XML Database, Spatial and Workspace, 
  you'll need to use the Java Console. Oracle states that it will eventually integrate 
  this functionality into 10G EM. Once the integration is complete, the Java Console 
  will be decommissioned. I'm just hoping that Oracle continues to provide a standalone 
  version of Enterprise Manager. Just in case my 10G EM management server ever 
  goes &quot;kaput&quot; again.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Installation and Activation</b><br>
  Installation is simple. The Java Console program is on the Oracle 10G Client 
  software CD. When you are prompted to choose the type of installation, select 
  the Administrator option and the Java Console will be installed with the rest 
  of the software. After the installation is complete, navigate to the Oracle 
  home's bin directory where you installed the Oracle Client and type in: </font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">oemapp console</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">The main administrative 
  console should appear. You'll notice that the interface looks VERY similar to 
  the 9i version of Oracle Enterprise Manager. If the console does not appear, 
  go to the 10G Enterprise Manager Grid Control Installation and Basic Configuration 
  manual on <a href="http://technet.oracle.com">Technet</a> and scroll to the 
  bottom. Look for the chapter on the Java Console and verify that you have the 
  correct shared library path environment variables set for your system. </font> 
</p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Adding Databases to the 
  Navigation Tree</b><br>
  After the console appears, you'll need to add a database to the tree to begin 
  administering it. Click on the Navigator drop down button at the upper right 
  hand side of the Java Console and then click on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/1b_navigator_add_database.gif">Add 
  Database to Tree navigation button</a>. The Java Console will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/2_add_database_entry_panel.gif">Add 
  Database to Tree popup panel</a>. Enter the required information to add the 
  database to the Java Console's administration tree. The popup panel also provides 
  you with the capability of selecting databases from your local TNSNAMES.ORA 
  file. Once the database is added, you should see it appear on the navigation 
  tree on the left side of the Java Console's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/3_database_added.gif">main 
  administration panel</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When you click on the database, 
  you'll see a popup asking you to provide your logon credentials. You can choose 
  to enter them on the popup or you can click on the Configuration dropdown and 
  choose the Local Preferred Credentials option to activate the<a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/4_add_preferred_credentials.gif"> 
  Edit Local Preferred Credentials popup</a> which allows you to enter logon credentials 
  for all databases in the tree.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Using the Java Console 
  </b><br>
  After I entered my logon credentials, I clicked on the database to activate 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_143862922689/5_java_console_functionality.gif">options 
  dropdown menu</a> for the database I am administering. If you have been using 
  previous versions of Oracle Enterprise Manager, the interface and selections 
  should look very familiar to you. You also need to take a look at the bottom 
  of the page. That is where you'll find the buttons that allow you to administer 
  Streams, Advanced Replication, etc..</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  I hope you enjoyed this article on the 10G Enterprise Manager Java Console. 
  If you want to use a GUI tool to administer some of the advanced features that 
  10G EM can't or you have a 10G Management Server that is unavailable, the Java 
  Console will currently be your only alternative to command line.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Book Review - Expert Oracle Database Architecture 9i and 10g Programming Techniques and Solutions by Thomas Kyte</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-10-08.8340251555</link>
                      <description>Before we return to our regularly scheduled 10G EM topics, I'd like to provide you with my opinions on Tom Kyte's latest book.</description>
                      <pubDate>Mon, 10 Oct 2005 06:08:12 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2">I have a LOT of books on 
  Oracle. I am an avid Oracle book collector. I buy them, publishers send me them 
  to review, I receive them as presents from family members - the works. I have 
  been working with Oracle for over 15 years now. I have bought it, sold it, 
  learned it and taught it. I have been using Oracle since Version 5 and I have 
  kept every Oracle book, manual and instructor's guide I crossed paths with during 
  that time. Remember the old paper back manuals that Oracle sent to you with 
  the software? I've got LOTS of them! I was certified by Oracle to teach virtually 
  the entire DBA admin track and I have kept every version of every instructor's 
  guide I used (Version 7 to Version 10). As a result, my library consists of 
  dozens and dozens (and dozens) of books on Oracle. </font> </p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I'm only allowed to &quot;decorate&quot; 
  two rooms in my house. One is my den and the other is the garage. All others 
  belong to my wife. Which is a good thing because Martha Stewart I'm not. I decorate 
  my den with car pictures and books on Oracle while my garage's motif is car 
  pictures and car books. Oh, and usually a couple of cars that are &quot;works 
  in progress&quot; (but my wife calls them other things). I'm very lucky that 
  she grew up with two car crazy brothers....</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> The books in my den are 
  arranged by Oracle release ranging from Version 6 to Version 10. The books are 
  then sorted by my affinity for them. How important I think they are, how well 
  written they are, how they rank against their fellow literary competitors. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">So let me start this book 
  review by saying that<i> Expert Oracle Database Architecture 9i and 10g Programming 
  Techniques and Solutions</i> by Tom Kyte now has the lead position in my 10G 
  section. I really like this book a lot. I can't tell you if another book will 
  knock it off the pole position it currently holds. But I can tell you that it 
  currently resides in the number one slot of a section that already contains 
  close to 30 other books and manuals. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Layout and Design</b><br>
  The layout and design of a book are important to me. They allow me to grasp 
  the information more quickly and find topics faster when I need to use the book 
  as a reference. Some texts I use to educate myself, while others I use as a 
  reference. A good design allows me to use a book as both. I can safely say that 
  I will be using this book as both an educational tool and a reference. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">A good design and layout 
  also lets me know what the author feels is important. Kyte and his publisher 
  Apress have designed a book that is easy for me to read and easy for me to determine 
  what Kyte feels is important.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let me show you an example:</font></p>
<hr>
<font face="Arial, Helvetica, sans-serif" size="2"><b>#Note </b>Does the text 
in this area stand out compared to other text in this book review? It certainly 
does to me. This tells me that the author thinks that this text is expressing 
an important concept that I need to comprehend and remember.<br>
</font>
<hr>
<font face="Arial, Helvetica, sans-serif" size="2"> </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">All code examples in the 
  book, including the code itself and the output it generates, are highlighted 
  in gray. It makes the code stand out in the text. I think I need to do more 
  of that in my blogs. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The chapter, paragraph and 
  section headings are also well defined. This is VERY important to me when I 
  use a book as a reference. I usually rely upon a book's table of contents and 
  appendix when I am trying to quickly find a specific piece of information. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Although this book contains 
  both a good table of contents and a very detailed appendix, I find that I don't 
  need to use them when I am scanning the book looking for a particular topic. 
  I am able to quickly flip through the pages to the chapter I want and scan the 
  pages looking at the section headings to find that particular tidbit of information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Writing Style</b><br>
  Examples, examples, examples. Extensive use of examples is a Kyte trademark. 
  Kyte maintains an Oracle Q&amp;A website aptly tiled &quot;<a href="http://asktom.oracle.com/">Ask 
  Tom</a>&quot;. My DBAs are going to the Ask Tom website to find answers 
  to their questions just as often as they go to Metalink. Sorry Tom, I still 
  prefer that my DBAs go to Oracle's official support site before they begin searching 
  other sites for information. I think you'd agree. Partly because Metalink is 
  Oracle's &quot;official&quot; support website. That and we pay Oracle to provide us high quality support and I want to make sure we use every resource we can. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you scan the Ask Tom 
  website, you'll quickly find that his primary method of simplifying complex 
  technical concepts is to use a snippet of code as an example. Based on the positive 
  responses he receives, the code examples work. They 
  also work for me too. One of the chapters in the book is on Concurrency and 
  Multi-Versioning. Information that I found particularly hard to successfully 
  convey to students during my career as an instructor. As I was reading that 
  chapter, I found myself thinking that I wish I had a few examples from that 
  chapter available to me when I was teaching. Although I was still able to ensure 
  my students understood the concepts I was trying to convey, my own examples 
  were neither as smooth nor as blatantly clear as the ones contained in the book. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The author has lost the 
  battle of conveying his thoughts when readers spend more time trying to understand 
  the written prose than the underlying concepts. Tom's writing style makes the 
  book easy to read. I'm a slow learner to begin with, I don't need to have the 
  writer try to impress me their literary style. I want them to make every effort 
  to clearly communicate complex and highly technical concepts to me. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I made that effort as an 
  instructor and I expect an author of a book I buy to do the same. I would often 
  end a discussion with a booming &quot; DO YOU UNDERSTAND?&quot; when I wanted 
  to be totally sure I, and the class, were on the same page. It certainly scared 
  them at first but by the end of class they would often yell out in unison &quot;YES!&quot;. 
  Hey, Oracle entrusted me with teaching new DBAs their software and I took it 
  seriously. I didn't want to end class thinking I did my students an injustice 
  by not giving my all. I miss that job. If my wife didn't keep forgetting what 
  my name was (too much travel), I'd still be doing it.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Tom's easy writing style 
  provides him with the unique ability to transform highly technical information 
  into easily understood (and interesting) text. Tom is to be commended for making 
  the transfer of complicated technical concepts from author to reader an extremely 
  pleasant experience. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Content</b><br>
  <i>Expert Oracle Database Architecture </i>is part one of a series. The second 
  book will focus more on application design and development topics. If you want 
  to know more about the contents of the second book, as well as give Tom your 
  opinion on what it should contain, go to <a href="http://tkyte.blogspot.com/">Tom's 
  personal blogsite</a>. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The book also contains a 
  searchable PDF on CD as an added bonus. When I get a book that has a CD with 
  it, I feel that I'm getting my money's worth. I'd rather use a search command 
  than flip through pages. The CD is an excellent addition to the book. Well thought 
  out and containing loads of valuable information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The content flow of <i>Expert 
  Oracle Database Architecture 9i and 10g Programming Techniques and Solutions 
  </i>is smooth and fluid. Don't let the title of the book fool you into thinking 
  this book is just for developers. It most certainly is for developers and DBAs 
  alike. The book begins with a chapter titled &quot;Developing Successful Oracle 
  Applications.&quot; I particularly enjoyed reading the sections titled &quot;Defensive 
  Programming&quot; and &quot;How Do I make it Run Faster.&quot; The book continues 
  with chapters on architecture, files, memory structures, processes, locking 
  and latching, transaction, and undo and redo. To the reader's benefit the book 
  also provides chapters on tables, indexes, datatypes, partitioning and parallelism. 
  Very close to the progression the Oracle classroom guides took. Classroom guides 
  that I thought were absolutely excellent, by the way. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Tom does not intend to cover 
  each and every administrative procedure a DBA or developer peforms on a regular basis. He 
  does cover a wide range of administrative topics that he feels are important. 
  With his track record and background, it would be hard to disagree with what 
  content he feels is important and what content he doesn't. If you want to learn 
  how to be a DBA or developer from the ground up, you should be taking Oracle classes first 
  and using books to complement that knowledge. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Tom's latest work is no 
  mere rehash of information covered by others. I'll be blunt; I absolutely hate 
  books that are nothing but information &quot;regurgitation.&quot; If you are 
  a visitor to the Ask Tom website, you'll know that Tom is unafraid to tell you 
  his opinion. He approaches this book the same way he approaches the Ask Tom 
  website. He provides readers with recommendations, best practices and dozens 
  of hints and tips that aren't covered by other Oracle books currently on the 
  market. I read each and every technical reference manual for the databases my 
  unit supports (Oracle and SQL Server). I don't want to reread that same information. 
  I fully realize that you need to restate information to lay the foundation for 
  the personal insight you are trying to transfer to the reader. But I want that 
  opinion, that personal view of how the author thinks it should be done. I may 
  not agree with them at times but I am looking for those personal insights on 
  how the author feels something should be done. I want the book to teach me something 
  new. This book accomplishes that goal and I'm glad I have it.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Wrapup<br>
  </b></font><font face="Arial, Helvetica, sans-serif" size="2">As I stated, do 
  I agree with each and every point contained in Tom's book? No, not every single 
  one. But when do DBA's agree with everything? Its not our nature. I will state 
  that some of the current debates have degraded to a point where they are lowering 
  the professional reputation of all those involved. But that's a different story. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">What I can say is that Tom 
  is one of the few people that will make me immediately reconsider my long held, 
  cherished opinions on technical topics. I have 20 years of experience and I'm 
  an ex-Oracle &quot;award winning&quot; instructor. I can think of no greater 
  complement I can pay to a fellow technician.</font></p>
<p> </p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Completing the Puzzle - Analyzing Agent to Management Server Communications</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-10-01.9667575745</link>
                      <description>This is the final blog of a three part series on troubleshooting 10G Grid Control agent to management server communication issues.  I’ll start the discussion by summarizing a few key points from the previous two blogs.&lt;BR&gt;&lt;BR&gt; 
I’ll also provide a few hints that will help you determine where to start the debugging process (management server or agent).   I’ll complete this series by showing you how to activate detailed tracing on the agent and management server components.  If you can’t identify the problem by analyzing error messages normally generated by the agents and management server, you’ll have to activate more detailed traces to gather additional diagnostic data. 
</description>
                      <pubDate>Mon, 03 Oct 2005 09:37:29 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> <b>Target Agent or Management 
  Server?</b><br> In my previous two blogs, I discussed troubleshooting the 10G Enterprise Managment <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_09_17.7657940139">agents</a> and <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_09_25.4346421276">management server</a>. My intent was to provide you with a head start up the problem determination and analysis learning curve. Now that we have an understanding of the agent and management server environments, we need to determine which component should be analyzed first.  Should we start our investigation on the management server or the target agents?
 </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The information below should help 
  you to determine the scope of the problem and where to start your analysis:<br>
  </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">If the problem is happening 
    on all of the monitored hosts, start your problem determination on the management 
    server and repository. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">If the problem is happening 
    on a single host, check the status of the agent and then continue your problem 
    determination on the individual targets before reviewing diagnostic information 
    on the management server.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">If the problem is occurring 
    on an individual target (e.g. unable to communicate with a database or listener) 
    and not the entire agent, the problem could be a permission issue with the 
    agent. Start your problem determination on the targets.xml file to determine 
    the accounts and passwords being used.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G Enterprise Manager 
  Information</b><br>
  Another way to determine the problem's scope is to review the information 
  displayed in 10G Grid Control's agent administration and management repository services 
  panels:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/01_mgmt_services_and_repository_overview.gif">Management 
    Services and Repository Overview panel</a>. During normal processing, the 
    Loader Backlog chart (upper right hand chart) will show a series of spikes. 
    Notice that the blue line on our Loader Backlog chart shows a single spike. 
    The spike means that a number of files were uploaded by the agent(s) and processed 
    by the management server. If your blue line ever looks like the red line I 
    have drawn as an example, your management server is not processing the uploaded 
    files and you need to perform 10G Grid Control management server problem determination.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/05_management_services.gif">Management 
    Services and Repository panel</a>. The first block of information is the name 
    of our management service (name removed for security reasons), the service's 
    current status (Up, Down, Pending) and the last error that was generated. 
    The block of information to the right shows the number of files waiting to 
    be loaded and the directory that contains them. If the management service 
    isn't processing files being uploaded by the agents, you'll see a high number 
    in the &quot;Files Pending Load&quot; column.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/1_agent_combo.gif">Agent 
    Administration panel.</a> The agent administration screen lists all of the 
    agents currently active in the 10G Grid Control environment. Each line displays the 
    agent software version, status (up, down, problem), number of targets that 
    are using the agent and the number of targets that aren't using the agent.  Although I had to remove some of the information from this screen for security reasons, most of the dates show a Last Successful Load date of Sept. 12 while one shows a Last Successful Load date of August 30. That's a good indication that we are having problems with that agent. Each agent's name is a link that allows the user to view more detailed configuration information about that agent.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"><a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/2_agent_drilldown_combo.gif">Agent 
    Drill Down Panel.</a> This panel provides detailed information on the agent's 
    configuration, status, resource utilization, targets monitored and upload 
    information. The most important piece of information on the agent administration 
    panel is the column titled 'Last Successful Load'.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Management Server and 
  Agent Logs</b><br>
  We continue our analysis by logging on to the hardware servers that are hosting 
  the management server and agent processes. I don't want to rehash the information 
  I provided in the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_09_17.7657940139">agent</a> 
  and <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_09_25.4346421276">management 
  server</a> troubleshooting blogs. The instructions contained in these blogs 
  should help you to identify the problems that are preventing agent to management 
  server communications from occurring. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The files and directories 
  listed below will be used during the analysis process:</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Agent</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Agent $OH/sysman/config/emd.properties 
    - Agent configuration file.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Agent $OH/sysman/log/emagent.log 
    - Agent log information.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Agent $OH/sysman/log/emagent.trc 
    - Agent trace information.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Management Server</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">OMS $OH/sysman/config/emoms.properties 
    - Management server configuration file.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">OMS $OH/sysman/config/emomslogging.properties 
    - Management server trace activation and configuration file.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">OMS $OH/sysman/log/emoms.log 
    - Management server log information.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">OMS $OH/sysman/log/emoms.trc 
    - Management server trace information.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">OMS $OH/sysman/recv/errors/*.* 
    - Directory containing error messages pertaining to agent files that could 
    not be processed.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Activating Detailed Tracing</b><br>
  If the information in the agent and management server log and trace files don't 
  provide you with enough information to identify the problem, you may need to 
  activate more detailed traces to gather additional diagnostic data. The 10G 
  EM agent and management server components provide configuration files that allow 
  administrators to activate traces that produce more detailed tracing information. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The possible logging levels 
  for both the agents and management server components are:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">ERROR - Reports only 
    critical errors.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">WARN - Reports critical 
    errors and warning.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">INFO - Includes informational 
    messages. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">DEBUG - Full debug trace.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Agent Tracing</b><br>
  The agent's $OH/sysman/config/emd.properties file provides parameters that control 
  tracing and logging file sizes and rotation limits. 10G Grid Control, by default, allows 
  trace and log file sizes to attain a maximum size of 4096 KB before renaming 
  them and creating a new current trace file. The LogFileMaxRolls, LogFileMaxSize, 
  TrcFileMaxRolls and TrcFileMaxSize parameters are used to tailor the file size 
  and number of backups for tracing and logging files.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Logging is performed in 
  a hierarchical manner with the tracelevel.main being the highest level. All 
  other components inherit the logging level from the components above them in 
  the hierarchy. The default logging level for tracelevel.main is WARN meaning 
  that all agent modules use this setting as their default. I have provided a 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_019667575745/emd_properties.txt">subset 
  of the emd.properties file</a> containing the modules and their default trace 
  settings. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In the sample I provided, 
  tracelevel.fetchlets would be a parent in the hierarchy and tracelevel.fetchlets.os, 
  tracelevel.fetchlets.osline, tracelevel.fetchlets.oslinetok, etc. would be children 
  of that parent component. If we change tracelevel.fetchlets' trace setting to 
  DEBUG, all children components would inherit that level of tracing. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">To activate more detailed 
  tracing, change the component's associated trace parameter in the emd.properties 
  file, and recycle the agent using the &quot;emctl stop agent&quot; and &quot;emctl 
  start agent&quot; or &quot;emctl reload agent&quot; commands. Please note that 
  the value supplied in the tracing parameter must be entered in uppercase letters.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Management Server Tracing</b><br>
  The steps to activate management server tracing are similar to the steps required 
  to activate tracing for the agents. 10G Grid Control provides a tracing configuration 
  file <a href="/blogs/blog_cf/chrisfoot/blogentry2005_10_019667575745/emoms_logging_properties.txt">$OH/sysman/config/emomslogging.properties</a> 
  that allows administrators to activate and configure tracing for the management 
  server and repository services. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">To activate more detailed 
  tracing on the management server, change the &quot;log4j.rootCategory=WARN, 
  emlogAppender, emtrcAppendertrace&quot; parameter in the emomslogging.properties 
  file and recycle the management server using the &quot;emctl stop oms&quot; 
  and &quot;emctl start oms&quot; commands. Please note that once again, the value 
  supplied in the tracing parameter must be entered in uppercase letters.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Wrapup</b><br>
  I hope you enjoyed this mini-series on debugging agent to management server 
  communication failures. The intention of this series was to create a foundation of knowledge that would assist you in the analysis process. Oracle's 
  <a href="http://metalink.oracle.com">Metalink website</a> provides a wealth 
  of information on the 10G Enterprise Server environment.  We currently have a 100% success rate using Metalink documents to solve our agent to management server communication problems. It is highly recommended that you leverage the information in Metalink early and often during problem analysis.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Troubleshooting 10G OEM Grid Control's Management Server Components</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-25.4346421276</link>
                      <description>Let's continue our discussion on debugging 10G Enterprise Manager agent to management server communications.  My last blog covered some of Giant Eagle's experiences with agent administration and troubleshooting.  But the management agents are only one piece of the puzzle; the problem could also be on the management server.  As a result, when debugging communication failures we must also spend some time reviewing diagnostic information generated by the 10G Grid Control management server environment.</description>
                      <pubDate>Mon, 26 Sep 2005 04:53:34 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> <b>Prerequisites</b><br>
  For those of you that haven't read my previous blog, it may be a good idea to 
  do so before continuing. I begin the blog by presenting a quick overview of 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/concepts.gif">10G 
  Enterprise Manager environment</a>. As I stated in my last blog, the management 
  service receives monitoring data from the various agents and loads it into the 
  management repository. The management console retrieves data from the management 
  repository, organizes it and then displays it as information to the administrator 
  via the HTML console interface. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Management Server Problem 
  Determination and Analysis using 10G Enterprise Manager</b><br>
  Before we begin analyzing management server trace and log information, 10G Grid Control's 
  Management Repository and Services panels often provide useful diagnostic information. 
  We'll begin our analysis by reviewing the contents of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/01_mgmt_services_and_repository_overview.gif">Management 
  Services and Repository Overview panel</a>. The overview panel provides general 
  information about management services configuration.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But the panel also provides 
  important 10G Grid Control management server processing information. Look at the first 
  graph at the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/01_mgmt_services_and_repository_overview.gif">top 
  of the screen</a>. During normal processing, the Loader Backlog chart (upper 
  right hand chart) will show a series of spikes. Notice that the blue line on 
  our Loader Backlog chart shows a single spike. The spike means that a number 
  of files were uploaded by the agent(s) and processed by the management server. 
  If your blue line ever looks like the red line I have drawn as an example, your 
  management server is not processing the uploaded files and you need to perform 
  10G Grid Control management server problem determination. I'll show you where to look 
  to find the uploaded files waiting to be processed later in this blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I click on the second 
  tab, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/03_repository_operations.gif">Repository 
  Operations panel</a>. If you see a series of errors being displayed like the 
  single error I have highlighted, you'll need to debug the problems on the management 
  server. This screen print shows that I had one problem in the past. If we click 
  on the Repository Metrics error shown in the red block, 10G Grid Control displays <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/04_repository_metrics_drilldown_errors.gif">detailed 
  information about the error</a>. Although, I have removed the name of the agent 
  we were having problems with for security reasons, it was my personal Oracle 
  lab environment which kept showing a &quot;Status Pending&quot; on <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/1_agent_combo.gif">10G 
  EM's Agent Administration panel</a>. <br>
  <br>
  You won't see a status pending message on the above screen print because I have 
  since fixed the problem. I copied the text &quot;sysman.metrics_severity_duplicates&quot; 
  and &quot;out of time sequence&quot; from the panel and pasted it into <a href="http://metalink.oracle.com">Metalink</a>. 
  I searched through the documents until I found one that described the problem 
  we were encountering. After further analysis, I solved the problem by running 
  the cleansing script provided at the bottom of <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_09_17.7657940139">my 
  previous blog</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If I click on the navigation 
  tab titled &quot;Management Services&quot;, 10G Grid Control will display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/05_management_services.gif">Management 
  Services and Repository panel</a>. This panel contains a wealth of diagnostic 
  information. Let's review the information from left to right. The first block 
  of information is the name of our management service (name removed for security 
  reasons), the service's current status (Up, Down, Pending) and the last error 
  that was generated. The management service name is a link to a drilldown panel 
  that provides more detailed diagnostic and configuration information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The block of information 
  to the right shows the number of files waiting to be loaded and the directory 
  that contains them. If the management service isn't processing files being uploaded 
  by the agents, you'll see a high number in the &quot;Files Pending Load&quot; 
  column. You can log on to the host running the management server and navigate 
  to the directory displayed in the &quot;Load Directory&quot; column to verify 
  that there are files waiting to be processed. Don't get excited if you see hundreds 
  of files waiting to be processed or you have used up all of the available freespace 
  in the load directory. The agents send a LOT of information to the management 
  server during the course of normal operations. This <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/11_error_backlog.gif"> 
backlog of files</a> shows that at one time we had over 2000 files waiting to be processed on our management server. Fix the problem on the management 
  server and do a refresh on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/01_mgmt_services_and_repository_overview.gif">Management 
  Services and Repository Overview panel </a>and you should see the line on the 
  Loader Backlog Chart drop quickly. </font><font face="Arial, Helvetica, sans-serif" size="2">The 
  column on the far right of the panel displays the timestamp of the oldest file 
  that needs loaded. The older the date displayed, the longer the problem has 
  been occurring. All of the information on this panel shows that my management 
  server is processing normally. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Continuing Oracle Management 
  Server Analysis</b><br>
  Let's continue our investigation by logging on to the host running 10G 
  EM's management server. I have set my home to the management server installation's 
  home directory. Before reviewing log and trace information, you can run the 
  following two commands:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">opmnctl status - You 
    can use the Oracle Process Management and Notification (OPMN) utility, to 
    display a status of all components that comprise the 10G Grid Control management server 
    installation. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">emctl status oms - The 
    Enterprise Manager command line utility can be used to start, stop or display 
    a message indicating whether or not the Management Service is running.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Both of the above commands 
  have numerous arguments that are used to manage and analyze the various 10G 
  EM components. The Oracle Enterprise Manager Advanced Configuration Guide manual 
  available on <a href="http://technet.oracle.com">technet.oracle.com</a> provides 
  a wealth of information on both opmnctl and emctl utilities. Technet is Oracle's 
  premier website for information dissemination and provides blogs, articles, 
  white papers software downloads and documentation. Registration is both free 
  and easy.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The directory structure 
  that we will be spending all of our time in is the<a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/08_syman_repos_directory.gif"> 
  $ORACLE_HOME/sysman directory</a> where $ORACLE_HOME is the home directory for 
  your 10G Grid Control management server installation. The SYSMAN/RECV directory is where 
  you will find all of agent upload files that are waiting to be processed. There 
  is a SYSMAN/RECV/ERRORS subdirectory that contains files that were uploaded 
  by the agents but could not be processed by the management server. You should 
  start the problem determination process by reviewing the contents of both SYSMAN/RECV 
  and SYSMAN/RECV/ERRORS directories.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The two directories that 
  contain important diagnostic information are SYSMAN/CONFIG and SYSMAN/LOG. This 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/09_sysman_config_directory.gif">screen 
  print </a>displays the contents of the CONFIG directory. Although this directory 
  contains numerous configuration files, the EMOMS.PROPERTIES file is THE main 
  configuration file used to customize 10G Grid Control management server installations. 
  Virtually any modification you need to make during the management server's lifecycle 
  will be accomplished by editing this file.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The<a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_254346421276/10_mgmt_service_log_dir.gif"> 
  last screen print</a> shows the contents of the SYSMAN/LOG directory. This is 
  the directory where you will be spending the bulk of your problem determination 
  activities. The two most important files used for debugging are EMOMS.LOG and 
  EMOMS.TRC. We have solved 100% of our problems caused by the management server 
  by reviewing the information contained in these two files. Review the most current 
  error messages in these logs and paste them into Metalink. I fully understand 
  that not all of your debugging actvities will be as simple as ours has been. But as I stated, reviewing 
  the information in EMOMS.LOG and EMOMS.TRC have helped us solve our management 
  server problems. <br>
  <br>
  </font><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  If the error messages in EMOMS.LOG and EMOMS.TRC don't help you solve the problem, 
  you'll need to activate more in-depth traces on the management server and agents. 
  In my next blog, I'll show you how.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Administering and Troubleshooting 10G OEM Grid Control Management Agents </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-17.7657940139</link>
                      <description>As we continue down our path of 10G Grid Control enlightenment, I thought it might be advantageous to deviate from our discussions on the advisors for yet another blog. Keeping the communications flowing between the agents and the management console can be somewhat tricky at times.  I will admit that most of our issues were "self inflicted". If you are like us, you'll have to learn how to troubleshoot a problem or two until you gain experience.&lt;BR&gt;&lt;BR&gt;

We have been installing and administering the 10G agents for some time now and we think we have crested the top of the learning curve. Once you gain experience,  the environment pretty works as advertised.  I thought I would give you a few helpful facts on how to administer the agents and also provide you with some information on how we solved some of the problems we have encountered. In an upcoming blog I'll describe how to troubleshoot the management server.</description>
                      <pubDate>Mon, 19 Sep 2005 05:09:22 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Architecture Overview</b><br>
  Like previous versions of Enterprise Manager, 10G Grid Control is a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/concepts.gif">multi-tier 
  architecture</a> consisting of the HTML console, a management service with an 
  integrated information repository and management agents running on all monitored 
  targets. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The management service receives 
  monitoring data from the various agents and loads it into the management repository. 
  The management console retrieves data from the management repository, organizes 
  it and then displays it as information to the administrator via the HTML console 
  interface.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The agents are programs 
  that run continuously on all servers that are controlled by the Enterprise Manager 
  architecture. Examples of the more popular targets found on the servers are 
  databases, application servers and listeners. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Agent Installation and 
  Configuration Differences</b><br>
  Let's discuss a few differences between the 10G agents and agents from previous 
  releases. In releases prior to 10G, the agent software was installed during 
  the installation of the target's software (database, application server). Administrators 
  then started the agent on the target server and notified Enterprise Manager 
  to begin administering the new target by running a discovery wizard from the 
  central management console. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">In 10G, the agent software 
  is installed separately from the database and application server. During the 
  agent software installation, the installer will prompt the user for the node 
  name of the server that is running the 10G management service. The target agent 
  then contacts the management server and uploads its configuration information. 
  A complete reversal of the way the process was executed in previous releases.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>Agent Troubleshooting</b><br>
  But what if we lose communications between the target agents and the management 
  service? Although we are experts by no means, we have done some troubleshooting 
  from time to time. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">If alerts and monitoring 
  information isn't being received by the management service, there are only a 
  few components that can be causing the communication breakdown. The problem 
  could be on the management server itself. We'll take a look at troubleshooting 
  that environment in an upcoming blog. The problem may be in the network connectivity, 
  or lack thereof. If you don't have network connectivity, you probably have more 
  problems than just being unable to administer and monitor the target with 10G 
  EM. More than likely you will also be getting calls from irate users letting 
  you know that they can't access the databases on that server. In that case, 
  do what DBAs have been doing for years - blame the network administration boys. 
  </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The remainder of this blog 
  will give you a few helpful hints on troubleshooting the target agent software. 
  Let's take a look at our <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/1_agent_combo.gif">Agent 
  Administration panel</a> in 10G Grid Control. The agent administration screen lists all 
  of the agents currently active in the 10G Grid Control environment. Each line displays 
  the agent software version, status (up, down, problem), number of targets that 
  are using it and the number of targets that aren't using the agent. Each agent's 
  name is a link that allows the user to view more detailed configuration information 
  about that agent. If I click on that link, EM will display a panel that allows 
  me to drill down to more specific information about that agent. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/2_agent_drilldown_combo.gif">Agent 
  Drill Down panel</a> provides detailed information on the agent's configuration, 
  status, resource utilization, targets monitored and upload information.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The most important piece 
  of information on the agent administration panel is the column titled 'Last 
  Successful Load'. Although I had to remove some of the information from this 
  screen for security reasons, most of the dates show a Last Successful Load date 
  of Sept. 12 while one shows a Last Successful Load date of August 30. That's 
  a good indication that we are having problems with that agent.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The next section of the 
  agent administration panel provides information on metric collection errors. 
  Each line contains information pertaining to the agent and when the collection 
  error occurred. If Oracle is able to provide additional information, it will 
  display the error message as a HTML navigation link that allows the user to 
  drill down into more specific information. I can either roll my mouse over the 
  navigation link or click on it to display the more detailed error information.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Let's pick one of the errors 
  and go through the error determination process. We'll start with the problem 
  that occurred at the<a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/1_agent_combo.gif"> 
  top of our Metric Errors Collection report</a>. 10G Grid Control was unable to run the 
  Agent Process Statistics process on Sept 3 at 6:46:27 AM. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The first step that needs 
  to be executed when performing agent error determination is to log on to the 
  server where the agent is running, navigate to the agent's home directory and 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/3a_emctl_agent_status.gif">run 
  a status command</a> on the agent. The following command displays pertinent 
  information about the status and configuration of the agent running on the target:</font></p>
<blockquote>
  <p><font size="2" face="Arial, Helvetica, sans-serif">&gt; emctl status agent</font></p>
</blockquote>
<p><font size="2" face="Arial, Helvetica, sans-serif">If you look at the output you will see that we have loaded 606.39 MEGs of XML data to the mangement server and we have 0 files and 0 MEGs of data pending upload.  These numbers are telling us that we have a functioning agent on this platform.   If your files pending upload increases continuously, you have an agent to mangagement server problem.  If you want to see all of 
  the variations of the EMCTL command, type &quot;emctl&quot; at the prompt and 
  do not enter any other commands after it. Oracle will display a listing of all 
  the variations of the EMCTL command on the screen.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">This next screenshot displays 
  the agent's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/4_aix_agent_top.gif">parent 
  directory structures</a>. Notice that I am navigating to the SYSMAN subdirectory. 
  SYSMAN is the parent directory for the subdirectories that contain the diagnostic 
  information that we will need to use as input to solve our problem. We'll be 
  spending the bulk of our time in this directory structure. 
  Although there are numerous files and subdirectories, I will be covering just 
  the files that we have been using to debug our environment. If I don't, I'll 
  have another one of the world's largest blogs.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/5_aix_config_directory.gif">CONFIG 
  subdirectory</a>, contains files that are used to tailor the agent to its host 
  platform's configuration. The emd.properties file is the main configuration 
  file that we have had to edit from time to time to fix a few of our issues. 
  The management service that the agent communicates with is identified in the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/6_emd_mgmt_repository_address.gif">REPOSITORY_URL 
  parameter</a>. If you want to change the host or port name of the management 
  server that this agent communicates with, you will have to edit the REPOSITORY_URL 
  parameter to reflect the new information. Later in this blog, I'll show you 
  how to cleanse the old information from the directories to allow the agent to 
  successfully connect to the new management server.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">There is one other parameter 
  in emd.properties that may cause a few problems. If your agent NEVER successfully 
  uploads data after installation, check the TIMEZONE parameter in the emd.properties 
  file. It is usually the last parameter in emd.properties. When our agent's time 
  zones didn't match the time zone in the management server's configuration file, 
  we weren't able to establish a successful connection between the agents and 
  the management service. So if you have agentTZRegion=America/New_York in the 
  agent's emd.properties file, you'll prevent a lot of headaches if you use the 
  same time zone in the management server's emd.properties configuration file. 
  We don't have any servers in different time zones, but there is a wealth of 
  information contained in the 10G Grid Control documentation to help those that do. What 
  I do know is that when the time zones didn't match, we couldn't make a connection.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/7_aix_emd_directory.gif">EMD 
  subdirectory </a>contains a few files and subdirectories that are important 
  to us. The UPLOAD subdirectory is a holding area for files that will be uploaded 
  to the management server. Lastupld.xml is pretty self explanatory. It contains 
  information on agent uploads to the management server. The file that you may 
  be required to edit from time to time is the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/8_targets.gif">targets.xml 
  file</a>. This file contains information about all of the targets (databases, 
  listeners,etc.) controlled by the agent on this platform. </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The DBSNMP user is the account 
  that 10G Grid Control uses to log on to the database to perform activities on behalf of 
  the 10G Enterprise Manager toolset. If you change the password for DBSNMP, you 
  will have to edit <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/8_targets.gif">targets.xml</a> 
  to reflect the new password. To do this, you change the value of ENCRYPTED to 
  FALSE and enter the new password after the VALUE column in the PASSWORD line 
  for that database. I have also had to change the release identifier after upgrading 
  a database being monitored by 10G Grid Control. If some targets are showing up on a platform, 
  while others are not, you may want to review the contents of targets.xml to 
  see if it has entries for the missing targets. Once again, you can use the cleanse 
  script I'll provide you with later in this blog to update targets.xml and upload 
  that information to the management server.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/8b_aix_log_directory.gif">LOG 
  subdirectory</a> will probably be the area where you spend most of your time 
  when you are evaluating a problem with the agent. This subdirectory contains 
  several files that will assist you in the problem determination process. The 
  most important debugging files are:</font></p>
<ul>
  <li><font size="2" face="Arial, Helvetica, sans-serif"> emagent.nohup - Agent 
    watchdog log file</font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">emagent.log - Main agent 
    log file </font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">emagent.trc - Main agent 
    trace file</font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">emagentfetchlet.log - 
    Log file for Java Fetchlets</font></li>
  <li><font size="2" face="Arial, Helvetica, sans-serif">emagentfetchlet.trc - 
    Trace file for Java Fetchlets </font></li>
</ul>
<p><font size="2" face="Arial, Helvetica, sans-serif">There is an excellent bulletin 
  on <a href="http://metalink.oracle.com">Metalink</a> that will provide you with 
  detailed information on the contents of these logs. The bulletin number is 229624.1. 
  Let's take a look at the contents of <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/9_emagent_error_log_match_last_error.gif">emagent.trc</a> 
  to see if we can find the problem. I have scrolled to the times that match the 
  error that was displayed on the top of our error metrics report. The file contains 
  dozens of lines before and after the time of the error stating 
  that we are having an out-of-memory condition. It looks like we have to perform 
  some further error-determination activities to solve the memory problem before 
  we can fix the agent. This out-of-memory condition is most certainly affecting 
  our database connections so I'll need to fix it soon. Lucky for me it is our 
  DBA &quot;playpen&quot; that we use for our own testing (or I would have a bunch 
  of irate users and/or developers clamoring for my head).</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>The Cleansing Script</b><br>
  If you go to <a href="http://metalink.oracle.com">Metalink</a> and do a search 
  on the value 'sysman/emd/state/*' or document ID 303105.1, you'll see a series 
  of commands that can be used to &quot;cleanse&quot; the environment as we like 
  to describe it here at Giant Eagle. When you get a continuous 'status pending' 
  message for a monitored target, change the name of the management server, reinstall 
  the agent software, remove the agent from the management server and re-add it 
  (and a host of other activities), Oracle recommends that you perform the following 
  steps at the end:</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">1. Stop the agent on the 
  target node</font></p>
<blockquote>
  <p><font size="2" face="Arial, Helvetica, sans-serif">emctl stop agent </font></p>
</blockquote>
<p><font size="2" face="Arial, Helvetica, sans-serif">2. Delete any pending upload 
  files from the agent home </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">rm -r $ORACLE_HOME/sysman/emd/state/* 
  <br>
  rm -r $ORACLE_HOME/sysman/emd/collection/* <br>
  rm -r $ORACLE_HOME/sysman/emd/upload/* <br>
  rm $ORACLE_HOME/sysman/emd/lastupld.xml <br>
  rm $ORACLE_HOME/sysman/emd/agntstmp.txt <br>
  rm $ORACLE_HOME/sysman/emd/blackouts.xml </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">3. Issue an agent clearstate 
  from the agent home </font></p>
<blockquote>
  <p><font size="2" face="Arial, Helvetica, sans-serif">emctl clearstate</font></p>
</blockquote>
<p><font size="2" face="Arial, Helvetica, sans-serif">4 Start the agent </font></p>
<blockquote> 
  <p><font size="2" face="Arial, Helvetica, sans-serif">emctl start agent</font></p>
</blockquote>
<p><font size="2" face="Arial, Helvetica, sans-serif">5. Force an upload to the 
  OMS </font></p>
<blockquote> 
  <p><font size="2" face="Arial, Helvetica, sans-serif">emctl upload</font></p>
</blockquote>
<p><font size="2" face="Arial, Helvetica, sans-serif">If you change the name or 
  port of the management server, you will need to run these commands on all platforms 
  that are running the 10G agents. Because we have been moving our <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/concepts.gif">10G 
  EM Management Service</a> from one server to another during our testing and 
  implementation, we have <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_177657940139/clean_up_oms.txt">created 
  a script</a> that automates the above commands. We have also used the above 
  series of commands as a last resort when all other debugging avenues have failed. 
  The script just seems to fix a lot of agent to server communication problems. 
  Set your ORACLE_HOME to the Oracle agent's home directory and run the script. 
  If you execute it by typing clean_up_oms.sh with no arguments, it will display 
  the current ORACLE_HOME, which is required to be set to the agent's home directory 
  to allow the script to process successfully. To execute the commands in the 
  script, supply the letter 'Y' as the single argument.</font></p>
<blockquote>
  <p><font size="2" face="Arial, Helvetica, sans-serif"> clean_up_oms.sh Y</font></p>
</blockquote>
<p><font size="2" face="Arial, Helvetica, sans-serif">Feel free to use this script 
  and tailor it to your specific shop's requirements. You'll have to change the 
  log output file and possibly some other file and directory names. The usual 
  cautions apply. I can safely tell you that the script works in our AIX 5.2 and 
  5.3 environments and has saved us lots of time. I'd like to thank Jeff Kondas 
  for writing the script and installing it on our 10G servers.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Thanks for reading!<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Shrink Command</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-10.8045550726</link>
                      <description>We were in the process of discussing 10G Grid Control’s Segment Analyzer before being interrupted by a one terabyte table that I discussed in the last blog.  In this blog, I’ll get back on track by reviewing the different alternatives we can use to reclaim wasted space in Oracle10G. &lt;BR&gt;&lt;BR&gt;

Since the Segment Analyzer and online shrink command were introduced in Oracle10G, I’ll spend a few minutes discussing how you can identify and shrink objects in pre-10G releases.</description>
                      <pubDate>Mon, 12 Sep 2005 04:34:41 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> <b>High Water Mark</b><br>
Before we begin our discussion, a brief review of the high water mark is in order. 
Oracle uses the high water mark to identify the highest amount of space used by 
a particular segment. It acts as the boundary between used and unused space. As 
the amount of data grows due to row inserts and updates, the segment's high water 
mark grows accordingly. But as row deletes and updates shrink the amount of data 
in the object, the high water mark is not altered to reflect the segment's new 
characteristics. As I stated in <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_08_25.8847176467"><U>my blog on 10G's Segment Advisor</U></a>, full table scans scan all the way to the table's high water 
mark. </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Identifying and Lowering 
  the High Water Mark in Releases &lt; 10G</b><br>
  Getting rid of unused space in a table improves the performance of full table 
  scans. The additional benefit is a more efficient utilization of space because 
  the space freed is available for other objects. It's a pretty simple process 
  to find how many blocks are allocated above the table's high water mark. The 
  ANALYZE TABLE &lt;tablename&gt; COMPUTE/ESTMATE STATISTICS statement will update 
  the table statistics in the database's data dictionary. After generating the 
  statistics, run the following statement to determine the table's high water 
  mark:</font></p>
<blockquote> 
  <p><font face="Arial, Helvetica, sans-serif" size="2">SELECT TABLE_NAME, BLOCKS, 
    EMPTY_BLOCKS, NUM_ROWS <br>
    FROM DBA_TABLES <br>
    WHERE TABLE_NAME = &lt;tablename&gt;; </font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">The value in BLOCKS represents 
  the number of blocks that were ever used by the segment, while EMPTY_BLOCKS 
  represents only the number of blocks above the high water mark. So how do you 
  identify wasted space below the high water mark? Instead of me spending 4 pages 
  of this blog showing you how, please refer to this note on <a href="http://metalink.oracle.com">MetaLink</a>. 
  The number of the note is 116565.1<br>
  <br>
  In releases prior to Oracle10G, getting rid of free space above and below a 
  table's high-water mark was usually done by one of the following methods:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The old tried-and-true, 
    Export, Drop Table, Import commands. DBAs have been using this series of commands 
    since SCOTT/TIGER was a cub. Administrators used the Export command to capture 
    the table's DDL, data, security and dependent objects (indexes, views, etc.), 
    dropped the table and used the Import command to recreate everything that 
    was exported. A variation of this was the Export, Truncate Table, Import commands. 
    Instead of dropping the table, the administrator truncated the table and then 
    imported just the rows back into it. TRUNCATE adjusts the high water mark 
    to the first block in the segment. In both variations, the high water mark 
    was then moved to the location where the last rows were inserted into the 
    table by the Import.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Another popular method 
    was to use the ALTER TABLE MOVE command to rebuild the table and drop the 
    high water mark. If you use this command, you'll need to remember that ALTER 
    TABLE MOVE marks all of the table's indexes as unusable. Run the ALTER INDEX 
    REBUILD command to rebuild the indexes and reset the flag. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Before we continue, let 
  me provide some clarification. In the above examples we were trying to remove 
  unused space that was freed up by delete statements. If you don't have a lot 
  of row deletes, running the steps above may not free any additional space for 
  you. You will still have unused space from the new high water mark to the end 
  of the last extent. You have put the same amount of data in that you took out. 
  Oracle allocated the last extent and you will have free space from the last 
  row inserted to the end of that extent.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You can use the command 
  below to free the space from the last row inserted to the end of the extent:</font></p>
<blockquote> 
  <p><font face="Arial, Helvetica, sans-serif" size="2"> ALTER TABLE &lt;tablename&gt; 
    DEALLOCATE UNUSED; </font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">All extents that are entirely 
  above the table's high water mark are deallocated. If the extent contains the 
  high water mark, the part above the mark is deallocated and the part below becomes 
  the extent.  Before you run the deallocate statement above, refer to the administrator's guide for your release.  There are a lot of variables that will determine how much space is actually freed up.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Using the 10G Shrink 
  Command</b><br>
  Oracle10G objects that reside in Automatic Segment Space Managed tablespaces 
  can be shrunk using the &quot;ALTER&#133;&#133;&#133;SHRINK&quot; statement. 
  The shrink statement is not limited to just heap tables and indexes, Oracle 
  also allows index-organized tables, partitions, subpartitions, materialized 
  views and materialized view logs to be shrunk using ALTER commands. In addition, 
  the CASCADE option can be used to propagate the shrink operation to all dependent 
  objects except materialized views, LOB indexes, IOT mapping tables and overflow 
  segments.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">It is interesting to note 
  that because the shrink operation may change the ROWIDS in heap-organized tables, 
  row movement must first be enabled by executing the following command:</font></p>
<blockquote>
  <p><font face="Arial, Helvetica, sans-serif" size="2">ALTER TABLE &lt; tablename&gt; 
    ENABLE ROW MOVEMENT;</font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">The shrink operation can 
  be performed while the table is on-line and does not require any extra database 
  data file space. The shrink operation itself is performed by the database internally 
  executing INSERT and DELETE statements. Since the data itself is not changed 
  (just rearranged), DML triggers are not fired during shrink operations. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The shrink operation will 
  free unused space both above and below the high water mark. Rows are moved from 
  one block to another which is why row movement must be enabled on the table 
  beforehand. Unlike the ALTER TABLE....MOVE statement, indexes do not need to 
  be rebuilt after the shrink operation is executed.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Demo</b><br>
  Since we are using Oracle's Sissy Gui Tool, 10G Grid Control, let's take a look at some 
  screen prints. The first thing we need to do is to find out where the shrink 
  button is in 10G Grid Control. The database target's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/1_admin_page.gif">Administration 
  page</a> contains a link titled 'Table' that will take us to a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/2_table_select.gif">Table 
  Selection page</a>. We can either enter the table's name into the input box 
  to navigate directly to the table or we can use the little flashlight icon to 
  activate the schema search pop up. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/3_table_select_popup.gif">Schema 
  Search Pop Up panel </a>allows me to search for objects by first selecting their 
  schema owner. I checked the radio button next to the schema 'FOOT' to search 
  for all of the objects owned by that schema. I clicked on the 'Select' navigation 
  button on the upper right hand side of the page. 10G Grid Control returns me to the table 
  selection page.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Notice that the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/4_activate_shrink.gif">Table 
  Selection page</a> now displays a listing of objects that are owned by the schema 
  'FOOT'. I selected the FOOT. EMP_TABLE that resides in the USERS tablespace 
  and activated the 'Actions' drop down menu selection. I scrolled past all of 
  the commands available and highlighted the 'Shrink Segment' menu selection. 
  I clicked on the 'Go' navigation button to continue the process.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/5_row_movement_error.gif">Shrink 
  Segment Options page</a> that will allow me to specify the options used as input 
  to the shrink operation. Looks like we have a problem. 10G Grid Control knows that row 
  movement must be enabled on a table before it can shrink it. So, let's go ahead 
  and enable row movement on our table. I executed this <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/6_enable_row_movement.gif">ALTER 
  statement</a> to enable row movement on the FOOT.EMP_TABLE table. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I tried the process again. 
  Now that I have enabled row movement on my table, Oracle no longer displays 
  the error message on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/7_run_shrink.gif">Shrink 
  Segment Options page</a>. Notice that I have selected to compact the segment 
  only. Since I have specified Compact, the shrink command will only defragment 
  the segment space and compact the table rows by moving them into other blocks. 
  The high water mark will NOT be adjusted and the space will not be freed. I 
  will be forced to issue another ALTER TABLE.... SHRINK statement at a 
  later time to complete the shrink operation. I have just turned the shrink command 
  into a two-step operation.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Take a look at the text 
  on the first radio button titled 'Compact Segments and Release Space'. I may 
  want to do this in two steps if I don't want to affect the statements currently 
  accessing the table being shrunk. My advice is that if you want to perform the 
  shrink command in one step, do it during the normal maintenance windows when 
  activity is at a minimum. We have tested running the shrink command and DML/SELECT 
  statements at the same time and have never had a problem. But we still follow 
  Oracle's advice and perform the shrink command during our maintenance windows.
  The next set of buttons allows me to cascade the shrink operation to all dependent 
  objects. I chose to also shrink the index that was built upon this table. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Before moving on to the 
  next panel that allows me to schedule the shrink job, I activated the 'Show 
  SQL' button on the upper right hand side of the panel to show the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/8_show_shrink_sql.gif">statement 
  we will be executing</a>. I returned to the panel and selected the 'Continue' 
  button to activate the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/9_scheduler_page.gif">Shrink 
  Segment: Schedule page</a>. This page allows me to schedule the shrink job immediately 
  or at a later time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I scheduled the job to be 
  executed immediately. 10G Grid Control now displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/10_scheduler_output.gif">Scheduler 
  Jobs page</a>. If you are looking for jobs that are running, completed, etc., 
  you must make sure you have the correct navigation tab activated.  Every time I navigate to this panel, I wonder where my job is.  The reasons is always the same; I didn't click on the correct tab to navigate to the proper area.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on my job name 
  to view the results of the shrink operation. 10G Grid Control now displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_09_108045550726/11_shrink_output.gif">Job 
  Output page</a> that provides me with all of the pertinent information related 
  to that job. Now, I'll need to run the Shrink command again if I want to move 
  the high water mark and free up the space to be used by other segments.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I hope you enjoyed these 
  blogs on the Segment Analyzer and the shrink statement. Thanks for reading!<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Administering Terabyte Tables - An Interview with Data Warehouse DBA Jim Dojonovic</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-06.2918203481</link>
                      <description>Consider this to be yet another "Stop the Presses Blog".  I originally intended to discuss the different toolsets that DBAs can use to reclaim unused space allocated to Oracle objects.  This installment was to be the follow-up to my previous blog on the Segment Analyzer.   But we have hit an important milestone here at Giant Eagle, so I thought I would deviate from my intended topic for one blog.&lt;BR&gt;&lt;BR&gt;  

If you have been following this series, you'll know that my unit is responsible for administering several large data warehouses.  The warehouse that we most recently converted to 10G has a single, partitoned table that has just grown to one terabyte in size.  The entire database is multiple terabytes and rapidly growing at hundreds (and hundreds) of MEGs per month.  We estimate that within 2 years, the database will be close to 10 terabytes in size.  I thought it might be interesting to interview our "big data" DBA, Jim Dojonovic.  Jim is responsible for administering our data warehouses.</description>
                      <pubDate>Tue, 06 Sep 2005 08:14:45 -0500</pubDate>
                              
      <content:encoded><![CDATA[ <font face="Arial, Helvetica, sans-serif" size="2"> <b>Interview with Ace Warehouse 
DBA Jim Dojonovic </b></font> 
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Question: </b><br>
  How long have you been working with large data stores?<br>
  <br>
  </font><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:<br>
  </b> I have been Giant Eagle's data warehouse DBA for the last five years. I 
  started in the group as a traditional database administrator but kind of evolved 
  into Giant Eagle's data warehouse administrator over the years. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question:</b><br>
  What do you like about administering data warehouses?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:<br>
  </b> The challenge. Large databases are very unforgiving. You make a mistake 
  and you're cooked. You quickly learn that what you can easily do in other databases 
  can create absolute havoc in a data warehouse. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question: </b><br>
  Can you give me an example of this?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b> <br>
  Sure. How about adding a column with a not-null constraint and a predefined 
  default value to a table? The statement used to perform the alteration may run 
  pretty quickly on a table with thousands, or even millions of rows but if you 
  run that statement on a table with hundreds of millions or billions of rows 
  there's a good chance you'll lock the table up and impact production processing 
  for hours. Possibly even days for that matter. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">A better alternative is 
  to add the column without the not-null constraint and default value. You can 
  then execute SQL statements to update the table with the predefined default 
  value. You have your choice to run a parallel DML statement or just logically 
  break up the table and run separate SQL statements to reduce the amount of time 
  it takes to perform the update. The last step is to execute the alter statement 
  to add the not-null constraint and predefined default value. Updating the table 
  using SQL statements to add the predefined default value has less overhead and 
  impact than the alter DDL statement. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question:</b> <br>
  So what are some of the other challenges?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b> <br>
  Besides performance? Backing them up. Making alterations to objects without 
  tying them up for hours. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question: </b><br>
  What are your recommendations for warehouse backups? </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b> <br>
  There are lots of technologies out there. Oracle's latest hot button is disk 
  backups, which we will be looking at in the near future. But if you have to 
  rely upon Oracle provided tools, you can't beat RMAN. We run weekly full backups 
  and use cumulative incrementals throughout the week. We run hot backups with 
  8 parallel streams to multiple tape devices. With that many streams doing the 
  incrementals, we don't feel it is necessary to run partial database backups 
  on a subset of the database structures. We stick with incrementals on the entire 
  database.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question:</b><br>
  How many data warehouses are you responsible for?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b><br>
  I'm currently responsible for 4 production data warehouses. Our hardware platforms 
  are AIX servers with EMC Symmetrix disk connected via SAN. We use both Oracle9i 
  and Oracle10G as the database. It's my personal statement of direction to migrate 
  all of Giant Eagle's data warehouses to 10G as soon as possible.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question:</b><br>
  OK, so how does a single DBA administer that many data warehouses?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b><br>
  The key is to come up with a set of best practices and strictly adhere to them 
  in all of the environments you are responsible for. What works in one warehouse 
  will probably work in all of them. I'm lucky to have a strong set of application 
  developers who know how to access large data stores. We have an excellent quality 
  review process here. The queries must be written to retrieve the data in the 
  shortest time possible without dominating finite system resources. It becomes 
  a delicate balancing act at times.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Our data administrator has 
  done an excellent job designing our warehouses. If you don't have good design, 
  you're in for big problems. Giant Eagle also has units that monitor hardware 
  and disk performance statistics VERY closely. At the first indication of a problem, 
  we are reviewing in-depth performance statistics.  Our operating system support technicians are absolutely top notch when it comes to tuning operating systems for data warehouses.  In addition, the SAN and EMC disk administrators 
  know how to design disk subsystems to support large data stores. We are very 
  proactive. If we see a hot spot on a set of disks, we don't wait until it becomes 
  a problem. We take steps to correct it immediately.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I'm also big fan of both 
  9I OEM and 10G EM administrative toolsets. Why code when you can point and click? 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">To sum it up, if you have 
  the right team supporting you and strong group of application coders, you don't 
  need an entire squad of DBAs to support large data stores. We do it here with one primary DBA.   If everyone that supports the data warehouse steps up to the plate and executes, the whole task of supporting large data stores becomes rather easy.  I'd like to be able say that I'm some kind of super DBA that can support several multiple terabyte warehouses.  But that's not it; we just don't have any weak links. It makes my job easy.  But you have to remember that we have been supporting warehouses here at Giant Eagle before they became popular.  We have over 10 years of experience and have been able to create a strong set of best practices during that time.  That's the key.</font></p>
<p><br>
  <b><font face="Arial, Helvetica, sans-serif" size="2">Question:</font></b><font face="Arial, Helvetica, sans-serif" size="2"> 
  <br>
  Can you provide us with a few pointers on performance?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b><br>
  Since you're my boss, I sure will. The keys to good performance are partitioning, 
  parallelism, adequate memory and CPU resources and fast disk that is configured 
  for performance. If you have that combination, you'll do OK. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Oracle optimizer is 
  both partition and parallel aware. It doesn't make a difference if your table 
  is a terabyte in size, if you can break it up and store it in small chunks, 
  you'll be able to get data out of it pretty quickly. If the optimizer thinks 
  that it can satisfy the query by accessing one or two partitions of a table, 
  the server process will only access those partitions. All of the other partitions 
  (and terabytes of data) aren't accessed. You need to choose your partitioning 
  keys very carefully. That's when having a data administrator that understands 
  performance is of great value. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You also need to use heavy 
  parallelism. We run our platforms hard because we hit them with so many parallel 
  processes. You take a single query or DML statement and split the workload among 
  dozens of child processes. As long as your hardware server can handle the workload 
  generated by the parallel processes, don't hesitate to experiment with high 
  numbers of parallel processes. Just remember that although a high number of 
  parallel processes may work with a few concurrent users, it may cause problems 
  as your number of concurrent users increases. It becomes a balancing act. It 
  takes a while, but once you learn, it's easy. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You must also have enough 
  memory to handle the SGA and PGA. I currently have SGAs and PGAs that are hundreds 
  (and thousands) of MEGs in size. Like CPU horsepower, your organization can't 
  scrimp on memory. It is so important to give large databases enough memory. 
  I monitor the cache areas around the clock using 10G performance alerts. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Last but not least, you've 
  got to have efficient disk layouts that are optimized for high performance. 
  Oracle provides numerous internal statistics that measure I/O performance. We 
  combine those statistics with the output from our other monitoring tools to 
  keep very close tabs on our disk systems. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question:</b><br>
  Can you tell us a little about some of the database features you use on a regular 
  basis?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b><br>
  We are heavy users of materialized views. You can equate them to summary 
  tables that were used in the past. Materialized views allow you to store the 
  pre-computed results of data calculations, such as sums, counts, averages and 
  data table joins. It is more efficient to access a pre-computed result instead 
  of computing the desired result from detail data every time a query is executed. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We also take advantage of 
  external tables, which provide a mechanism to view data stored in external sources 
  as if it were a table in the database. This ability to read external data provides 
  a more straightforward method of loading and transforming data from external 
  sources. This prevents us from having to reserve space inside the database for 
  staging tables or write external programs to transform the data outside of the 
  database environment. External tables streamline the ETL function by merging 
  the transformation and loading processes.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We also use the database 
  resource manager to limit the amount of resources consumed on the warehouse 
  servers. In addition, we are certainly proponents of star schema processing 
  here.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The 10G features I'm most 
  fond of are all of the advisors, which you've done a good job writing about, 
  the ability to monitor O/S performance from Enterprise Manager and the advanced 
  monitoring thresholds you can set. I also use automatic memory management, which 
  allows me to allocate one big chunk of memory to the Oracle SGA. Oracle then 
  becomes responsible for dynamically allocating memory between the shared pool, 
  data buffer cache, etc.. It works great! I set it and forget it, so to speak. 
  The advancements to flashback are also very beneficial. I have never had to 
  use the flashback feature yet but I have seen some of my fellow DBAs use it 
  here to prevent database recoveries. Being able to recover data deleted or updated 
  by mistake is very beneficial. It makes me rest easier knowing I have another 
  tool in the toolbox I can use to recover from incorrect changes made to database 
  data.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Although I haven't implemented 
  it yet, I am highly interested in evaluating Oracle ASM. It's truly the next 
  evolutionary step in database technology. I predict that, sooner or later, most 
  Oracle installations will use ASM to administer disk. Striping is the key to 
  warehouse disk performance. Currently, when we add a new disk into a striped 
  file system we have to move the data to a different set of temporary drives, 
  reconfigure the stripe with the new disk and move the data back on to the original 
  stripe. This requires that the data be taken offline. ASM would allow us to 
  add the drive directly to the stripe without being forced to take an outage. 
  Oracle ASM would then distribute the data during off-peak hours.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Question:</b><br>
  What is the future of data warehousing?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Answer:</b><br>
  Data warehouses aren't solely used for pure decision support any more. That 
  went out years ago. Truthfully, you can describe some of our warehouses as &quot;really, 
  really large operational data stores&quot;. Large data stores will be used for 
  both tactical and strategic decision making. Advancements in hardware and software 
  will continue unabated. Let's face it; the hardware, O/S and database markets 
  are extremely competitive. A competitive market arena forces all vendors to 
  continuously adjust pricing and accelerate the release of new products as well 
  as enhancements to existing products. Consumers can expect the improving hardware 
  performance trends to continue. This rapid release of new features and dramatic 
  improvements in hardware performance makes our jobs exciting.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  We get back on topic when we discuss the different toolsets we can use to reclaim 
  unused space allocated to Oracle objects.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for Reading!<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Segment Advisor</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-08-25.8847176467</link>
                      <description>The 10G segment advisor identifies segments that have become fragmented as a result of update and delete operations. Oracle describes these objects as being sparsely populated. Not only do sparsely populated objects waste space but they can also contribute to SQL performance problems. &lt;BR&gt;&lt;BR&gt; This blog will show you how to use the 10G segment advisor to identify sparsely populated segments. In my next blog, we'll discuss the different alternatives we can use to reclaim the wasted space.</description>
                      <pubDate>Mon, 29 Aug 2005 04:45:23 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"><b>A Walk Down Memory Lane:</b><br>
  </font><font face="Arial, Helvetica, sans-serif" size="2">I've been burned a 
  couple of times in my career by sparsely populated segments. You would think 
  that I would have learned my lesson after the second (or third) time. Hey, what 
  can I say, sometimes I'm a slow learner. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Here's a quick rundown of 
  the sequence of events that occurs: </font></p>
<ol>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I get notified that a 
    SQL statement is running too long. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The developer says that 
    although the query's access path is a full table scan, there aren't that many 
    rows in the table to justify the long execution times.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I forget to ask the developer 
    if a large amount of data was recently removed from the table by SQL delete 
    statements.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I begin looking at all 
    the common culprits (poor operating system or I/O performance, external influences 
    affecting the job, etc.)</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I waste a few hours tracking 
    down potential problems that aren't the cause of the statement's poor performance.</font></li>
</ol>
<p><font face="Arial, Helvetica, sans-serif" size="2">If the developer had responded 
  yes to my question on any recent data deletions (had I asked the question), 
  I could have possibly found and resolved the performance problem with a few 
  minutes. There are tables that, by their nature, have data volumes that expand 
  and contract on a regular basis. The common phrase we use is &quot;the data 
  volumes are very fluid.&quot; That means that application programs add and remove 
  data from the table during normal day-to-day processing. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle uses an indicator 
  called a high water mark to identify the highest amount of space used by a particular 
  segment. It acts as the boundary between used and unused space. As the amount 
  of data grows due to row inserts and updates, the segment's high water mark 
  grows accordingly. But as row deletes and updates shrink the amount of data 
  in the object, the high water mark is not altered to reflect the segment's new 
  characteristics. The high water mark not being adjusted as the data shrinks 
  has the tendency to create a somewhat confusing performance problem. A problem 
  that irritates me to no end when it catches me by surprise.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">During a full table scan, 
  Oracle scans all blocks up to the table's high water mark. This happens regardless 
  of whether those blocks contain data or not. Business needs often require that 
  all rows of a table be scanned. A common method of improving the performance of table scans is to purge the data on a regular basis.  The less data to be scanned, the faster the scan becomes. The purge is often accomplished by using SQL delete statements to remove the unwanted data.  The problem is that 
  even though the delete statement may remove a lot of data from the segment, 
  the high water mark will not be moved and the table scans will continue to perform 
  poorly.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If all of the rows are being 
  deleted, the administrator should use the SQL truncate statement to remove the unwanted 
  rows. Truncate adjusts the high water mark to the first block in the segment. 
  If a partial purge is being performed, the administrator must reclaim the unused 
  space using the methods described in the next blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We have learned that removing 
  unused space helps to improve the performance of full table scans when they 
  are eventually shrunk. It should also be pretty clear that freeing unused space 
  allows us to use it elsewhere. But it is also important to note that reclaiming 
  unused space also compacts the segment, which leads to improvements in buffer 
  cache performance. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Segment Advisor Demo</b><br>
  Like all advisors, we access the segment advisor by clicking on the segment 
  advisor link that is displayed on 10G Grid Control's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/9_advisor_central_home_page_2.gif">Advisor 
  Central page</a>. Clicking on this link notifies 10G Grid Control to display the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/1_segment_advisor_home.gif">Segment 
  Advisor Home page</a>. The Segment Advisor Home page allows administrators to 
  analyze space at a couple of different levels:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Object level analysis 
    - The segment advisor analyzes an entire object (table, all partitions of 
    a table).</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Segment level analysis 
    - The segment advisor analyzes a single segment such as a non-partitioned 
    table or index.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Tablespace level analysis 
    - The segment advisor analyzes segments in the specified tablespace.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">In addition, the home page 
  also allows us to choose the depth of analysis to perform. Pay close attention 
  to the text displayed below the comprehensive option radio button. It is almost 
  the exact same warning that 10G Grid Control displays next to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/5_schedule_advisor_page_2.gif">SQL 
  Tuning Advisor's comprehensive option</a>. This is because the comprehensive 
  analysis does incur a noticeable overhead on the database. Here are my recommendations:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Only run the comprehensive 
    option during periods of low database activity.  </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">If you must run the comprehensive 
    option during peak periods, only run it on one or two objects at a time. The smaller the object is, the better.  How big is too big?  It's hard for me to provide you with a blanket recommendation because there are so many factors involved.  How fast is the box you are running it on?  How heavy is the current workload on the system?  On some of our systems here, I can safely run the advisor during daylight hours on segments that are 500 to 600 MEGs in size. On other systems, analyzing a segment that large would bring the environment to its knees.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">You can run the limited 
    option during periods of peak activity but don't run it on dozens and dozens 
    (and dozens) of objects in one execution. Break them up into groups.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">I selected the Schema Objects 
  radio button to run the segment advisor on a set of specific schema objects. 
  10G Enterprise Manager displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/2_schema_objects_home.gif">Segment 
  Advisor Schema Objects Page</a>. I add schema objects by clicking on the Add 
  button, which activates the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/3_schema_ojbects_add.gif">Schema 
  Objects Add Page</a>. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Schema Objects Add Page 
  allows me to make selections based on the object's type, its schema owner, the 
  object's name, the tablespace it resides in or its size. The tool also allows you 
  to specify combinations of selection criteria to narrow
  the search. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the little 
  flashlight next to the box titled "Schema" to activate the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/4_schema_ojbects_add.gif">Search 
  and Select: Schema search page</a>. I selected the radio button next to the 
  value &quot;Foot&quot; to tell 10G Grid Control to display objects owned by that schema. 
  10G Grid Control returns me to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/5_schema_objects_select.gif">Schema 
  Objects Add page</a> and populates the results section of the panel with the 
  objects owned by the schema owner &quot;Foot&quot;.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Since this is a test system 
  and I'm not worried about consuming too many resources, I selected all of the 
  objects and clicked OK to continue the process. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/6_segment_advisor_options.gif">Segment 
  Advisor: Options page</a> which allows me to select the depth of the analysis 
  to perform. Since we are using my test system, I chose to run a comprehensive 
  analysis on all selected objects. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/7_schedule_select_option.gif">Segment 
  Advisor: Schedule page</a>. The panel provides me with several different options 
  to run the advisor during off-peak maintenance windows (predefined windows will 
  be discussed in an upcoming blog). This should give you another hint that the 
  segment advisor is resource intensive, especially when it is asked to analyze large 
  objects. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Choosing the Standard option 
  tells Enterprise Manager to refresh the Segment Advisor: Schedule page and display 
  some <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/8_schedule_standard_immediately.gif">additional 
  boxes</a> that allow me to run the advisor immediately or schedule its execution 
  at some specified time in the future. In addition, I am also given the option 
  of scheduling the job to run on a repeating basis. Check out the text that has 
  the red line underneath it. It's your last warning before you run the advisor. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Clicking OK displays the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/9_review.gif">Segment 
  Advisor: Review page</a>. This panel displays a listing of the objects to be 
  analyzed as well as the depth of analysis to be performed. I clicked on the 
  Submit button to schedule the segment advisor job for execution. 10G Grid Control returns 
  me to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/10_advisor_central_running.gif">Advisor 
  Central Home page</a>. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We learned previously that 
  the Advisor Central Home page displays the output of all advisor job executions. 
  Note that the status of my segment advisor job is &quot;Running&quot;. I opened 
  up a Telnet window and used NMON to measure the load that the segment advisor 
  was placing on my test platform. The advisor did have a noticeable impact on 
  system resources during its execution. When the system resources returned to 
  normal levels, I took that as an indication that the segment advisor was finished 
  processing. I returned to the Advisor Central home page and my guess was indeed 
  correct. The segment advisor had completed its execution and the results were 
  ready to be reviewed.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the segment 
  advisor's job name SHRINK3440621 to view the job's output. 10G Grid Control displays the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/11_segment_advisor_output.gif">Segment 
  Advisor Task:3440621 output page</a>. The page displays job execution information 
  and contains a row for each object that was analyzed. The row begins with metadata 
  about the object (owner, type, tablespace it resides in, etc.). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The output page also displays 
  information that will help us determine if shrinking the segment is justified. 
  The far right of each row displays:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The amount of space allocated 
    to the object.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The amount of space that 
    the object actually consumes.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The amount of space that 
    will be reclaimed if a shrink operation is performed.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">A recommendation stating 
    if the shrink operation should be performed and if so, what steps should be 
    taken to perform the shrink effectively.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Take a look at the recommendations; 
  each one advises that row movement be enabled to facilitate the shrink operation. 
  When I click on the Show SQL button, Oracle <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_258847176467/12_show_sql.gif">displays 
  the SQL </a>that will be executed if the recommendation is implemented. The 
  SQL execution file contains an &quot;ENABLE ROW MOVEMENT&quot; statement for 
  each of the tables analyzed.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Now we know how to identify 
  candidates for shrink operations. But why do we need to enable row movement? 
  And what exactly does a shrink operation do? </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We'll discuss those topics 
  when we investigate shrinking in my next blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading!</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Automatic Shared Memory Management and Memory Advisors </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-08-19.0090015270</link>
                      <description>The memory advisors can only be activated when 10G's automatic shared memory management feature is turned off. Since the memory advisors are pretty simple, I thought I would include a discussion on 10G's automatic shared memory management feature. So consider this blog to be your first "two for one special" from your friendly ex-Oracle instructor.</description>
                      <pubDate>Mon, 22 Aug 2005 05:29:39 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> </font> 
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Introduction to Automatic 
  Shared Memory Management</b><br>
  The automatic shared memory management feature of Oracle10G simplifies administration 
  of the various memory components that make up the System Global Area (SGA). 
  In previous releases, database administrators were required to specify the amount 
  of memory allocated to the buffer cache, shared pool, java pool and large pool. 
  Setting, monitoring and adjusting these parameters was time-consuming and oftentimes 
  guesswork. The process could be described as being more of an &quot;art&quot; 
  than a &quot;science.&quot; Sizing them incorrectly usually led to poor performance 
  and/or out-of-memory conditions. <br>
  <br>
  Oracle10G administrators are able to set a single dynamic parameter named SGA_TARGET 
  to allocate memory to the Oracle SGA. Oracle10G uses the value contained in 
  SGA_TARGET to determine how much memory to allocate to the buffer cache, shared 
  pool, large pool and java pool. If the SGA_TARGET is set to a non-zero value 
  and the STATISTICS_LEVEL initialization parameter is set to TYPICAL or ALL, 
  the database will perform automatic memory reallocation. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">During normal database operations, 
  the database engine periodically reviews memory usage and redistributes memory 
  between the components accordingly. The resizing process is called automatic 
  SGA segment sizing in the 10G manuals. Oracle 10G provides a new background 
  process named MMAN (Memory Manager) that is responsible for sizing the memory 
  components and scheduling resizing operations. The MMON process checks performance 
  statistics every few minutes and uses this information to determine the best 
  distribution of memory. For example, if a batch job activates numerous parallel 
  processes, MMAN will review memory allocations to ensure that the large pool 
  is sized correctly. If MMAN determines that the large pool needs to be increased 
  to handle the additional parallel processes, it will reduce memory from the 
  other cache areas and increase the large pool. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">MMAN stores the component 
  sizes in the SPFILE and uses those settings to initially size the memory areas 
  during database start. Oh, and one last thing, MMAN uses the different memory 
  advisories during its analysis. Just like we'll learn to do later in this blog!</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Setting the SGA_TARGET to 
  0 disables automatic SGA segment sizing and requires that the SHARED_POOL_SIZE, 
  LARGE_POOL_SIZE, and JAVA_POOL_SIZE parameters be set. The parameters controlled 
  by automatic segment SGA sizing are now referred to as auto-tuned SGA parameters. 
  The remaining memory configuration parameters that are not set automatically 
  are referred to as manually tuned parameters. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you set any of the auto-tuned 
  SGA parameters and set SGA_TARGET to a non-zero value, Oracle will activate 
  automatic memory management and use the auto-tuned SGA parameter values as minimum 
  settings. Oracle will not reduce the cache area's size below the specified value. 
  For example, if the value of SGA_TARGET is 1 GIG and the SHARED_POOL parameter 
  is set to 500 MEGs, Oracle will not reduce the size of the shared pool to below 
  500 MEGs when performing automatic memory resizing.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SGA_MAX_SIZE initialization 
  parameter still defines the maximum amount of memory that can be allocated to 
  the Oracle SGA. As a result, SGA_TARGET must be set to a value that is less 
  than or equal to the value of SGA_MAX_SIZE. If you change the value of SGA_TARGET, 
  Oracle automatically adjusts the size of the various auto-tuned cache areas. 
  The SGA_MAX_SIZE parameter can be reduced until it reaches the user-specified 
  or Oracle default minimum sizes of all auto-tuned cache areas added together.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Manually-Sized Cache 
  Areas</b><br>
  The following initialization parameters must be set to size the manually sized 
  cache areas:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">DB_KEEP_CACHE_SIZE - 
    keep pool</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">DB_RECYCLE_CACHE_SIZE 
    - recycle pool</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">STREAMS_POOL_SIZE - streams 
    pool</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">DB_nK_CACHE_SIZE - non 
    standard blocksize cache areas</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">LOG_BUFFER - database 
    log buffer</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">The memory that is allocated 
  to these cache areas is deducted from the SGA_TARGET and the resulting free 
  memory is then allocated to the various auto-tuned cache areas. Reducing the 
  value of SGA_TARGET has no affect on manually sized cache areas. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Memory Advisor Demo</b><br>
  As stated previously, the memory advisors are not activated when the database 
  is configured to use automatic memory allocation. But they can be used when 
  the database is configured to use manual memory allocation. A link to the Memory 
  Advisor Home page is provided on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/9_advisor_central_home_page_2.gif">Advisor 
  Central panel</a>. The link's title doesn't fully describe all of the functionality 
  the Memory Advisor Home page provides. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/1_memory_advisor_automatic.gif">Memory 
  Advisor Home page</a> allows administrators to toggle the database back and 
  forth between automatic and manual memory allocation, change manual cache area 
  sizes and activate the memory advisors. The Memory Advisor Home page is split 
  into SGA and PGA panels. The PGA (Program Global Area) is not controlled by 
  automatic memory management and must be administered separately.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You'll notice that Oracle 
  sized my shared pool much larger than my buffer cache. That's because I was 
  testing numerous stored procedures that did not access large amounts of data. 
  As a result, MMON sized the shared pool and data buffer cache memory areas accordingly.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the &quot;Disable&quot; 
  button to deactivate automatic memory management, which will then allow me to 
  activate and demo the memory advisors. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/2_disable_automatic_memory.gif">Disable 
  Automatic Shared Memory Management page</a>. The page displays the current cache 
  area sizes and allows me to resize them during the switch from automatic to 
  manual memory management.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When I click OK to deactivate 
  automatic memory management, 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/3_disable_automtic_memory_complete.gif">Memory 
  Advisor Home page</a>. Enterprise Manager displays an informational message 
  at the top of the panel stating that automatic memory management was successfully 
  disabled. 10G Grid Control also displays input boxes that allow me to manually resize the 
  cache areas and two new advice buttons that activate the memory 
  advisors.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If I click on the advice 
  buttons, 10G Grid Control displays the memory advisor associated with that cache area. 
  Here are screenshots of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/4_shared_pool_advisor.gif" target="_blank">Shared 
  Pool</a> and <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/5_buffer_pool_advisor.gif" target="_blank">Buffer 
  Cache</a> advisors. If I close these two advisors and click on the PGA link, 
  10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/6_pga_panel.gif">PGA 
  Administration Panel</a>. The PGA Administration panel displays the current 
  PGA allocations and an input box that allows me to change the PGA allocation. 
  In addition, the page also displays the Advice and PGA Memory Utilization Details 
  buttons. Clicking on the Advice button displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/7_pga_advisor.gif">PGA 
  Memory Advisor</a>. I can also display <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_190090015270/8_pga_memory_details.gif">single 
  and multi-pass PGA information</a> by clicking on the PGA Memory Usage Details 
  button. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Recommendation</b><br>
  We use automatic memory allocation religiously and have found no need to set 
  minimum cache area sizes. But most of our 10G applications do not have cache 
  area size requirements that dramatically vary from one instant to the next. 
  We have been monitoring the actual sizes of the auto-tuned cache areas and found 
  that 10G is resizing them on a regular basis. We are happy with the memory allocations 
  that Oracle has been defining for us so we intend to configure all new 10G databases 
  to use automatic memory management. If anything happens to change this decision, 
  I'll let you know immediately. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading!</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Chris Foot</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>SQL Tuning Advisor</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-08-11.0227938704</link>
                      <description>SQL tuning can be a real pain.  I have been doing it for 15 years and it is still one of the most challenging parts of my job.  I have always described SQL tuning as more of an art than a science.   Hopefully, as the SQL Tuning Advisor matures, it will help transform a once time-consuming and arduous burden into just one more line item on a DBA’s “TODO” list.   This blog presents an overview of 10G Grid Control’s SQL Tuning Advisor.</description>
                      <pubDate>Mon, 15 Aug 2005 04:45:39 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"> Hey, don't think I'm mentally 
  lazy, but the less I have to think about something, the faster it gets done. 
  My unit's &quot;TODO&quot; list rivals &quot;War and Peace&quot;. If any tool 
  can help us do ANYTHING faster, I want to use it. There will still be plenty 
  for us to learn. Once my Enterprise Manager blogs are complete, I'll be blogging 
  about our experiences with Oracle BPEL, Collaboration Suite, Application Server 
  and Oracle's Internet Directory (OID). This group of products has a steep learning 
  curve (kind of like MT. Everest) and would present a challenge to any unit given 
  the task of supporting them.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I'll be truthful; I was 
  a lousy developer, that's why I became a DBA. All those &quot;IF-THEN-ELSE-OTHERWISE-GOTO-EXIT&quot; 
  routines drove me nuts. But over the years, I have come to understand the importance 
  of knowing the data (not just the database) and the SQL language that accesses 
  it. I became a strong SQL tuner because my (no, make that OUR) profession requires 
  it. In the near future I'll be showing you how to use all of these new-fangled 
  tools to tune SQL. I'll begin with a blog on overall SQL tuning from a DBA perspective. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Tuning Advisor Overview</b><br>
  OK, so what is this first generation SQL Tuning tool all about? The SQL Tuning 
  Advisor is an intelligent analyzer that we can use to monitor and tune SQL statements. 
  It provides recommendations and includes information justifying why it generated 
  those recommendations. This prevents the advisor from becoming a &quot;black 
  hole&quot; that pumps out advice without supporting information. The recommendations 
  may include collecting statistics on objects, new index creation, restructuring 
  the SQL statement or the creation of a SQL profile to create a more optimal 
  access path. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SQL Tuning Advisor's 
  SQL rewrite feature uses the Oracle10G cost based optimizer to tune poorly performing 
  SQL. It saves the access path in a new Oracle object called a SQL profile, which 
  is then stored in the database. Each time the poorly performing SQL statement 
  executes, the stored access path is used in its place.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The optimizer's job is to 
  create the most high performance access path in the shortest time possible. 
  It's easy to understand how these two objectives can be viewed as &quot;mutually 
  exclusive.&quot; In a perfect world, you would give the optimizer as much time 
  as it needs to create the most optimal access path. In the real world, you need 
  to get the statements executing as quickly as possible. That includes optimization. 
  Since the SQL Tuning Advisor does not have time constraints, the tool can take 
  as much time as necessary to optimize the statement. The SQL Tuning Advisor 
  Home Page provides a drop down menu that allows the administrator to &quot;throttle&quot; 
  the amount of time the utility spends optimizing the statement.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SQL Tuning Advisor will 
  be especially beneficial to administrators who support third-party applications. 
  Before the advent of stored outlines (predecessor to SQL profiles), once the 
  administrator identified the canned application's poorly performing SQL, the 
  third-party vendor was contacted to change the SQL code and the changed code 
  then implemented in test and finally in production to effect the tuning change. 
  Anyone who has experience with third-party application vendors knows that this 
  is often a time consuming, if not impossible, process. Creating SQL Plans and 
  stored outlines (discussed later) allows the administrator to correct the poorly 
  performing SQL statement immediately without vendor assistance.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Tuning Advisor Demo</b><br>
  The SQL Tuning Advisor can be accessed from many different panels in 10G Enterprise 
  Manager. Take a look at the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/2_tuning_advisor_link_page_2.gif">screen 
  print</a> of the panel that appears when you click on the SQL Tuning Advisor 
  link on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/1_advisor_central_home_page_2.gif">Advisor 
  Central Home Page</a>. You'll notice that the SQL Tuning Advisor can not be 
  called directly from Advisor Central. The utility can only be called from the 
  Top SQL, SQL Tuning Sets, Snapshots and Preserved Snapshot Sets panels. </font> 
</p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Top SQL Page</b><br>
  We learned previously that the TOP SQL home page is divided into Spot SQL and 
  Period SQL drilldown panels. The Spot SQL page provides a slider that allows 
  me to choose from 5 minute windows. The Period SQL page also provides a slider 
  but its increments are in 24 hour time periods. I decided to choose the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/3_period_sql_page_2.gif">Top 
  SQL Period SQL page </a>for the demo because it would provide me with a larger 
  number of SQL statements to choose from. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Before we continue, take 
  a close look at the page I just mentioned. It should look very close to the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/period_sql_selection_7.gif20">Top 
  SQL Period SQ</a>L page provided in my blog on the SQL Access Advisor. </font><font face="Arial, Helvetica, sans-serif" size="2">The 
  two pages are almost mirror images of each other. Which is exactly the way they 
  should be. The only difference is when you navigate to the Top SQL pages from 
  the SQL Tuning Advisor, the panels display a &quot;Run SQL Tuning Advisor&quot; 
  button and when you navigate to them from the SQL Access Advisor they display 
  a &quot;Run SQL Access Advisor&quot; button. Everything else is exactly the 
  same. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">After dragging the window 
  to the desired 24 hour time slice, 10G Grid Control displays the SQL for that time period 
  on the lower left side of the panel. The tool allows me to drill down to view 
  the text of the statement and also displays the statement's CPU and Wait times. 
  10G Grid Control provides us with a couple of different ways to activate the SQL Tuning 
  Advisor from the Top SQL Period SQL page.</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I can select multiple 
    SQL statements by clicking on their associated check boxes (far lower left 
    of screenshot). I then activate the SQL Tuning Advisor by clicking on the 
    &quot;Run SQL Tuning Advisor&quot; button to analyze all of the selected statements 
    at the same time.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I select the statements 
    the same way as mentioned in the previous bullet. Instead of activating the 
    SQL Tuning Advisor immediately, I store them in a SQL Tuning Set by clicking 
    on the &quot;Create SQL Tuning Set&quot; button. I am then able to use the 
    stored SQL statements as input to the advisors at a later time. For more information 
    on SQL Tuning Sets, please refer to my blog on <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/blogentry_view/index.html">SQL 
    Tuning Sets</a>. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">I can display the SQL 
    details page by clicking on the text of the SQL statement shown in the SQL 
    Text column. I can then activate the advisor from details page.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Every time 10G Grid Control displays 
  a SQL statement's SQL ID or a snippet of its text, it usually shows them as 
  a link that allows us to drill down to the SQL statement's details. Let's click 
  on the SQL text link and navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/4_sql_details_page_2.gif">SQL 
  statement details page</a>. This page shows the text of the SQL statement and 
  its associated execution plan. 10G Grid Control provides a link to tune the statement 
  immediately using the SQL Tuning Advisor. In addition, the page also provides 
  tabs that allow users to drill down into in-depth performance statistics and 
  historical tuning and execution information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>The Schedule Advisor</b><br>
  I'll click on the &quot;Run SQL Tuning Advisor&quot; button to activate the 
  SQL Tuning Advisor on this single statement. 10G Grid Control then displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/5_schedule_advisor_page_2.gif">Schedule 
  Advisor page</a>. This page allows users to specify the time the advisor will 
  run and select the scope of the analysis performed.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Analysis Scope</b><br>
  You can choose from limited or comprehensive analysis. The limited option will 
  provide recommendations on statistics collection, new index recommendations 
  and SQL statement restructuring but will not recommend SQL profiles. The comprehensive 
  option provides all recommendations including SQL profiles. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Here's the tradeoff. Look 
  at the text included in the comprehensive option. Pay special attention to the 
  words &quot;may take a long time.&quot; I would heed that warning if I were 
  you. Do NOT run an in-depth comprehensive analysis on numerous SQL statements 
  during peak utilization periods. Comprehensive analysis does incur a noticeable 
  overhead on the database. Here are my recommendations:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Only run the comprehensive 
    option during periods of low database activity.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">If you must run the comprehensive 
    option during peak periods, only run it on a few statements at a time.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">You can run the limited 
    option during periods of peak activity but don't run it on dozens and dozens 
    (and dozens) of statements in one execution. Break them up into groups.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The best option is to 
    create a SQL Tuning Set, transport the set to a test environment and tune 
    the statements at your leisure. That's what test is for.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">I chose the comprehensive 
  option and clicked OK to start the analysis process. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/6_tuning_advisor_status_2.gif">SQL 
  Tuning Advisor Status page</a>. This page is displayed until the advisor has 
  completed its analysis activities. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Why does the SQL tuning 
  process generate overhead? As stated previously in this blog, the SQL Tuning 
  Advisor does not have optimization time constraints. As a result, the tool can 
  take as much time as necessary to optimize each statement. You'll certainly 
  get an educated decision from the optimizer, but you may impact system performance 
  to get it. The big resource consumer is when you select the comprehensive option 
  to tell the SQL Tuning Advisor to recommend SQL profiles.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Profiles</b><br>
  Don't confuse SQL profiles with stored outlines. Stored outlines, which were 
  introduced in Oracle8i, provide administrators with the capability of &quot;freezing&quot; 
  a SQL statement's access path and storing it in the database. Administrators 
  can use the OEM stored outline editor or hints to change the statement's access 
  path for better performance. The access path to the data then remains constant 
  despite data changes, schema changes, and upgrades of the database and/or application 
  software. To learn more about this popular feature, please turn to my DBAZine 
  article titled <a href="/oracle/or_articles/foot13/index.html">&quot;Stored 
  Outlines.&quot;</a><br>
  <br>
  SQL profiles differ from stored outlines in a couple of key areas. Although 
  SQL profiles also change a statement's access path, they don't freeze the exact 
  same access path forever. In addition, a SQL Profile's access path is still dependent 
  upon the data. What you are doing is allowing the optimizer to take its time 
  to make the most educated decision that it can. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Recommendations</b><br>
  After the analysis is complete, 10G Grid Control displays a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/7_recommendations_page_2.gif">recommendations 
  page</a>. The series of recommendations are displayed in a tabular format. Each 
  row provides a recommendation category, finding, rationale and percentage of 
  benefit. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If an alternate access path 
  is recommended, a set of glasses is displayed which allows users to view the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/8_new_explain_page_2.gif">new 
  explain plan</a>. The recommendation page also provides a button that displays 
  the original explain plan to allow administrators to compare the old access 
  path to the new one. Comparing the new and old explain plans is HIGHLY recommended. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">IF YOU HIT THE IMPLEMENT 
  BUTTON ON THE RECOMMENDATIONS PAGE, YOU WILL IMPLEMENT THE RECOMMENDATION. In 
  case of the SQL profile, you will implement it immediately without any additional 
  prompts. I learned this the hard way. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">How do you drop a profile 
  that is created automatically by the SQL Tuning Advisor? That's the next logical 
  question I would ask. You can use the Oracle supplied DBMS_SQLTUNE procedure 
  to manually create, alter and drop SQL profiles. If you are looking for more 
  information on how to use the DBMS_SQLTUNE procedure to create and administer 
  SQL profiles, please search for note 271196.1 on Oracle's support website <a href="http://metalink.oracle.com">Metalink</a>.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">So, if you need to drop 
  a SQL Profile which was automatically created using the SQL Tuning Advisor you 
  can <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/12_dba_sql_profiles_2.gif">select 
  from the DBA_SQL_PROFILES table</a> or navigate to EM's advisor central page 
  to view the advisor's output. You can then use that information to identify 
  the SQL profile and then execute the statement below to drop it.</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2"><br>
      BEGIN <br>
      DBMS_SQLTUNE.DROP_SQL_PROFILE(name =&gt; 'my_sql_profile'); <br>
      END; <br>
      / </font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Since our first SQL statement 
  generated only a few recommendations, I chose to analyze another statement that 
  generated <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/10_more_recommendations_2.gif">this 
  set of recommendations</a>. If you choose to implement the create index recommendation, 
  you will not build the index. Instead, 10G Enterprise Manager will display the 
  SQL Access Advisor home page to allow you to analyze the statement and create 
  the proper index structures. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">As with all advisor executions, 
  the SQL Tuning Advisor output is available on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_110227938704/9_advisor_central_home_page_2.gif">Advisor 
  Central home page</a> until it expires.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I think you'll find that 
  the first release of the SQL Tuning Advisor to be pretty robust. Do I agree 
  with all of its recommendations? NO! But since when do DBAs always agree on 
  everything, or anything for that matter? Like all new features, as this one 
  matures it will provide us with higher quality recommendations at a lower resource 
  consumption cost.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>SQL Tuning Sets</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-08-02.1208871355</link>
                      <description>SQL Tuning Sets are stored groupings of SQL statemtents that can be used as input to the SQL Access Advisor  and the SQL Tuning Advisor (next blog).  If you intend to use 10G Grid Control to tune SQL, you'll be using SQL Tuning Sets.  So, I’d like to spend a few minutes discussing them before we discuss the SQL Tuning Advisor.</description>
                      <pubDate>Mon, 08 Aug 2005 05:35:59 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Introducing SQL Tuning 
  Sets</b><br>
  A SQL Tuning Set is a database object that groups and stores one or more SQL 
  statements. In addition to the text of the statement, a SQL Tuning Set also 
  stores the following items to facilitate the SQL monitoring and tuning process:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Execution context - You 
    can loosely describe a SQL statement's execution context as the environment 
    that the SQL statement executes in. It consists of the user's schema, application 
    program that executes it, a listing of bind variables and the cursor compliation 
    enviroment.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Performance statistics 
    such as CPU and elapsed times, buffer gets, disk reads, rows processed, cursor 
    fetches, number of executions, optimizer cost and command type.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Execution plans and row 
    source statistics.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Later in this blog, I'll 
  show you how to create SQL Tuning Sets using a couple of different workload 
  captures from Enterprise Manager as input. The source of the SQL statements 
  can be the Automatic Workload Repository (AWR), the database's SQL cursor cache 
  (from the shared pool) or a user-defined set of SQL statements contained in 
  a workload table.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Tuning Set and the 
  SQL Advisors</b><br>
  SQL Tuning Sets can be used as input to the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_06.5201081269">SQL 
  Access Adviso</a>r and the SQL Tuning Advisor (topic of next blog). That's the 
  key benefit of using SQL Tuning Sets. You create the tuning sets from a selected 
  workload and store them as a named object. You can then review and tune them 
  at any time. In addition, 10G allows you to rank the statements according to 
  several different criteria.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You'll see in one of the 
  examples below that I'm capturing statements that are currently running in the 
  database. Capturing the current contents of the SQL cursor area is of great 
  benefit to administrators. When notified of a performance problem, DBAs are 
  now able to access the contents of the SQL cursor area to capture the workload 
  currently running in the database. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SQL cursor cache is 
  dynamic and fluid by nature. Since this memory construct is finite in size, 
  old statements must be flushed out at times to make room for new statements 
  coming in for parsing and execution. So what you think should be in there, may 
  not be. Being able to capture and store the contents of the SQL cursor area 
  as well as using historical information from snapshots allows us to tune statements 
  that executed in the past. Now, we finally have an answer to &quot;Hey, my program 
  ran long two days ago... Can you fix it?&quot;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Transporting SQL Tuning 
  Sets</b><br>
  I also like the new 10G R2 feature that allows DBAs to transfer SQL Tuning Sets 
  from one database to another. Administrators can use the DBMS_SQLTUNE package 
  to transfer poorly perfoming SQL statements to test systems where they can be 
  safely analyzed and tuned. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">This will prevent DBAs from 
  having to perform extended diagnostics on SQL statements in their production 
  environments. In addition, once a statement is tuned, it must be re-executed to 
  determine if the tuning changes accomplished their intended results. If the 
  results don't match expectations, another round of tuning and monitoring is 
  warranted. Transporting the statements in bulk to another database facilitates 
  the monitoring and testing of multiple SQL statements.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Editing SQL Tuning Sets</b><br>
  SQL Tuning Sets can be modified using DBMS_SQLTUNE. The statement below removes 
  all statements that have executed less than 10 times. Check the Oracle documentation 
  for a complete listing of the criteria that can be used to modify the contents 
  of SQL Tuning Sets.</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2">BEGIN<br>
      DBMS_SQLTUNE.DELETE_SQLSET(<br>
      sqlset_name =&gt; 'sqlcursor_dump_072905_0700',<br>
      basic_filter =&gt; 'executions &lt; 10');<br>
      END;</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Demo</b><br>
  Let's continue our discussion with a quick demo of how to create SQL Tuning 
  Sets using 10G Grid Control R1.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">One way (out of many) that 
  we can access the SQL Tuning Set home page is from the target database's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/administration_page_1.gif"> 
  administration home page</a>. You can also access the SQL Tuning Set home page 
  from the Top SQL, SQL Tuning Advisor, SQL Access Advisor and ADDM tools.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Clicking on the link I just 
  described takes me to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/sql_tuning_sets_homepage_2a.gif">SQL 
  Tuning Set home page</a>. The home page allows us to create and administer stored 
  SQL Tuning Sets. We can search for existing tuning sets by name or create a 
  tuning set by choosing from one of the following input options: spot SQL, period 
  SQL, snapshots and preserved snapshot sets. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the drop down 
  menu selection titled &quot;spot SQL&quot; and clicked create. 10G Grid Control now displays 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_selection_3a.gif">Top 
  SQL Spot SQL pag</a>e. The Top SQL page can also be displayed by navigating 
  to it from the target database's performance home page. The Spot SQL page provides 
  a slider that allows me to choose from 5 minute windows. After dragging the 
  window to the desired 5 minute time slice, 10G Grid Control displays the SQL for that 
  time period on the lower left side of the panel. The tool allows me to drill 
  down to view the text of the statement and also displays the statement's CPU 
  and Wait times. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I selected two SQL statements 
  to be used as input to the tuning set by clicking on the check box (far lower 
  left side of screen). I then clicked the button titled &quot;Create Tuning Set&quot; 
  to begin the creation process. 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_tuning_set_create_main_4.gif">Create 
  SQL Tuning Set page</a>. The reason why the statements don't match in number 
  (2 selected vs 3 shown) and SQL IDs is because I went back and chose a timeslice 
  that had statements that consumed more resources than my first selection.</font><font face="Arial, Helvetica, sans-serif" size="2">We 
  can accept the name that 10G Grid Control recommends or we can choose our own. In addition, 
  we can add a description to help us better identify the grouped SQL statements. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Every time 10G Grid Control displays 
  a SQL statement's SQL ID, it shows it as a link that allows us to drill down 
  to the SQL statement's details. Clicking on the SQL ID link sends us to the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_tuning_set_sql_drilldown_5a.gif">SQL 
  statement details page</a>. This page shows the text of the SQL statement and 
  its associated execution plan. 10G Grid Control provides a link to tune the statement 
  immediately using the SQL Tuning Advisor and tabs that display in-depth performance 
  statistics and historical tuning and execution information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked the back button 
  to return to the Create SQL Tuning Set page and clicked OK to create the SQL 
  Tuning Set. 10G Grid Control returns me to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_complete_homepage_6.gif">SQL 
  Tuning Set home page</a>. Now that we have stored a SQL Tuning Set in the repository, 
  10G Grid Control provides navigation buttons to allow me to view or delete SQL Tuning 
  Sets as well as activate the advisors.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Creating a SQL Tuning Set 
  using Period SQL is pretty much the same as its Spot SQL counterpart. From the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_complete_homepage_6.gif">SQL 
  Tuning Set home page</a>, I clicked on the drop down menu selection titled &quot;period 
  SQL&quot; and clicked create. 10G Grid Control displayed the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/period_sql_selection_7.gif">Top 
  SQL Period SQL Page</a>. I performed virtually the same steps as I did when 
  I was using the Top SQL Spot SQL Page. I used the slider to select the time 
  slice, reviewed the SQL statements, selected the ones I wanted by clicking on 
  the check box (far lower left on screenshot) and clicked on the button titled 
  &quot;Create Tuning Set&quot; to begin the creation process.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's begin to conclude 
  our demo by creating a SQL Tuning Set using an AWR snapshot as input. To learn 
  more about AWR snapshots, please review my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_06_02.0384701461">&quot;Advisory 
  Framework - 10G Common Manageability Infrastructure&quot;</a>. I navigate to 
  this page by clicking on on the link provided on the target database's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_perf_home.gif">performance 
  home page</a>. The link is titled &quot;Snapshots&quot; and is displayed on 
  the lower right hand side of the page.<br>
  <br>
  I clicked on the Snapshot link and 10G Grid Control displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/snapshot_tuningset_create_8.gif">Snapshot 
  Actions home page</a>. I activated the Actions drop down selection menu. The 
  menu allows me to select from several different actions. I'll discuss all of 
  these selections in-depth in my upcoming blog on 10G Grid Control Snapshot Administration. 
  In this case, I chose the &quot;Create SQL Tuning Set&quot; option to create 
  a new SQL Tuning Set. The page also allows me to specify the starting time period. 
  After I select the beginning time period, 10G Grid Control displays the specify ending 
  time period page. I then click OK to create the SQL Tuning Set. Very simple.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Now that I have my SQL Tuning 
  sets created I can use them as input to the SQL Advisors. In addition, I can 
  navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_complete_homepage_6.gif">SQL 
  Tuning Set home</a> page to evaluate individual SQL statements. This is accomplished 
  by first selecting a SQL Tuning Set, clicking on the statement's SQL ID drilldown 
  link which will takes me to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_08_021208871355/spot_sql_tuning_set_sql_drilldown_5a.gif">SQL 
  statement details page</a>. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">As stated earlier in this 
  blog, the SQL details page allows me view the text of the SQL statement and 
  its associated execution plan. It also provides links to to tune the statement 
  immediately using the SQL Tuning Advisor and displays tabs that allow me to 
  navigate to screens displaying in-depth performance statistics and historical 
  tuning and execution information. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">This is how we tune the 
  majority of statements here. Using SQL Tuning Sets doesn't automatically force 
  you into using the 10G Grid Control SQL advisors. We often copy statements from the SQL 
  details page and paste them into text editors. We then rewrite the SQL or add 
  hints to improve performance. Remember that the SQL Tuning Advisor, which will 
  be covered in my next blog, will automatically create alternative access paths 
  for you. Some times they work better, some times they don't. Manually specifying 
  hints allows me more granular ontrol over the access paths. But that's better 
  covered in my next blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Next Up</b><br>
  How to use the 10G Grid Control SQL Tuning Advisor.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G R2 New Features Part 3</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-07-25.6154655837</link>
                      <description>We have reached the final blog on 10G R2 New Features.    I think that after reading the last blog of this series, you'll agree that 10G R2 (like all new Oracle releases) contains a LOT of interesting and beneficial enhancements.&lt;BR&gt;&lt;BR&gt;I'll get back on track in the next blog by discussing how to use 10G Enterprise Manager SQL Tuning Sets.  </description>
                      <pubDate>Mon, 01 Aug 2005 05:10:02 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"><b>DML Error Logging</b><br>
What I like about SQL*LOADER is its ability to continue processing through load 
errors. If the record being loaded is rejected by the database (i.e. unique constraint 
violation) or discarded because it does not meet some user-defined criteria, SQL*LOADER 
places the record into a discard or reject file. SQL*Loader keeps on running until 
it completes or has reached a user-specified maximum number of rejects or discards. 
</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">The loader's log file will 
  show how many records were loaded, rejected or discarded. I can look at the 
  messages and review the discard or reject files, fix the problem and attempt 
  to reload them again.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In 10G R2, this same type 
  of processing has been applied to bulk DML operations. Users are able to specify 
  whether they want to log errors or abort the entire DML statement, set the amount 
  of detail information logged and the maximum error threshold. So instead of 
  the entire DML statement blowing up and rolling back, Oracle will log the errors 
  to the error table and continue processing until it exceeds the maximum number 
  of errors. Just like SQL*Loader! </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle 10G R2's DBMS_ERRLOG 
  package is used to create the error log output table and link it to the table 
  being updated. The package's specification is provided below:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">DBMS_ERRLOG.CREATE_ERROR_LOG 
      (<br>
      dml_table_name IN VARCHAR2,<br>
      err_log_table_name IN VARCHAR2 := NULL,<br>
      err_log_table_owner IN VARCHAR2 := NULL,<br>
      err_log_table_space IN VARCHAR2 := NULL,<br>
      skip_unsupported IN BOOLEAN := FALSE);</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Most of the columns are 
  pretty self explanatory: name of table being updated, error log table name, owner 
  of error log table and the error log table's tablespace. If the SKIP_UNSIPPORTED 
  is set to TRUE, column types that are not supported by error logging will be 
  skipped over and not added to the error logging table. If it is set to FALSE, 
  an unsupported column type will cause the procedure to fail.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Here's a quick example:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">Let's create the table 
      we are going to update:<br>
      SQL&gt; r<br>
      1 CREATE TABLE foot.emp_table<br>
      2 (empno number(4), ename varchar2(10), job varchar2(8))<br>
      3* TABLESPACE users;</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">Table created.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Add a primary key:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; ALTER TABLE 
      foot. emp_table ADD PRIMARY KEY(empno) <br>
      2 USING INDEX TABLESPACE users;</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">Table altered.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Load some rows:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; INSERT INTO 
      foot.emp_table VALUES (7499, 'ALLEN', 'SALESMAN');</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; INSERT INTO 
      foot.emp_table VALUES (7521, 'WARD', 'SALESMAN');</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; INSERT INTO 
      foot.emp_table VALUES (7566, 'JONES', 'MANAGER');</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>

  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's cause a unique constraint 
  violation:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; insert into 
      foot.emp_table select * from foot.emp_table;<br>
      insert into foot.emp_table select * from foot.emp_table<br>
      *<br>
      ERROR at line 1:<br>
      ORA-00001: unique constraint (FOOT.SYS_C009069) violated</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Create the 10G R2 error 
  logging table:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">exec dbms_errlog.CREATE_ERROR_LOG 
      ('emp_table','dml_errors_emp_table');</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's create a new table 
  and load it with all of the rows from our original table:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; create table 
      foot.emp_load_table tablespace users as select * from foot.emp_table;</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">Table created.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Update one row to change 
  the EMPNO column's value to avoid the primary key violation:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; update foot.emp_load_table 
      set empno=123 where empno=7499;<br>
      1 row updated.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Rerun the statement specifying 
  the new 10G R2 error logging syntax. We'll use our new load input table so that 
  our one changed row will be loaded and two will be rejected and placed into 
  the DML_ERRORS_EMP_TABLE:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; insert into 
      foot.emp_table select * from foot.emp_load_table<br>
      LOG ERRORS INTO dml_errors_emp_table('test_load_20050718')<br>
      REJECT LIMIT UNLIMITED;</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">1 row created.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">OK, we loaded one row. What 
  happened to the other two rows? Let's see what our DML_ERRORS_EMP_TABLE contains. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">First, let's describe the 
  DML_ERRORS_EMP_TABLE:</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; DESC foot.dml_errors_emp_table<br>
      <br>
      ORA_ERR_NUMBER$ NUMBER<br>
      ORA_ERR_MESG$ VARCHAR2(2000)<br>
      ORA_ERR_ROWID$ ROWID<br>
      ORA_ERR_OPTYP$ VARCHAR2(2)<br>
      ORA_ERR_TAG$ VARCHAR2(2000)<br>
      EMPNO VARCHAR2(4000)<br>
      ENAME VARCHAR2(4000)<br>
      JOB VARCHAR2(4000)</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">Our error logging table 
      contains an incrementing error counter, the error message, ROWID, error 
      type, tag (contains our user specified name from above -'test_load_20050718') 
      and the three columns of our table.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Let's select from the table. I have truncated the ORA_ERR_MESG$ column for readability 
  sake:</font></p>
<blockquote>
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SQL&gt; SELECT ora_err_number$, 
      ora_error_mesg$, emp_no FROM foot.dml_errors_emp_table;</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2">ORA_ERR_NUMBER$ ORA_ERR_MESG$ 
      EMP_NO<br>
      --------------- -------------------------------------------------- ------<br>
      1 ORA-00001: unique constraint (FOOT.SYS_C009069) violated&#133;..7521<br>
      2 ORA-00001: unique constraint (FOOT.SYS_C009069) violated&#133;.7566</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2"><br>
      We loaded one row and rejected two rows due to primary key constraint violations.</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  <b>Quick ASM Overview</b><br>
  Oracle10G R1 provides its own disk storage management system. Database administrators 
  are no longer required to use hardware vendor or third-party (Veritas, EMC, 
  etc) disk volume managers to provide striping and mirroring functionality. ASM 
  manages the raw disks within the Oracle database architecture. Administrators 
  are able to assign disks to disk groups, which can then be striped and/or mirrored 
  to provide high performance and high availability. During tablespace creation, 
  the administrator assigns the tablespace datafile to a disk group. This differs 
  from previous Oracle releases which required that datafiles be assigned to the 
  individual disks themselves.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>ASM Command-Line Utility 
  (ASMCMD)</b><br>
  Administrators are able to use 10G R2's new ASM command-line utility to administer 
  ASM environments. The command line utility provides all of the features and 
  functionality of its Enterprise Manager SGT (Sissy GUI Tool) counterpart.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G R2 ASM 3-Way Mirrors</b><br>
  ASM provides templates to facilitate the creation of database data files. ASM's 
  file template now has a switch for redundancy. If the attribute is set to HIGH, 
  ASM will provide 3-way mirroring.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>RMAN Backup Encryption</b><br>
  If you remember anything from this upcoming discussion on Oracle security, make 
  it the next sentence. Experienced hackers understand that they don't have to 
  gain access to the production database to get your data. The following information 
  is so important, that I think a quick deviation from our discussion on 10G R2 
  new features is justified.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Many hackers have a strong 
  understanding of the various support activities required to administer an Oracle 
  database. As a result, they often look for data in places that are traditionally 
  left unsecured. The listing below provides some of the areas that hackers look 
  for your data before they attempt to access your production database:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Output from hot and cold 
    database backups. We (and the hackers) know that database backups are exact 
    copies of your production database. It is a relatively easy process to find 
    the scripts that create the backups once the hacker is in your system.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> Oracle Export utility 
    output files. Oracle Export files can be easily transferred and loaded into 
    any Oracle database. The hacker can transfer the Export file to their machine 
    and have unlimited access to your data without having a connection to your 
    database. In addition, full database Exports contain all of the accounts and 
    passwords contained in the database. The hacker will be able to use that data 
    to identify the account/password combinations, which will provide them with 
    easy access to your production environment.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> QA, test, development, 
    reporting and disaster recovery databases. How many times have you been asked 
    to refresh these databases with production data? Once the data is refreshed, 
    they must then be treated as production and secured accordingly.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Using LOGMINER to scan 
    Oracle online and archived redo logs. Now that Oracle has provided us with 
    a quick and easy way to access data changes stored in the redo logs, these 
    files, and the LOGMINER utility also needs to be secured.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The UTL_FILE_DIR directories. 
    UTL_FILE_DIR is specified in the parameter file (which is often left unprotected) 
    and is used as the output directory for flat files created from PL/SQL stored 
    programs. Hackers are able to easily find the output directory and gain access 
    to the output files.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G R2 provides several 
  RMAN backup encryption features that will make it a lot harder for hackers to 
  use backups to gain access to sensitive data. There are three modes of backup 
  encryption now available:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Password Encryption - 
    The user is required to specify a password when executing RMAN backups and 
    restores. Oracle provides the syntax below to activate password protected 
    backups:</font> </li>
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2">SET ENCRYPTION ON IDENTIFIED 
      BY password ONLY </font></p>
  </blockquote>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Transparent Encryption 
    - To implement transparent encryption, users must first configure the Oracle 
    Encryption Wallet. Once the Oracle Encryption Wallet is configured, no further 
    DBA intervention is required to encrypt RMAN backups. Transparent encryption 
    is discussed later in this blog.</font></li>
</ul>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Dual-Mode Encryption 
    - Administrators have the choice of using either Password Encryption or Transparent 
    Encryption.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Transparent Data Encryption</b><br>
  Transparent is a good name for Oracle's new data encryption mechanism because 
  it allows users to encrypt data in columns without being forced to explicitly 
  manage encryption keys. The key management is automatically handled by the database. 
  Not being forced to activate encryption keys means that the data can be encrypted 
  and decrypted without developers being required to change the application code. 
  The key management is handled by the database and encryption occurs automatically 
  for users authorized to access the table. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">To protect the data, Transparent 
  Data Encryption encrypts data at the column level using the AES and 3DES standard 
  encryption algorithms. The encryption keys are stored in an external security 
  module. Each table has its own encryption key which is encrypted wth the database 
  master key. Both the database master and table key must be used to decrypt the 
  table's columns. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Reduced Privileges for 
  Connect Role</b><br>
  I wonder how many times grizzled DBA veterans have said &quot;Don't grant the 
  Connect role to users, it gives them too many privileges. Grant them Create 
  Session.&quot; to junior-level administrators. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle must have also been 
  listening because Oracle 10G R2 reduces the Connect role's privileges to one, 
  the CREATE SESSION privilege. Users granted the Connect role will no longer 
  have CREATE TABLE, CREATE VIEW, CREATE SEQUENCE, CREATE CLUSTER, 
  CREATE SYNONYM, CREATE DATBASE LINK, CREATE SEQUENCE, ALTER SESSION privileges 
  granted to them.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>RMAN Automatically Creates 
  Temporary Datafiles During Restore</b><br>
  Ever perform a restore and forget to recreate the temporary tablespace's data 
  files? I have. The database comes on-line but the first time a user's sort overflows 
  from memory to disk, an error code is returned. Recreating a database's temporary 
  files is one of those activities that are often overlooked. 10G R2 RMAN will 
  automatically recreate temporary datafiles belonging to locally managed temporary 
  tablespaces during the recovery operation.</font></p>
<p><b><font face="Arial, Helvetica, sans-serif" size="2">Restore Points</font></b><font face="Arial, Helvetica, sans-serif" size="2"><br>
  How many times have database recoveries been performed because of incorrect 
  changes made to database data? A user deletes or updates &quot;one too many 
  rows&quot; by mistake and the result is a time-consuming and error prone process 
  to restore and recover the database to a point-in-time before the error occurred. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's go back to my days 
  as an Oracle instructor&#133;. A common question in the Oracle DBA backup and 
  recovery class was &quot;why can't I just roll the database back to remove unwanted 
  changes instead of restoring the database from a backup and applying the redo 
  logs to roll forward to a point-in-time before the error occurred?&quot; The 
  question was invariably followed by &quot;don't you think that would be easier?&quot; 
  The answer was always the same &quot;yes, it would be easier, but the Oracle 
  database doesn't have that capability.&quot;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">That was before 9I's Flashback 
  feature came along.  Oracle9I allowed administrators to use before images stored in automatic undo tablespaces to undo changes made to tables. Pushing tables back in time was only dependent upon the amount of undo that was available (and whether any DDL changes were made between the current and destination times).    Oracle 10G improved upon this feature by introducing the Flashback Database.  Flashback Database allows the DBA to &quot;roll 
  back&quot; a table, set of tables or the entire database to a previous point-in-time using flashback logs. 
  Administrators often used a timestamp during the execution of flashback operations.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G R2 enhances Flashback 
  Database by allowing administrators to associate a user-defined name with a 
  point-in-time. The user-defined name, called a restore point, can be used in 
  place of a SCN or timestamp when executing a FLASHBACK TABLE or FLASHBACK DATABASE 
  statement. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">A SQL statement is used 
  to create the restore point which means it can be embedded in application programs 
  as well as executed on an as-needed basis in SQL*PLUS. The example below shows 
  the creation of a restore point:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2"> CREATE RESTORE POINT 
      batch_daily_cycle_complete;</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Now if I execute the following 
  statement:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2"> UPDATE gianteagle.employee_salary_table 
      SET<br>
      salary = 200000 WHERE empl_lname = 'FOOT';</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">My boss can execute this 
  statement to correct the 'mistake' (although I prefer to call it a fully justifiable 
  pay adjustment):</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2"> FLASHBACK TABLE gianteagle.employee_salary_table 
      TO batch_daily_cycle_complete;</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">10GR2 also provides guaranteed 
  restore points which ensure that the database can be flashed back to the point-in-time 
  they were created. Guaranteed restore points save disk space because only the 
  flashback logs required to meet the guaranteed restore point need to be retained 
  by the database. The statement below creates a guaranteed restore point:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2"> CREATE RESTORE POINT 
      batch_daily_cycle_complete GUARANTEE FLASHBACK DATABASE;</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Enterprise Manager Enhancements</b><br>
  If you have been reading this blog, you know that we have been spending a LOT 
  of time on Enterprise Manager. Well, 10G R2 has certainly added some important 
  enhancements that we must cover if we are going to call ourselves 10G R2 Certified 
  EMEs (Enterprise Manager Experts). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Rest assured that we will 
  be covering all of these enhancements in-depth in future blogs so I'll cover 
  them at a high-level for now. Think of the remainder of this blog as a preview 
  of upcoming blogs.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Enterprise Manager Statistics 
  Management Support</b><br>
  A new link titled 'Manage Optimizer Statistics' has been added to the database 
  administration home page in Enterprise Manager. Clicking on the link displays 
  the new Manage Optimizer Statistics home page. The new home page provides wizards 
  and templates that facilitate and automate optimizer statistics management. 
  In 10GR2 administrators are able to use Enterprise Manager to gather, restore, 
  delete, lock and unlock statistics </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Why would you want to lock 
  and unlock statistics? Let me describe one real-life example from a recent project 
  here at Giant Eagle. We have a warehouse system that contains an extremely volatile 
  table. Describing it as volatile is like stating the Titanic sprung a small 
  leak. Hundreds of thousands of rows are added and removed around the clock. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The level of activity is 
  based on the particular business process taking place. At any particular time, 
  the table can contain hundreds of thousands of rows and at other times it can 
  contain dozens. OK, so when do you generate statistics? If you run DBMS_STATS 
  at the same time each day, in most cases you would think you would get a predictable 
  set of statistics generated. Not so in this table's case. At one time you may get 
  hundreds of rows and other times you get hundreds of thousands of rows.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you are unlucky and generate 
  statistics on the table when it has hundreds of rows, access paths suffer when 
  the table grows to hundreds of thousands. So, we ran DBMS_STATS when we knew 
  the table contained numerous rows and never generated statistics on it again. 
  Problem is that we can no longer easily use the SCHEMA option for DBMS_STATS. 
  Freezing statistics on this table will allow us to use the SCHEMA option and 
  not generate statistics for selected tables.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Enterprise Manager Enhanced 
  Performance Monitoring</b><br>
  OK, let me start this section by stating that we are going to spend some dedicated 
  time learning this new feature in upcoming blogs. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G R2 EM provides the ability 
  to view user sesion activity historically. This historical information will 
  help administrators finally answer questions like &quot;a few of my programs 
  ran long two hours ago, can you find out why?&quot;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Other performance monitoring 
  enhancements include:</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Ability to compare specific 
    time periods of ADDM snapshot data. In the past, administrators were only 
    able to compare time periods using ADDM's regular snapshot intervals. 10G 
    EM R2 provides drop down menus that allow users to choose either snapshot 
    IDs or wall-clock times as input to snapshot data comparisons.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Administrators now have 
    the capability of running ADDM snapshots on demand.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">System-level and CPU-level 
    activity can be viewed for any duration in real-time, recent-time or historically.</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><br>
  I hoped you enjoyed these blogs on 10G R2 new features. Thanks for reading!<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G R2 New Features Part 2</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-07-21.4277544177</link>
                      <description>Oracle has recently announced that 10GR2 for Linux is available for download from their technical website. If you read my last blog, you will probably agree that this release has some pretty interesting and beneficial features. But there are a few more enhancements that we need to cover before we can call ourselves 10G R2 new features experts. So, let's forge ahead and continue our discussion on 10G Release 2. </description>
                      <pubDate>Fri, 22 Jul 2005 05:32:02 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Enhanced Commit</b><br>
  Before we discuss 10G R2's new Enhanced Commit Feature, a little background 
  information is in order. For all you Oracle gurus that know how a commit works, 
  please turn to the paragraph titled &quot;Oracle's New Commit Parameters.&quot;</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Commit Process</b><br>
  When a transaction commits, the server process places a commit record in the 
  log buffer and tells LGWR to perform a contiguous write of all the redo log 
  buffer entries up to and including the COMMIT record to the redo log files (not 
  the data files!). Oracle is now able to guarantee that the changes will not 
  be lost even if there is an instance failure. Please note that the flushing 
  of dirty data buffers to the data files is performed independently by DBWR and 
  can occur either before or after the commit. This could result in Oracle having 
  committed data on the redo log files but not on the data files.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>The Synchronization Process</b><br>
  If a failure occurs and the instance terminates abnormally, Oracle must restore 
  the database to a transaction consistent state just prior to the failure. The 
  database must remove all uncommitted data from the data files and replay all 
  changes committed and recorded in the redo log files but not recorded on the 
  data files (remember that a commit forces LGWR to flush, not DBWR). Oracle restores 
  the database to a transaction consistent state using roll forward and roll backward 
  processes.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Roll Forward Phase </b><br>
  The purpose of the roll forward is to apply all changes recorded in the log 
  files to the corresponding data blocks. Rollback/undo segments are populated 
  during the roll forward phase. A rollback/undo segment entry is added if an 
  uncommitted data block is found on the data files and no undo entry exists in 
  the rollback/undo segment. At the end of this phase, all committed data is in 
  the data files, although uncommitted data may still exist. The database is then 
  opened to allow user access to database data. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Roll Backward Phase</b><br>
  Oracle removes the uncommitted data by using the rollback/undo segments populated 
  during the roll forward phase or prior to the crash. Blocks are rolled back 
  when requested by the Oracle server or a user's server process, depending on 
  which process requests the block first. The database is therefore available 
  even while the roll backward phase is executing. Only those data blocks that 
  are actively participating in the rollback are not available. Total data synchronization 
  has now occurred.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Oracle's New Commit Parameters</b><br>
  10G R2's new COMMIT clause provides options that control how the redo stream 
  is written from the redo log buffer to the online redo log files. As a result, 
  it is really important that we fully understand these new parameters because 
  they affect the way Oracle commits data as we now know it. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In the past, we knew that 
  a COMMIT guaranteed that a transaction's data was safely stored in the database. 
  After 10G R2, this guarantee will depend upon the COMMIT statement options chosen 
  for that particular transaction. The end result is the data you think should 
  be in the database, might not be. Oh boy&#133; </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's take a look at 10G 
  R2's new COMMIT WRITE &lt;option&gt; clause: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">COMMIT WRITE WAIT; - 
    This is the default option. WAIT tells the COMMIT to function as it has done 
    in the past. The transaction will wait until LGWR posts a message back stating 
    that all redo changes were flushed from the redo log buffer to the online 
    redo log files on disk. If you issue a COMMIT with no other parameters, this 
    is the option that will be chosen.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">COMMIT WRITE NOWAIT; 
    - The transaction will continue processing without waiting for LGWR to post 
    a message back stating that all redo changes are on disk.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">COMMIT WRITE BATCH: - 
    Oracle will batch groups of COMMIT statements together and flush them to the 
    redo logs as a single unit. If you have batch jobs that commit too frequently, 
    this is a possible remedy. I would recommend that you first ask the developers 
    to change their code to increase the amount of work performed between commits 
    before you implement this option.<br>
    <br>
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">COMMIT WRITE IMMEDIATE; 
    - Notifies Oracle to flush the log buffer to the online redo logs immediately. 
    </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle provides the dynamic 
  system initialization parameter COMMIT_WRITE to conrtrol redo stream processing 
  at the database level.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Why would Oracle do this? 
  The answer is performance. Commit processing has a measurable impact on transaction 
  performance. One of the first questions a DBA asks (or should ask) when tuning 
  a long running batch job is how many updates are occurring between commits. 
  If the answer is &quot;after every record&quot;, a lengthy discussion on the 
  detrimental impact of performing too many commits is justified.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle provides the &quot;log 
  file sync&quot; wait event to allow administrators to monitor commit performance. 
  The wait is measured when Oracle foreground processes issue a COMMIT or ROLLBACK 
  statement and are waiting for LGWR to post a message back stating that all redo 
  changes are safely on disk. Oracle documentation on Metalink provides the following 
  information to help reduce the number of log file sync wait events.</font></p>
<blockquote> 
  <blockquote> 
    <p><font face="Arial, Helvetica, sans-serif" size="2"><i>&quot;If there are 
      lots of short duration transactions see if it is possible to BATCH transactions 
      together so there are fewer distinct COMMIT operations. Each commit has 
      to have it confirmed that the relevant REDO is on disk. Although commits 
      can be &quot;piggybacked&quot; by Oracle reducing the overall number of 
      commits by batching transactions can have a very beneficial effect.&quot;</i> 
      </font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">
  Notice that Oracle is recommending that users BATCH transactions together to 
  reduce the number of COMMIT statement operations. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Transportable AWR Snapshots</b><br>
  10G R2's Enterprise Manager allows administrators to transfer Automatic Workload 
  Repository snapshots to other 10G R2 workload repositories for offline analysis. 
  This is accomplished by the administrator specifying a snapshot range and extracting 
  the AWR data to a flat file. The flat file is then loaded into a user-specified 
  staging schema in the target repository. To complete the transfer, the data 
  is copied from the staging schema into the target repository's SYS schema. The 
  data in the SYS schema is then used as the source for the ADDM analysis.<BR><BR>If 
  the snapshot range already exists in the SYS or staging schemas, the data being 
  imported is ignored. All data in snapshot ranges that does not conflict with 
  existing data is loaded. 10G R2 contains a new package DBMS_SWRF_INTERNAL to 
  provide AWR snapshot export and import functionality. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">
  The example below exports a snapshot range starting with 100 and ending at 105 
  to the output dump file 'awr_wmprod1_101_105' in the directory '/opt/oracle/admin/awrdump/wmprod1':</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2"><br>
      BEGIN<br>
      DBMS_SWR_INTERNAL.AWR_EXTRACT<br>
      (<br>
      DMPFILE =&gt;'awr_export_wmprod1_101_105',<br>
      DMPDIR =&gt; '/opt/oracle/admin/awrdump/wmprod1',<br>
      BID =&gt; 101,<br>
      EID =&gt; 105<br>
      )</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">We then use the AWR_LOAD 
  procedure to load the data into our target repository staging schema:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2">BEGIN<br>
      DBMS_SWR_INTERNAL.AWR_LOAD<br>
      (<br>
      SCHNAME =&gt; 'foot',<br>
      DMPFILE =&gt;'awr_export_wmprod1_101_105',<br>
      DMPDIR =&gt; '/opt/oracle/admin/awrdump/wmprod1'<br>
      )</font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">The last step is to transfer 
  the data from our staging schema (FOOT) to the SYS schema for analysis:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2">BEGIN<br>
      DBMS_SWR_INTERNAL.MOVE_TO_AWR<br>
      (<br>
      SCHNAME =&gt; 'foot',<br>
      )<br>
      </font></p>
  </blockquote>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Transportable SQL Tuning 
  Sets</b><br>
  Administors are now able to transfer SQL Tuning Set workoads from one database 
  to another. This allows the administrator to transfer poorly perfoming SQL statements 
  to test systems where they can be safely analyzed and tuned. </font><font face="Arial, Helvetica, sans-serif" size="2">This 
  will prevent administrators from having to perform extended diagnostics on SQL 
  statements in their production environments.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> In addition, once a statement 
  is tuned, it must be rexecuted to determine if the tuning changes accomplished 
  their intended results. If the results don't match expectations, another round 
  of tuning and monitoring is warranted. Transporting the statements in bulk to 
  another database facilitates the monitoring and testing of multiple SQL statements.How 
  do you create a SQL Tuning Set? That will be the topic of one of my upcoming 
  blogs after we finish discussing 10G R2. I'll also show you how to move it to 
  another environment at that time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>DBMS_OUTPUT Line Length 
  and Output Limit Increases</b><br>
  Oracle provides the DBMS_OUTPUT package to display debugging information from 
  PL/SQL code. The package was not designed to display reports or format output 
  to standard output. But there are times when developers need to pump out large 
  amounts of diagnostic information to help them debug their programs. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">
  But developers using 10G R1 and earlier versions were frequently constrained 
  by DBMS_OUTPUT's 255 byte single line limit and total session limitation of 
  1 million bytes. As a result, when using SQL*PLUS to debug their PL/SQL code, 
  developers often received the following error messages:</font></p>
<blockquote> 
  <blockquote>
    <p><font face="Arial, Helvetica, sans-serif" size="2">ORA-20000: ORU-10028: 
      line length overflow, limit of 255 bytes per line<br>
      Single line limit of 255 bytes exceeded.</font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2"><br>
      ORA-20000: ORU-10027: buffer overflow, limit of 1000000 bytes<br>
      Maximum amount of 1 million bytes per session exceeded.</p> </blockquote>
</blockquote>
      10G R2 increases the single length line limit to 32,767 bytes and the overall 
      session limit is removed altogether.</font>
<font face="Arial, Helvetica, sans-serif" size="2">
  <p><b>Memory Corruption Checking</b><BR>
  Setting the DB_BLOCK_CHECKSUM system initialization parameter to TRUE notifies 
  DBWR to calculate a value based on the number of bytes in the block and store 
  that value in the cache header of every data block when writing it to disk. 
  This calculated number is called a checksum. Checksums are verified when the 
  block is read and is used by Oracle to detect corruption caused by the various 
  components of disk storage systems.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In Oracle 10G R2, administrators 
  can set DB_BLOCK_CHECKSUM to FULL to notify Oracle to verify the checksum as 
  it is being transferred from one memory construct to another (i.e. user session 
  to buffer cache). This improves Oracle's capability of identifying block corruptions 
  and is particularly useful when propagating blocks to standby databases.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Online Redefinition of 
  a Single Partition </b><br>
  Oracle9i introduced a feature that allows DBAs to perform complex table redefinitions 
  online. The DBMS_REDEFINITION utility allows users to change column names and 
  datatypes, manipulate data, add and drop columns and partition tables while 
  the table is being accessed by online transactions. DBMS_REDEFINITION provides 
  significant benefits over more traditional methods of altering tables that require 
  the object to be taken off-line during the redefinition process. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G R2 enhances DBMS_REDEFINITION 
  by providing it with the capability of redefining a single partition of a multi-partition 
  tablespace. One benefit that stands out is that administrators can now use DBMS_REDEFINITION 
  to move a single partition to a different tablespace while the data is being 
  updated. In addition, this enhancement allows a partition table to be redefined, 
  one partition at a time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Transportable Tablespace 
  from RMAN Backups</b><br>
  A new feature in Oracle8i provided a high-speed mechanism for copying tablespaces 
  (datafiles) between identical systems and allowing the same data to be accessed 
  by both systems. Now data movement could be as fast as simply transferring the 
  files between machines. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Transporting tablespaces 
  is particularly useful for: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Feeding data from OLTP 
    systems to data warehouse staging systems </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Updating data warehouses 
    and data marts from staging systems </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Loading data marts from 
    central data warehouses </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Archiving OLTP and data 
    warehouse systems efficiently</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">
  The Export and Import utilities are used to &quot;unplug&quot; and &quot;plug-in&quot; 
  the data dictionary structural information (metadata) that pertains to the objects 
  in the tablespace set being transported. The data is copied by operating system 
  commands and is only limited by network bandwith and hardware limitations. Since 
  the Export/Import utilities only transfer the metadata, they run much faster 
  than their more traditional counterparts. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The problem is that to &quot;unplug&quot; 
  the tablespace, it had to be taken offline first. This could be a problem for 
  applications that require 24 x 7 data availability. In 10G R2, administrators 
  are able to create transportable tablespaces using RMAN backups instead of the 
  online database datafiles. This allows the data to be moved without making it 
  read only in the source database.<br>
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Up Next<br>
  </b>In my final blog on 10G R2, we'll discuss DML error logging, ASM command 
  line, RMAN backup encryption, Transparent Data Encryption and a whole LOT more!</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G R2 New Features</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-07-16.1165649869</link>
                      <description>OK, here comes another "Stop the Presses" blog. I intended to discuss the SQL Tuning Advisor, but Oracle 10G R2 intervened. Since Oracle is currently publicizing all of the features contained in the latest and greatest release of its flagship product, I thought it would be appropriate to spend a few blogs discussing them. &lt;BR&gt;&lt;BR&gt;Rest assured, we will continue our discussion on the10G EM advisors once we have completed our review of 10G R2.</description>
                      <pubDate>Sat, 16 Jul 2005 06:33:57 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> </font><font face="Arial, Helvetica, sans-serif" size="2">These 
next few blogs will contain just a subset of Oracle10G R2's new features. I thought 
I would focus on the enhancements that provide the greatest benefit to the general 
DBA public. Because of space considerations, and to not turn our new feature discussion 
into the world's largest blogs, the topics will be initially covered at a high-level. 
That's the cool thing about blogs; I'll have lots of time in the future to discuss 
each feature in depth. If you have a feature you would like to highlight, please 
feel free to respond to this blog. That's what blogging is all about!</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Access Advisor</b><br>
  Since our last discussion was on the <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_07_06.5201081269">SQL 
  Access Advisor</a>, I thought that this would be an appropriate feature to start 
  with. You have to admit, the SQL Access Advisor is a pretty helpful tool. If 
  you read my last blog, you know that the SQL Access Advisor used to recommend 
  two types of indexes, B-Tree and bitmap. You can now add function-based indexes 
  to that list. The utility is now able to recommend the creation of all of the 
  major index structures available in Oracle. Once we get 10G R2 installed, I'll 
  provide you with our SQL Access Advisor test results. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Additional enhancements 
  to the SQL Access Advisor include:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The ability to quick 
    tune a single statement</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Users are able to create 
    templates to simplify the data capture and evaluation process</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The SQL Access Advisor 
    panels in 10G Enterprise Manager R2 now display recommendation and action 
    implementation statuses</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Segment Advisor</b><br>
  Administrators are able to use Oracle10G's Segment Advisor to identify candidates 
  for shrink operations. The advisor estimates the amount of unused space that 
  will be released when the shrink operation is run on the particular object. 
  A wizard is available that allows users to evaluate all objects in the database, 
  all objects in a specific tablespace or all objects owned by a particular schema. <BR><BR>
  The 10G R2 Segment Advisor has been enhanced to identify tables that suffer 
  from excessive row chaining and row migrations. Does this mean we can finally 
  put the SQL ANALYZE statement to rest?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Why </font><font face="Arial, Helvetica, sans-serif" size="2">should 
  we care about row chaining and row migrations? When a row is updated and becomes 
  too large to fit into its original block (due to insufficient free space), the 
  row is moved to a new block and a pointer is placed in the original block that 
  identifies the row's new home. This is called a row migration. So when you access 
  the row through an index, Oracle navigates first to the row's original block 
  and then follows the pointer to the block where the row is actually stored. 
  This means you are generating unnecessary I/O to access a migrated row. You 
  correct this by identifying the tables affected and reorganizing them. A row 
  chain occurs when a row is simply too long to fit into a single block. Oracle 
  will chain the row together on multiple blocks using pointers to connect the 
  chain's pieces. You solve this problem by increasing the block size or decreasing 
  the row's length. Most often you just have to live with row chaining.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In the past, we identified 
  row chaining and row migrations by reviewing the &quot;table fetch by continued 
  row&quot; output line in our STATSPACK reports and ran SQL ANALYZE statements 
  on the data objects on a regular basis. Remember DBMS_STATS does not populate 
  the CHAIN_CNT column in DBA_TABLES. If you want to populate that column, you'll 
  need to run the ANALYZE statement. But the CHAIN_CNT column is incremented for 
  both row chains and row migrations. How do you know which rows are chained and 
  which ones are migrated? <a href="http://asktom.oracle.com">Tom Kyte's website</a> 
  has an excellent discussion on this topic. Do a search on &quot;row chaining&quot; 
  to find it. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In 10G R2, the Segment Advisor 
  is automatically scheduled by Enterprise Manager to run during a predefined 
  maintenance window. The maintenance window is initially defined as follows:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Monday through Friday 
    - 10PM to 6AM</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Saturday 12:00 a.m. to 
    Monday morning at 12:00 a.m</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">The maintenance window's 
  default times can be changed to tailor it to an individual application's availability 
  requirements. </font><font face="Arial, Helvetica, sans-serif" size="2">The 
  Automatic Segment Advisor doesn't analyze all of the data objects in the database. 
  It intelligently selects them by identifying segments that are the most active, 
  have the highest growth rate or exceed a critical or warning space threshold.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Database Managed Undo 
  Retention Time Period</b><br>
  In Oracle9i, administrators had their choice of continuing to manage rollback 
  segments on their own (manual undo management) or configuring the database to 
  manage its own before image data (automatic undo management). Oracle refers 
  to system managed before image segments as undo segments. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You didn't have to be an 
  Oracle expert to know that manual rollback segments were &quot;somewhat troublesome.&quot; 
  Out of space conditions, contention, poor performance and the perennial favorite 
  &quot;snap shot too old&quot; errors had been plaguing Oracle database administrators 
  for over a decade. Oracle finally decided that the database could probably do 
  a better job of managing before images of data than we could. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But implementing automatic 
  undo retention didn't necessarily guarantee users a trouble free undo environment. 
  There really is only one parameter that administrators can tweak in a system 
  that uses automatic undo. The UNDO_RETENTION parameter specifies the amount 
  of time in seconds that Oracle attempts to keep undo data available. Setting 
  this parameter to the appropriate value could be described as more of an art 
  than a science. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Set it too low and you are 
  wasting disk space. In addition, you aren't taking advantage of being able to 
  flashback your data to as far back as the disk space allocated to the undo tablespace 
  allows. Set it too high and you are in danger of running out of freespace in 
  the undo tablespace.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G R2 comes to the rescue! 
  The database now collects undo usage statistics, identifies the amount of disk 
  space allocated to the undo tablespace and uses that information to tune the 
  undo retention time period to provide maximum undo data retention. Administrators 
  can determine the current retention time period by querying the TUNED_UNDORETENTION 
  column of the V$UNDOSTAT view.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Database Managed Multiblock 
  Read Count</b><br>
  The DB_FILE_MULTIBLOCK_READ_COUNT parameter determines the number of blocks 
  that will be read in a group (called a multiblock prefetch). Multiblock prefetching 
  is usually invoked when a sequential scan of blocks is needed, such as a full 
  table scan or index fast full scan. Prefetching groups of blocks reduces the 
  I/O overhead associated with scans because multiple blocks become available 
  in a single read request. Setting this value correctly can significantly improve 
  database performance. 10G R2 collects information on the operating system optimal 
  I/O size and the size of the data buffer cache to automatically tune the DB_FILE_MULTIBLOCK_READ_COUNT 
  parameter for optimal multiblock prefetch performance.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Size-Based Tablespace 
  Freespace Alerts</b><br>
  If you have read some of my past blogs, you know that we have several large 
  data warehouses here at Giant Eagle. Tables having 3, 4, 5 billion rows and 
  dozens and dozens (and dozens) of partitions are common. Some of our tablespaces 
  have hundreds of GIGs of disk space allocated to them. Setting the free space 
  alerts to 85% for warning and 90% for critical on these tablespaces led to us 
  getting paged on out-of-space conditions when a substantial amount of free space 
  was still available. 10G R2 remedies this problem by allowing administrators 
  to also set warning and critical thresholds in absolute values (megabytes) of 
  disk free space available. This is one feature that we will be implementing 
  ASAP. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Enterprise Manager Direct 
  SGA Attach</b><br>
  Have you ever had a database workload get out of control on you? You know, the 
  kind of workload that consumes so many resources that you can't even log in 
  to see what programs are running amok? The kind of workload that makes your 
  UNIX admin's alarm page light up like a Christmas Tree? Enterprise Manager now 
  provides screens that attach to the SGA and access statistics directly from the 
  shared memory areas. No SQL statements are issued or required. This feature facilitates the problem determination process 
  for slow and hung systems by allowing DBAs to access diagnostic information 
  that would be otherwise unavailable. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Dropping Empty Datafiles</b><br>
  If you have ever added a datafile to the wrong tablespace or created it in the 
  wrong directory structure, you know what a pain it was to correct the problem. 
  The data usually had to be taken offline to correct the error. In addition, 
  any time you move data around you potentially expose it to additional risks 
  (personally, the less I have to juggle data around the safer I feel).</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G R2 provides an easier 
  way to fix this mistake by allowing users to drop empty tablespace datafiles. 
  The command below drops a datafile from tablespace TESTTBS1:</font></p>
<blockquote> 
  <p><font face="Arial, Helvetica, sans-serif" size="2">ALTER TABLESPACE testtbs1 
    DROP DATAFILE 'c:\oraclass\oradata\u06\testtbs1_empty_file_01.dbf'</font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you attempt to drop a 
  datafile that contains data, Oracle will return an error message notifying you 
  of your</font><font face="Arial, Helvetica, sans-serif" size="2"> mistake. In 
  addition, you can't drop the last datafile in a tablespace (drop the tablespace 
  instead) and the tablespace is required to be online and have a status of read/write.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>V$SQLSTATS Performance 
  View</b><br>
  Before we discuss the new V$SQLSTATS view, let me deviate for a minute to provide 
  you with some quick SQL tuning advice. V$SQLAREA is one of my favorite SQL tuning 
  views. I use the two queries below to identify poorly performing SQL. I take 
  the traditional &quot;top down&quot; tuning approach and start tuning the highest 
  resource consuming SQL idenfified by the scripts below. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The following query dentifies 
  the SQL responsible for the most disk reads:</font></p>
<blockquote>
  <p><font face="Arial, Helvetica, sans-serif" size="2">SELECT disk_reads, executions, 
    disk_reads/executions, hash_value, sql_text FROM v$sqlarea WHERE disk_reads 
    &gt; 5000 ORDER BY disk_reads;</font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">The following query dentifies 
  the SQL responsible for the most buffer hits:</font></p>
<blockquote>
  <p><font face="Arial, Helvetica, sans-serif" size="2">SELECT buffer_gets, executions, 
    buffer_gets/executions, hash_value, sql_text FROM v$sqlarea WHERE buffer_gets 
    &gt; 100000 ORDER BY buffer_gets;</font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">You can create a more readable 
  report in SQLPLUS by inserting report breaks between the output lines. To generate 
  the report breaks in SQLPLUS, issue the following statement before running the 
  query:</font></p>
<blockquote>
  <p><font face="Arial, Helvetica, sans-serif" size="2"> BREAK ON disk_reads SKIP 
    2 --- for the disk read report and<br>
    BREAK ON buffer_gets SKIP 2 --- for the buffer get report</font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">It's common knowledge that 
  poorly performing SQL is responsible for the majority of database performance 
  problems. The first query returns SQL statements responsible for generating 
  disk reads greater than 5,000 while the second query returns SQL statements 
  responsible for generating buffer reads greater than 100,000. These are good 
  numbers to start with and you can adjust them according to the size of the system 
  you are tuning. You'll notice that I divide the number of disk and buffer reads 
  by the number of statement executions. If a statement is generating 1,000,000 
  disk reads but is executed 500,000 times, it probably doesn't need tuning. Heavy 
  disk reads per statement execution usually means a lack of proper indexing. 
  Heavy buffer reads usually means the exact opposite - indexes are being used 
  when they shouldn't be. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But the SQLTEXT column in 
  V$SQLAREA does not provide the entire text of the SQL statement. That's why 
  I include the HASH_VALUE column in the report. I can use that value to dump 
  the entire SQL statement from V$SQLTEXT using the statement below (where xxxxxxxx 
  is the value in the HASH_VALUE column from the V$SQLAREA reports above):</font></p>
<blockquote>
  <p><font face="Arial, Helvetica, sans-serif" size="2">SELECT sql_text FROM v$sqltext 
    WHERE hash_value = 'xxxxxxxxx' ORDER BY piece;</font></p>
</blockquote>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle 10G R2 provides a 
  new view called V$SQLSTATS that contains a combination of columns that appear 
  in V$SQL and V$SQLAREA. The benefits that V$SQLSTATS provides are as follows:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Since V$SQLSTATS contains 
    the entire text of the SQL statement AND its associated performance statistics, 
    we are no longer required to access both the V$SQLTEXT and V$SQLAREA to obtain 
    the information we need.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Oracle states that V$SQLSTATS 
    is faster and more scalable.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The data in V$SQLAREA 
    has a tendency to get its contents flushed out just when you need to get additional 
    information from it. The V$SQLSTATS view provides users with a longer access 
    window. That I'm sure I'll like.<br>
    </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading my first 
  blog on 10G R2! Look for Parts 2 and 3 to come soon.<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G SQL Access Advisor</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-07-06.5201081269</link>
                      <description>OK, let's continue our review of 10G Enterprise Manager's Advisors.  In this blog, we turn our attention to the SQL Access Advisor (not to be confused with the SQL Tuning Advisor which is a totally different tool).    We'll begin by reviewing the benefits that the SQL Access Advisor provides and finish with a quick demo of the tool.</description>
                      <pubDate>Thu, 07 Jul 2005 05:18:28 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2">If you had to answer the 
  following question: "What two types of database objects have the greatest impact 
  on performance?" How many of you would answer "indexes and materialized views?" 
  You could add my name to that list. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Indexes</b> <br>
  Generally, the fastest way to access Oracle data is with an index. Oracle's 
  bitmap and B-Tree indexes are designed to provide complementary performance 
  functionality. While standard B-tree indexes perform best with key columns containing 
  a high number of different values (good selectivity), bitmap indexes work best 
  with columns that have a limited number (poor selectivity) of possible values.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> Both types of indexes contain 
  an entry for each value that appears in the indexed column(s) of the table and 
  a pointer that provides direct, fast access to rows in that table. The key to 
  good B-Tree index performance is to build the index on columns having good selectivity. 
  Oracle is able to quickly bypass rows that do not meet the search criteria when 
  searching through indexes built on columns having a high degree of selectivity. 
  Conversely, bitmap indexes perform better when the selectivity of an index is 
  poor. A bitmap index is a set of multiple bitmap structures containing a series 
  of bits. If the bit is on, the corresponding row has that value. If it is off, 
  the row does not. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Materialized Views</b> 
  <br>
  In releases previous to Oracle8i, administrators used summary tables to increase 
  SQL performance for data warehousing applications. A summary table stores the 
  pre-computed results of data calculations, such as sums, counts, averages and 
  data table joins. It is more efficient to access a pre-computed result instead 
  of computing the desired result from detail data every time a query is executed. 
  In Oracle8i and later releases, administrators are able to use materialized 
  views to provide the same benefits as summary tables. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">An example that Oracle often 
  uses in its materialized view demos is the sales-per-region-per-month materialized 
  views. When a SQL statement is executed that calculates all sales for the Eastern 
  region for the first quarter, the Oracle database will not calculate the total 
  sales from individual sales detail records. Oracle will use the query-rewrite 
  feature to rewrite the query to retrieve the summarized data from the sales-per-region-per-month 
  materialized view. Because the optimizer automatically rewrites the query to 
  use the summarized data, the use of the materialized view is entirely transparent 
  to the end-user. No SQL or application changes required. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Introducing the SQL Access 
  Advisor</b><br>
  </font><font face="Arial, Helvetica, sans-serif" size="2"> In the old days, 
  when DBAs were DBAs (we actually had to take data offline to administer it - 
  I know that's hard to believe), we had to create indexes and materialized views 
  the old fashioned way. We interviewed the application developers to determine 
  what columns they were using to access the data, what tables they were joining 
  together and what types of summary calculations they were performing. We then 
  went back to our desks and began building database objects to improve performance. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Well, you no longer have 
  to do that… Just kidding! You still have to do that but the SQL Access advisor 
  is another tool in your toolbox that will help you obtain "maximus database 
  performis". The SQL Access Advisor is not a replacement for old-fashioned DBA 
  grunt work. You must still interview the developers to determine how they access 
  and summarize the data and tune SQL by creating indexes. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Access Advisor Output</b><br>
  The SQL Access Advisor recommends a set of materialized views and indexes based 
  on a supplied workload input. The tool can also help administrators optimize 
  materialized views to take advantage of fast refresh and query rewrite capabilities. 
  In addition, the SQL Access Advisor may recommend dropping indexes and materialized 
  views that aren't being used. The SQL Advisor ranks and groups the recommendations 
  based on the positive impact they will have if implemented. The recommendations 
  can range from simple suggestions to the creation of complex objects such as 
  materialized views and materialized view logs. Like most output generated by 
  the advisors, the data is stored in the repository, which allows it to be viewed 
  until it expires and is removed. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Access Advisor Input</b><br>
  The input workload can consist of SQL statements currently in the SQL Cache, 
  a user defined set of SQL statements contained in a workload table or an OEM 
  generated SQL Tuning Set. The SQL Access Advisor 
  is also able to generate a hypothetical workload for a specified schema. The utility can be invoked from the Advisor Central home page or from the 
  DBMS_ADVISOR package. Since we are discussing 10G Enterprise Manager's tuning 
  toolsets, we'll focus our discussion on invoking it from Oracle's "sissy GUI 
  tool". </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Please remember that the 
  quality of the output will depend upon the quality of input.  Make sure that the tables and indexes 
  being accessed have up-to-date statistics. You do this by generating statistics 
  using the Oracle supplied package DBMS_STATS. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Using the SQL Access 
  Advisor</b><br>
  The SQL Access Advisor can be accessed from 10G Enterprise Manager's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/advisor_central_main_4.gif">Advisor 
  Central home page</a>. The home page allows administrators to access all of 
  the advisors that are available in 10G Enterprise Manager. The Advisor Tasks 
  section of the page displays output from advisor executions.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> I clicked on the SQL Access 
  Advisor link to activate the wizard. 10G Enterprise Manager displayed the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/access_advisor_home.gif">SQL 
  Access Advisor: Workload Source page</a> that allows users to specify the workload 
  input. As stated previously, the administrator can choose from one of the following 
  workload inputs: SQL currently residing in the SQL cache, SQL from a predefined 
  SQL Tuning Set (more on this in a later blog), SQL contained in a user-defined 
  table or a hypothetical workload based on a set of tables contained in a particular 
  schema. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I decided to use the SQL 
  currently residing in the SQL cache as the workload input. When I clicked next, 
  10G EM displayed the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/access_advisor_recommendations_2.gif">SQL 
  Access Advisor: Recommendation Options page</a>. This page allows users to choose 
  the objects that will be recommended (index, materialized views, both). The 
  user is also able to choose the depth of the analysis to be performed, specify 
  if space should be used as a determining factor when generating the recommendations, 
  how the results will be sorted and the schema and tablespaces that will be used 
  when the tool generates the DDL recommendations.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> When I click Next, 10G 
  Enterprise Manager displays the<a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/access_advisor_schedule_3a.gif"> 
  SQL Access Advisor: Schedule page</a>. This page allows users to specify when 
  to run the advisor and if the job should be repeated on a regular basis. I chose 
  to use the Standard option from the drop down menu titled "Schedule Type". The 
  SQL Access Advisor also allows users to choose from predefined time-period windows. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The last page that is displayed 
  is the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/access_advisor_review_4.gif">SQL 
  Access Advisor: Review page</a> that allows users to perform a final review 
  of the options they chose. Hitting the Submit button asks 10G Enterprise Manager's 
  job scheduler to run the job based on the scheduling options chosen.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you chose the comprehensive 
  option, the SQL Access Advisor will take some time to generate the recommendations. 
  During my test, I checked the amount of resources the utility consumed on the 
  database server using 10G EM and the NMON operating system monitoring tool. 
  Although the resources the utility used were noticeable, the impact was not large enough for me to become concerned . The affect it has on your system will depend upon your hardware 
  platform's CPU and memory configuration and the workload used as input. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">When the job completes, 
  10G Enterprise Manager displays the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/acess_advisor_output_1.gif">Summary 
  Output page</a> that sorts recommendations according to their benefit. Clicking 
  on the number on the far left side of the tabular output drills down into the 
  specific recommendation. Notice that this execution has generated over 5,000 
  recommendations. Needless to say, I will be concentrating on the top few recommendations. <br><br>  I did notice that when I clicked on the report, 10G EM began to access the target database server.  I assume this is to update some information required by the report.  Once again, the resources used were noticeable but nothing that would cause me concern.  The problem I created was when the page didn't load fast enough for me.  I became impatient and started "clicking around" (don't tell me you have never done this yourself) which generated an additional workload on the target database.  I think I hit the browser's BACK button and then clicked on the report's link one too many times. The workload became more and more noticeable until I came to the conclusions that I had better 1) stop clicking around and 2)kill some of my connections.   Once I terminated my connections, I went back into the tool and clicked on the report ONCE.   I let the report run and things were fine.  I have accessed the report several times since then to test performance and have experienced no problems.
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I continued reviewing the 
  output by clicking on the recommendation ID link titled "7". 10G Enterprise 
  Manager displayed the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/acess_advisor_output_2.gif">Recommendation 
  Details page</a>. This page displays links for the specific objects that will 
  be created if the recommendation is implemented. The bottom of the page displays 
  the SQL statements that will be improved by the recommendation. Notice that 
  the output DDL uses the table schema as default if none is specified. The page 
  also displays the space that will be consumed if the object is created. Finally, 
  users can hit the OK button to begin creating the recommended objects or save 
  the DDL for execution at a later time. When you click on the materialized view 
  link, 10G Enterprise Manager <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/acess_advisor_output_3.gif">displays 
  the DDL</a> for the recommended object. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Like all output generated 
  by the 10G EM advisors, the results can be viewed on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_07_065201081269/advisor_central_5.gif">Advisor 
  Central home page</a> until it reaches it reaches its expiration date and is 
  deleted.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> I hope you enjoyed our 
  review of 10G EM's SQL Access Advisor. As I stated previously, although the 
  tool helps administrators improve the performance of their databases, it should 
  only be used in conjunction with proper DBA tuning practices. </font> </p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Automatic Database Diagnostic Monitor (ADDM)</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-06-30.3614041361</link>
                      <description>OK, now that I’ve given you a “brief” overview of the 10G Grid Control advisor toolsets, let’s start our in-depth discussions of them by reviewing Oracle’s Automatic Database Diagnostic Monitor (affectionately known as ADDM). &lt;BR&gt;&lt;BR&gt;
Once I cover all of the advisors, we’ll review what we have learned and then apply our newfound knowledge by running through a couple of performance tuning scenarios. 
</description>
                      <pubDate>Thu, 30 Jun 2005 19:01:21 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"><b>AWR and Statspack Snapshots</b><br>
Oracle's ADDM utility uses information stored in the Automatic Workload Repository (AWR) as input.  For those readers that are familiar with Statspack, you can loosely equate AWR's Snapshot style of information gathering 
to its Statspack predecessor. The Statspack utility is a set of SQL, PL/SQL and 
SQL*PLUS scripts that collect, store and report on Oracle database performance 
statistics. The utility stores the statistical information in permanent tables, 
which allows the data to be used for after-the-fact performance analysis as well 
as performance trending. The administrator collects performance information by 
running data captures called Snapshots. Snapshots record key statistics, high 
resource consuming SQL statements and wait events. Administrators run the Snap in SQLPLUS, which can be scheduled to run on a regular basis by using Oracle Enterprise Manager or a job scheduler. To report on this information, 
users run an Oracle supplied script that prompts them for beginning and ending 
Snapshot IDs. Oracle then displays performance information, which can be spooled 
to an output file in SQLPLUS. Since the information is stored in permanent tables, 
the information is available to be viewed at any time. </font> <br>
<br>
<font face="Arial, Helvetica, sans-serif" size="2"><b>ADDM on Automatic</b><br>
ADDM follows the same Snapshot premise. By default, AWR Snapshots occur every 60 minutes.  After the AWR Snapshot is executed, the Automatic Database Diagnostic Monitor is triggered to analyze the information contained in the AWR for the period pertaining to the last two Snapshots.  If ADDM requires additional information to make a decision, it will activate other 
advisories to gather more information. ADDM's output includes a plethora of reports, 
charts, graphs, heartbeats and related visual aids. In general, ADDM provides 
users with a top-down analysis of performance bottlenecks and their associated 
resolutions. This information can be sent by ADDM to the various database targets 
as alerts and recommendations. Oracle recommends that DBAs review ADDM output 
first when performing performance problem analysis.</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Manually Executing ADDM 
  </b><br>
  Administrators are also able to execute ADDM manually. Administrators specify 
  start and end times on the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/create_addm_task.gif">ADDM 
  Task Page</a> to ask ADDM to generate performance information for the selected 
  time period. You'll notice that the ADDM Task Page also displays a chart showing 
  information on the number of sessions, resource utilization and waits.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The administrator clicks 
  OK to tell ADDM to begin the analysis process. Once the analysis is complete, 
  10 Enterprise Manager displays the findings at <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/bottom_addm_task.gif">the 
  bottom of the ADDM Task Page</a>. The listing of findings is categorized (on 
  the far right side of tabular display) and each recommendation is actually a 
  link that allows the user to drill down to more specific information pertaining 
  to that finding. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>ADDM Output</b><br>
  </font><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the recommendation 
  link titled &quot;The buffer cache was undersized causing significant additional 
  I/O&quot;. 10G Enterprise Manager displayed a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/performance_findings_buffercache.gif">Performance 
  Finding Details Page</a> that provides more information on that particular recommendation. 
  You'll notice that there is a navigation button that says &quot;Implement&quot;. 
  Be very careful when you hit this button. Depending on the type of recommendation, 
  10G Enterprise Manager may not prompt you again. Look at the bottom of the page. 
  ADDM displays a Findings Path that provides you with some of the information 
  it used to make its decision.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I continued my investigation 
  by clicking on the recommendation link titled &quot;SQL statements consuming 
  significant database time were found&quot;. Considering this is a large data 
  warehouse database, this shouldn't surprise anyone. 10G Enterprise Manager displayed 
  another <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/performance_findings_sql.gif">Performance 
  Finding Details Page</a> that provides more specific information on the selected 
  recommendation. The page displays the SQL text of the statement and provides 
  a navigation button that allows the user to activate the SQL Advisor Utility. 
  We'll discuss the SQL Advisor in an upcoming blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Clicking on the SQL text 
  takes the user to a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/sql_details2.gif">SQL 
  Details Page</a> which shows the entire text of the SQL statement being reviewed. 
  In addition, 10G Enterprise Manager also displays navigation tabs that allows 
  the users to view the statement's execution plan, current statistics, execution 
  history and tuning history. Once again, 10G Enterprise Manager provides a navigation 
  button that allows the user to activate the SQL Advisor Utility.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You should have quickly 
  come to the conclusion that ADDM provides different functionality, information 
  and navigation paths based on the recommendation being reviewed. That's exactly 
  as it should be. Pretty neat! </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you would like to see 
  a <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/base_report2.gif">text 
  version of the recommendations</a>, navigate back to the ADDM Task Page that 
  displays the performance findings. Don't navigate too far back or you'll go 
  back to the first page where you specified the start and end times to analyze. 
  Navigate to the page that contains the recommendation summary and click on the 
  &quot;View Report&quot; link to see a text version of the recommendations and 
  the &quot; View Snapshots&quot; link to see the information ADDM used as input.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you navigate back to 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_303614041361/addm_tasks_display.gif">Advisor 
  Central Page</a>, you'll find a listing of jobs including the ADDM task I just 
  executed. As you can see based on the information displayed on the right side 
  of the screen, I have 30 days to view the report before it is automatically 
  removed by ADDM.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Saving Performance Statistics</b><br>
  It is important to note that the performance information used as input by ADDM 
  is stored in the Automatic Workload Repository. AWR snapshots are purged automatically 
  by MMON every night. MMON, by default, tries to keep one week's worth of AWR 
  snapshots available. If AWR detects that the SYSAUX tablespace is in danger 
  of running out of space, it will free space in SYSAUX by automatically deleting 
  the oldest set of snapshots. If this occurs, AWR will initiate a server-generated 
  alert to notify administrators of the out-of-space error condition. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Administrators are able 
  to manually adjust the amount of information retained by invoking the MODIFY_SNAPSHOT_SETTINGS 
  PL/SQL stored procedure and specifying the RETENTION parameter input variable. 
  So if you want to retain your performance information longer than the default 
  setting allows, you'll need to ensure your SYSAUX tablespace has sufficient 
  space and run the MODIFY_SNAPSHOT_SETTINGS PL/SQL stored procedure. Please turn 
  to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_06_02.0384701461">&quot;Advisory 
  Framework - 10G Common Manageability Infrastructure&quot;</a> for more information 
  on 10G Enterprise Manager's Automatic Workload Repository and the SYSAUX tablespace.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I stated at the beginning 
  of this blog that we could loosely equate ADDM to Statspack. The snapshot mechanism 
  is pretty close but the similarities soon end there. Statspack's reporting script 
  dumps the information into a spooled SQPLUS output file. ADDM provides intelligent 
  recommendations and allows you to activate additional advisors when necessary. 
  Oracle states that there are hundreds of years' worth of experience in the recommendations 
  provided by ADDM. Considering this is the first iteration of this tool, I can't 
  wait to see what future releases offer. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next up</b><br>
  We'll turn our attention to the 10G Enterprise Manger's SQL Access Advisor.<br>
  </font><font face="Arial, Helvetica, sans-serif"> </font> </p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>A Quick Blog about the Author</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-06-20.6982554476</link>
                      <description>I’ve been writing this blog for a while now.   I have received a fair number of questions about my background.   So I thought I would spend a few minutes in one blog discussing my “body of work” to date.  Rest assured I won’t make this a habit.  Mainly because I’m not that interesting.   We’ll then get back on topic and continue our discussion on the 10G EM advisors.</description>
                      <pubDate>Mon, 20 Jun 2005 06:31:16 -0500</pubDate>
                              
      <content:encoded><![CDATA[Most of my blogs break the cardinal rule of blogging.  They aren’t short and don’t contain a few tidbits of information.  Well, blogs are also supposed to be personal and I have always been grammatically long-winded by nature. My co-workers are lucky it only affects my writing and not my verbal communications.  Although my writing style does drive my boss nuts.   He  often states “can you quit writing me 8 paragraphs and just come and TALK?” <BR><BR>

A lot of blogs provide you with the author’s opinion on non-technical as well as technical issues.  We’ll leave that to the other bloggers out there.  I’m happy with remaining on the topic at hand – Oracle10G.  As I said, I’ll digress for one blog. <BR><BR>

I have been working with Oracle for over 15 years now. I have bought it, sold it, learned it and taught it.  I am currently the author of over three-dozen articles on Oracle technologies and have spoken multiple times at both the International Oracle Users Group (IOUG) and Oracle’s Open World. <BR><BR>

I have held many jobs during my career; I started as a COBOL programmer 20 some years ago.  During the past 20 years, I have worked as a database administrator, database architect, alternative architecture specialist, high-priced Oracle consultant, Oracle certified trainer, and finally, database team lead at Giant Eagle.  Great job for a great company. <BR><BR>

I began my career working as a database administrator at Mellon Bank. For ten years at Mellon, I served as a DBA and later as the bank’s Client Server Systems Architect. During my tenure at Mellon, I was responsible for helping to create Mellon’s support infrastructure for all non-mainframe database applications.  As a result, Mellon was asked by the Oracle Corporation to participate in Oracle’s Showcase Environment program in August of 1996.  Hey, it was easy.   I just applied mainframe quality control processes and principles to our non-mainframe systems.  <BR><BR>

I continued my career at Alcoa and became Alcoa’s Database and Server Architect in April 1998. I was responsible for worldwide database software and hardware server strategies at a corporate level, reporting to Alcoa’s Chief Technology Officer (CTO) and Chief Information Officer (CIO).  <BR><BR>

I have always been interested in training.  During my entire 20 year career in the trenches, I have always had another part-time career in some facet of education.   Over the years I have developed Oracle and DB2 database training curriculum for several companies, including Platinum Technologies and KCS Inc. At Platinum, I was responsible for creating their entire Oracle curriculum including classes on general administration, backup/recovery, database tuning and several SQL and PL/SQL courses.   That career lasted until Platinum was bought, more like “borg’d”, by Computer Associates.  Ahhhh,  CA – gotta love them (I think).   <BR><BR>

I finally merged both careers when I became a certified Oracle Instructor and senior database consultant for Contemporary Technologies Inc. Contemporary Technologies Inc. was an Oracle certified training center and a member of the Oracle Approved Education Center (OAEC) program. <BR><BR>


Part of my job at CTI was to perform database audits.  I evaluated database environments on key database disciplines (performance, security, reliablity, ease-of-administration, recoverability).  Its funny, you just can’t believe what goes on at some shops until you’re a consultant.  I loved logging on to systems and seeing everyone with DBA authority and jobs running in the system named BOB1, BOB2, BOB3, BOBFIXIT…  You also can’t believe how many times I had to say “Your current strategy of copying database files while they are active and the database isn’t in ARCHIVELOG mode is not correct.”  Or “No, you can’t do a full database Import and then use the redo logs to roll the database forward to the current point-in-time.” <BR><BR>


I received my Senior Oracle Instructor title in 1999, which allowed me to certify my fellow instructors.   I was very proud to have the title “trainer of trainers.”   The greatest accomplishment in my career came was when I was awarded the OAEC Quality Achievement Award. These awards are given to the top 4 instructors in the OAEC program. Like most instructors, I took my teaching responsibilities seriously.  It was my job to ensure that all students taking my classes were prepared for the challenges that faced them. I tried to impart 15 years of tips, tricks and techniques so that my students didn’t make the same mistakes I did.<BR><BR>

If you believe the adage "we all learn from our mistakes", then you can truly classify me as an Oracle expert. My classes were often described as an Oracle “boot camp” (actually it is more like “Foot camp”) because I ran the classes hard.  Minimal breaks and long days were common (10 to 12 hours per day). I didn’t want to end class thinking I did my students an injustice by not giving my all.  Kind of like these blogs, don’t you think?    Although some of my students looked like they were going to kill me if I said the word Oracle one more time during the last day or two of class.  I miss education.  That's one of the reasons why I write this blog.  Makes me feel like I'm still trying to contribute.<BR><BR>

I am a frequent lecturer on the database circuit and have given over a dozen speeches to local, national and international Oracle User Groups. In addition, I have been a guest lecturer for the Master’s Program at Duquesne University. I was a featured speaker at three international Oracle User Groups, and four Oracle Open Worlds. At Oracle Open World, I spoke to a group of more than 700 and was asked to provide an encore presentation on database tuning.  <BR><BR>

I think I can easily write a book on what not to do when giving presentations.   One – don’t drink a carbonated beverage when you’re wearing a tie mike (trying to stifle a burp doesn’t work well).  During one of my presentations I leaned on the podium when I began my speech and quickly found out that it was on wheels.  I lost my balance and the podium and I were quickly heading for the end of the raised stage. By the time we reached the end of the stage, I was easily doing 20 MPH.   It was good luck for everyone involved that the people in the first row were quick enough to put their hands up to catch me or I would have landed directly on top of them.  They kind of looked like the people in the old movies just before they get stomped on by Godzilla. I also had a speaker before me leave with the tie mike I was supposed to use.   This forced me to give an entire speech bent over.   I had no choice, I was attached to a 4 ½ foot mike cord and I’m over four feet tall.  I couldn’t straighten up for the rest of the day. <BR><BR>

I am currently is the author of over thirty articles for a variety of magazines including DBAZine, Database Programming & Design, The Data Administration Newsletter, and Edge- The Database Survival Guide.   I have also written one book titled "The OCP Instructors Guide for DBA Certification."</a><BR><BR>

On a more personal note, here’s <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_206982554476/screen8.jpg"> an image of everything that I am interested in.</a> It’s the desktop’s background on all of my computers. My wife has beat cancer twice which is why I don't sweat the details as much as I used to. I built all of those decks myself.  They aren’t exactly straight or square but they look OK…   My interests (besides friends and family) are dogs, cars and growing roses…  You could describe me as an absolute car maniac.  My house has more car stuff than most dealerships.  Like my carpentry skills, I am only a fair mechanic but I get by.  The newest addition to the family is Abigail, an English Mastiff pup. <BR><BR>

Ok, back to Oracle 10G! 
 ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>An Overview of 10G Advisors</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-06-10.8609363343</link>
                      <description>In my last blog, I presented a quick overview of 10G Enterprise Manager’s database performance monitoring capabilities.    Oracle’s latest release also contains numerous enhancements to Enterprise Manager’s advisor utilities.  This blog contains a high level overview of the various advisors available in 10G Grid Control.   In subsequent blogs, we’ll take an in-depth look at each one of them to see exactly what benefits they offer.</description>
                      <pubDate>Fri, 10 Jun 2005 17:00:31 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2"> When you first begin using 
10GEM, it becomes clear that Oracle's direction is to continue the automation 
of day-to-day database administration activities. Where this automation will lead 
is a matter of great debate. </font> 
<p><font size="2" face="Arial, Helvetica, sans-serif"><b>The &quot;Adminstratorless&quot; 
  Database</b><br>
  </font><font face="Arial, Helvetica, sans-serif" size="2">I </font><font face="Arial, Helvetica, sans-serif" size="2">have 
  read quips and quotes from various industry pundits proclaiming that the next 
  release of so-and-so database would no longer require DBAs for support. Oh, 
  OK&#133; I'm still waiting. Database vendors know that they must add new features 
  to be competitive. Each new release of Oracle contains so many new features 
  that I feel like I have to learn to support the database all over again (which 
  is why I like this job, by the way). As the manager of a database group, I spend 
  way more time than I would like trying to make sure my organization understands 
  all of the features that Oracle offers. The more solutions the database inherently 
  provides, the more cost effective it becomes. These integrated features allow 
  technical personnel to solve business problems without the additional costs 
  of writing custom code and/or integrating multiple vendor solutions. Its part 
  of my job to make sure my organization leverages these features when appropriate.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle10G allows us to administer 
  disk, lash multiple computers together to enable grid computing and the list 
  goes on, and on, and on.... It took me four different articles to cover just 
  a subset of the new features available in Oracle's latest release. The database 
  may become easier to administer in some areas, but there are so many new features 
  being incorporated into the product that administrative duties are just being 
  migrated to other areas. Oracle ASM now allows my unit to administer disk. How 
  many Oracle DBAs could have predicted that they would have the capability to 
  manage their own storage subsystems? Can any one of us predict what IBM, Oracle 
  and Microsoft have up their sleeves in their next &quot;latest and greatest&quot; 
  release? Not me. But THAT is what makes this job exciting. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Database Advisor Overview</b></font><br>
  <font face="Arial, Helvetica, sans-serif" size="2">OK, enough ranting and back 
  to the topic at hand. Advisors are user invoked utilities that perform detailed 
  analysis on key components of the Oracle database. Advisors provide comprehensive 
  recommendations and some advisors allow what-if scenarios to be performed. Oracle 
  states that advisors do consume resources to provide these detailed recommendations 
  so we are currently testing all of the advisors to determine each one's actual 
  resource utilization. As soon as we compile our findings, I'll make sure to 
  make that information available to you.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you take a look at the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/advisor_central_link_3.gif">database 
  home page</a>, you'll notice a link titled Advisor Central. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/advisor_central_main_4.gif" target="_self">Advisor 
  Central home page</a> allows administrators to access all of the advisors that 
  are available in 10G Enterprise Manager. The Advisor Tasks section of the page 
  displays output from advisor executions. </font><font face="Arial, Helvetica, sans-serif" size="2">By 
  default, only the ADDM advisor is set to run automatically after the database 
  is started. So, if you haven't manually scheduled other advisors, ADDM will 
  be the only task execution that will appear in the task output section of the 
  page. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's take a high level 
  look at each of the advisors available on the Advisor Central home page. Starting 
  with my next blog, I'll provide more in-depth information on each of the individual 
  advisors.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>ADDM</b><br>
  Before we discuss ADDM, a brief overview of the Automatic Workload Repository 
  that it uses as input is warranted. The Automatic Workload Repository collects performance statistics (and the SQL 
  text itself) for all SQL statements executed in the database. It is a historical 
  performance data warehouse that stores SQL statement CPU, memory and I/O resource 
  consumption. AWR runs by default and Oracle states that it does not add a noticeable 
  level of overhead. The information in this repository is used as input for the 
  various advisors. This historical information will help administrators finally 
  answer questions like &quot;my program ran long two days ago, can you fix it?&quot;<br>
  <br>
  A new background server process (MMON) takes snapshots of the in-memory database 
  statistics (much like STATSPACK) and stores this information in the repository. 
  MMON also provides Oracle10g with a server initiated alert feature, which notifies 
  database administrators of potential problems (out of space, max extents reached, 
  performance thresholds, etc.).</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Automatic Database Diagnostic 
  Monitor analyzes the information contained in the Automatic Workload Repository 
  every 30 minutes to pinpoint problems and provide automated recommendations 
  to administrators. If ADDM requires additional information to make a decision, 
  it will activate other advisories to gather more information. ADDM's output 
  includes a plethora of reports, charts, graphs, heartbeats and related visual 
  aids. In general, ADDM provides users with a top-down analysis of performance 
  bottlenecks and their associated resolutions. Oracle recommends that DBAs should 
  review ADDM output first when performing performance problem analysis. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle documentation touts 
  the following ADDM benefits:</font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Provides hourly diagnostic 
    reports by default</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The tool's intelligence 
    contains hundreds of years of Oracle expertise</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Identifies the root cause 
    of the problem, not just the symptoms</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Problem diagnosis based 
    on decades of tuning expertise </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">ADDM incurs minimal overhead 
    during execution</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>SQL Access Advisor and 
  SQL Tuning Advisor</b><br>
  These two new advisories will help Oracle DBAs with the &quot;fine art&quot; 
  of SQL tuning. In the past SQL tuning could be defined more of an art than as 
  a science. Hopefully, these two new advisories will put the science back into 
  the SQL tuning process. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/sqlaccess_advisor_3.gif">SQL 
  Access Advisor </a>uses the Automated Workload Repository to provide recommendations 
  on creating Oracle objects (additional indexes, materialized views, etc.) to 
  increase the performance of poorly performing SQL statements. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The utility is able to accept 
  input from current and historical workloads, SQL Tuning Sets (user defined collections 
  of various SQL statements) and SQL statements contained in user defined tables. 
  The tool is also able to create a hypothetical workload against a group of predefined 
  tables that use database defined referential integrity constraints. We are currently 
  testing the hypothetical workload feature here at Giant Eagle. I'll present 
  our findings to you when I focus on the SQL Access Advisor in an upcoming blog.<br>
  <br>
  The SQL Tuning Advisor also uses the Automated Workload Repository to capture 
  and identify high resource consuming SQL statements. An intelligent analyzer 
  is then used to assist administrators in tuning the offending SQL statements. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Take a look at this <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/sqltuning_advisor_3.gif">screen 
  print </a>of the panel that appears when you click on the SQL Tuning Advisor 
  link on the Advisor Central Home Page. You'll notice that the SQL Tuning Advisor 
  can not be called directly from Advisor Central. The utility can only be called 
  from the Top SQL, SQL Tuning Sets, Snapshots and Preserved Snapshot Sets panels. 
  We'll discuss each of those calling panels in-depth in the SQL Tuning Advisor 
  blog.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SQL Tuning Advisor provides 
  advice and includes information justifying why it generated those recommendations. 
  This prevents the advisor from becoming a &quot;black hole&quot; that pumps 
  out recommendations without supporting information. The recommendations may 
  include collecting statistics on objects, new index creation, restructuring 
  the SQL statement or the creation of a SQL Profile to create and &quot;freeze&quot; 
  a more optimal access path. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SQL Tuning Advisor uses 
  the Oracle10G cost based optimizer to rewrite the poorly performing SQL to create 
  the SQL Profile, which is then stored in the data dictionary. Each time the 
  poorly performing SQL statement executes, the rewritten statement stored in 
  the data dictionary is used in its place.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The optimizer's job is to 
  create the most high performance access path in the shortest time possible. 
  Its easy to understand how these two objectives can be viewed as &quot;mutually 
  exclusive.&quot; In a perfect world, you would give the optimizer as much time 
  as it needs to create the most optimal access path. In the real world you need 
  to get the statements executing as quickly as possible. That includes optimization. 
  Since the SQL Tuning Advisor does not have time constraints, the tool can take 
  as much time as necessary to optimize the statement. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/sqltuning_advisor_actual_3.gif">SQL 
  Tuning Advisor Home Page</a> provides a drop down menu that allows the administrator to &quot;throttle&quot; 
  the amount of time the utility spends optimizing the statement.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The SQL Tuning Advisor will 
  be especially beneficial to administrators who support third-party applications. 
  Before the advent of Stored Outlines (predecessor to SQL Plans), once the administrator 
  identified the canned application's poorly performing SQL, the third-party vendor 
  was contacted to change the SQL code and the changed code then implemented in 
  test and finally in production to effect the tuning change. Anyone who has experience 
  with third-party application vendors knows that this is often a time consuming 
  (if not impossible) process. Creating SQL Plans allows the administrator to 
  correct the poorly performing SQL statement immediately without vendor assistance.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>MEMORY ADVISOR</b><br>
  The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/memory_advisor_3.gif">Memory 
  Advisor</a> can only be used when the automatic memory tuning feature is disabled. 
  So before we begin our discussion on the Memory Advisor, I'll provide you with 
  a few quick details on automatic SGA segment sizing.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The automatic SGA segment 
  sizing feature of Oracle10G simplifies administration of the various memory 
  components that make up the System Global Area (SGA). In previous releases, 
  database administrators were required to specify the amount of memory allocated 
  to the buffer cache, shared pool, java pool and large pool. Setting, monitoring 
  and adjusting these parameters was time-consuming and oftentimes guesswork. 
  Sizing them incorrectly usually led to poor performance and/or out-of-memory 
  conditions. <br>
  <br>
  Oracle10G administrators are able to set a single, dynamic parameter, SGA_TARGET, 
  to allocate memory to the entire Oracle SGA. Oracle10G uses the value contained 
  in SGA_TARGET to determine how much memory to allocate to the buffer cache, 
  shared pool, large pool and java pool. During normal database operations, the 
  database engine periodically reviews memory usage and redistributes memory between 
  the components accordingly. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">For those administrators 
  who still want to maintain more granular control over the size of the various 
  SGA components, Oracle 10G Grid Control contains a memory advisor that provides sizing 
  advice. This advisor is pretty straight-forward. If you have the automatic SGA 
  segment sizing feature disabled, an advice button appears next to each SGA component. 
  Clicking on the advice button takes the user to a &quot;what if&quot; chart 
  that shows the relationship between the SGA component's size and hit ratio. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>MTTR ADVISOR</b><br>
  Setting the FAST_START_MTTR_TARGET parameter to control the amount of time the 
  database takes to perform instance recovery must be done with some forethought. 
  Administrators must balance the needs of fast instance recovery with the performance 
  implications of setting the value of FAST_START_MTTR_TARGET too small. Before 
  we begin discussing the advisor, some background information is in order.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Periodically, Oracle's DBWR 
  flushes blocks from the data buffer cache to the database files. One mechanism 
  that initiates this event is a checkpoint. Checkpoints ensure that modified 
  data buffers are written to the database files on a regular basis.</font><font face="Arial, Helvetica, sans-serif" size="2">Oracle 
  records changes using System Change Numbers (SCNs). Each transaction is assigned 
  a SCN to identify the changes made by the SQL statements within that transaction. 
  The SCN that is associated with the current checkpoint has all of its changes 
  flushed from the data buffer cache to the database files. If a database failure 
  occurs, Oracle knows that all transactions that have SCNs higher than that number 
  must be &quot;replayed&quot; during the recovery process. All SCNs lower than 
  the number associated with the checkpoint have already been flushed to the database 
  files and don't need to be recovered. The more blocks that need to be recovered, 
  the longer the recovery will take. So, frequent checkpoints reduce recovery 
  time by reducing the amount of blocks needing to be recovered. But checkpointing 
  too frequently negatively impacts runtime performance by overworking the DBW<i>n</i> 
  processes.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Once again, Oracle10G comes 
  to the rescue with another new advisor, t<a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/mttr_advisor_3.gif">he 
  MTTR Advisor</a>. You can use MTTR Advisor to evaluate the effect of different 
  FAST_START_MTTR_TARGET settings on system performance, compared to your chosen 
  setting. Oracle populates the dynamic performance view V$MTTR_TARGET_ADVICE 
  with the information collected by MTTR Advisor.</font></p>
<p></p>
<p><b><font face="Arial, Helvetica, sans-serif" size="2">SEGMENT ADVISOR</font></b><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Getting rid of unused space in a table improves the performance of full table 
  scans. Removing unused space in index structures provides quicker index access 
  due to a more compact tree. The additional benefit is a more efficient utilization 
  of space because the space freed is available for other objects. In releases 
  prior to Oracle10G, getting rid of free space above and below a table's high-water 
  mark was usually done by the tried-and-true, Export, Drop Table, Import or ALTER 
  TABLE MOVE commands. Administrators could also use the ALTER INDEX REBUILD statement 
  to reorganize index segments to create a more compact index tree.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle10G objects that reside 
  in Automatic Segment Space Managed (ASSM) tablespaces can be shrunk using the 
  &quot;ALTER&#133;&#133;&#133;SHRINK&quot; statement. The shrink statement is 
  not limited to just heap tables and indexes, Oracle also allows index-organized 
  tables, partitions, subpartitions, materialized views and materialized view 
  logs to be shrunk using ALTER commands. In addition, the CASCADE option can 
  be used to propagate the shrink operation to all dependent objects except materialized 
  views, LOB indexes, IOT mapping tables and overflow segments.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Administrators are able 
  to use Oracle10G's <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/segment_advisor_3.gif">Segment 
  Advisor </a>to identify candidates for shrink operations. The advisor estimates 
  the amount of unused space that will be released when the shrink operation is 
  run on the particular object. A wizard is available that allows users to evaluate 
  all objects in the database, all objects in a specific tablespace or all objects 
  owned by a particular schema. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Although we have tested 
  this in our labs, we have yet to test the segment advisor in an active 10G environment. 
  The DBA running the 10G project here likes to &quot;aggressively test and implement&quot; 
  new releases here. Rest assured that in future blogs, I'll be providing you 
  with a wealth of information on the segment shrink statement and the segment 
  advisor</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>UNDO ADVISOR</b><br>
  A transaction uses an undo segment to record before images of data it intends 
  to change. If the transaction fails before committing, Oracle uses the before 
  images to rollback or undo the uncommitted data changes. Oracle also uses undo 
  segments for statement-level read consistency. Read consistency ensures that 
  all data returned by a query comes from the same point-in-time (query start 
  time). Lastly, undo segments provide before images of data to help the instance 
  roll back failed transactions during instance recovery.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You don't have to be an 
  Oracle expert to know that even though we have migrated to system-managed undo 
  segments, administering them can be &quot;somewhat troublesome.&quot; Out of 
  space conditions, contention, poor performance and the perennial favorite &quot;snap 
  shot too old&quot; errors have been plaguing Oracle database administrators 
  for over a decade. System managed undo segments has lessened, but not entirely 
  alleviated, this burden.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The parameter UNDO_RETENTION 
  specifies the amount of time that Oracle attempts to keep undo data available. 
  Setting this parameter too low may result in &quot;snapshot too old&quot; errors 
  being generated. This occurs when a query that is attempting to maintain read 
  consistency fails to obtain a before image of a changed data block. The data 
  block has been aged out or overwritten by more current before images. Setting 
  the parameter too high may cause undo data to fill up the undo tablespace which 
  leads to out of space errors.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The 10G <a href="/blogs/blog_cf/chrisfoot/blogentry2005_06_108609363343/undo_advisor_3.gif">Undo 
  Advisor</a> provides recommendations on setting the UNDO_RETENTION parameter 
  as well as sizing the undo tablespace. The administrator sets the amount of 
  time that the advisor will analyze and the advisor reviews the workload that 
  was executed during the specified time period.The advisor is also able to analyze 
  the impact of new undo retention settings.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  In-depth analysis of each advisor<br>
  </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Advisory Framework - 10G Common Manageability Infrastructure</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-06-02.0384701461</link>
                      <description>Before we begin our discussion on the intelligent advisors contained in Oracle10G, it is important that we review the entire architecture from a higher level.   I want to make sure that we all have a firm understanding of 10G's Common Manageability Infrastructure before we begin reviewing the individual advisors.&lt;BR&gt;&lt;BR&gt; To ensure that we have this firm foundation, we must learn more about the Automatic Workload Repository and Active Session History which capture the data that many of the advisors use as input.  Although, the Automatic Workload Repository and Active Session History may not be as exciting as the advice provided by the advisors and the automatic tuning recommendations provided by ADDM, it is important for us to understand the information used as input by these new components.
</description>
                      <pubDate>Thu, 02 Jun 2005 19:17:55 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><b>The Problem: Too Much Time Spent on Database Management Activities<br>
  </b>O<font face="Arial, Helvetica, sans-serif" size="2">racle states that DBAs 
  spend more than 50 percent of their time performing on-going systems-management 
  activities. These activities include: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Application and SQL Performance 
    Management — Reviewing response times, SQL access path analysis and tuning, 
    schema object performance analysis, index creation, and cost-based optimizer 
    statistics collection. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">System Resource Management 
    — Database memory pool sizing, CPU utilization, and process management. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Space Management — Growth 
    trend analysis, fragmentation analysis, disk configuration, segment space 
    utilization monitoring, datafile sizing, and Oracle data object segment sizing. 
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Storage Management — 
    Disk configuration, determining stripe sizes, and I/O bandwidth monitoring.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Backup and Recovery Management 
    — Backup monitoring, disaster recovery planning, backup strategy planning, 
    writing operating system scripts to perform database backups, and monitoring 
    the database Mean Time To Recover (MTTR). </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle10g assumes that some 
  of these aforementioned activities reduce the amount of time administrators 
  spend performing daily management tasks. Oracle10g’s new manageability architecture 
  is designed to automatically inform DBAs of any performance, space management, 
  or resource allocation issues. In addition, the intelligent advisors are able to provide
  administrators with suggestions on how to resolve these types of problems. The 
  database provides these benefits through its Common Manageability Infrastructure. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>The Resolution — The 
  Common Manageability Infrastructure<br>
  </b></font><font face="Arial, Helvetica, sans-serif" size="2">The Common Manageability 
  Infrastructure provides the Oracle10g database with self-tuning capabilities. 
  The database collects self-tuning and problem detection statistics that are 
  used as input to automated and DBA-initiated performance advisories. The captured 
  statistics are also used as input to Oracle10g’s server-generated early warning 
  alert system. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Common Manageability 
  Infrastructure (refer to Image 1) can be divided into the following four main 
  components: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Automatic Workload Repository 
    (AWR) — The center of the Common Manageability Infrastructure provides services 
    to collect, store, maintain, process and provide access to statistics for 
    self-tuning and problem detection. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Server-Generated Alerts 
    — Oracle10g provides early warning mechanisms to alert administrators of possible 
    error conditions. The database now collects numerous metrics that were previously 
    collected by Oracle Enterprise Manager. Administrators are able to select 
    from 161 server-generated alerts. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Advisory Framework — 
    The Advisory Framework consists of various server components that provide 
    feedback and recommendations about database resource utilization and performance. 
    These feedback advisories can be initiated by the DBA or by the database server.</font><font face="Arial, Helvetica, sans-serif" size="2">Oracle10g’s 
    Automatic Database Diagnostic Monitor (ADDM) automatically identifies performance 
    bottlenecks and makes recommendations to resolve them. We'll discuss each 
    individual advisory in-depth in upcoming blogs. Its important to know what 
    feeds them. Now you know!</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Automated Tasks — A sophisticated 
    job scheduler allows administrators to schedule routine administrative tasks 
    such as cost-based optimizer statistics gathering. Administrators are also 
    able to create complex job streams that execute PL/SQL, Java and C programs. 
    </font></li>
</ul>
<p align="center">Figure 1<img src="/images/foot11_1.gif"></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> <b>Automatic Workload Repository<br>
  </b></font><font face="Arial, Helvetica, sans-serif" size="2">Oracle describes 
  the Automatic Workload Repository as the “data warehouse of the Oracle10g database.” 
  It is used as the statistics data source for all other components of the Common 
  Manageability Infrastructure (refer to figure 2). </font></p>
<p align="center">Figure 2
<img src="/images/foot11_2.gif"></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Automatic Workload Repository 
  consists of two main components: In-memory Statistics and Repository Snapshots. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>AWR In-memory Statistics</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Oracle10g</font><font face="Arial, Helvetica, sans-serif" size="2"> 
  provides a collection facility to collect base statistics and store them in 
  memory. Some of the statistics collected by AWR’s collection facility are as 
  follows: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Object Statistics — Object 
    access and usage statistics of application data segments including read and 
    write activity and data waits. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Time-Model Statistics 
    — Connection management, SQL statement parse, PL/SQL compilation and SQL and 
    PL/SQL execution. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">OS Statistics — CPU and 
    memory utilization. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Wait Classes — I/O, CPU 
    concurrency, COMMIT, and scheduler waits. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">SQL Statistics — CPU 
    and elapsed SQL execution times, wait-class times, and PL/SQL Java times. 
    </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">System and Session Statistics 
    — Collected and stored in the V$SYSSTAT and V$SESSTAT dynamic performance 
    views.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> Current Session Activity 
    — The Active Session History component of the Automatic Database Diagnostic 
    Monitor samples recent session activity. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Active Session History<br>
  </b></font><font face="Arial, Helvetica, sans-serif" size="2">Since the AWR, 
  by default, takes snapshots every 60 minutes (discussed below), performance 
  information could be up to 60 minutes old. As a result, snapshots do not contain 
  enough information to allow administrators to perform analysis on the active 
  workload currently being performed in the database system. Oracle10g contains 
  a new internal utility, called Active Session History, to provide administrators 
  with access to current performance information.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> Active Session History 
  samples data from the V$SESSION dynamic performance table every second and stores 
  the information in V$ACTIVE_SESSON_HISTORY. The information contains the events 
  for which current sessions are waiting. The information pertains to active sessions 
  only; information from inactive sessions is not recorded. The view contains 
  one row per active session for each one-second sample. Administrators are able 
  to access V$ACTIVE_SESSON_HISTORY as they would any other V$ dynamic performance 
  table. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">It is important to note 
  that, like V$SQLAREA, V$ACTIVE_SESSION_HISTORY is a rolling buffer in memory. 
  Oracle’s internal documentation states that current workload analysis most often 
  requires detailed performance statistics on activity within the last five- to 
  ten-minute time period. As new information is added, earlier information contained 
  in the view will be removed. Active Session History consumes two megabytes of 
  memory per CPU and is fixed for the lifetime of the instance. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>AWR Snapshots<br>
  </b></font><font face="Arial, Helvetica, sans-serif" size="2">AWR snapshots 
  provide a persistent view of database statistics. They are stored in the system-defined 
  WR schema, which resides in a new tablespace called SYSAUX. A snapshot is a 
  collection of performance statistics that are captured at a specific point in 
  time. The snapshot data points are used to compute the rate of change for the 
  statistic being measured. A unique SNAP_ID snapshot identifier identifies each 
  snapshot.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"> Storing statistics generated 
  by AWR snapshots in the database allows administrators to analyze problems that 
  occurred in the past. This historical information will help administrators finally 
  answer questions like, “My program ran long two days ago; can you fix it?” </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The stored statistics also 
  allow the database to compare its current performance to a stored baseline. 
  The database is then able to initiate its own early-warning performance alerts 
  when baseline measurements are exceeded. Automatic Database Diagnostic Monitor 
  (to be discussed in an upcoming blog in this series) uses the snapshot information 
  to automatically identify performance problems and make recommendations to correct 
  them. In addition, administrators are able to use the historical data to perform 
  performance trending analysis. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The snapshot mechanism can 
  be loosely compared to its Statspack predecessor. Statspack collected database 
  statistics and stored them in the PERFSTAT schema. The major differences between 
  Statspack and AWR snapshots are: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">AWR snapshots are scheduled 
    every 60 minutes by default. A new background server process called MMON is 
    responsible for initiating the snapshot mechanism. Administrators can manually 
    adjust the snapshot interval by invoking the MODIFY_SNAPSHOT_SETTINGS PL/SQL 
    stored procedure and specifying the INTERVAL parameter input variable. In 
    addition, administrators can manually initiate AWR snapshots by invoking a 
    PL/SQL stored procedure. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The depth and breadth 
    of statistics collected (discussed previously in this blog). During snapshot 
    processing, MMON transfers the in-memory version of the statistics to the 
    permanent statistics tables. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The AWR snapshots are 
    purged automatically by MMON every night. MMON, by default, tries to keep 
    one week’s worth of AWR snapshots available. If AWR detects that the SYSAUX 
    tablespace is in danger of running out of space, it will free space in SYSAUX 
    by automatically deleting the oldest set of snapshots. If this occurs, AWR 
    will initiate a server-generated alert to notify administrators of the out-of-space 
    error condition. Administrators can manually adjust the amount of information 
    retained by invoking the MODIFY_SNAPSHOT_SETTINGS PL/SQL stored procedure 
    and specifying the RETENTION parameter input variable. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Metrics vs. Base Statistics</b><br>
  Base statistics are the raw data points collected by AWR. An example of a base 
  statistic would be the number of reads per second performed on a particular 
  database data object. Metrics are computed statistics derived from base statistics. 
  The MMON server process uses the base statistics as input to calculate their 
  corresponding metrics. These computed statistics are used by internal components 
  for system health monitoring, early warning problem detection, and self-tuning. 
  An example of a metric would be the average number of physical reads per second 
  performed on a database data object within the last 60-minute time period. Pre-computing 
  metrics allows internal components to quickly compute the rate of change of 
  system statistics. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">In the past, administrators 
  who wanted to determine the impact a specific workload had on the database used 
  Statspack to capture baseline statistics before the run, ran the workload being 
  evaluated, ran Statspack again to capture statistics after the run, then manually 
  computed the rate of change for the particular base statistic. With pre-computed 
  metrics, administrators only need to run the workload, then select the desired 
  metric values from the new V$ metric tables. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Statistics Levels</b><br>
  </font><font face="Arial, Helvetica, sans-serif" size="2">Administrators are 
  able to control the breadth and depth of statistics to capture by setting the 
  STATISTICS_LEVEL initialization parameter. The parameter has three different 
  possible values: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Basic — The collection 
    of AWR statistics and computation of metrics is deactivated. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Typical (default value) 
    — Partial statistics are collected. AWR collects only those statistics required 
    to provide base-level monitoring capabilities. This is the setting currently 
    recommended by Oracle. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">All — All possible statistics 
    are captured. The additional statistics are used for manual SQL diagnosis. 
    The ALL setting does incur additional overhead. </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>AWR Snapshot Baselines</b><br>
  Administrators create snapshot baselines to capture and measure performance 
  statistics for a particular time period. The baseline data can then be used 
  to compare current system performance against a time period when database performance 
  was determined to be optimal. Threshold-based alerts can be set up to notify 
  administrators when current system performance deviates from the statistics 
  and metrics stored in the baseline snapshot. The baseline snapshot is defined 
  on a pair of SNAP_IDs. The CREATE_BASELINE stored procedure accepts the START_SNAP_ID 
  and END_SNAP_ID variables as input to create the snapshot baseline. Administrators 
  use the BASELINE_NAME variable to uniquely identify the baseline snapshot. AWR 
  does not delete snapshots defined as baseline snapshots. <br>
  <br>
  <b>AWR Report Generation<br>
  </b>The AWR contains a reporting tool that can also be loosely compared to a 
  Statspack report. The report summarizes information on the statistics stored 
  in the workload repository for a given time period. Administrators run one of 
  the two following SQL statements to create the AWR reports: </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">SWRFRPT.SQL — Creates 
    a text report that describes overall system performance over the time period 
    selected.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">SWRFRPTH.SQL — Provides 
    the same information as SWRFRPT.SQL in HTML format with navigational links. 
    </font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2">Administrators are required 
  to connect to the database using the AS SYSDBA privilege to run the above SQL 
  statements. The script prompts the user for the number of days of snapshots 
  to choose from. The script then prompts the user for the beginning and ending 
  SNAP_IDs and the output file name. Oracle10g also contains numerous DBA_views 
  to provide direct access to AWR base statistics and metrics. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Database Feature Usage 
  and General Database Statistics</b><br>
  AWR also tracks database feature usage statistics and high-water marks of certain 
  database statistics. The MMON process records this information once a week by 
  sampling information from the data dictionary. Administrators can access this 
  information by selecting from the DBA_FEATURE_USAGE_STATISTICS and DBA_HIGH_WATER_MARK_STATISTICS 
  data dictionary views. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Up Next</b><br>
  An introduction to 10g EM advisories.</font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Database Performance Monitoring Using 10G OEM Grid Control</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-05-22.3884573887</link>
                      <description>Let's forge ahead with our discussion on 10G Grid Control's performance monitoring capablities by turning our attention to database performance.  Like the blogs on 10G host performance, I’ll break this information up into two blogs.  This first blog will provide you with a quick tour of EM's database performance monitoring component. In my next blog, I'll provide you with a brief overview on how to use the information it generates to monitor database performance.&lt;BR&gt;&lt;BR&gt;

We’ll then take a look at 10G Grid Control’s performance advisors that are grouped together in Advisor Central.  Once we have a firm understanding of Enterprise Manager’s performance and tuning capabilities, we’ll put   our newfound knowledge to use when we use EM to solve some real-world performance problems. 
</description>
                      <pubDate>Mon, 23 May 2005 07:06:13 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font face="Arial, Helvetica, sans-serif" size="2">We learned previously that 
10G Enterprise Manager calls objects that it monitors and administers &quot;targets.&quot; 
10G Grid Control's home page allows administrators to easily navigate to the different target 
types. Like all monitored targets, each database has its own home page in Enterprise 
Manager. </font> <p><font face="Arial, Helvetica, sans-serif" size="2"><b>Database Home Page</b><br>
  Take a couple of minutes and look at all of the information that our sample 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_home.gif">database 
  home page</a> provides. By reviewing the information on this page, we can quickly 
  determine (starting at top left column):</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>General Information Column</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">How long the database 
    has been available</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Database Version</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The Oracle home directory</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Listener information</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Host information</font></li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Host CPU Column</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Current CPU utilization 
    and drill downs to more specific host performance information</font> </li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Active Sessions Column</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Time required to perform 
    instance recovery (MTTR)</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Information on the last 
    backup and related availability information</font> </li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Space Usage Column</b></font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Database sizing information 
    with drilldown capabilities</font> </li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Diagnostic Information 
  Column</b><br>
  </font></p>
<ul>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Alerts, warning and policy 
    violations, which will be discussed in an upcoming blog</font> </li>
</ul>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Alert Section </b><br>
  At the bottom of the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_home.gif">database's 
  home page</a> is a section that display's information on alerts that are currently 
  active. Alerts are generated when a metric's threshold is exceeded. Metrics 
  are units of measurement that are set at predefined values to assess the health 
  of the target being monitored. These predefined values are called metric thresholds. 
  Thresholds are one or more values against which current statistical values are 
  compared. To learn how to set up 10G Grid Control's early warning, alert notification 
  system, please refer to my blog titled <a href="/blogs/blog_cf/chrisfoot/blogentry.2005_05_14.9418191992">&quot;Configuring 
  10G's Automatic Alert Notification System.&quot;</a></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You'll notice that there 
  is a series of tabs at the top left side of the panel that allow users to navigate 
  to performance, administration and maintenance components. Clicking on the performance 
  tab takes us to the database's performance home page. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Database Performance 
  Home Page</b><br>
  One of the great benefits that 10G Grid Control provides is the ability to display historical 
  performance information. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_perf_home.gif">database 
  performance home page</a> displays a drop down that allows users to view current 
  as well as historical performance statistics for the last 24 hours, 7 days and 
  31 days.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">This feature not only helps 
  administrator answer questions like &quot;my program ran long yesterday, can 
  you help me fix it before it runs today?&quot; but also helps to determine exactly 
  when a particular performance problem began to occur. Knowing when performance 
  first &quot;went South&quot; is a critical piece of information that allows 
  you to determine what changes were made since the problem first occurred. This 
  is often all that is needed to identify and solve the performance problem. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Run Queue Length and 
  Instance Throughput Charts (top and bottom charts on the screen) allow administrators 
  to evaluate general host and database performance. It's really quite simple, 
  the more work you have waiting in the queue or the lower your instance throughput 
  is, the more disgruntled your end users are.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Additional Monitoring 
  Links area contains links that provide information on top resource consuming 
  sessions, overall instance workload (I/O, number of sessions, etc.), database 
  lock, blocking session and general session information. We'll take a look at 
  these additional components in upcoming blogs.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You can use the Sessions: 
  Waiting and Working Chart in the middle of the screen to determine exactly what 
  resource your disgruntled users are waiting for. Take a look at our sample <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/db_perf_home.gif">Sessions: 
  Waiting and Working Chart</a>. The chart allows administrators to quickly determine 
  where the most waiting time is spent. In our example, we are waiting for I/O. 
  Since this is a multi-terabyte data warehouse, no surprises here. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>I/O DrillDown</b><br>
  Clicking on one of the colored areas of the Sessions: Waiting and Working Chart 
  allows administrators to drill down to the specific resource being waited on. 
  If we click on the purple I/O color on our chart, we'll navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/io_drilldown.gif">I/O drill down page.</a> </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The Active Session Waiting: 
  User I/O panel displays in-depth I/O information. As with all OEM performance 
  panels, a drop down is provided to view current as well as historical resource 
  utilization statistics for the last 24 hours, 7 days and 31 days. Administrators 
  are able to focus on a particular time period by dragging the gray slider over 
  the desired time slot. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">No matter what resources 
  you drill down into, they all have the same look and feel. I chose I/O since 
  that is the top resource being waited on by our sessions. All of the resource 
  panels display the particular resource's historical utilization and 
  two pie charts on the bottom of the screen that allow administrators to drill down into 
  the top sessions and SQL statements utilizing that resource.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We view more specific information 
  on our top I/O resource consuming SQL by clicking on the Top Waiting SQL: User 
  I/O pie chart or on the link next to chart itself. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/session_drilldown2.gif">SQL 
  Details Page</a> displays the SQL statement, the access path the statement is 
  using and historical execution performance information. As I stated previously, 
  knowing when performance degraded is often a vital piece of information. In 
  our example, we have a TOAD session that is doing a full table scan on a multi-million row table (there's something new). The SQL Details Page also provides 
  a link to the SQL Tuning Advisor. We'll discuss the SQL Tuning Advisor in-depth 
  in a future blog. This is one powerful tool and we'll need to know how to use 
  it wisely. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Since we are evaluating 
  I/O statistics in our example, it is important for us to know what objects we 
  are waiting for. We can change the view from top session and SQL information 
  to top files and top object statistics by clicking on the Top Files and Top 
  Object links just above the pie charts. In my <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_223884573887/file_drilldown.gif">last 
  screen print</a>, I have clicked on the Top Files Link to display I/O utilization 
  statistics on a per file basis.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I realize that we only reviewed 
  one resource out of many. But as I said, they all have the same look and feel. 
  Each drill down panel provides you with historical information, a slider to 
  focus on a particular time period and further drilldowns into SQL, session and 
  object information related to the resource in question.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  Now that we have a better understanding of some of the database information 
  that 10G Grid Control provides , I'll provide you with a few helpful hints on using this 
  information to evaluate database performance. We'll then discuss 10G's Advisor 
  Central toolsets. Wait until you get a load of them!</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Thanks for reading!<br>
  </font><font face="Arial, Helvetica, sans-serif"> </font> </p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Configuring 10G OEM Grid Control's Automatic Alert Notification System</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-05-14.9418191992</link>
                      <description>Before we begin our discussion on 10G Grid Control's database monitoring and tuning features, I thought I would show you how to configure the 10G Grid Control environment to provide automatic notifications.  Creating automatic notifications allows database administrators to identify (and correct) performance and availability issues before they negatively impact the database environment.&lt;BR&gt;&lt;BR&gt;
In many of my blogs, I have been promising to cover this topic.  In addition, I'm getting a little tired of writing "We'll learn more about creating and modifying performance alerts in upcoming blogs."   So consider this "the upcoming blog."
</description>
                      <pubDate>Sat, 14 May 2005 11:24:29 -0500</pubDate>
                              
      <content:encoded><![CDATA[<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Protecting Core Data 
  Assets</b><br>
  Database administrators, by the very essence of their job descriptions, are 
  the protectors of their organization's core data assets. They are tasked with 
  ensuring key data stores are continuously available. However, ensuring that 
  data is available on a 24 x 7 basis is a wonderfully complex task. Hardware 
  failures, software failures, user errors and performance problems all combine 
  to make many administrators lie awake nights thinking about whether their databases 
  will be continuously available (or not).</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Proactive vs Reactive 
  DBA Support</b><br>
  Daily support requests and problem solving activities often overwhelm many DBA 
  groups. Understaffing, over-commitment to supporting new and legacy application 
  developments, lack of repeatable processes and lack of budget are the most common 
  causes of DBAs being reactive instead of proactive. Proactive DBAs understand 
  that time must be spent creating a performance and availability monitoring infrastructure. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The reactive DBA can be 
  compared to a firefighter; they resolve problems but never prevent them. The 
  biggest problems garner the most attention. The reactive DBA's time is dominated 
  by these firefighting activities, reducing the amount of time they are able 
  to spend implementing the process and procedures required to switch their mode 
  from reactive firefighting to proactive problem prevention.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Numerous methods can be 
  used to create this monitoring infrastructure. Although I personally prefer 
  using Enterprise Manager as the foundation for Giant Eagle's early warning system, 
  I have also written my fair share of operating system scripts to monitor both 
  databases and operating systems. </font> </p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>10G EM's Early Warning 
  System at Giant Eagle</b><br>
  As I stated, I am a big fan of using Oracle Enterprise Manager as the foundation 
  for our proactive notification system. I'm glad to report that 10G EM contains 
  many new features that justify my preference for this tool. We have fully implemented 
  10G's server generated alert feature here at Giant Eagle. We use the 10G EM 
  GUI interface, the &quot;SGT - Sissy GUI Tool&quot; as I used to call it when 
  I was an Oracle instructor, to administer these server generated alerts. What 
  we have found is that there are a LOT more canned alerts available in 10G than 
  in previous versions. That is a good thing. I would rather wade through dozens 
  of alerts I don't want to activate than spend ANY time coding an alert that 
  wasn't provided by the toolset. Administrators are able to select from close 
  to two-dozen server-generated and over a hundred database-generated alerts. 
  What more could a proactive DBA ask for! </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Setting Up the Environment</b>
  </font><BR>
<font face="Arial, Helvetica, sans-serif" size="2">Like previous versions of 
  OEM, 10G EM is a multi-tier architecture consisting of the HTML console, a management 
  service with an integrated information repository and management agents running 
  on all monitored targets. During the management service installation process, 
  the installer will ask several questions on the host's e-mail configuration. 
  If you don't know the answers to these questions, you'll need to confer with 
  your friendly operating system administrator. It would be a good idea to have 
  e-mail configured on the host server before you begin the 10G EM installation.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Notification Methods</b><br>
  Once that is complete, you'll log in to the 10G EM console using the default 
  account and password provided during the installation. The first thing you'll 
  want to do is set up the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/notification_methods.gif">notification 
  methods</a>. Navigate to SETUP and then NOTIFICATION METHODS. You do this by 
  clicking on the SETUP tab at the top right hand side of the screen and then 
  selecting the Notification Methods link on the left side of the panel. The input 
  fields will allow you to enter the host server's outgoing SMTP server name. 
  In addition, you can use the default IDENTIFY SENDER AS value &quot;EnterpriseManager&quot; 
  or tailor it to your own preferences. I personally prefer &quot;Greetings From 
  10G EM!.&quot; You will also need to fill in the SENDER'S E-MAIL ADDRESS. In 
  our system, the SENDER's E-MAIL ADDRESS needed to be a valid account in Giant 
  Eagle's E-mail system.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Creating Administrator 
  Accounts</b><br>
  You will also need to create 10G EM administrative accounts. Don't confuse these 
  with database and host accounts. This is the account that the 10G EM users will 
  specify when they log on to the tool itself. These are NOT the accounts for 
  the targets they will be administrating. We'll configure those accounts in an 
  upcoming step. You navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/create_administrator.gif">administrator 
  setup panel </a>by clicking on the SETUP tab at the top of the screen and then 
  selecting the Administrators link on the left side of the panel. You'll notice 
  on the screenprint that I have blocked out our account names for security reasons. 
  Click on the CREATE or CREATE LIKE buttons to create the administrator account. 
  You will be asked to provide the administrator's E-mail account, or accounts, 
  on subsequent screens.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Configuring Administrator 
  Accounts</b><br>
  Although the new administrator is now able to log on to 10G EM, they won't be 
  able to do much without performing some additional configuration activities. 
  Log off with the default 10G EM account and log back in to the tool using the 
  account you just created. If you look at the top right side of each panel in 
  10G EM, you'll see a PREFERENCES link. Click on that link to navigate to the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/email_length.gif">preferences 
  panel</a>. The first screen that appears will allow you to EDIT or ADD additional 
  E-Mail accounts that will be used to receive notifications. The MESSAGE FORMAT 
  was an important configuration parameter in my case. My cell phone provider 
  did not allow text messages over a certain length to be sent to my phone. I 
  had to choose the SHORT FORMAT in order to receive 10G EM text messages. If 
  text messages aren't being received on your phone, you may want to configure 
  10G EM to send you the shorter text messages as I had to.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Setting Up Preferred 
  Credentials</b><br>
  Before a 10G EM user can administer targets, they must provide the appropriate 
  accounts and passwords for each target on the preferred credentials panels. 
  This <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/preferred_credential_1.gif">first 
  configuration panel</a> shows the different types of targets that require accounts 
  and passwords to administer. You'll notice that our environment has 30 database 
  targets, 13 host targets and 14 listener targets. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">I clicked on the SETUP HOST 
  ICON on the right side of the panel to navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/preferred_credential_2.gif">host 
  configuration panel</a> to set up the preferred credentials for one of our hosts. 
  This panel allows you to set up a default credential for all targets that do 
  not have credentials set up individually. The target credential grid allows 
  you to enter host names and their associated operating system accounts and passwords. 
  This is the account that will be used to run host commands and jobs on the target 
  host server. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The database preferred credential 
  panel provides the same input format. Users are able to set up default, normal 
  and privileged account/password combinations for each target database they want 
  to administer. If preferred credential setup is not performed for a particular 
  target, a pop-up box will appear asking you to provide the required account/password 
  combination when you click on the link to navigate to the target's home page.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">You'll notice that there 
  are two different types of accounts and passwords, NORMAL and PRIVILEGED. Normal 
  database credentials are used by Enterprise Manager to perform functions that 
  do not require database administrator privileges. These credentials are also 
  used as the default login credentials when accessing an EM function that requires 
  a database connection. Privileged accounts are SYSDBA database credentials used 
  by functions that access non-open databases or perform database startup/shutdown 
  operations.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Notification Schedule</b><br>
  10G EM allows administrators to customize how they want to be notified of events 
  or alerts. For example, I may want to have an E-mail sent to my work account 
  during the hours from 9:00AM to 5:00PM and a text page sent to my cell phone 
  during off hours. Administrators use the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/notification_schedule.gif">notification 
  schedule setup panel</a> to customize their alert notifications. You navigate 
  to this panel by clicking on the SETUP tab at the top of the screen and then 
  selecting the Schedule link on the left side of the panel. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Notification Rules</b><br>
  Now that we know how we want to be notified when an event occurs, we'll need 
  to setup up WHAT we want to be notified of. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/notification_rules.gif">notification 
  rules panel</a> is used to create notification rules for all monitored targets. 
  You navigate to this panel by clicking on the SETUP tab at the top of the screen 
  and then selecting the Rules link on the left side of the panel. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G EM provides templates 
  to simplify the rule notification creation process. You'll notice that we have 
  created our own notification rules. Although this screen print doesn't show 
  it, we have created different notification rules for test and production targets. 
  In addition, we also have some customized notification rules set up for some 
  of our more mission-critical targets that require more stringent monitoring.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's continue our discussion 
  by creating a notification rule for our test databases. We do this by clicking 
  on the CREATE button on the notification rules panel. The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/rule_setup_1.gif">first 
  rules configuration screen</a> allows us to enter the notification rule's NAME, 
  DESCRIPTION and TYPE (database, host, listener, application server). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Clicking next takes us to 
  the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/rule_setup_2.gif">target 
  selection panel</a>. This screen allows us to select the targets we want this 
  notification rule to pertain to. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We then click next to navigate 
  to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/rule_setup_3.gif">availability 
  panel</a> which allows us to select the availability states for which we would 
  like to receive notifications. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">We navigate to the <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/rule_setup_4.gif">m</a></font><a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/rule_setup_4.gif"><font face="Arial, Helvetica, sans-serif" size="2">etrics 
  selection panel</font></a><font face="Arial, Helvetica, sans-serif" size="2"> 
  by clicking next. This panel lists all of the different metrics for that target. 
  We use the drop down to select the metrics that we want to be notified of. We'll 
  set the metric's threshold values later.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/rule_setup_5.gif">object 
  panel</a> is used to limit the objects that are monitored on the target. Traditional 
  SQL syntax is used to select or restrict the objects. In this 
  case, we have used the NOT LIKE SQL syntax to prevent the monitoring of all 
  tablespaces that have the characters &quot;TEMP&quot; in them. Hey, if an application 
  developer writes a five-table join that blows out our 7 GIG test TEMP tablespace, 
  let them call me.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Metrics and Thresholds 
  and Alerts - Oh My!</b><br>
  Metrics are units of measurement that are set at predefined values to assess 
  the health of the target being monitored. These predefined values are called 
  metric thresholds. Thresholds are one or more values against which current statistical 
  values are compared. Alerts are generated when a metric's threshold is exceeded. 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">10G EM divides the threshold 
  settings into warning and critical categories and allows administrators to configure 
  a specific set of actions that will occur when that threshold category is reached. 
  For example, the DBA may want to be e-mailed if a particular host's CPU utilization 
  exceeds the warning threshold of 70% and paged if the host's CPU utilization 
  exceeds the critical threshold of 90%.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Each target (host, database, 
  listener, application server) has its own set of predefined metrics that can 
  be customized to address each application's unique performance monitoring requirements. 
  In addition, administrators are able to create their own set of user-defined 
  metrics to provide a truly customized monitoring strategy for each monitored 
  target. <br>
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's end our discussion 
  by setting up thresholds for a target database. You navigate to the manage metrics 
  screen by clicking on the TARGETS link on 10G EM's home page and then clicking 
  on the DATABASE link which will take you to the databases being monitored. You 
  select the database you want to configure which takes you to the target 
  database's home page. Click on the PERFORMANCE tab and then scroll down until 
  you see the Manage Metrics link. Clicking on this link will take you to the 
  <a href="/blogs/blog_cf/chrisfoot/blogentry2005_05_149418191992/manage_db_metrics.gif">manage 
  metrics panel</a>. This panel lists all of the metrics associated with that 
  particular target type. Click the Edit Threshold link to edit the threshold 
  values. You can also use the Copy Threshold link to copy this target's thresholds 
  to other like targets.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Testing</b><br>
  To test your configuration, I highly suggest that you create a rule for one 
  of your databases and then set a few of the target's threshold values. We tested 
  our first alert by filling up our USERS tablespace in one of our DBA play databases. 
  Although the initial setup is somewhat tricky, I know that you'll become a 10G 
  notification guru in no time.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  Using 10G EM to perform database performance monitoring and tuning. </font></p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Using 10G OEM Grid Control's Host Performance Monitoring and Tuning Features</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-05-03.4782910010</link>
                      <description>&lt;font face="Arial, Helvetica, sans-serif" size="2"&gt;We took a quick detour from 10G in my last blog. In this blog, we get back on topic by discussing 10G Enterprise Manager's host performance monitoring and tuning features. In the final installment of this two-part series, I'll show you how to use 10G Grid Control's drilldown capabilities to identify performance problems.&lt;/font&gt; </description>
                      <pubDate>Wed, 04 May 2005 11:24:08 -0500</pubDate>
                              
      <content:encoded><![CDATA[</font> 
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's continue our discussion on 10G Grid Control host performance monitoring and tuning features by reviewing what currently happens in many shops.  I'll use UNIX in this example but the same events can be applied to any operating system.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">A performance issue arises 
  and the hapless DBA is notified by either:</font></p>
<ol>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> The UNIX support person 
    who is more than happy to verbally berate the DBA and his database for dragging 
    down his perfectly configured and administered hardware platform, or</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2"> An application developer 
    who was just called by an irate user stating that every time they run their 
    program nothing comes back, or</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">The irate user decides 
    to eliminate the middle man (see number &quot;2&quot; above) and contacts 
    (yells) at the DBA directly. </font></li>
</ol>
<p><font face="Arial, Helvetica, sans-serif" size="2">Wouldn't it be better if 
  the events occurred in this manner?</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">A performance issue arises 
  and the DBA is paged by a 10G Enterprise Manager CPU Utilization Alert that 
  is automatically generated by the database. The DBA brings up 10G Grid Control's host 
  performance home page and immediately determines that CPU utilization has suddenly 
  spiked to 100%. The DBA scrolls down and reviews the Top Processes by CPU Report 
  and finds that all of them are parallel processes running on database DWPROD3. 
  Our intrepid DBA navigates to the DWPROD3 performance home page, locates the 
  offending SQL and finds that the developer has overridden the parallel setting 
  by using the /*+ parallel degree(38) */ hint. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">The DBA then does the following:</font></p>
<ol>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Calls the application 
    developer to tell them that they shouldn't be overriding the parallel setting 
    in their SQL and the statement needs to be killed and resubmitted. The DBA 
    then makes a mental note to activate Database Resource Manager as soon as 
    possible.</font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Sends an E-Mail to the 
    UNIX support person telling them that there is a performance issue occurring 
    on one of their platforms but the cause has already been identified and the 
    problem will be fixed shortly. The DBA finishes by stating that he doesn't need to 
    use any of their archaic performance monitoring tools like NMON and TOP anymore 
    because Oracle 10G provides some nifty new performance reports. </font></li>
  <li><font face="Arial, Helvetica, sans-serif" size="2">Meets with business unit 
    folks after work for drinks and dinner. </font></li>
</ol>
<p><font face="Arial, Helvetica, sans-serif" size="2">Let's take a look at the 
  above story a little more closely (and seriously). </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Alert Notifications </b><br>
  Oracle10G provides early warning mechanisms to alert administrators of possible 
  error conditions or performance problems. The database itself collects numerous 
  metrics that were previously collected by Oracle Enterprise Manager. The host 
  metric page allows the DBA to activate thresholds and edit the threshold values 
  for up to a dozen different alerts. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Although, there are dozens of host monitoring statistics available, they all boil down to monitoring the utilization 
  of three primary resources: CPU, Memory and Disk. 10G Grid Control immediately begins 
  monitoring all targets at default settings when they are added to the monitoring 
  framework. Administrators are then able to fine-tune the threshold values for 
  individual targets when necessary. Monitored metrics are stored and aggregated 
  in the repository to provide trend analysis capabilities. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Here is a <A href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/manage_metrics.gif">screen print</A> of 
  the manage metrics page showing the resource metrics that can be activated for 
  a host server. The percentages shown are Oracle's default threshold values but 
  the values can be modified to customize the metrics to a specific target's monitoring 
  requirements. We'll learn more about creating and modifying performance alerts 
  in upcoming blogs. It is a two-part process that is relatively simple but I 
  don't want to make this blog any longer than it already is. The key to being 
  a proactive DBA instead of a reactive one is to SET THESE ALERTS. As I said, 
  I'll have a whole set of blogs on creating and editing alert notifications.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">But, lets get back to the 
  topic at hand. One way for us to categorize performance problems is by the scope 
  of their impact. We can have enterprise-wide, host server, application, program 
  and individual SQL statement performance issues. Enterprise-wide performance 
  problems are easy, just blame your network guys. But host, application, program 
  and SQL statement performance issues are often much harder to solve. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>The Drilldown Process</b><br>
  Good tuners understand that the tuning process starts with an understanding 
  of the problem then continues with the DBA collecting statistical information. 
  Information collection begins at a global level and then narrows in scope until 
  the problem is pinpointed. 10G Grid Control's performance drilldown capabilities facilitate this style of problem solving by allowing administrators to start their detective work at the host level and then providing the information necessary to allow them to quickly narrow the scope of possible causes until the performance issue is found.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">If you want to begin your 
problem determination process at the host level, <A href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/perf_home_page_vs_nmon.gif">10G Grid Control's host performance home page</A> is the natural place to start. You will want to review the utilization of the three primary resources: CPU, Memory and Disk. Take a look at the CPU chart, you'll notice that our server is currently experiencing a high level of CPU usage. We can verify this by comparing it against the host server's <A href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/nmon3.gif">NMON performance monitoring output screen.</A></p></font>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Historical Analysis</b><br>
  </font><font face="Arial, Helvetica, sans-serif" size="2"> We can then use the 
CPU drilldown link to take a look at <A href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/historical_CPU_drilldown.gif">CPU utilization historically.</A> I chose to review statistics for the last 7 days. Notice that CPU utilization spikes on a regular basis. We have known for some time that these spikes occur and intend to increase the number of CPUs to alleviate the problem. We have already identified and tuned all high resource consuming SQL running on that platform but were unable to reduce their resource utilization by a noticeable amount. Until we add the additional CPUs, we intend to reduce the number of parallel processes by setting the parallel process value lower in Database Resource Manager. </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">So we learned that we can use 10G Grid Control's drilldown capabilities to determine what resource is being over-utilized. In addition, we can use EM's historical reporting features to determine if the   problem is due to a gradual increase in the utilization of the resource in question or caused by a resource utilization spike. If it is a gradual resource increase, you will have to tune the SQL running on that server to reduce the amount of resources they consume or add more horsepower. If it is a utilization spike, 
  you will need to determine what SQL is causing the problem to occur.</font></p>
<p><B><font face="Arial, Helvetica, sans-serif" size="2">Problem Process Identification</font></B><BR><font face="Arial, Helvetica, sans-serif" size="2">In either case, we can use 
  <A href="/blogs/blog_cf/chrisfoot/blogentry2005_05_034782910010/perf_home_page.gif"> EM's process reporting chart</A> to determine what the top resource consuming processes are. The tool allows you to order the top resource consuming processes by CPU or memory. Please note that the sample EM Process reporting chart is from another server and is not related to the CPU problem we are experiencing in the previous discussion. In addition, I had to blank out some of the information for security reasons. The information I removed allows administrators to determine the process's owner and database it is executing in.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Once we know the database 
  the process (or processes) are executing in, we can navigate to that database's 
  performance page and continue our performance problem determination drill-down 
  process. 10G Grid Control has some new SQL tuning features that will help us to determine 
  exactly what the problem is.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Next Up</b><br>
  In my next blog, we'll continue our discussion by reviewing 10G Enterprise Manager's 
  database performance monitoring and tuning features. <br>
  </font> </p> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Optimizer Plan Stability in Oracle9i</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-04-27.7298144282</link>
                      <description>What?  A 9I article in a 10G blog?   What happened?  And its not on host monitoring like you promised?   Blashpemy! Well, I thought I'd deviate from 10G for one blog  to show you something neat that we have been using to tune vendor queries that are not coded for "optimal performance". &lt;br&gt;&lt;br&gt;So here's what I'll do to make up for it.  Because Stored Outline administration has changed somehwat much from 9I to 10G, I'll make sure I cover how Stored Outlines are created and administered in a 10G environment in a future blog.</description>
                      <pubDate>Thu, 28 Apr 2005 09:21:06 -0500</pubDate>
                              
      <content:encoded><![CDATA[<font=arial>Oracle8i provided administrators with the capability to "freeze" access paths and store them in the database. The access path to the data remains constant despite data changes, schema changes and upgrades of the database or application software. Administrators are able to determine which statements use the frozen access paths and which statements must have their access paths determined at execution time.<BR><BR> 

This feature provides stable application performance and is particularly suited to ISVs that distribute packaged applications. ISVs are now able to ensure that the same access paths are being used regardless of the environment their applications are installed upon. <BR><BR>

Optimizer plan stability also benefits high-end OLTP sites by having SQL execute without having to invoke the cost-based optimizer at each SQL execution. This allows complex SQL to be executed without the additional overhead added by the optimizer when it performs the calculations necessary to determine the optimal access path to the data.<BR><BR>

Oracle preserves the execution plans in objects called stored outlines. You can create a stored outline for one or more SQL statements. The optimizer generates equivalent execution plans from the outlines when you enable the use of stored outlines. You can also group outlines into categories and control which category of outlines Oracle uses. This feature allows administrators to choose from multiple outlines and multiple access paths. If the SQL text of the incoming statement matches the SQL text in an outline in that category, Oracle considers both texts identical and uses the outline. Oracle considers any differences a mismatch.<BR><BR>   

But it seems that the matching process isn't as strict as a hard parse vs soft parse match performed during statement execution.  Oracle matches statements being executed to statements that are already parsed and stored in the shared pool.  If Oracle finds an exact match, it will use the statement in the shared pool.  When the statement is found in the shared pool, it is described as being a soft parse.  If Oracle does not find any matching SQL in the shared pool, it will perform a hard parse which requires more steps to be performed than a soft parse.  As with mostly everything elese, less steps = faster performance.  When Oracle looks for a matching SQL statement in the shared pool, the statements must match EXACTLY.  That is, the statement must match in case, line breaks and spacing.   If the SQL doesn't match exactly, Oracle executes a hard parse.   <BR><BR>I experimented with capitalizing some of the characters in the stored outline SQL and executing the same statement in SQLPLUS in all lower case and it still used the outline.   In addition, I placed hits of enter in the SQL I was executing in SQLPLUS and, once again, the outline was used.   I finished my testing by using a combination of line breaks, extra spaces, lower and upper case and the outline was still used.   But if I rearranged any text in the statement or I did not use bind variables, Oracle considered this to be a mismatch and the stored outline was not used.  If the SQL statement you want to use to create the stored outline never changes its search criteria, I would expect that you would be able to use the statement without using bind variables.<BR><BR>

Oracle documentation states that administrators are able to activate cursor sharing if bind variables are not used to get the SQL statements running in the database to match the SQL in the stored outline.  Setting the parameter CURSOR_SHARING to SIMILAR or EXACT tells Oracle to replace all hard coded values in the SQL statements' WHERE clause with bind variables.   I have used this parameter to reduce hard parses in a large online transaction processing database and it certainly works.   Oracle replaced EVERY statement's hard coded values with bind variables.  That means every statment.  I noticed that it was also transforming 9I OEM's SQL used to retrieve database performance statistics.<BR><BR>

So statements that used to look like this in V$SQLTEXT:<BR><BR>

SELECT FIRST_NAME, LAST_NAME, DEPT_ID FROM SCOTT.EMP
WHERE LAST_NAME = 'SMITH'<BR><BR>

Look like this when you set the parameter CURSOR_SHARING = SIMILAR:<BR><BR>

SELECT FIRST_NAME, LAST_NAME, DEPT_ID FROM SCOTT.EMP
WHERE LAST_NAME = :V1<BR><BR>

But the biggest benefit that optimizer plan stability provides, in my opinion anyway, is its ability to allow us to tune vendor SQL without getting the vendor involved.    Is that great or what?<BR><BR>   

Before optimizer plan stability became available, once the administrator identified the canned application's poorly performing SQL, the third-party vendor was contacted to change the SQL code.  The vendor would eventually change the code and send a patch or new release back to the customer.  The customer then implemented the changed code in test and finally in the production environment to effect the tuning change.  Anyone who has experience with third-party application vendors knows that this is often a time consuming (if not impossible) process.  Vendors certainly try to avoid tailoring code to a specific customer.  If they do, it usually comes at a high monetary cost to the requestor.<BR><BR>

Optimizer plan stability allows administrators to use 9I OEM's Stored Outline Editor and ALTER SESSION commands to influence the optimizer to use a more high performance access path which is then frozen in the stored outline.<BR><BR>   

You can also create two stored outlines and swap their access paths.  One stored outline will contain hints to achieve the better access path while the other will match the SQL that will be running in the database to achieve the stored outline/running SQL match.  You then use SQL UPDATE statements to swap the stored outlines so the running SQL uses the outline's access path that was created using the hints.  Go to metalink.oracle.com and search using the keyword plan stability to find more detailed instructions.<BR><BR>

Each time the poorly performing SQL statement executes, the rewritten statement stored in the outline is used in its place.  No vendor assistance required!   Working with third-party application vendors is usually painful to begin with.   The less I need them to tune, in most cases, the better. <BR><BR>


To use stored outlines when Oracle compiles a SQL statement, set the system parameter USE_STORED_OUTLINES to TRUE or to a category name. This parameter can be also be set at the session level.  If you set USE_STORED_OUTLINES to TRUE, Oracle uses outlines in the DEFAULT category. If you specify a category name with the USE_STORED_OUTLINES parameter, Oracle uses outlines in that category until you re-set the USE_STORED_OUTLINES parameter to another category name or until you suspend outline use by setting USE_STORED_OUTLINES to FALSE. If you specify a category name and Oracle does not find an outline in that category that matches the SQL statement, Oracle searches for an outline in the DEFAULT category.  Oracle also allows individual statements to be used as input to stored outlines by adding some additional syntax to the statement itself.<BR><BR>

Remember that you are trying to get the SQL being executed to use a more efficient access path.   In our case, the vendor was optimizing the entire database for high volume transactions that required sub second response times.  In order to achieve the quick response times, the vendor set OPTIMIZER_MODE to FIRST_ROWS, OPTIMIZER_INDEX_CACHING to 90 and OPTIMIZER_INDEX_COST_ADJ to 20.    All excellent settings if you want to influence the optimizer to use NESTED LOOP joins and index access paths to improve online transaction performance.<BR><BR>

Our problem was that the application also required the execution of large batch jobs that joined large tables and scanned a large percentage of the tables being accessed.   Needless to say, the parameter changes made by the vendor to achieve sub-second OLTP response time didn't allow the optimizer to create the most optimal access paths for heavy batch processing.   We realized that the only way we could get the vendor's batch jobs to run in the desired timeframes was to influence some of the access paths to use more HASH joins and table scans (which are typically more suited to processing large volumes of data).<BR><BR>

We achieved this by using the ALTER SESSION commands to customize our session parameter settings.   We used the ALTER SESSION command to set OPTIMIZER_MODE to ALL_ROWS and set  OPTIMIZER_INDEX_ CACHING and OPTIMIZER_INDEX_COST_ADJ to their default values.<BR><BR>

Here's the <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_277298144282/create_wave_outline.sql">code</A> we used to create the stored outline with the optimal access path. You will notice that because the statement has to run successfully to create the stored outline, we had to wrap a lot of additional code around the it to get it to execute in SQLPLUS. We were forced to create a mini stored procedure.  That's because the SQL used input bind variables which you have to supply to get it to run.  In addition, SQLPLUS will choke if you select values from columns in PL/SQL and don't put them in predefined output variables.  That is why ALL of those output variables are identified.<BR><BR>File courtesy of Ace DBA Ron Berner.<BR><BR>

Because the table's schema owner was not hardcoded in the SQL coming from the vendor, we logged on as the owner of the tables to create the stored outline.  You are able to use 9I OEM's Outline Management tool to determine if the outline is being used.  When you become proficient at SQL tuning, you can also use it to change the outline's access path.  This <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_277298144282/outline_manager.gif">screenshot</A> of the Outline Management tool shows two stored outlines, their owners, and that they were both used by at least one SQL statement.<BR><BR>    

9i OEM's Outline Editor tool is activated by clicking on the EDIT OUTLINE button in the Outline Management tool.  It is important to note that you use the Outline Editor to edit the Store Outline's access path and NOT the statement itself.   If you look at this <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_277298144282/outline_editor2.gif">screen shot</A>, you'll see that I have activated the Join Method Properties Panel which allows me to change the statement's join method.   You can also use the editor to determine which table is accessed first in the join and toggle back and forth between index-access and full table scans.<BR><BR>

If you are experienced at tuning SQL and know the access path you want, you can dump the SQL into the Outline Management tool, create the Stored Outline and then activate the Outline Editor tool to manipulate the access path to achieve optimal performance.    Is this a great tool or what?  Oracle also provides PL/SQL programs to perform the same activities, but I'm now hooked on Oracle's SGT (Sissy Gui Tools).<BR><BR>

<B>Next Up</B><BR>
Back to 10G EM host performance monitoring and tuning.<BR><BR>
</font> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Host Performance Monitoring Using 10G Enterprise Manager Grid Control</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-04-19.3743394432</link>
                      <description>No matter how expertly you tune an Oracle database, if the server it runs on is overloaded, underpowered or configured incorrectly, you will never obtain "maximus database performis". &lt;BR&gt;&lt;BR&gt;So, let's start our discussion on 10G Enterprise Manager's performance monitoring features by investigating the tool's new host monitoring capabilities.  This first blog will provide you with a quick tour of EM's hot new host monitoring component.  In my next blog, I'll show you how you use the information it generates to monitor operating system and hardware performance.</description>
                      <pubDate>Wed, 20 Apr 2005 19:15:13 -0500</pubDate>
                              
      <content:encoded><![CDATA[10G Enterprise Manager calls objects that it monitors and administers "targets."  Target types include but are not limited to hosts, databases, application servers, listeners, and third-party applications.  10G EM's home page allows administrators to easily navigate to the different target types.  This blog will focus on the host target type.<br><br>

<b>Host Home Page</b><br>If you take a look at the host's <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/host_home_page.gif">home page</A> you'll notice a configuration section on the right hand side of the page.   This section contains navigation links that allow administrators to view hardware and operating system configuration parameters.  This system-related information, often only available to O/S administrators, allows DBAs to quickly view parameters that affect server and database performance.  The drill-down panels also include information on O/S packages, and patches, disk configuration and file system freespace.<br><br> 

<A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/host_home_page.gif">At the bottom</A> of the host's home page is a section that display's information on alerts that are currently active.  Alerts are generated when a metric's threshold is exceeded.   <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/metrics.gif">Metrics</A> are units of measurement that are set at predefined values to assess the health of the target being monitored.  These predefined values are called metric thresholds.  Thresholds are one or more values against which current statistical values are compared.<br><br>  

10G EM divides the threshold settings into warning and critical categories and allows administrators to configure a specific set of actions that will occur when that threshold category is reached.   For example, the DBA may want to be e-mailed if a particular host's CPU utilization exceeds the warning threshold of 70% and paged if the host's CPU utilization exceeds the critical threshold of 90%.<br><br>

Each target (host, database, listener, application server) has its own set of predefined metrics that can be customized to address each application's unique performance monitoring requirements.  In addition, administrators are able to create their own set of user-defined metrics to provide a truly customized monitoring strategy for each monitored target.       We'll discuss how administrators define and administer metrics and thresholds in another series of blogs.<br><br>       

Each host's <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/host_home_page.gif">home page</A> contains tabs that allow users to navigate to Performance, Targets and Configuration panels.  Let's take a look at each one.<br><br>

<b>Performance Tab</b><br>
The host's <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/perf_home_page.gif">performance panel</A> provides information on current CPU, Memory and Disk resource utilization.   Each resource's graphical display contains links that allow users to view more detailed statistical information.  Each of the drill down panels for <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/cpu_drilldown.gif">CPU</A>, <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/memory_drilldown.gif">Memory</A>and <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/disk_drilldown.gif">Disk</A> contains a drop down menu list that allows users to view current  as well as historical performance statistics for the last 24 hours, 7 days and 31 days.<br><br>

The main performance panel also displays information on the <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/perf_home_page.gif">top resource consuming processes</A> currently running on the host.  Once again, a drop down menu allows administrators to switch between top CPU and top memory consumption reports.   We'll learn how to use this report to speed the performance problem resolution process in the next blog.<br><br>

<b>Target Tab</b><br>
If you click on the Targets tab on the host's main panel, a <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/targetlisting.gif">listing</A> of the dependent or sub-targets (listeners, application servers, databases, etc) running on that host is provided.    The links allow administrators to easily navigate to the desired target.<br><br> 

<b>Configuration Tab</b><br>
Clicking on the configuration tab on the host's main panel sends users to the <A href="/blogs/blog_cf/chrisfoot/blogentry2005_04_193743394432/configuration.gif">main configuration display screen</A>.    The configuration panel displays information about the hosts' hardware and software configuration.   
<br><br>The information includes:
<ul>
<li>Hardware Configuration - memory, CPU, I/O and network interface configuration information</li>
<li>Operating System Configuration - release levels, kernel parameters and patches</li>
<li>Third-party package software installations -  (i.e. Veritas data storage management system packages,  EMC drivers, etc.)</li>
<li>Oracle software installations - products, components and patch sets</li>
</ul>

The host's configuration panel has an option to capture key configuration values to a flat file which can be viewed as a report or used in host configuration comparisons.   Although I haven't needed it yet, it would seem that comparing host configurations would be a pretty useful function.  Enterprise manager supports the following host configuration comparisons: 
 
<ul>
<li>Two host configurations</li>
<li>Two host configuration files</li>
<li>Host configuration and configuration file</li>
<li>One host configuration compared to multiple hosts</li>
</ul>
All aforementioned comparisons above can be done interactively except comaparisons between one host to multiple hosts which must be performed using 10G EM's batch job system.  The summary results of the comparison are presented in a tabular format.  The report contains links which drill down into more detailed comparison information.<br><br>

<b>Next Up</b><br>
Now that we have a better understanding of some of the host information that 10G EM provides , I'll provide you with a few helpful hints on using this information to determine if the  hardware platform and operating combination are helping (or hurting) database performance.
Thanks for reading..
 ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>A Preview of Upcoming Blogs</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/performancepreview</link>
                      <description>Ok, I just got notification that the administrators need to "freeze" this blogsite for a few days.   The freeze starts on Wednesday (4/13/05) and may last until this coming Friday or Monday.   We are converting to a new content management system called Plone.   Plone is an open-source content management system that provides the capability for blogs, RSS feeds, and other fun stuff. &lt;BR&gt;&lt;BR&gt;I wanted to try and squeeze a blog in that discusses 10G Grid Control's new host monitoring features.   These new tools will allow us to monitor and tune the hardware and operating system environment that Oracle runs on.   But it looks like I'm not going to make the deadline.   I started to rush through the article (or blog or whatever you want to call it) and decided that I would prefer to postpone it until next week.   There is just too much information to cover and rushing through it would be a disservice to you and to the host monitoring features that 10G Enterprise Manager provides.  I want to cover each new feature as thoroughly as I can.   I have numerous screen prints, hints and tips I want to include in this next blog. &lt;BR&gt;&lt;BR&gt;So we'll switch topics for a minute and I'll provide you with a quick preview of what's to come in future blogs.</description>
                      <pubDate>Tue, 12 Apr 2005 14:01:14 -0500</pubDate>
                              
      <content:encoded><![CDATA[<FONT size=2>
<P>In this next series of blogs, I intend to break 10G Grid Control's performance monitoring and tuning features into their individual components. I don't want an individual blog to be more than a few pages in length. Someone told me that one of the cardinal rules of blogging is to keep it simple and short. I'm OK with the simple part, but I certainly can be verbose from time to time. So if I get too long winded discussing a particular component, I'll break the blog up into two parts. </P>
<P>In Part 1, I'll provide a general overview of the component. I'll include screen shots and provide detailed definitions and descriptions of the integral parts that make up the component being discussed. In Part 2, I'll describe how we use the component here at Giant Eagle. For example, the next topic I intend to discuss is 10G Grid Control's host monitoring component. So next week's blog will provide readers with an overview of this new feature. I'll provide screen shots and definitions of the various terms&nbsp;we&nbsp;use&nbsp;when we talk about 10G Grid Control host monitoring. After reading the first blog, you should have a general understanding of 10G Grid Control's host monitoring capabilities. That will lay the groundwork for the next blog that will show you how to use 10G Grid Control's host monitoring component to monitor the hardware platform and operating system your database engine runs on. Clear as mud? Good...</P>
<P>A few of the 10G Enterprise Manager features I intend to cover are:</P>
<UL>
<UL>
<LI>Host Monitoring Features</LI>
<LI>Alerts, Metrics and Thresholds</LI>
<LI>Alert Notification Rules and Methods</LI>
<LI>10G Grid Control's Database Performance Page</LI>
<LI>AWR - Automatic Workload Repository</LI>
<LI>ADDM - Automatic Database Diagnostic Monitor</LI>
<LI>10G Grid Control SQL Tuning Tools Overview</LI>
<LI>SQL Tuning Advisor</LI>
<LI>SQL Access Advisor</LI>
<LI>Segment Advisor</LI></UL></UL>
<P>In addition, we have another set of data warehouses being converted to 10G in the near future. These are the multi-terabyte data stores that are hit hard by our end user population. I will deviate from our performance discussion from time to time to provide you with a status on our upgrade activities and discuss the lessons we learned during the planning and execution of our database migrations.</P>
<P>Thanks for reading.</P></FONT> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G OEM Grid Control Performance Overview</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/performanceoverview</link>
                      <description>Consider this to be the first of many blogs on the art of performance monitoring and tuning using 10G Enterprise Manager.  I'll start the series by discussing how the latest release of Oracle's SGT (Sissy GUI Tool) will force us to change the way administer, monitor and tune Oracle databases. &lt;BR&gt;&lt;BR&gt;In upcoming blogs, I'll break 10G Grid Control's monitoring infrastructure into individual components and discuss each one in-depth.   By the time I'm done, we'll all be 10G Enterprise Manager experts.</description>
                      <pubDate>Mon, 04 Apr 2005 08:31:46 -0500</pubDate>
                              
      <content:encoded><![CDATA[<P>I have been using Oracle's enterprise management toolsets for some time.&nbsp; I was around when the migration from command line to Oracle Enterprise Manager first took place.&nbsp; I must admit, it was hard for me to give up the command line interface that I trusted.&nbsp; Every time I entered a command using the new tool, I used the "Show SQL" button to review the SQL that was being executed.&nbsp;&nbsp; I began using the term "SGT" or "Sissy GUI Tool" to describe Oracle's new graphical administrative tool.&nbsp;&nbsp;&nbsp; I thought that real DBAs used command line! I think I'm showing my age here.</P>
<P>Now, like the majority of Oracle DBAs, I am an avid user of Oracle's graphical administrative toolsets.&nbsp;&nbsp; They make day-to-day administration so much easier that I actually can't remember the last time&nbsp; I used the traditional command line interface.&nbsp; I am now a "SGT" proponent.&nbsp; </P>
<P><STRONG>Oracle's New Strategy for Enterprise Manager</STRONG><BR>Previous versions of Enterprise Manager focused primarily on displaying a collection of database administration tools to the end user.&nbsp; The product's primary intent was to facilitate database object administration.&nbsp; Don't get me wrong.&nbsp; 9I OEM also allowed DBAs to be proactive by providing panels to create event driven alerts.&nbsp; In addition, 9iOEM also allowed administrators to run administrative and report jobs in batch against the target databases.&nbsp; If you purchased the Tuning Pack, there were dozens of screens available that displayed in-depth tuning information.&nbsp;&nbsp; Although these monitoring and tuning tools were very useful, when you compare 9I OEM to its 10G counterpart, it is blatantly obvious that Oracle has changed the way it wants us to use Enterprise Manager. </P>
<P>Although the efficient administration of database objects is still one of the fundamental objectives for 10G Grid Control, its no longer the primary one.&nbsp; In 10G Enterprise Manager, database object administration must "share the spotlight" with the presentation of proactive feedback information.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Each target's home page (database server, application server, hardware server, listener) displays such a wide array of information that a few of the Giant Eagle DBAs have described it as "command central." </P>
<P>Each <A href="/blogs/blog_cf/chrisfoot/performanceoverview/homepage2/index.html">home page</A> contains a wealth of information on performance, current workload, availability, diagnostics and early warning alerts and events.&nbsp; The new focus of Enterprise Manger is to provide information to the DBA to help them understand what is happening in their environments.&nbsp; Don't worry, Oracle still provides plenty of emphasis on database object administration.&nbsp; Each target's home page contains navigation tabs that allow administrators to easily access configuration information, management tools and administrative functions. </P>
<P><STRONG>Enterprise Manager Database Administration Functions<BR></STRONG>Although the graphical presentation has changed from 9I OEM to 10G Grid Control, we still perform administrative activities the same way we have for years.&nbsp;&nbsp; We add files to tablespaces, add columns to tables and grant and revoke security using buttons and drop-downs.&nbsp; As I stated, the administrative procedures didn't change.&nbsp; We are just using a different navigation style and clicking on different buttons and drop-downs to make object changes.&nbsp; </P>
<P>Once you learn to navigate through the tool as you would a website, Oracle10G Grid Control becomes a breeze to use.&nbsp;&nbsp; As usual, I didn't like it when I didn't understand how to use it.&nbsp; After using it for 2 or 3 hours, I was able to easily navigate through the database administration panels.&nbsp; I now prefer 10G Grid Control's navigation style to previous versions.&nbsp; Who says you can't teach an old DBA new tricks?&nbsp; </P>
<P><STRONG>Enterprise Manager Performance Monitoring<BR></STRONG>The story is much different with 10G Enterprise Manager's performance and monitoring architecture.&nbsp; Unlike its administrative counterpart, 10G Enterprise Manager's performance tools will change the way we monitor and tune Oracle databases.&nbsp;&nbsp; </P>
<P>When I first started learning how to use 10G Grid Control's new performance screens, I was somewhat intimidated by their radically different look and feel.&nbsp;&nbsp;&nbsp; Learning the new interface takes time and patience.&nbsp; After testing day-to-day functionality, I spent 15 or 20 hours performing mock tuning drills using Enterprise Manager.&nbsp;&nbsp;&nbsp; I once again feel that 10G Grid Control's tools are far superior to any product (third party or Oracle provided) that I have ever used.&nbsp;&nbsp; </P>
<P>The changes begin with the information displayed on the target's <A href="/blogs/blog_cf/chrisfoot/performanceoverview/homepage2/index.html">home page</A>.&nbsp;&nbsp; Host CPU and user workload information is predominantly displayed.&nbsp; In addition, early warning performance alert information is also displayed.&nbsp;&nbsp; The administrator is able to use the links provided with this information to drill down to&nbsp;panels providing more specific and detailed tuning information.</P>
<P><STRONG>Workload Monitoring</STRONG><BR>The interesting thing to note is that once you begin to drill down through the screens, 10G Grid Control's focus is on the SQL&nbsp;workload and not database statistics.&nbsp;&nbsp; This is in stark contrast to 9I OEM, which provided dozens of screens that displayed database performance stats.&nbsp; 10G Enterprise Manager wants us to review the SQL workload first, <A href="/blogs/blog_cf/chrisfoot/performanceoverview/drilldown/index.html">drill down&nbsp;into it</A>&nbsp;and investigate the impact it has on the database before we begin looking at the database performance indicators.&nbsp;&nbsp;&nbsp; In upcoming blogs, I'll highlight this change specifically.</P>
<P>10G Grid Control bolsters its emphasis on SQL workload monitoring by providing users with the capability of viewing past workloads.&nbsp;&nbsp; Administrators are able to use a&nbsp;<A href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/performanceoverview/slider2">slider</A> to review SQL workloads that occurred previously.&nbsp; This feature will help DBAs answer the age old question, "I had a program run long yesterday, can you help?".</P>
<P>In future blogs, I will be paying particular attention to 10G Grid Control's SQL monitoring feature, which automatically analyzes SQL statements for performance and resource consumption.&nbsp;&nbsp; This enhancement not only identifies poorly performing SQL statements but also make recommendations to improve them.</P>
<P><STRONG>Proactive Performance Monitoring</STRONG><BR>Metrics are units of measurement that are set at predefined values to assess the health of the target being monitored.&nbsp; These predefined values are called metric thresholds.&nbsp; Thresholds are one or more values against which current statistical values are compared.&nbsp; 10G Grid Control divides the threshold settings into warning and critical categories and allows administrators to configure a specific set of actions that will occur when that threshold category is reached.&nbsp;&nbsp; For example, the DBA may want to be e-mailed if a particular host's CPU utilization exceeds the warning threshold of 70% and paged if the host's CPU utilization exceeds the critical threshold of 90%.</P>
<P>Each target (host, database, listener, application server) has its own set of metrics that can be customized to address each application's unique performance monitoring requirements.&nbsp;&nbsp; In addition, 10G Enterprise Manager allows you to copy the current target's metrics to other targets to facilitate the metric creation process.&nbsp;&nbsp; Our current strategy at Giant Eagle is to set metrics for a master target and copy those metrics to all targets of the same type.&nbsp;&nbsp; Once we become more accustomed to using Enterprise Manager, we'll consider customizing each individual target's metrics to better address its unique monitoring needs. </P>
<P>10G Grid Control also takes a much more proactive role in performance monitoring and reporting.&nbsp; This proactive monitoring and reporting functionality is applied to all monitored targets.&nbsp; 10G Grid Control immediately begins monitoring all targets at default settings when they are registered.&nbsp; Administrators are then able to fine-tune the threshold values for individual targets when desired.&nbsp; Monitored metrics are stored and aggregated in the repository to provide performance trend analysis capabilities. Those of us who have SLA agreements with their customers will find 10G Grid Control's status reports to be of great benefit.&nbsp; 10G Grid Control automatically provides an availability status for the last 24 hours, 7 days or one month.&nbsp;&nbsp; <BR>&nbsp;<BR><STRONG>Intelligent Thresholding</STRONG><BR>10G Grid Control allows administrators to review statistics for a monitored target and choose a particular time period to act as a benchmark for future performance evaluations.&nbsp;&nbsp; The DBA reviews past statistical information, determines when performance was good and 10G Grid Control will capture the statistics for that time period.&nbsp;&nbsp; The DBA then sets one warning and one critical threshold for each monitored statistic.&nbsp; 10G Grid Control will begin comparing all future statistics to the baseline.&nbsp; If any of the statistics exceed their baseline threshold, a warning or critical alert message will be generated.</P>
<P><STRONG>Advice Driven Alerts</STRONG><BR>10G Grid Control also provides advice-driven responses to generated alerts.&nbsp; The administrator is able to use the advice to speed the problem determination and resolution process.&nbsp; The advice may include historical information to allow administrators to perform trend analysis on a particular statistic or threshold. </P>
<P><STRONG>Operating System Performance Information</STRONG><BR>10G Enterprise Manager places much more emphasis on the presentation of operating system and hardware specific performance information than previous versions.&nbsp; Each monitored host has its own <A href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/performanceoverview/hostinfo3">performance panel</A>&nbsp;that provides information on CPU, Memory and Disk performance statistics.&nbsp; We all know the effect that the operating system and hardware combination have on database performance.&nbsp; You can have the most finely tuned database on the planet and it will still not perform to expectations if the hardware server/operating system environment it runs on is configured incorrectly or is experiencing a workload spike.&nbsp; Host performance information is another feature that I intend to spend some dedicated blog-time on.</P>
<P><STRONG>Next Up</STRONG><BR>In my next blog we'll cover host performance information.&nbsp;&nbsp; </P>
<P>Thanks for reading!</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Database Upgrade Tips</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10gupgradetips</link>
                      <description>In my last blog, I discussed the various testing strategies we implemented at Giant Eagle to make sure we had a trouble-free migration to Oracle's latest and greatest release.  In this blog, I'll discuss some general techniques you can use to make any database upgrade easier and less error-prone.&lt;BR&gt;&lt;BR&gt;In upcoming blogs, I'll cover how we have configured 10G Enterprise Manager to monitor and administer our 10G test and production databases.  In addition, I'll also describe how we use the tool to perform performance monitoring and tuning.  Performance monitoring and tuning using 10G EM is so drastically different than 9I OEM, that it is definitely worthwhile for me to spend some time telling you how we use it.   With SQL joining billion row tables on a regular basis, we quickly become experts on all new tools we use here.</description>
                      <pubDate>Thu, 31 Mar 2005 09:07:45 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>I'm guessing that a few readers may think that some of the hints below are overkill (like reading all of the Oracle documentation).&nbsp;&nbsp; As I said before, some DBAs are smart, some are lucky and the rest of us have to be thorough.&nbsp; </P>
<P><STRONG>Migration Tips and Techniques<BR></STRONG>Begin by reading everything you can about the release you are migrating to.&nbsp; Call me old school, but I still read the entire set of documentation for every new Oracle release.&nbsp;&nbsp; The order of the first few books is always the same: "Migration Guide",&nbsp; "New Features", "Concepts", "Administrators Guide", "Reference",&nbsp; "SQL Reference", "Performance Tuning Guide" and "Data Warehousing Guide".&nbsp;&nbsp; The remaining books are read in no particular order.&nbsp; It's pretty much what I feel like reading at the time.&nbsp;&nbsp; When I was teaching, I always reinforced to my students that they needed to reference the Oracle documentation FIRST.&nbsp; When reading the migration manual, pay special attention to the common migration problems and back-off procedure sections.&nbsp;&nbsp; Also pay special attention when reading the New Features Guide.&nbsp; Not only to determine the benefits the new features provide but to ensure that you are able to quickly identify any problems that they may create.&nbsp; </P>
<P>There are numerous industry pundits out there claiming to be "The Expert" on Oracle technologies.&nbsp; Take some advice from your friendly ex-Oracle instructor.&nbsp;&nbsp; The only sources of information that you should bet your career on are the Oracle Documentation, MetaLink (<A href="http://metalink.oracle.com/">metalink.oracle.com</A>) and Technet (<A href="http://technet.oracle.com/">technet.oracle.com</A>).&nbsp; Scour the web for information on the upgrade process and potential pitfalls.&nbsp; Start with metalink.oracle.com and technet.oracle.com and then do some <A href="http://www.google.com/">Googling</A>.&nbsp;&nbsp; Search Metalink using the release number you are upgrading to.&nbsp; Pay special attention to all of the reported problems and see if they apply to your particular environment.&nbsp; Currently, Technet has the the <A href="http://www.oracle.com/openworld/archive/index.html">2004 Oracle Open World Presentations </A>available for downloading.&nbsp; A few of the presentations focus specifically on the 10G upgrade process. </P>
<P>Make sure you visit the various database discussion forums.&nbsp; Like this one!&nbsp;&nbsp; How can you beat the information contained in DBAZine!&nbsp;&nbsp; Reply to this blog with a question.&nbsp;&nbsp; I didn't become an Oracle instructor for the fame and fortune, I like transferring information to others. I'll help you as much as I can.&nbsp; One thing about the DBA community - we are a helpful bunch and always willing to give advice.&nbsp; Choose it wisely. </P>
<P>You'll need to determine the upgrade path required for the release you are upgrading to.&nbsp; For example, Oracle supports a direct upgrade to Oracle10G from versions 8.0.6, 8.1.7, 9.0.1, and 9.2.0.&nbsp;&nbsp; Upgrades from other releases require upgrading to an intermediate release before migrating to 10G.&nbsp;&nbsp; A database on release 7.3.4 would first be upgraded to 9.2.0, and then to 10.1.0.&nbsp;&nbsp; This will have a definite impact on your timelines and testing strategies.</P>
<P>Sell the benefits that 10G has to offer to management.&nbsp;&nbsp; 10G has dozens of new features so it should be easy.&nbsp;&nbsp;&nbsp; Let's face it; the database upgrade process is costly and to be quite frank, a little dangerous.&nbsp;&nbsp; You'll need their buy in to push the upgrade process through the organization. </P>
<P>Sell the reasons why this upgrade is important to the application development teams.&nbsp; These are the folks that will be spending the numerous hours required to test their application.&nbsp;&nbsp; I know of few organizations that have developers with enough free time to test a new release without impacting other projects.&nbsp;&nbsp; Understand that they have production deadlines that also must be met.&nbsp;&nbsp;&nbsp; If you have many different databases to convert (like we do), create a conversion strategy that takes application workload into consideration.&nbsp;&nbsp; Juggle the application conversion sequence until you come up with a set of conversion dates that all can agree upon.&nbsp; Lastly, don't take it personal (as I used to) when an application team is forced to change a conversion date.&nbsp;&nbsp; Rest assured, they don't usually dream up ways of making you miserable.&nbsp; They are being driven by the business. </P>
<P>Create your own lab database and convert it before you upgrade a test database that is used by application developers.&nbsp;&nbsp; That way you can fight through any conversion errors at your leisure. Use this conversion database to test the latest, high-tech features to ensure they work as advertised (and they don't crash the database).&nbsp; Document the migration process paying special attention to problems and migration "quirks".</P>
<P>If you have the luxury of choosing the first production database to upgrade, choose one that is small, easy to recover, not mission critical and has an adequate outage window.&nbsp;&nbsp; Choosing an Electronic Funds Transfer or General Ledger application for your first upgrade instead of your unit's internal vacation database could be a mistake.&nbsp; </P>
<P>Create a migration document that includes checklists, application test plans, back-off procedures and business user contacts.&nbsp; Include a step-by-step description of the activities that will be executed during the migration process. Contact information for everyone involved in the migration should also be included in the migration document.</P>
<P>Create application developer and business user sign off documents.&nbsp; Once the developers and business users have completed their testing, the documents will be signed and the initial migration process will be complete.&nbsp; I have been burned once or twice by applications that were inadequately tested. </P>
<P>Perform the upgrade in test and ask the developers to run a complete test of the applications that access the database being upgraded.&nbsp; A formalized test plan should be created that tests application functionality, compares application performance to the old release and evaluates any new features that the application will be utilizing in the near future. </P>
<P>Schedule a meeting with operating system administrators, application developers, operations personnel and business users to discuss the migration process.&nbsp; Discuss and verify the contents of the turnover document.&nbsp;&nbsp; This meeting will also ensure that everyone understands what is expected of them during the migration process. </P>
<P>Be prepared to back the migration out.&nbsp; No matter how sure you are that you have tested everything, you MUST have a fallback strategy in place.&nbsp;&nbsp; </P>
<P><STRONG>Up Next</STRONG> <BR>Tuning, tuning, tuning.&nbsp; The first blog of many blogs on performance monitoring and tuning using 10G Enterprise Manager.</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Data Warehouses</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/productionturnover</link>
                      <description>It has been a long process, but we have successfully converted our first production warehouse to Oracle10G.  The database has been running for over a week now with no problems and is performing better than we thought it would.  In this first post-turnover blog, I'll cover some of the testing strategies we used to ensure a successful migration to Oracle10G.  In part 2, I'll provide you with a laundry list of helpful tips and techniques you can use to make any database upgrade easier and less error-prone.</description>
                      <pubDate>Fri, 25 Mar 2005 13:42:24 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>I wanted to wait for at least a week after converting our first warehouse database to discuss the conversion process.&nbsp;&nbsp; Now that we have 10 days of processing complete, it looks like our migration from 9I to 10G was a success.&nbsp; As I stated in previous blogs, the PL/SQL programs run much faster in 10G than they do in 9I.&nbsp;&nbsp; In addition, we have had no problems (knock on a DBA's head) since the database was converted. </P>
<P>I just reviewed the database's alert log and associated trace files (for the thirtieth time) and found nothing that would cause me to believe that the database is having problems.&nbsp;&nbsp; In addition, we have been using Oracle 10G Enterprise Manager to administer and monitor the newly converted database and both the tool and the database have been performing flawlessly. </P>
<P>In upcoming blogs, I'll cover how we have configured 10G Enterprise Manager to monitor and administer our 10G test and production databases.&nbsp; In addition, I'll also describe how we use the tool to perform performance monitoring and tuning.&nbsp; Performance monitoring and tuning using 10G EM is so drastically different than 9I OEM, that it can only be described as a "paradigm shift".&nbsp; </P>
<P>I hate to use such a trite expression, but I think that's the best way to describe it.&nbsp;&nbsp; 9i OEM's tools primarily focused on database statistics (buffer hit ratios, file stats, events and waits).&nbsp; Workload tuning (SQL, PL/SQL) tools were available but they didn't seem to be the primary focus&nbsp;(compared to 10G EM).&nbsp;</P>
<P>10G EM continues to provide database statistical information but also provides numerous tools to monitor and evaluate database workloads and the affect they have on database performance.&nbsp; Administrators are now able to easily view all of the programs and SQL that are running (or have run) in the Oracle database and determine how well they are performing.&nbsp; If they aren't performing well, 10G EM quickly provides the reasons why.&nbsp;&nbsp; This new release of EM is just so much better at monitoring database workload performance that it is worthwhile for me to spend some time describing how we use it.&nbsp;</P>
<P>But let's get back to the topic at hand.&nbsp;&nbsp; I thought I would provide you with some of the reasons why I think our conversion went off without a hitch.&nbsp; Some DBAs are smart, some are lucky and the rest of us have to be thorough.&nbsp;&nbsp;&nbsp; Since I am neither lucky nor super-smart, I absolutely have to be thorough to be successful in my profession.&nbsp; </P>
<P>Let's face it; one of the tasks that makes many DBAs lie awake nights is the database upgrade.&nbsp;&nbsp;&nbsp; Most point upgrades (i.e. 8.1.6 to 8.1.7) are relatively simple.&nbsp; The DBA runs a few SQL scripts to upgrade the database to the new release.&nbsp;&nbsp;&nbsp; But upgrades from one Oracle version to the next, like our 9I to 10G migration, are major projects that require a well thought-out, documented strategy to ensure success.</P>
<P>My primary piece of advice is to be thorough.&nbsp;&nbsp; Take a look at the test plans below and you'll see that we tried to test everything we could.&nbsp;&nbsp; The end result was the new database went in and everyone, including management, is happy. The database engine plays such a strategic role in organizations that upgrade projects are often highly visible to upper management.&nbsp; There's nothing like an upgrade gone bad to tarnish a reputation you have spent years building. <BR>&nbsp;<BR><STRONG>OEM Testing</STRONG><BR>Because 10G Enterprise Manager is so radically different than its 9I counterpart, I felt that it required a separate testing plan.&nbsp; So, I created a <A href="/blogs/blog_cf/chrisfoot/10goemtesting/index.html">10G EM testing plan</A>&nbsp;that covered virtually every feature that the new tool provides.&nbsp;&nbsp; Sound like overkill to you?&nbsp; Not to me. I am now confident that we will be able to administer the databases without a problem.&nbsp;&nbsp; <BR>&nbsp;<BR><STRONG>RMAN Testing</STRONG><BR>If you have read my past blogs you also know that I was also highly concerned about the new release of RMAN.&nbsp; Hey, that tool scares me to begin&nbsp;with so I wasn't going to rest easy until I created an <A href="/blogs/blog_cf/chrisfoot/10grmanpart2/index.html">RMAN test plan</A>&nbsp;that covered every RMAN command that we use here at Giant Eagle.&nbsp; The&nbsp;test plan didn't take me that long to set up and execute so&nbsp;it was&nbsp;well worth the&nbsp;effort.&nbsp;&nbsp;&nbsp;<BR>&nbsp;<BR><STRONG>Base Functionality Testing</STRONG><BR>Our base functionality test plan included: startup/shutdown, remote access, utility execution (SQLLOADER, Export/Import), interoperability with the UNIX and LINUX operating systems, querying the data dictionary, backup/recovery, basic DML and DDL statement execution.&nbsp; Please note that since we had been testing Oracle10G in our labs for some time, most of this was just a quick review to ensure that everything continued to work as it had in the past.<BR>&nbsp;<BR><STRONG>Application Testing</STRONG><BR>Our application team counterparts created their own formal 10G test plans. Some of the components they tested are provided below:</P>
<UL>
<LI>Business rules enforced by constraints, triggers and procedures </LI>
<LI>Data feeds from other architectures </LI>
<LI>Load utility processing </LI>
<LI>Nightly batch processing </LI>
<LI>Online transaction processing </LI>
<LI>Development tools used to build front-end application screens </LI>
<LI>Third-party tools used to provide Ad-Hoc query access </LI>
<LI>Procedural language used to build business logic (Java, PL/SQL) </LI>
<LI>Advanced features required (replication, advanced queuing, partitioning, parallelism)</LI></UL>
<P>Although application functionality testing isn't intended to identify performance problems, general run times were evaluated.&nbsp; If something ran twice as fast or twice as slow as we expected, we intended to perform an in-depth analysis.&nbsp; Luckily for us, everything ran the same or faster in Oracle10G.<BR>&nbsp;<BR><STRONG>Performance Testing</STRONG><BR>Performance testing allowed us to compare the performance of various SQL statements in the new Oracle10G database with the statements' performance in the old release (in this case Oracle Version 9.2).&nbsp; We ran selected online transactions and batch jobs and compared their execution times and performance statistics.&nbsp; <BR>&nbsp;<BR>We didn't have to run traditional stress tests.&nbsp; Like many data warehouses, a high number of concurrent users is not the pressing issue for this database.&nbsp;&nbsp;&nbsp; We are concerned about loading lots of data and SQL statements that scan millions and millions of rows.&nbsp; If our test database could survive our nightly batch processing job stream, I knew that 10G could handle virtually everything we threw at it.<BR>&nbsp;<BR>We have numerous Oracle supplied and third-party toolsets available.&nbsp;&nbsp; Since 10G and 9i have different versions of Oracle Enterprise Manager, we didn't use them during our performance evaluation.&nbsp; As a result, we used the basic toolsets at our disposal.&nbsp; <BR>&nbsp;<BR>We began by comparing the elapsed execution times of both workloads.&nbsp; We used explain plans to compare access paths and STATSPACK to generate statistical performance reports.&nbsp; Yes, even though 10G has all kinds of high-tech tuning gadgets, we used the old tried-and-true STATSPACK tool to generate our performance statistics.&nbsp;&nbsp; We also used SQL Trace and TKPROF when more in-depth analysis was warranted.&nbsp; The same tools I have been using since Scott's tiger was a cub.<BR>&nbsp;<BR>In addition, our UNIX team was also involved.&nbsp; They used NMON, VMSTAT, IOSTAT and various third-party toolsets to measure the overall load on the system during each of the test runs.&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR><STRONG>Good Testing Documentation is Essential<BR></STRONG>Creating new release testing checklists is a task that is often considered to be boring and mundane. Most DBAs would rather perform virtually any other activity than sit in front of a screen using a word processor. As a result, creating testing documentation is often postponed until the last minute.&nbsp; </P>
<P>But a robust and detailed documentation library is the key to success.&nbsp; The documents we created for our first production migration can now be used for future migration processes.&nbsp; The testing checklists ensured that nothing was missed and were essential to the testing process. </P>
<P><STRONG>Next up</STRONG><BR>In my next blog, I'll provide you with a laundry list of helpful tips and techniques you can use to make any database upgrade easier and less error-prone.<BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>RMAN 10G Registration Problems </title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/rmanregproblem</link>
                      <description>Consider this to be my first "stop the presses" blog.  We ran into an issue with RMAN that I think everyone needs to know about.  Although the problem's impact was significant enough to stop our 10G conversions, we have identified an easily implemented preventative measure, a fix and an explanation.&lt;br&gt;&lt;br&gt;If you intend to upgrade any 9I databases to 10G and use RMAN to back them up, it would be worthwhile for you to spend a few minutes reading this blog.  If you don't, you may be recreating all of your database's controlfiles to fix a problem that is EASILY prevented.</description>
                      <pubDate>Wed, 16 Mar 2005 08:55:06 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>OK, let's start this problem prevention blog by providing you with an overview of the problem.</P>
<P>As you know we have begun converting many of our test databases to Oracle's latest and greatest release, Oracle10G.&nbsp; You also know that I have begun testing 10G RMAN to make sure everything works.&nbsp; The problem occurs when you convert an Oracle 9I database to 10G and then attempt to register the newly upgraded database with the 10G RMAN repository.&nbsp; </P>
<P>During the registration, you may get the following error:</P>
<P>RMAN&gt; register database ;</P>
<P>database registered in recovery catalog</P>
<P>starting full resync of recovery catalog</P>
<P>RMAN-00571: ===========================================================</P>
<P>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============</P>
<P>RMAN-00571: ===========================================================</P>
<P>RMAN-03008: error while performing automatic resync of recovery catalog</P>
<P>ORA-01400: cannot insert NULL into ("RMAN"."BSF"."MODIFICATION_TIME")</P>
<P>If you do get the error, which I am assuming everyone will, you are in for a somewhat rude surprise.&nbsp;&nbsp; You are hitting BUG 3657899 - Registering Migrated Database in RMAN Fails with ORA-01400.&nbsp;&nbsp; The bug definition states that the problem&nbsp;occurs because the MODIFICATION_TIME is NULL in V$BACKUP_SPFILE after the migration.&nbsp; Actually, the registration works; it's the catalog resync that occurs automatically after the registration that fails.</P>
<P>Oracle's fix is to have the customer issue the 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE' statement and use the output to recreate the target database's control files.&nbsp;&nbsp; The database can then be successfully registered and the catalog resynchronized.&nbsp;&nbsp; </P>
<P>Needless to say, the 'CREATE CONTROLFILE' statement is NOT an operation to be taken lightly.&nbsp; As far as I am concerned, it is one of the most dangerous statements a DBA can execute.&nbsp; During my career as an Oracle instructor, I have personally taught hundreds of students how to recreate controlfiles in Oracle's Backup and Recovery Class and I still only execute this statement as a last resort.&nbsp; I will&nbsp;always try and "weasel" my way out of doing it if I can. </P>
<P>We now need to recreate the controlfiles for several of our test databases.&nbsp;&nbsp; Lucky for us we caught the problem before we began migrating our production databases from Oracle9i to Oracle10G.&nbsp;&nbsp; I created a TAR with Oracle that pretty much stated that recreating a database's controlfiles should only be done as a last resort in a recovery situation and asked if there were any other workarounds available.&nbsp;&nbsp;&nbsp; I received a quick response from Oracle telling us that the problem was fixed in releases 10.1.0.4 and 10.2.&nbsp;&nbsp; The problem is that neither of those versions have been released yet.&nbsp;&nbsp; At that time, we felt that we should place our 10G production migration on hold until 10.1.0.4 became available. </P>
<P>Arun Bhat, Giant Eagle's RMAN expert, decided that instead of us waiting for Oracle versions 10.1.0.4 or 10.2 to be released for AIX,&nbsp; we needed to do some further testing on our own.&nbsp;&nbsp; One of Arun's suggestions was to preregister the 9I database with the 10G repository, upgrade the 9I database to 10G and then execute the RESYNC CATALOG command to resynchronize the newly upgraded database in 10G RMAN.&nbsp; Jeff Kondas agreed and decided that he would run the tests.&nbsp;&nbsp; Arun is usually correct and he once again was in this case.&nbsp;&nbsp; The database resynchronize was successful. </P>
<P>So to summarize the problem:</P>
<P><STRONG>Problem Description:</STRONG><BR>Registering a target database in RMAN that has been upgraded from 9i to 10G will fail with an ORA-01400.&nbsp; The actual registration itself works but the automatic resynchronization that occurs after the registration fails with the ORA-01400.&nbsp; Since you can only back up a 10G database with a 10G RMAN repository, you will be unable to use RMAN to back up your newly upgraded database.&nbsp; </P>
<P><STRONG>Problem Fix:</STRONG><BR>Issue the 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE' statement which sends a file containing the CREATE CONTROLFILE syntax to the database's user dump destination directory.&nbsp;&nbsp; Edit the output file and execute it to recreate all of the database's control files.&nbsp;&nbsp; Register the database with 10G RMAN.</P>
<P><STRONG>Problem Corrected:</STRONG><BR>The problem is supposed to be corrected in Oracle versions 10.1.0.4 or 10.2.&nbsp; </P>
<P><STRONG>Problem Prevention:</STRONG><BR><STRONG><FONT color=#000000>Make SURE YOU REGISTER THE 9I DATABASE WITH 10G RMAN BEFORE YOU UPGRADE THE DATABASE TO 10G.</FONT></STRONG>&nbsp; If you don't, you'll be forced to drop and recreate the target database's control files.&nbsp; Not an enviable position to be in...<BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>An Interview with Expert Warehouse Developer Bob George on 10G Application Performance</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/applicationperformance</link>
                      <description>Giant Eagle's warehouse development team has also been busy putting Oracle10G through its paces.   We have spent a lot of time learning how to administer Oracle's latest and greatest release, so let's now turn our attention to what Giant Eagle's application developers have been up to.   In this blog, we'll review the results of our application testing and compare some batch and on-line execution times from our 9I data warehouse to its 10G counterpart.</description>
                      <pubDate>Wed, 09 Mar 2005 07:20:54 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>I've had the good fortune of working with Bob George since I started at Giant Eagle.&nbsp;&nbsp; Besides having a very strong technical skill set, Bob takes ownership of the applications he supports and is one stubborn individual.&nbsp;&nbsp; I like that in a developer.&nbsp;&nbsp; He's not afraid to stand up against all of the Type A personalities I have on my DBA team.&nbsp;&nbsp; Why are all DBAs Type A's anyway?&nbsp; </P>
<P>If Bob doesn't feel comfortable with us migrating his warehouse to 10G, he'll tell us.&nbsp; I trust&nbsp;Bob's opinion.&nbsp;&nbsp;If Bob says we don't (or can't) go to 10G, we will postpone the migration until he says we're ready.&nbsp; Bob has been running our entire warehouse nightly batch job stream against the 10G test database&nbsp;for some time now and comparing the run times against our 9I&nbsp; production warehouse.&nbsp; &nbsp;I thought it might be beneficial to interview Bob on his findings and on 10G application performance in general.&nbsp;&nbsp;</P>
<P><STRONG>Question <BR></STRONG>You have been working with Giant Eagle's data warehouses for some time now. Why do you like working with such large data stores?<BR><BR><STRONG>Answer</STRONG> <BR>I've been working on large data warehouses for about 5 years now.&nbsp;&nbsp; I like big data.&nbsp; Working with large data stores is extremely challenging.&nbsp; Data Warehouses, because of the amount of data they store, are very unforgiving.&nbsp; As a result, they challenge your technical expertise on a daily basis.&nbsp; If you make a mistake on an access path, not only can your job run long, it can lock up the entire warehouse platform.&nbsp;&nbsp; My job is to be able to transform terabytes of data into meaningful information for my business users.&nbsp; That's the name of the game. I like working with a system that can bite you if you aren't careful.</P>
<P><STRONG>Question </STRONG><BR>What does the future hold for data warehouse data stores? </P>
<P><STRONG>Answer </STRONG><BR>I think that we will see more real time data feeds into data warehouses.&nbsp; The warehouse will no longer be viewed as a simple repository of historical data that is used to make strategic decisions.&nbsp;&nbsp; The real time feeds will allow end users to use the data to also make tactical decisions.&nbsp; As a result, the traditional role of the warehouse will change.&nbsp; It will be a data store that is used to make both strategic and tactical decisions.&nbsp;</P>
<P>The size of data warehouses will also continue to grow.&nbsp; Businesses want to store more data not less.&nbsp; More data to be analyzed means better business decisions.&nbsp;&nbsp;Storage is becoming more cost effective.&nbsp; <FONT size=2>In the past, databases that were hundreds of GIGs in size were considered to be large environments.</FONT>&nbsp; We now have single index structures&nbsp;that size.&nbsp; </P>
<P><STRONG>Question <BR></STRONG>You have been monitoring 10G application performance for some time now.&nbsp;&nbsp; What is your general opinion? <BR><BR><STRONG>Answer</STRONG> <BR>The database is pretty rock solid.&nbsp; You never know what to expect when you begin testing a new release.&nbsp; You always expect at least a few problems to crop up. We have had no problems worth mentioning.&nbsp;&nbsp; We did have a few problems with TOAD, which is one of the tools we use a lot here.&nbsp; Users that have Versions 7.5 and 7.6 of TOAD may have problems accessing a 10G database.</P>
<P>I highly recommend that TOAD users upgrade to Version 8 and install the Oracle10G client software. Version8 also takes advantage of some of the 10G new features that really enhance the tool's functionality.&nbsp; I'm really happy with Version 8's SQL performance reporting capabilities.</P>
<P><STRONG>Question </STRONG><BR>Is there anything that took you by surprise? </P>
<P><STRONG>Answer <BR></STRONG>The PL/SQL engine in 10G is much faster than previous versions. When you first talked to me about 10G, you stated that we should expect to see a 30% improvement in PL/SQL program execution. Not the SQL, but the actual procedural code itself.&nbsp; I thought to myself "yeah right".&nbsp; Well, we are actually experiencing performance improvements that are greater than 30%.&nbsp; We have one set of resource intensive programs that are critical to our nightly batch streams.&nbsp; They used to run in 5 to 6 hours in Oracle9i.&nbsp; In 10G, they run in 1 to 2 hours.&nbsp; I was shocked.&nbsp; The more instructions the code has, the greater the reduction will be.&nbsp;&nbsp; We are seeing improvements across the board. Very good news.</P>
<P><STRONG>Question </STRONG><BR>When you compare run times between programs running in 9I against their 10G counterparts, have you identified any patterns on&nbsp;what runs faster?</P>
<P><STRONG>Answer </STRONG><BR>As I stated previously, the more resource intensive the PL/SQL code is the greater the performance improvement will be.&nbsp;&nbsp; 10g just runs PL/SQL a LOT faster than previous versions.</P>
<P><STRONG>Question </STRONG><BR>Slower? </P>
<P><STRONG>Answer <BR></STRONG>Nothing worth mentioning.&nbsp;&nbsp; We run dozens of jobs in our nightly batch stream that contain hundreds of SQL statements.&nbsp; A few statements may have run a few seconds or a few minutes longer.&nbsp; Remember, we are working with tables that have hundreds of millions of rows, so a few minutes is not a long time.&nbsp; These systems are not kept in a vacuum.&nbsp; We use them.&nbsp; There may have been other jobs contending for resources. </P>
<P><STRONG>Question </STRONG><BR>Now the big question.&nbsp; How comfortable are you with 10G?&nbsp; Should we begin migrating our warehouses to it? </P>
<P><STRONG>Answer <BR></STRONG>I say we go.&nbsp; <BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G RMAN Testing Part 2 - Just call me "The Recovery Kid"</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10grmanpart2</link>
                      <description>I'll begin part 2 of my series on RMAN by discussing a few of the 10G enhancements that we are interested in. I'll finish this series with our 10G RMAN test plan.   Considering that we will be using this new release of RMAN to back up and recover our multiple terabyte data warehouses, I won't rest easy until I know I have tested every command that we use here at Giant Eagle.  &lt;BR&gt;&lt;BR&gt; Call me paranoid but I will never, ever, ever trust any tool with my career.  The test plan included in this blog may seem like overkill to you, but if it reduces my personal anxiety and lowers my (and my unit's) stress during our next recovery, the time spent testing RMAN will be well worth it.  The more stressed you are during a recovery, the greater the chance you will have of making mistakes.  Recoveries are stressful enough.  I don't want to be wondering if the tool is going to work.</description>
                      <pubDate>Fri, 04 Mar 2005 14:33:28 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>Change Tracking for Incremental Backups</STRONG><BR>10G's Change Tracking feature improves the performance of incremental backups by recording datafile block changes in a change tracking file.&nbsp; Without Change Tracking, RMAN incremental backups are required to scan every block in the datafile to identify the blocks that have changed since the last database backup.&nbsp;&nbsp; </P>
<P>Activating Change Tracking allows RMAN to read the change tracking file to identify the changed blocks.&nbsp; So, RMAN incremental backups should run much faster because they are no longer required to read each and every block in the datafile.&nbsp;&nbsp; Sounds logical to me!</P>
<P>What does concern me is that Change Tracking is disabled by default.&nbsp; Oracle states that this is because the feature does introduce some "minimal overhead" on the database during normal day-to-day operations.&nbsp; We'll need to perform some in-depth performance testing to determine exactly how much minimal overhead is incurred when Change Tracking is activated.&nbsp;&nbsp; We intend to execute SQLLDR utilities and DML statements that insert or update millions of rows with Change Tracking off and then run the same workload with Change Tracking activated.&nbsp;&nbsp; Once we compare the results, I'll make sure to include them in my next blog.</P>
<P>One change tracking file is used to track changes for the entire database.&nbsp; The file is created as an Oracle managed file and, as a result, is stored in the directory identified in the DB_CREATE_FILE_DEST initialization parameter.&nbsp; Administrators are also able to specify the name of the change tracking file and place it in any location they choose.</P>
<P>The size of the change tracking file depends on the size of the database and not the frequency of updates.&nbsp; I still haven't figured out how this works but Oracle states that the size of the block tracking file is 1/30,000 the size of all the database data blocks being tracked by Change Tracking.&nbsp;&nbsp; Oracle also states that the file is created in 10 MB increments.&nbsp; For databases up to and including one terabyte, the size of the change tracking file will be 10MEGs, 2 terabyte databases will require 20MEGs and so on.<BR>&nbsp;<BR>We are very excited about the potential performance improvement that Change Tracking offers.&nbsp;&nbsp; It seems fairly obvious that the improvements should be considerable.&nbsp;&nbsp;&nbsp; But we must determine if the level of overhead generated by the Change Tracking feature is low enough to warrant its use.&nbsp; I'll keep you posted.<BR>&nbsp;&nbsp;<BR><STRONG>Compressed Backupsets</STRONG><BR>10G RMAN now supports binary compression of backupsets.&nbsp; Administrators activate compression by specifying the AS COMPRESSED BACKUPSET parameters in the BACKUP command.&nbsp;&nbsp; Oracle states that the backupsets are compressed using an algorithm that is optimized for efficient compression of Oracle database datafiles.&nbsp;&nbsp; </P>
<P>What I like most about this feature is that you don't need to uncompress the file to use it as input to an RMAN recovery.&nbsp; RMAN will automatically uncompress the file during the file restoration process.&nbsp;&nbsp; </P>
<P>Oracle states that compressing the output file does increase CPU overhead for both the backup and restoration processes.&nbsp;&nbsp; Since the majority of our backups are sent directly to tape devices, having RMAN generate smaller backup files is not really a huge benefit to us.&nbsp;&nbsp;&nbsp; But there are times when we need to send a database backup to disk for performance reasons. Like many shops, we never seem to have enough disk available for the backup's output files.&nbsp;&nbsp; We are hoping that the compression utility will help us when we need a backup immediately and are pressed for space.&nbsp; <BR>&nbsp;<BR>We'll run one backup with compression off and another with compression activated and compare the size of the output files.&nbsp;&nbsp; We will then use the compressed backup as input to an RMAN recovery to make sure it works.&nbsp;&nbsp; I'll let you know the results as soon as we have them!<BR>&nbsp;<BR><STRONG>Next Up</STRONG><BR>Giant Eagle's application developers have also been hard at work testing Oracle10G.&nbsp; They have been running their entire batch stream nightly for close to two months now with no issues.&nbsp;&nbsp; Performance results have been VERY positive.&nbsp;&nbsp; In my next blog, we'll review the results of our application testing and compare some batch and on-line execution times from our 9I data warehouse to its 10G counterpart.&nbsp;&nbsp;&nbsp; We are getting close to converting a couple of billion rows to Oracle10G, folks.&nbsp;&nbsp;&nbsp; As one of my DBA stated at the beginning of this project "its going to be a wild ride."&nbsp;</P>
<P><STRONG>RMAN Test plan<BR></STRONG>OK, here's my super-duper Giant Eagle 10G RMAN test plan.&nbsp; As I said in the introduction, it may seem like overkill but if it makes me less nervous about using 10G RMAN, the time will be well spent.&nbsp; Since we have been using 10G RMAN to back up our 10G test environments, many of the items below have already been tested.&nbsp; I'll make sure to provide you with everything I learned during the execution of my test plan.&nbsp; </P>
<P>Whew, this will be a LOT of recoveries - but I need the practice.&nbsp;&nbsp; Since I retired as an Oracle instructor, I haven't had a chance to do many recoveries.&nbsp; This will be one way for me to sharpen my slightly rusty recovery skill sets.</P>
<P>I'll keep you posted.</P>
<P align=center><BR><STRONG>&nbsp;THE 10G RMAN TEST PLAN</STRONG></P>
<P><STRONG>Commands:</STRONG><BR>SQL 'ALTER DATABASE MOUNT'<BR>SQL 'ALTER DATABASE OPEN'<BR>&nbsp;<BR>ALTER SYSTEM SWITCH LOGFILE<BR>ALTER SYSTEM ARCHIVE LOG CURRENT<BR>&nbsp;<BR>ALLOCATE SINGLE TAPE CHANNEL (backup)<BR>ALLOCATE SINGLE TAPE CHANNEL (restore)<BR>ALLOCATE MULTIPLE TAPE CHANNELS (backup)<BR>ALLOCATE MULTIPLE TAPE CHANNELS (restore)<BR>ALLOCATE SINGLE DISK CHANNEL (backup)<BR>ALLOCATE SINGLE DISK CHANNEL (restore)<BR>ALLOCATE MULTIPLE DISK CHANNELS (backup)<BR>ALLOCATE MULTIPLE DISK CHANNELS (restore)</P>
<P>CONFIGURE RETENTION POLICY TO REDUNDANCY 3<BR>CONFIGURE DEFAULT DEVICE TYPE TO TAPE<BR>CONFIGURE CONTROLFILE AUTOBACKUP ON<BR>&nbsp;<BR>CREATE CATALOG<BR>&nbsp;<BR>CROSSCHECK ARCHIVELOG ALL <BR>CROSSCHECK BACKUP<BR>DELETE EXPIRED BACKUP<BR>&nbsp;<BR>LIST BACKUP<BR>LIST BACKUP SUMMARY<BR>LIST COPY<BR>LIST INCARNATION OF DATABASE<BR>&nbsp;<BR>REGISTER DATABASE<BR>REPORT NEED BACKUP INCREMENTAL 3 DATABASE<BR>REPORT NEED BACKUP DAYS 3 DATABASE<BR>REPORT NEED BACKUP DAYS 3 TABLESPACE SYSTEM<BR>REPORT NEED BACKUP REDUNDANCY 3<BR>REPORT UNRECOVERABLE<BR>REPORT OBSOLETE<BR>&nbsp;<BR>RESET DATABASE<BR>RESYNC CATALOG<BR>SHOW ALL<BR>&nbsp;<BR>SHUTDOWN<BR>STARTUP<BR>&nbsp;<BR>VALIDATE<BR>VIEW SCHEMA<BR>&nbsp;<BR><STRONG>Backup:</STRONG>&nbsp;<BR><STRONG>Database Backup Commands (to tape):</STRONG><BR>Hot backup of entire database (multiple channels)<BR>Hot backup of entire database (single channel)<BR>Hot backup of multiple tablespaces (multiple channels)<BR>Hot backup of multiple tablespaces (single channel)<BR>Hot backup of single tablespace (multiple channels)<BR>Hot backup of single tablespace (single channel)<BR>Hot backup of single datafile (single channel)<BR>&nbsp;<BR>Hot backup of controlfiles<BR>&nbsp;<BR>Individual data file image copy<BR>&nbsp;<BR>Hot incremental backup of entire database (multiple channels)<BR>Hot incremental backup of multiple tablespaces (multiple channels)<BR>Hot incremental backup of single tablespace (multiple channels)<BR>&nbsp;<BR>Cold backup of entire database (multiple channels)<BR>Cold backup of entire database (single channel)<BR>Cold backup of multiple tablespaces (multiple channels)<BR>&nbsp;<BR>Cold backup of single tablespace (multiple channels)<BR>Cold backup of controlfiles&nbsp; <BR>&nbsp;<BR>Cold incremental backup of entire database (multiple channels)<BR>Cold incremental backup of multiple tablespaces (multiple channels)<BR>Cold incremental backup of single tablespace (multiple channels)<BR>&nbsp;<BR><STRONG>Database Backup Commands (to disk):</STRONG><BR>Hot backup of entire database (multiple channels)<BR>Hot backup of entire database (single channel)<BR>Hot backup of multiple tablespaces (multiple channels)<BR>Hot backup of single tablespace (multiple channels)<BR><BR>Hot backup of controlfiles<BR><BR>Cold backup of entire database with no log archiving (multiple channels)<BR>Cold backup of entire database with archiving (multiple channels)<BR>Cold backup of multiple tablespaces (multiple channels)<BR>Cold backup of single tablespace (multiple channels)<BR>Cold backup of controlfiles<BR>&nbsp;<BR>Archive log backup (multiple channels)<BR>&nbsp;<BR><STRONG>Database Restore Commands (tape):</STRONG><BR>Complete database restore from cold backup (multiple channels)<BR>Complete database restore from cold backup (single channel)<BR>&nbsp;<BR>Complete database restore from hot backup to current point-in-time with archive log roll forward (multiple channels)<BR>Complete database restore to previous point-in-time (incomplete recovery) (multiple channels)<BR>&nbsp;<BR>Restore multiple tablespaces from hot backup (multiple channels)<BR>Restore single tablespace from hot backup (multiple channels)<BR>&nbsp;<BR>Complete database restore using cumulative incremental backups to current point-in-time (multiple channels)<BR>Complete database restore using cumulative incremental backups to current point-in-time (single channel)<BR>&nbsp;<BR>Complete database restore using incremental backups to previous point-in-time (incomplete recovery) (multiple channels)<BR>&nbsp;<BR>Restore of multiple tablespaces to current point-in-time (multiple channels)<BR>Restore of multiple tablespaces to current point-in-time (single channel)<BR>&nbsp;<BR>Restore of single tablespace to current point-in-time (multiple channels)<BR>&nbsp;<BR>Restore of individual datafile to current point-in-time (single channel)<BR>&nbsp;<BR>Relocating tablespace to a new location during current point-in-time restore<BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G RMAN Testing Part 1</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10grmanpart1</link>
                      <description>Recovering an Oracle database is a wonderfully complex task. Data files, log files, control files, full 
backups, hot backups and point-in-time recoveries all combine to make many administrators lie awake 
nights wondering if their databases can be easily recovered.  Oracle10G contains numerous 
enhancments to the RMAN backup utility.   As a result, a thorough testing of 10G RMAN is warranted.&lt;BR&gt;&lt;BR&gt;

In part 1 of this 2 part series, I'll provide you with a few backup and recovery tips, tricks and techniques 
that I think will help both beginners and experts alike.  Since we are RMAN aficionados here at Giant Eagle, I'll finish the blog with an 
introduction to RMAN.  In part 2, I'll highlight a few of the 10G RMAN new features we are interested in 
and provide you with Giant Eagle's detailed 10G RMAN test plan.</description>
                      <pubDate>Mon, 28 Feb 2005 18:14:51 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>It's the Little Things That Bite You</STRONG><BR>Most botched recoveries can be attributed to human error. Make sure all tapes have proper retention periods, verify that all backups are executing correctly and run test recoveries on a regular basis. Don't let missing tapes or backups cause you to lose data. You don't want to hear UNIX support say "the retention on that tape was supposed to be how long?" in the middle of a recovery. COMMUNICATE with others that are responsible for all other pieces of the recovery "pie" (system admins, operators) on a regular basis to ensure you have everything you need to recover a crashed database. </P>
<P><STRONG>Keep Your Skills Sharp</STRONG><BR>Don't let your recovery skills get rusty. Create one database that you and your fellow administrators can trash on a regular basis. Take turns and make a game out of it. DBAs can be pretty creative when causing problems for others when it's all in fun. Spend dedicated time keeping your recovery skills sharp. If you are a senior-level DBA, make sure you keep the junior folks on their toes. A staff that has up-to-date recovery experience means less calls to you at 2AM.</P>
<P><STRONG>RELAX and Plan Your Attack</STRONG><BR>When you are notified of a database failure, take a deep breath and relax. Don't immediately begin to paste the database back together without a plan. Create a recovery plan, put it on paper, have others review it if you can, and then execute it. You shouldn't be trying to determine what the next step is in the middle of the recovery process.</P>
<P><STRONG>Don't Be Afraid to Ask Others</STRONG><BR>I have 18 years of experience using Oracle, am an ex-Oracle Instructor and have done my fair share of database recoveries.&nbsp; If possible, I still have others review my recovery strategy and recovery steps before I execute them.&nbsp; I'll be the first one to admit that I&nbsp;can still&nbsp;make a mistake during a recovery so I'm&nbsp;hapy to have others review my strategy.&nbsp;&nbsp;Don't be afraid to ask others and don't be afraid to call Oracle support if you have to. That's what they get paid by your company to do - support you.&nbsp; Don't make a database unrecoverable by guessing. &nbsp;I once viewed over 100 different commands in an alert log after a junior DBA botched a production database recovery.&nbsp; An ego that was too big to allow that person to ask questions created a database that was virtually unrecoverable.</P>
<P><STRONG>V$RECOVERFILE</STRONG><BR>If you aren't using RMAN to perform the recovery, you can query the V$RECOVERFILE table to determine how many files are missing or corrupted before you have them restored. The operators will like you much better and the recovery process will be a lot faster if you restore all of the files that have been lost at the same time.</P>
<P><STRONG>Watch the NOLOGGING Option</STRONG><BR>The NOLOGGING option is great for performance but it tends to complicate recoveries that require redo log entries to be applied. If you load or insert data using the NOLOGGING option and you don't immediately take a backup, you're asking for trouble. If you have to execute a database recovery, the database will be out of synch.&nbsp; During the application of the redo log entries, the data loaded or inserted using the NOLOGGING option will not be in the redo logs.&nbsp; This means that the data will not be replayed during the database recovery.&nbsp;&nbsp; If transactions that depend on the missing data are replayed during the recovery, they will be accessing data that's not there!&nbsp;&nbsp; Bad things will happen to your recovery as a result.&nbsp;&nbsp; Take a backup after a NOLOGGING statement or utility execution.</P>
<P><STRONG>Striped File Systems</STRONG><BR>If mirroring is not used, exercise caution when placing redo logs and/or control files on the same disk stripes as data files. If you lose any disk contained in the stripe, you also lose your ability to recover the database to the current point-in-time. Call me old-fashioned, I still try to sneak a copy of the control files and redo logs on a non-striped drive. If the stripe containing the other copies becomes unusable, the copies on the non-stripe disk are available to use as input to a forward recovery. I just can't bring myself to place all of my multiplexed redo log files and control files on the same stripe (whether that stripe is mirrored or not).&nbsp;&nbsp; </P>
<P><STRONG>Data Files and Redo Logs</STRONG><BR>If mirroring is not used, don't place redo logs and data files on the same disk. Once again, you may lose your ability to recover the database to the current point-in-time.</P>
<P><STRONG>Redo Log and Control File Multiplexing</STRONG><BR>Make sure your redo log groups have two or more members in each group with each member being on a different disk drive. Multiple copies of the control file should also be maintained on different disks. There should be a very limited number of reasons why you have to recover a database due to the loss of all members of a redo log group or control file set.</P>
<P><STRONG><FONT color=#000000>Recovery Manager</FONT></STRONG><BR>Whether you love it or hate it, the Oracle Recovery Manager (RMAN) tool is Oracle's preferred strategy for backup and recovery.&nbsp; &nbsp;The tool really does simplify the recovery process. Recovery Manager allows administrators to write scripts, test&nbsp;them&nbsp;and store them in the recovery catalog.&nbsp; During a recovery scenario, the administrator executes one of the scripts stored in the catalog to recover the database. Running a script or two at 2AM in the morning is usually preferable to sitting at your PC trying to paste together a recovery procedure. </P>
<P>Here is some general information on the Recovery Manager toolset:</P>
<P>Recovery Manager is a utility&nbsp;that allows administrators&nbsp;to create database backups and use them as input to database recoveries.&nbsp;&nbsp;RMAN uses a special program interface to the server for invoking backup and restore operations.</P>
<P>Recovery Manager provides the following benefits:</P>
<UL>
<LI>Automates backup operations. </LI>
<LI>Creates printable logs of all backup and recovery operations. </LI>
<LI>Automates both restore media and recovery operations. </LI>
<LI>Automates backup and recovery processes. </LI>
<LI>Configures backups for later execution. </LI>
<LI>Automatically finds datafiles that need a backup based on user-specified limits on the amount of redo that must be applied if the datafiles were to be recovered. </LI></UL>
<P dir=ltr style="MARGIN-RIGHT: 0px">Notice that the key word is automate! Many of the operations that once required manual intervention by the administrator are now automated. Recovery Manager automatically starts Oracle server processes to&nbsp; backup and recover the target databases. </P>
<P>Recovery Manager can be run in either interactive or batch mode. In interactive mode, Recovery Manager will immediately execute commands as you enter them at the prompt.&nbsp; Batch mode allows backups to be run by third party job schedulers.&nbsp;&nbsp; </P>
<P><STRONG>Recovery Catalog</STRONG><BR>The recovery catalog can be loosely compared to a database catalog. Recovery manager uses the catalog's repository of information to keep track of backup and recovery operations. The recovery catalog must be contained in an Oracle database but does not require the creation of an additional database. The catalog can be placed in an existing database if desired.&nbsp; It is highly recommended that you create the RMAN repository in a separate database that is used only for RMAN operations. </P>
<P>The recovery catalog contains information on:</P>
<UL>
<LI>Tablespaces and datafiles </LI>
<LI>Archived redo logs (and copies of archived redo logs) </LI>
<LI>Datafile copies </LI>
<LI>Datafile and archivelog backup sets and backup pieces </LI>
<LI>Stored scripts which contain user created sequences of commands that can be executed by the Recovery Manager </LI></UL>
<P>Administrators are able to create scripts and store them in the recovery catalog. Stored scripts allow administrators to chain a sequence of backup or recovery operations together and execute them as a single unit. </P>
<P><STRONG>Channels<BR></STRONG>A channel is a data stream that is sent to a device.&nbsp; The most common devices are disk and tape.&nbsp; Administrators are able to automatically configure channels using the RMAN CONFIGURE command or they can explicity define the channel in the RMAN backup or recovery script.&nbsp; </P>
<P>The example below shows an RMAN script that allocates a device type of SBT (TAPE) and names the channel TAPE1.&nbsp; The next line tells RMAN to back up the entire database including all of the archive logs.</P>
<P dir=ltr style="MARGIN-RIGHT: 0px">RUN <BR><A name=1006252></A>{<BR><A name=1006253></A>&nbsp; ALLOCATE CHANNEL&nbsp;tape1 DEVICE TYPE sbt;<BR><A name=1006254></A>&nbsp; BACKUP DATABASE PLUS ARCHIVELOG;<BR><A name=1006255></A>}<BR><STRONG></STRONG></P>
<P dir=ltr style="MARGIN-RIGHT: 0px">This example allocates a&nbsp;channel to disk with all files created by this channel having the format '/u01/rpprod1/backup/23005tools.bak'.&nbsp; The script backs up one database datafile.&nbsp;</P>
<P dir=ltr style="MARGIN-RIGHT: 0px">RUN <BR><A name=1006252></A>{<BR><A name=1006253></A>&nbsp; ALLOCATE CHANNEL&nbsp;d1 DEVICE TYPE disk<BR>&nbsp; FORMAT = '/u01/rpprod1/backup/23005tools.bak';<BR>&nbsp; BACKUP DATAFILE '/u01/oracle/oradata/rpprod1/tools01.dbf';<BR><A name=1006255></A>}</P>
<P dir=ltr style="MARGIN-RIGHT: 0px">Our last example allocates 3 disk channels, performs an incremental level 0 (base) backup and uses channel d1 to backup data files 1, 4 and 5, d2 to backup up data files 2, 3 and 6 and so on.&nbsp; The naming convention of the output files will begin with the characters "df_" followed by database name, set name and piece name.</P>
<P dir=ltr style="MARGIN-RIGHT: 0px">RUN <BR><A name=1006252></A>{<BR><A name=1006253></A>&nbsp; ALLOCATE CHANNEL&nbsp;d1 DEVICE TYPE disk;<BR>&nbsp; ALLOCATE CHANNEL&nbsp;d2 DEVICE TYPE disk;<BR>&nbsp; ALLOCATE CHANNEL&nbsp;d3 DEVICE TYPE disk;<BR>&nbsp; BACKUP<BR>&nbsp; INCREMENTAL LEVEL = 0 <BR>&nbsp; FORMAT = '/u01/rpprod1/backup/df_%d_%s_%p.bak';<BR>&nbsp; (DATAFILE 1, 4, 5 CHANNEL d1 tag=df1)<BR>&nbsp; (DATAFILE 2, 3,&nbsp;6 CHANNEL d2 tag=df2)<BR>&nbsp; (DATAFILE 7, 8,&nbsp;9 CHANNEL d3 tag=df3);<BR>&nbsp;&nbsp; sql 'alter system archive log current';<BR>}</P>
<P dir=ltr style="MARGIN-RIGHT: 0px"><STRONG>Recovery Manager Backup Types</STRONG><BR>Recovery Manager supports two different types of backups: backup sets and image copies:</P>
<P><STRONG>Backup Sets</STRONG><BR>Backup sets consist of datafiles or archivelogs.&nbsp; A single backup set cannot contain a combination of archivelogs and datafiles. A backup set can contain a combination of datafile and control file backups. Recovery Manager allows you to move archived logs from disk to tape. Backup sets containing moved archived logs are called archivelog backup sets. </P>
<P>Backup sets consist of one or more individual backup files. The individual files contained in a backup set are called backup pieces. Recovery Manager uses the backup sets as input for recovery operations. Backup sets can be written to disk or sequential output media (tape). The V$BACKUP_DEVICE contains a list of backup devices that are supported by your platform. </P>
<P>Backup sets can be full or incremental. A full backup is a backup of all of the blocks that make up a datafile or datafiles. Recovery Manager allows you to take full backups of datafiles, datafile copies, tablespaces, archive logs, control files and databases. Incremental backups copy blocks that have been changed since a previous backup. Incremental copes can be taken of datafiles, tablespaces and databases. Recovery Manager also provides cumulative backups. Cumulative backups copy all blocks that have been changed since the most recent incremental backup. </P>
<P><STRONG>Image Copies<BR></STRONG>An image copy is a single datafile that&nbsp;you can use as input to a recovery. The Oracle server process validates the blocks in the file during backup and registers the copy in the recovery catalog.&nbsp; Image copies do not require the execution of a recovery operation, the datafile can be renamed to the image copy. </P>
<P>As a result, image copies:</P>
<UL>
<LI>Do not store header or footer control information. </LI>
<LI>Must be written to disk. </LI>
<LI>Cannot be compressed. </LI>
<LI>Cannot contain multiple input or output files. </LI>
<LI>Cannot be multiplexed (discussed later). </LI></UL>
<P><STRONG>Parallel Backup and Recovery</STRONG><BR>Recovery Manager is able to parallelize a single backup, recovery or restore operation, but is unable to process multiple commands in a stored script in parallel. </P>
<P>The RMAN script below uses three channels to back up three data files identified by their file number.&nbsp; This creates three separate server processes each one sending a&nbsp;data stream to the tape device.&nbsp; </P>
<P>RUN<BR>{<BR>&nbsp; ALLOCATE CHANNEL t1 DEVICE TYPE sbt;<BR>&nbsp; ALLOCATE CHANNEL t2 DEVICE TYPE sbt;<BR>&nbsp; ALLOCATE CHANNEL t3 DEVICE TYPE sbt;<BR>&nbsp; BACKUP DATAFILE 3,4,5 ;<BR>}</P>
<P><STRONG>Multiplexed Backup Sets</STRONG><BR>A backup process is able to take concurrent backups of multiple data files, or one or more multi-file tablespaces and multiplex the output into a single stream. </P>
<P><STRONG>Backup/Recovery Reports</STRONG><BR>Recovery Manager provides two commands to provide information relating to backups and image copies:</P>
<UL>
<LI>Report - produces a report of files that require backups, files that are unrecoverable and backup files that can be deleted. </LI>
<LI>List - produces a listing of the contents of the recovery catalog. The list command allows you to find out what backups or copies are available. </LI></UL>
<P><STRONG>Database Restore and Recovery<BR></STRONG>The database restoration process is performed by executing the RMAN RESTORE and RECOVER commands.</P>
<P>The RESTORE command tells RMAN to retrieve files from RMAN backups based on the contents of the RMAN repository.&nbsp; </P>
<P>You use the RECOVER command in Recovery Manager to perform media recovery and apply incremental backups and redo logs (archived or online) if necessary. Recovery Manager uses the recovery catalog to select the backup sets or image copies to use as input to the recovery operation.</P>
<P>There are four variations of the recover command:</P>
<UL>
<LI>RECOVER DATABASE - recovers an entire database. </LI>
<LI>RECOVER TABLESPACE - recovers an entire tablespace consisting of one or more datafiles. </LI>
<LI>RECOVER DATAFILE - recovers a single datafile or datafiles. </LI>
<LI>RECOVER CONTROLFILE - recovers the database control files.</LI></UL>
<P>This sample recovery script allocates three disk channels, performs a point-in-time recovery to the specified time and&nbsp;resets the&nbsp;logs when opening the database:&nbsp;</P>
<P>RUN <BR><A name=1006252></A>{<BR><A name=1006253></A>&nbsp; ALLOCATE CHANNEL&nbsp;d1 DEVICE TYPE disk;<BR>&nbsp; ALLOCATE CHANNEL&nbsp;d2 DEVICE TYPE disk;<BR>&nbsp; ALLOCATE CHANNEL&nbsp;d3 DEVICE TYPE disk;<BR>&nbsp;&nbsp;SET UNTIL TIME&nbsp;=&nbsp;'2005-02-28:11:00:00';<BR>&nbsp; RESTORE DATABASE;<BR>&nbsp; RECOVER DATABASE;<BR>&nbsp; SQL 'alter database open resetlogs';<BR>&nbsp; }</P>
<P><STRONG>RMAN Examples</STRONG><BR>The examples below should give you a general understanding of how RMAN is used to back up and recover an Oracle database:</P>
<UL>
<LI>rman - Operating system command to activate RMAN. There is also a GUI version available in later releases. </LI>
<LI>CONNECT TARGET <A href="mailto:SYS/sysdba@prod1">SYS/sysdba@prod1</A>&nbsp;&nbsp;- Connecting to the target database (the one that is to be backed up or recovered). </LI>
<LI>CONNECT CATALOG <A href="mailto:rman/rman@rcat">rman/rman@rcat</A> - Connecting to the database containing the RMAN catalog. </LI>
<LI>rman TARGET <A href="mailto:SYS/target_pwd@target_str">SYS/target_pwd@target_str</A> CATALOG <A href="mailto:rman/cat_pwd@cat_str">rman/cat_pwd@cat_str</A> - Getting high-tech and connecting to both the target and RMAN catalog at the same time. </LI>
<LI>CREATE CATALOG; - Creating the catalog in the RMAN repository database. </LI>
<LI>REGISTER DATABASE; - Registers the target database in he RMAN repository database.</LI>
<LI>REPORT SCHEMA; - Displays the datafiles currently in the target database. </LI>
<LI>LIST BACKUP SUMMARY; - Displays a summary of all backups recorded in the catalog. </LI>
<LI>LIST COPY OF DATABASE ARCHIVELOG ALL; - Lists archived logs and copies of logs. </LI></UL>
<P><STRONG>Sample RMAN Scripts</STRONG><BR>This command uses two backupSpec clauses to back up tablespaces and datafiles and lets RMAN perform automatic parallelization of the backup. A channel must be allocated when it accesses a disk or tape drive. The backup is identifying files by tablespace name and fileid.</P>
<P>&nbsp;RUN<BR>&nbsp;{<BR>&nbsp;&nbsp; ALLOCATE CHANNEL dev1 DEVICE TYPE DISK FORMAT '/fs1/%U';<BR>&nbsp;&nbsp; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK FORMAT '/fs2/%U'; <BR>&nbsp;&nbsp; BACKUP <BR>&nbsp;&nbsp;&nbsp;&nbsp; (TABLESPACE SYSTEM,sales1,sales2,sales3 FILESPERSET 10)<BR>&nbsp;&nbsp;&nbsp;&nbsp; (DATAFILE 12,14,15);<BR>&nbsp;}</P>
<P>The following example takes the USERS tablespace&nbsp;offline, uses automatic channels to restore and recover it&nbsp;, then brings it back online.&nbsp; Notice that we don't care what the backupset&nbsp;file names are or where the archived logs are located - RMAN handles it all!</P>
<P>RUN<BR>&nbsp;{<BR>SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";<BR>RESTORE TABLESPACE tools;<BR>RECOVER TABLESPACE tools;<BR>SQL "ALTER TABLESPACE tools ONLINE";<BR>&nbsp;}</P>
<P><STRONG>Next Up</STRONG><BR>In my next blog, we'll discuss a handful of new features that we are interested in and provide you with our detailed RMAN test plan.</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G OEM Grid Control Tips, Tricks and Techniques</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oemtestresults2</link>
                      <description>After spending 20 hours testing Enterprise Manager, I'm happy to report that everything works as advertised.   The tool is rock-solid.  I thought for sure the product would have at least a few problems that I could report on.   So instead of a bug discussion, this blog contains some of the   tips and tricks I learned  during the execution of my Enterprise Manager test plan.</description>
                      <pubDate>Thu, 17 Feb 2005 06:32:35 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>10G OEM&nbsp;is really 10G Grid Control</STRONG><BR>Jim Dojonovic, who just returned from 10G training,&nbsp;tells me that I have been using the wrong name for 10G's enterprise management tool.&nbsp;&nbsp; He stated that the correct name is Grid Control or Enterprise Manager Grid Control.&nbsp; So to keep in synch with the Oracle Corporation, I'll use Grid Control instead of OEM when I talk about Oracle's enterprise management tool.</P>
<P><STRONG>Tips and Tricks</STRONG><STRONG><BR></STRONG>There is no mechanism to let you temporarily navigate to another area of Grid Control and then return to your current unit of work.&nbsp; I had to open up a new browser session to look for the desired information and then switch to the original Grid Control session to continue.&nbsp; Once you become used to it, it seems fairly straightforward.</P>
<P>You will need to establish alert&nbsp;notification rules in Grid Control.&nbsp; The rules establish the criteria that Grid Control&nbsp;will use to determine if it should generate a notification when a particular type of problem occurs.&nbsp;&nbsp;&nbsp;For example, you may want to be notified when&nbsp;a database becomes&nbsp;unavailable and not be notified when the number of writes to LOB segments exceeds&nbsp;the default threshold.&nbsp; &nbsp;To establish the notification rules, log on to the tool's home page and navigate to:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>&nbsp;Preferences ---&gt; Rules</P></BLOCKQUOTE>
<P>Grid Control allows you to clone a set of predefined notification rules to simplify the rule creation process.&nbsp;&nbsp; During our testing, we cloned the following predefined rules:</P>
<UL>
<UL>
<LI>Agent Upload Problems - Notifications for agents having problems uploading data to the management server</LI>
<LI>Agents Unreachable - Notifications for agents that lose their connection to the management server</LI>
<LI>Database Availability and Critical States - Database outages and metric alert notifications&nbsp;(out-of-space conditions, performance thresholds, ORA-0600s in alert log, etc.).</LI>
<LI>Host Availability and Critical States - Host server outages and performance metrics (CPU, memory, etc.) notifications</LI>
<LI>Listener Availability - Listener outage notifications</LI></UL></UL>
<P><BR>Be very selective when activating the metrics that will generate alerts.&nbsp; We are still in the process of tailoring the alerts to our environment.&nbsp; Currently, I have 75 Grid Control alert notifications in my E-mail's in-box.&nbsp; This is a large number considering we only have 5 databases currently being monitored.&nbsp;&nbsp; We intend to spend dedicated time reducing these alerts to a smaller and more manageable number.</P>
<P>Each target (host, database, listener, application server) has its own set of metrics that can be customized to address each application's unique monitoring requirements.&nbsp;&nbsp; In addition, Enterprise Manager allows you to copy the current target's metrics to other targets to facilitate the metric creation&nbsp;process.&nbsp;&nbsp; Until we become more familiar with the tool, we are setting the metrics for a master target and then copying that target's metrics to all targets of the same type.&nbsp;&nbsp; Once we become more accustomed to using Enterprise Manager, we'll consider customizing each individual target's metrics&nbsp;to better address its&nbsp;unique monitoring&nbsp;needs.&nbsp; </P>
<P>I thought the administration panel that allows you to change database initialization parameters was very well thought out.&nbsp; It allows users to search for parameters based on their category grouping (i.e. performance, logging, archiving, etc).&nbsp; In addition, Grid Control allows you to order initialization parameters on name, value, type and category.&nbsp;&nbsp; The groupings allowed me to view all of the parameters related to the topic I was interested in.&nbsp; For example, the archive grouping allowed me to see all of the parameters related to log archiving which made it easy for me to configure multiple archiving destinations.</P>
<P>If you want to change an initialization parameter for both the current running instance and in the SPFILE, navigate to the SPFILE administration panel and check the "<EM>Apply changes in SPFile mode to the current running instance(s)</EM>." radio button.&nbsp; If you use the SHOW SQL button, you will notice SCOPE=BOTH at the end of the ALTER SYSTEM statement.&nbsp; SCOPE=BOTH tells Oracle to make the parameter change to the current running instance and in the SPFILE.</P>
<P>If you are looking for session information, go to the target database home page and click on number next to the word "<EM>Active Sessions</EM>".&nbsp;&nbsp;The link will be displayed&nbsp;under &nbsp;the pie chart&nbsp;titled "<EM>Active Sessions</EM>".&nbsp; Clicking on the link activates the Top Sessions screen.&nbsp; If you would like to display all of the sessions, click on the CUSTOMIZE button.&nbsp; The customization form contains a radio button that allows you to display information for&nbsp;all sessions. To search for a specific session, use the following links:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>&nbsp;Performance ---&gt; Additional monitoring links ---&gt; Search Sessions</P></BLOCKQUOTE>
<P>To find locking information (including database lockout conditions), go to the target database and follow these links:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>Performance ---&gt; Additional monitoring links ---&gt; Database Locks</P>
<P>Choose BLOCKING SESSIONs to identify sessions having locking problems.</P></BLOCKQUOTE>
<P>You want to make sure your browser has the latest SVT plug in.&nbsp; If you don't, you won't be able to activate the drill downs on the target database's performance page.&nbsp; If you see a message that states "Best Viewed Using Lastest SVT Plugin" displayed on a database's &nbsp;performance page, you don't have the most up-to-date version.&nbsp; That means you will not be able to use Grid Control's drill down capabilities.&nbsp;&nbsp;Download it immediately to take advantage of this very helpful functionality.</P>
<P>The new database-wide DEFAULT tablespace works.&nbsp; If you don't specify the DEFAULT tablespace during user creation, it will default to the database's DEFAULT tablespace.</P>
<P>The CREATE TABLE and CREATE INDEX screens provide buttons that help you to estimate the size of the object being created.&nbsp; The form prompts you for the number of rows and returns an estimate on the amount of space it thinks the object will consume.&nbsp;&nbsp; I tested this several times and the estimated size was always within a few MEGs of the actual size of the segment.&nbsp; Not bad considering some of our tables are hundreds (and hundreds) of GIGs in size.</P>
<P>When adding a foreign key to a table, the parent table form doesn't designate which columns are in the primary or unique key.&nbsp; You must have those columns previously identified.&nbsp; If you don't know what they are and don't want to lose your current unit of work,&nbsp;open another Grid Control browser session to identify the primary key or unique key columns.&nbsp; Note to Oracle: do us a favor and tell us what the columns are in the primary or unique key constraints on the parent table form.<BR>&nbsp;<BR>During tablespace creation, Enterprise Manager automatically sets the out-of-space warning and error thresholds for you.&nbsp; The tool does allow you to change them if you prefer to create the tablespace with non-default threshold values.&nbsp;&nbsp; This ensures that all tablespaces are monitored immediately upon creation.</P>
<P>To simplify administration, Enterprise Manager often combines a series of commands into command sets.&nbsp; This allows administrators to make changes that used to require multiple executions in one step.&nbsp; For example, the temporary tablespace form allows administrators to create a new temporary tablespace and make it the database's default temporary tablespace in one execution (which used to require multiple command executions). </P>
<P>When you add a column to a table, Grid Control will ask you if you want to add 5 columns.&nbsp; If you only fill out one column specification, rest assured you will only add one column.</P>
<P>The table administration form provides a radio button that allows administrators to remove columns from a table.&nbsp; After you select DELETE COLUMN from the drop down, the screen will refresh and the column will no longer appear on the form.&nbsp; That doesn't mean the column was deleted.&nbsp; You must click on the GO button to execute the ALTER statement that removes the column from the table.</P>
<P>The table, index and tablespace reorganization wizards check the target tablespace's freespace to determine if there is sufficient freespace available to hold the reorganized object(s).</P>
<P>If you would like to move a table or index to a different tablespace, select REORGANIZE from the drop down list in the object's administration panel to activate the reorganization wizard.&nbsp;&nbsp; The second panel of the reorganization wizard will display a button titled "SET ATTRIBUTES" which allows you to specify a new tablespace for the object being reorganized.</P>
<P>Enterprise Manager automatically analyzes all indexes when they are created.</P>
<P>I liked being able to view the alert log from Enterprise Manager.&nbsp; </P>
<P>EM, unlike previous versions, allows you to select a parallel worker process and navigate back to the SQL statement that is generating the parallel workload.</P>
<P><STRONG>XML File Processing Bug<BR></STRONG>If your OMS server is having problems processing the XML files the agents are uploading, you may be hitting bug #4018344.&nbsp;&nbsp; There is a job that contacts Metalink that gets hung up.&nbsp;&nbsp; It also locks the tables used by the XML file loader.&nbsp; Navigate to the jobs panel and search for JOBTYPE=RefreshFromMetalink, OWNER=all, STATUS=all.&nbsp;&nbsp; Suspend the REFRESH_FROM_METALINK_JOB that shows up and then recycle OMS using the EMCTL utility.&nbsp;&nbsp; For more information, go to Metalink and search for the number 4018344.<BR><STRONG><BR>Final Recommendation<BR></STRONG>If you want to learn how to use 10G Grid Control, execute my test plan.&nbsp; I now feel much more comfortable using the tool to perform day-to-day administrative&nbsp;functions.&nbsp;&nbsp; I'll be honest, I like this version&nbsp;MUCH BETTER than&nbsp;the&nbsp;previous one.&nbsp; I also feel that I can now assist my fellow DBAs when they have problems using the tool.</P>
<P><STRONG>Summary</STRONG><BR>Although we have finished the bulk of our Grid Control testing, we are still not complete.&nbsp; Our entire unit must understand how to use Grid Control to tune the Oracle environment.&nbsp;&nbsp; My team is very comfortable using the previous version of the tool&nbsp;to tune both the database and individual SQL statements.&nbsp;&nbsp; </P>
<P>But, it is imperative that we come up to speed as quickly as we can on this new version.&nbsp; With tables having hundreds of millions and billions of rows, being able to quickly identify and correct performance problems is a VERY high priority here at Giant Eagle.&nbsp; </P>
<P>When I first started learning Grid Control's new tuning toolsets, I was somewhat intimidated by their radically different look and feel.&nbsp;&nbsp;&nbsp;&nbsp;Learning&nbsp;the new interface&nbsp;takes time and patience.&nbsp;&nbsp;After testing day-to-day functionality, I spent&nbsp;15 hours performing mock tuning drills&nbsp;using&nbsp;Enterprise Manager.&nbsp; I once again&nbsp;feel that Enterprise Manager's tools are far superior to&nbsp;any tool (third party or Oracle provided) that I have ever used.&nbsp;&nbsp;&nbsp;We'll be spending dedicated time in the future learning Grid Control's Automatic Database Diagnostic Monitor and becoming more comfortable with the other database performance monitoring tools that are available to us.</P>
<P>I am not as concerned about SQL tuning because we still have the same tools available to us as we always have.&nbsp; We'll continue to use Explain, SQLPLUS AUTOTRACE, Statspack and SQLTRACE until we come up to speed on 10G's SQL Tuning and SQL Access advisors.&nbsp;&nbsp;</P>
<P><STRONG>Next Up</STRONG> <BR>An interview with Bob George on Oracle10G's impact on data warehouse application performance.</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G OEM Grid Control Testing Results</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oemtestresults1</link>
                      <description>This is the first release of Oracle that has forced me to spend more time learning how to use the tool to administer the database than I have spent testing the new features the database provides.  Now that our 10G OEM testing is finally complete, I'll provide you with two blogs in quick succession. In this first blog, I'll provide you with a high-level over of what we found during our installation and in-depth testing.    In the second I'll finish my discussion on OEM with a bulleted list of notes that I compiled during my 20 hours of putting 10G OEM through its paces.</description>
                      <pubDate>Sun, 13 Feb 2005 08:57:36 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>It has been over a week since my last blog, but I wanted to wait until I completed my 10G OEM testing.&nbsp; I have spent 22 hours executing my OEM 10G test plan.&nbsp; If you are going to utilize 10G effectively, you must become an expert in 10G's administration tools.&nbsp;You can find my complete test plan in my previous blog titled <A href="/blogs/blog_cf/chrisfoot/10goemtesting/index.html">Oracle10G OEM Overview and Test Plan</A>. </P>
<P><STRONG><BR>Installation</STRONG><BR>My entire unit&nbsp;was slightly concerned about the occurrence of&nbsp;"catastrophic installation problems."&nbsp; You know the ones I mean...&nbsp;&nbsp; The problems that take days, or even weeks, to fix.&nbsp; There is nothing like a good 'ol installation problem to&nbsp;knock you down a few notches on&nbsp;the Oracle&nbsp;expert scale.&nbsp;&nbsp; Actually, I think they are good for me.&nbsp; Just when I get too cocky, Oracle lets me know that my career is still challenging.</P>
<P>Like previous versions of OEM, 10G OEM is a multi-tier architecture consisting of a HTML console,&nbsp; management service (OMS),&nbsp;&nbsp;repository database&nbsp;and management agents running on all monitored targets.&nbsp; We assumed that the most problematic install would be the OMS and repository combination.&nbsp;&nbsp; Wrong again!&nbsp; Problems with the agents continued to plague us.&nbsp;&nbsp; But we did have one or two problems occur during the OMS installation.&nbsp;&nbsp; </P>
<P>Luckily, our OEM 10G administrator&nbsp;Ron Berner, is well-versed in the AIX operating system and a super technician.&nbsp;&nbsp;&nbsp; Although the 10G OEM install process irritates him from time to time, it certainly doesn't intimidate him.&nbsp;&nbsp; Ron is also a strong technical troubleshooter, so he is just the person we need to perform the 10G OEM installs.&nbsp;&nbsp; </P>
<P>Although the initial install went well, when we applied the 10.1.0.3 patch the first time, the entire environment went "kaput".&nbsp;&nbsp; After several hours of attempting to fix the problem, we decided to de-install everything, reinstall the base software and back it up to another directory.&nbsp;&nbsp; If we had problems with the patch, this would allow us to restore the environment to a state before the patch was applied.&nbsp;&nbsp; After completing the backup, we decided to install the patch again and closely monitor all screen messages and log files generated during the installation process.&nbsp; Well, it worked the second time through. I find that concerning because Ron performed the exact same sequence of commands that he did previously.&nbsp;&nbsp; That's why I love this profession. You can tell someone to run it again and truly believe it has a chance of working the second time.&nbsp;&nbsp; </P>
<P>After Ron set up our Oracle management server environment, he turned his attention to installing the agents on our warehouse test servers.&nbsp;&nbsp; The agent requires a separate install into a different Oracle home.&nbsp; During the agent install on the target, the Oracle Universal Installer asks for the name of the 10G management server that will be responsible for administering the new environment.&nbsp;&nbsp; This information is recorded in the EMD.PROPERTIES configuration file on the target.&nbsp; When the agent is started on the target it "injects" itself into the management server identified during the installation.</P>
<P>The agent installs injects itself into the management server environment by uploading information about the target to the management server.&nbsp;&nbsp; Getting this XML data upload to work can be tricky.&nbsp;&nbsp; Here are a few hints and tips:</P>
<UL>
<LI>Make sure you run the agent control utility (EMCTL) from the agent's home directory.&nbsp; I had several problems occur when I executed the EMCTL utility with my environment set incorrectly.</LI>
<LI>If you are having trouble getting the agent to attach to the management server, review all of the messages contained in EMAGENT.LOG and EMAGENT.TRC.&nbsp; These files can be found in the AGENTHOME/SYSMAN/LOG directory path (where AGENTHOME is the agent's home directory).&nbsp; They contain error messages generated by the agent during startup and XML data uploads.&nbsp;&nbsp; The information contained in these two files helped us fix the majority of our problems.&nbsp; </LI>
<LI>After you find the error messages, use Metalink to research the problem.&nbsp; If you can't figure it out, file a TAR with Oracle support.&nbsp; You should run the RDA (Remote Diagnostic Assistant) on the management server and upload that information when you create the TAR.&nbsp;&nbsp;&nbsp;Since Oracle will ask you for it, you might as well run the RDA and upload it when you create the TAR.&nbsp;</LI>
<LI>After finding and correcting the problem, we found that removing and regenerating the agent's configuration files improved our chances of achieving a successful XML file upload.&nbsp; Go to document ID 537188.994 on Metalink.&nbsp;&nbsp; If you can't find it by the document ID, search Metalink using LASTUPLD.XML as the keyword and document ID 537188.994 will pop up.</LI></UL>
<P><STRONG>Thoughts, Musings and Opinions Formulated During Testing</STRONG></P>
<P><STRONG>Problems and Crashes (or lack thereof)</STRONG><BR>Although the agent install is problematic, once you get everything up and running the entire environment is rock solid.&nbsp;&nbsp;&nbsp; I spent over twenty hours testing OEM 10G and did not receive one fatal error.&nbsp;&nbsp; More importantly, everything but one feature worked.&nbsp; The partitioned table wizard allows administrators to specify multiple tablespaces during the creation process.&nbsp; OEM is supposed to&nbsp;select the tablespaces&nbsp;in a round robin fashion until all partitions are assigned to a particular tablespace.&nbsp; So if you have tablespaces TSPACEA, TSPACEB, TSPACEC and a table that has 6 partitions, partitions 1 and 4 would use TSPACEA, 2 and 5 would use TSPACEB and partitions 3 and 6 would use tablespace TSPACEC.&nbsp; For some reason, I couldn't get the wizard to perform the round robin tablespace selection.&nbsp;&nbsp; Partition 1 did choose TSPACEA but partitions 2 through 6 ended up in the user's default tablespace.</P>
<P>That's it.&nbsp; Not one abnormal termination by the browser.&nbsp; I was absolutely sure the product was going to terminate abruptly on a regular basis.&nbsp;&nbsp; But the tool didn't crash.&nbsp;&nbsp;It was totally error free and&nbsp;every feature (except the previously mentioned&nbsp;round robin tablespace option) worked.&nbsp;&nbsp; When it didn't', I eventually found out it was my&nbsp;fault that caused the Oracle error code to be returned.&nbsp; And when the Oracle errors were returned, they were very explicit and easy to understand. </P>
<P><STRONG>Navigation<BR></STRONG>Once you learn to navigate through the tool as you would a website, Oracle10G OEM becomes a breeze to use.&nbsp;&nbsp; As usual, I didn't like it when I didn't understand how to use it.&nbsp; After using it for 2 or 3 hours, I was able to easily navigate through the panels.&nbsp; I now prefer 10G OEM's navigation style to previous versions.&nbsp; Who says you can't teach an old DBA new tricks?&nbsp;&nbsp; </P>
<P><STRONG>Use the SHOW SQL Button a LOT</STRONG><BR>This tool acts differently than previous versions.&nbsp; As a result, what you think is going to be executed and what the tool will execute won't always match.&nbsp; Each administration panel has a button that allows you to see the command you will be executing if you hit the GO button.&nbsp;&nbsp; I would advise you to use the SHOW SQL button religiously until you become experienced with the tool.&nbsp;&nbsp; The SHOW SQL button prevented me from making numerous mistakes during my testing process.</P>
<P><STRONG>Use the Tool's Navigation Tabs - Not the Browser's Forward and Back Buttons to Navigate</STRONG><BR>Many of the administrative procedures in OEM 10G require the user to enter data in multiple screens to complete the task.&nbsp;&nbsp; Remember to use the navigation tabs to transfer between the different screens when reviewing your work.&nbsp;&nbsp; The browser's BACK button often displayed a blank data entry form.&nbsp;&nbsp; When I used the navigation tabs, the browser always displayed the completed form.&nbsp; </P>
<P><STRONG>The GO Button Means Execute - All the Time</STRONG><BR>All of the data entry screens contain a GO button. Seeing the GO button on a particular screen doesn't mean all of the data entry screens are complete.&nbsp;&nbsp; You must navigate through all of the tabs and then hit the GO button on the final tab.</P>
<P><STRONG>Set the Preferred Credentials Immediately</STRONG><BR>Oracle 10G OEM, as in previous versions, requires that administrators supply Oracle and operating system accounts and passwords in the preferred credentials panel.&nbsp; When you navigate to the target, OEM logs on to that target using the previously specified account/password combination.&nbsp; The only time 10G OEM "acted up" was when I did not specify the preferred credentials on the newly defined target.</P>
<P><STRONG>Next Up</STRONG><BR>I'll provide readers with a bulleted list of information that I compiled during testing.</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>10G Features I Hope I'll Like</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10gfeaturesilike</link>
                      <description>We have been testing Oracle10G for some time now.  So, I thought I'd spend 5 minutes giving you a quick update on a few new features we are interested in.</description>
                      <pubDate>Thu, 03 Feb 2005 19:35:09 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>Oracle Backup - Oracle's New Tape Management System<BR></STRONG>Oracle10G has its own tape managment system that integrates directly into RMAN.&nbsp; Since we are an RMAN shop, we are going to kick off another project to determine if we should begin using Oracle Backup as our tape management system.</P>
<P>I figure that its definitely worth further investigation.&nbsp; What better software can you use to back up Oracle than Oracle?&nbsp;&nbsp;&nbsp; Our current tape management system is expensive in both licensing and maintenance costs.&nbsp;&nbsp; We'll need to determine if the benefits that Oracle Backup provides outweighs the costs of us supporting two different tape management systems.&nbsp;&nbsp; </P>
<P><STRONG>Automatic Storage Management (ASM)<BR></STRONG>If you have read my past blogs, you understand what ASM does.&nbsp; For those of you that haven't, here's a quick refresher.&nbsp; ASM is actually an Oracle instance that manages disk.&nbsp; Instead of using a file management system, you feed the disks into ASM which then provides the traditional mirroring and striping that we all know and love.&nbsp; You create ASM disk groups and place your Oracle data files, temp files and online redo logs in the ASM disk groups.</P>
<P>We are an EMC shop, through and through.&nbsp; We have cabinets and cabinets of Symmetrix and Clariion disks.&nbsp;&nbsp; We are also an IBM shop running 5.2 and 5.3 of AIX.&nbsp; Since we currently use AIX raw devices, we won't have much of a learning curve when we move to ASM.&nbsp; We will also be continuing to let EMC provide the mirroring and striping but we also&nbsp;want ASM to do it's own 1 MEG striping.&nbsp; </P>
<P>EMC has the concepts of LUNs and METALUNs.&nbsp; A LUN is a&nbsp;chunk of a disk that is addressed by the&nbsp;SCSI Logical Unit Number (LUN).&nbsp;&nbsp;A&nbsp;single EMC disk can&nbsp;be&nbsp;split into several LUNs.&nbsp;&nbsp;A METALUN is a collection of LUNs that act as single entity and are presented to the application (in this case, Oracle) as a single component.&nbsp; EMC provides a myriad of alternatives for striping and mirroring. A common practice here at Giant Eagle is to carve up the EMC disks into METALUNs and stripe them in 64 MEG stripes.&nbsp; <BR><BR>OK, why are we interested in ASM if we already use RAW disk and will continue to let EMC mirror and stripe?&nbsp; Isn't this overkill? How about a mutli-part answer to that question:</P>
<UL>
<LI>Some of our servers have several small databases on them.&nbsp; We will create one ASM instance on the server and be able to administer all of the database's datafiles with ASM.&nbsp; We'll create separate disk groups for tables, indexes, online redo logs, temp files, undo files etc. and place data from multiple databases within the same group.</LI>
<LI>ASM will provide disk loadbalancing by automatically moving data to a new disk that is added to the disk group.&nbsp;&nbsp;This is a HUGE benefit for ASM.&nbsp; When we want to add a disk to improve performance by spreading I/O among more drives or increase a disk group's storage capacity, we can do it without taking the system down.&nbsp;&nbsp; In the past this required an extended outage to allow our disk gurus to relayout the disk subsystem.&nbsp; BIG IMPROVEMENT.&nbsp; We'll stripe the daylights out of everything and when we need to add additional disk, we can just add it on the fly.&nbsp;&nbsp; </LI>
<LI>ASM allows us to do a finer grain of striping than we can with EMC and raw devices.&nbsp; I would much rather prefer a 1 MEG stripe over our traditional 64 MEG EMC stripe for performance.</LI>
<LI>I want to administer my own disk.&nbsp;So there.</LI></UL>
<P><STRONG>Until&nbsp;Next Time</STRONG><BR>Chris&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle Enterprise Manager 10G Grid Control - Lessons I've Learned the Hard Way</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10goemlessons</link>
                      <description>We now have several 10G analysis projects underway. I thought I’d give you a quick update on our accomplishments (or lack thereof) on one of them.   This will hopefully prevent others from experiencing the same issues that we just have.  </description>
                      <pubDate>Tue, 01 Feb 2005 17:49:33 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>Lessons I have learned the hard way:</STRONG></P>
<UL>
<LI>That you should use never use the SHUTDOWN NORMAL command to stop an Oracle database.&nbsp; I did one in June of 1996 that I'm still waiting for a response from.</LI>
<LI>Watching the number of bytes increase on a file that you are restoring from a backup won't make it run any faster.</LI>
<LI>That you should never believe a student in an Intro to Oracle class when he says "I didn't even touch it, it just broke!"&nbsp; Note to my fellow Oracle instructors - just restore the database.&nbsp; He probably pulled the old ALTER, RENAME, RESIZE, REMOVE and REALLOCATE trick on the database's control files.&nbsp;</LI>
<LI>That it's not OK to allow a "slightly broken" 10G agent to continue running.</LI></UL>
<P>This is one of the projects that we’ll have to temporarily dump into the “lack of accomplishments” column.&nbsp; In addition, we’ll also file it in the “exasperating” and “patience building” columns too.&nbsp; You know, I have been in this field a long time and continue to find it challenging at times.&nbsp; I have also found that since I have become a manager, my administrative skill sets and problem solving skills are becoming a little rusty, so to speak.&nbsp; Personally, I find that somewhat concerning.&nbsp;&nbsp;&nbsp; But let’s put my concerns aside and continue our discussion.</P>
<P><STRONG>The Target Discovery Process</STRONG> <BR>Before I give you the gory details on our problems, let me describe how nodes are added into the 10G Management Server.&nbsp; In 9I and earlier releases of OEM, you fired up the agents on the targets and then asked the management console to “discover” the node.&nbsp; You specified the node name in a wizard on the management console to add the new target node into the management framework.&nbsp;&nbsp;&nbsp; The databases and listeners running on that node were identified during the discovery process.&nbsp; </P>
<P>The discovery process in 10G is the exact opposite of 9I's.&nbsp; During the agent install on the target, the Oracle Universal Installer asks for the name of the 10G management server that will be responsible for administering the new environment.&nbsp;&nbsp; This information is recorded in the EMD.PROPERTIES configuration file on the target.&nbsp; When the agent is started on the target it “injects” itself into the management server identified during the installation.</P>
<P>We wanted to test deleting and re-adding an entire node from the management console.&nbsp;&nbsp; BIG MISTAKE.&nbsp;&nbsp; Apparently, this generates a problem or two with the management server.&nbsp; Actually it generates more than a few problems, it generates a LOT of problems.&nbsp; First, the server didn’t clean up any of the rows in the management server’s configuration tables.&nbsp; When we attempted to add the node again, we received a SYSMAN trigger error stating that the node was in the process of being deleted.&nbsp;&nbsp; </P>
<P>Although the node was no longer showing up in OEM, there were rows in the configuration table SYSMAN.MGMT_TARGETS_DELETE that caused the trigger to think that the node was in the process of being deleted.&nbsp; We reviewed the contents of the table and found that it contained a history of every target (database, listener, node) that we deleted in the past.&nbsp;&nbsp; None of these previously deleted targets could ever be successfully added back into the environment.&nbsp; That is a problem.</P>
<P>We created a TAR with Oracle and received a very quick response.&nbsp; Of course the analyst’s recommendation was for us to upgrade to version 10.1.0.3 of OEM.&nbsp; Apparently, this is the “catch all” patch that solves a lot of problems relating to the agents.&nbsp;&nbsp; We upgraded to 10.1.0.3 on the management server and on the target and still had the same problem adding the node back in.&nbsp; We deleted another target to determine if the patched code would successfully delete the rows in SYSMAN.MGMT_TARGETS_DELETE.&nbsp; Although the patch did successfully fix the original problem, we still had the old rows in SYSMAN.MGMT_TARGETS_DELETE.</P>
<P>We determined that the rows still residing in the configuration table SYSMAN.MGMT_TARGETS_DELETE continued to be the source of our problem.&nbsp;&nbsp; So, we did what any good DBA would do; we backed up the table and deleted all of the offending rows in it.&nbsp; This fixed our first problem but we then ran into another issue.&nbsp; This time the following error was returned:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>ERROR-400|ORA-20206: Target does not exist: Agent does not exist for <A href="http://agenthost:1830/emd/main/">http://agenthost:1830/emd/main/</A> <BR>ORA-06512: at "SYSMAN.EMD_LOADER", line 1656 <BR>ORA-06512: at line 1</P></BLOCKQUOTE>
<P>We made another visit to Metalink for further research.&nbsp; Although we originally thought that we shouldn’t have tried to “trick” Oracle by deleting the rows, note 290527.1 on Metalink told us that we indeed had a new problem.&nbsp; 290527.1 stated that multiple agents running on the target would “confuse” the management server and prevent a successful target injection into the management server from occurring.</P>
<P>Other day-to-day&nbsp;work needed our immediate attention, so we decided to&nbsp;try again the next morning.&nbsp;&nbsp;The&nbsp;target agent was left&nbsp;in an active&nbsp;state. &nbsp;This was a mistake on our part (really, my part).&nbsp; The agent kept trying to inject itself into the management server every few minutes throughout the night.&nbsp; Each time it failed, it generated a 5 MEG error log on the management server.&nbsp; The error messages rapidly filled the $ORACLE_HOME/sysman/log directory on the management server which caused OEM to ultimately fail and become totally unusable.&nbsp; </P>
<P><BR><STRONG>Lessons Learned</STRONG></P>
<UL>
<LI>Do apply patch 10.1.0.3.&nbsp; This would have prevented the whole comedic set of problems from occurring.&nbsp; I found multiple articles on Metalink stating that it fixes numerous issues with both the management server and the target agents.</LI>
<LI>Don’t let an agent that is having problems inserting itself into the management server continue to run.&nbsp; It will fill up the error log directory which may cause your management server to crash (like ours did).</LI>
<LI>Do use OEM 10G’s monitoring capabilities to monitor the space used in its error log directories.&nbsp;&nbsp; We intend to monitor space utilization in the error log directory every 15 minutes. That way if any of our agents “flake out” and is automatically restarted by their monitoring processes, we won’t fill up the error log directory.</LI>
<LI>Our Oracle application server DBA, Jeff Kondas, recommended that we customize the script that he uses to move application server error logs to a hold directory.&nbsp; He runs a job daily through KRON that moves&nbsp;all of the files in&nbsp;error log directories to a hold directory, &nbsp;compresses the error logs&nbsp;and then removes them from the hold directory on a semi-regular basis.&nbsp; That allows him to keep a running history of logs if historical error analysis is required.</LI></UL>
<P>&nbsp;</P>
<P><BR>&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle10G OEM Grid Control Overview and Test Plan</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10goemtesting</link>
                      <description>Even with all of the high-tech bells and whistles that 10G offers, the database is useless to us if we can't administer it effectively.  For years now, Oracle Enterprise Manager (OEM) has been the sissy GUI administrative tool of choice for Oracle databases.  Oracle10G's OEM is radically different than previous versions.  In this blog, I'll provide you with a high level overview of Oracle10G OEM and Giant Eagle's OEM testing plan.</description>
                      <pubDate>Fri, 28 Jan 2005 11:40:52 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>10G OEM Overview</STRONG><BR>Enterprise manager allows administrators to monitor, administer and report on every Oracle software element&nbsp;in their environment.&nbsp; Each target that OEM manages has its own home page that provides a snapshot of its health and general performance status.&nbsp;&nbsp; Although the target's home page displays the most important metrics and notifications, OEM offers drill downs that provide more in-depth analysis information. </P>
<P>The entire toolset is accessed through a HTML-based console interface.&nbsp; Like previous versions of OEM, 10G OEM is a multi-tier architecture consisting of the HTML console, a management service with an integrated information repository and management agents running on all monitored targets.</P>
<P>The target home pages contain navigation tabs that allow administrators to easily access configuration information, management tools and administrative functions.&nbsp; This presentation style is much different than previous versions of OEM that focused primarily on displaying administrative tools to the end user.&nbsp; The focus of Oracle Enterprise manager has been changed dramatically and it took me a while to become comfortable using it.&nbsp;&nbsp; There is a BIG&nbsp;learning curve with this release&nbsp;and I still find myself stumbling around in it at times.&nbsp;&nbsp; OEM's new layout focuses on providing proactive feedback in the form of alerts, hints and monitoring output to help DBAs understand what is happening in their environments.&nbsp;&nbsp; I'm&nbsp;assuming that I will become more&nbsp;proficient&nbsp;with the tool as I execute our OEM test plan below.&nbsp; I intend to take copious notes so I can help my fellow DBAs at Giant Eagle become comfortable using the product as soon as possible.&nbsp;&nbsp; I'll make sure I provide any interesting information to you in upcoming blogs.</P>
<P><STRONG>Proactive Monitoring</STRONG><BR>10G OEM takes a much more proactive role in monitoring and reporting.&nbsp; The management service and agents have their own watchdog processes that monitor their health and performance.&nbsp;&nbsp; If any of their associated processes abnormally terminates, the watchdog processes automatically restarts them without administrator intervention. </P>
<P>This proactive monitoring and reporting functionality is also applied to all monitored targets.&nbsp; 10G OEM immediately begins monitoring all targets at default settings when they are added.&nbsp; Administrators are then able to fine-tune the threshold values for individual targets when desired.&nbsp; Monitored metrics are stored and aggregated in the repository to provide trend analysis capabilities. Those of us who have SLA agreements with their customers will find 10G OEM's status reports to be of great benefit.&nbsp; 10G OEM automatically provides an availability status for the last 24 hours, 7 days or one month.&nbsp;&nbsp;&nbsp; </P>
<P><STRONG>Intelligent Thresholding</STRONG><BR>One of the new features I intend to thoroughly&nbsp;test is "Intelligent Thresholding Through Baseline Metrics".&nbsp;&nbsp;&nbsp; Wow, now that even sounds high-tech!&nbsp;&nbsp; 10G OEM allows administrators to review statistics for a monitored target and choose a particular time period to act as a benchmark for future performance evaluations.&nbsp;&nbsp; The DBA reviews past statistical information, determines when performance was good and 10G OEM will capture the statistics for that time period.&nbsp;&nbsp; The DBA then sets one warning and one critical threshold for each monitored statistic.&nbsp; 10G OEM will begin comparing all future statistics to the baseline.&nbsp; If any of the statistics exceed their baseline threshold, a warning or critical alert message will be generated.</P>
<P>10G OEM also provides advice-driven responses to generated alerts.&nbsp; The administrator is able to use the advice to speed the problem determination and resolution process.&nbsp; The advice may include historical information to allow administrators to perform trend analysis on a particular statistic or threshold. </P>
<P><STRONG>Proactive SQL Monitoring</STRONG><BR>In addition, I will be paying particular attention to 10G OEM's SQL monitoring feature, which automatically analyzes SQL statements for performance and resource consumption.&nbsp;&nbsp; 10G OEM is supposed to be able to identify poorly performing SQL statements and also make&nbsp;recommendations to correct them.&nbsp;&nbsp; </P>
<P><STRONG>10G Day-to-Day Administration Functionality Testing</STRONG><BR>Before my unit begins taking advantage of 10G OEM's new features, we need to make sure that we can use the tool for day-to-day DBA grunt work.&nbsp;&nbsp; I want to ensure that when we "flip the switch" we will be ready to provide a full set of administrative services for our new environment.&nbsp;&nbsp; So, I'll be personally testing a myriad of day-to-day functions in 10G OEM.&nbsp;&nbsp; Please note that this is not an exhaustive list of 10G OEM's capabilities.&nbsp; These are the functions that must work if we are to begin implementing the product at Giant Eagle.</P>
<P><BR>Here's the checklist I'll be using:</P>
<P dir=ltr style="MARGIN-RIGHT: 0px"><STRONG>1)Viewing database information</STRONG></P>
<UL>
<UL>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Parameters </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Data buffers </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Log buffers </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Shared pool </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Sort areas </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Active processes </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Locks </LI>
<LI dir=ltr style="MARGIN-RIGHT: 0px">Show object DDL</LI></UL></UL>
<P><STRONG>2)Database Structures</STRONG></P>
<UL>
<UL>
<LI>On-line redo log group creation</LI>
<LI>On-line redo log&nbsp; group adding member</LI>
<LI>On-line redo log group dropping member</LI>
<LI>Permanent tablespace creation</LI>
<LI>Permanent datafile - adding to tablespace</LI>
<LI>Permanent datafile - increasing size of</LI>
<LI>Temporary tablespace creation</LI>
<LI>Temporary&nbsp; datafile - adding to tablespace</LI>
<LI>Temporary datafile - increasing size of</LI>
<LI>Undo tablespace creation</LI>
<LI>Undo datafile - adding to tablespace</LI>
<LI>Undo datafile - increasing size of</LI>
<LI>Undo tablespace&nbsp; - switching undo tablespaces</LI>
<LI>Taking above tablespaces offline</LI></UL></UL>
<P><STRONG>3) Object&nbsp; Administration</STRONG></P>
<UL>
<UL>
<LI>Table creation</LI>
<LI>Table alteration (add columns)</LI>
<LI>Table alteration (drop columns)</LI>
<LI>Table alteration (changing columns)</LI>
<LI>Table alteration (moving to a different tablespace)</LI>
<LI>Table alteration (adding constraint referential integrity, check and unique constraints)</LI>
<LI>Table alteration (dropping constraint)</LI>
<LI>Constraints enabling</LI>
<LI>Constraints disabling</LI>
<LI>Table analyze</LI>
<LI>Drop table</LI>
<LI>Index creation</LI>
<LI>Index alteration (moving to different tablespace)</LI>
<LI>Index analyze</LI>
<LI>Index drop</LI>
<LI>Table partitioning (range, hash, list, composite) </LI>
<LI>View creation </LI>
<LI>View drop</LI>
<LI>Sequence creation</LI>
<LI>Sequence drop</LI>
<LI>Synonym creation</LI>
<LI>Synonym drop </LI>
<LI>Hashing and sequence cluster creation </LI>
<LI>DBlink creation</LI>
<LI>DBlink drop</LI>
<LI>Array type creation</LI>
<LI>Array type drop</LI>
<LI>Table type creation</LI>
<LI>Table type drop</LI>
<LI>Create like command for above objects</LI>
<LI>Show dependencies for above objects</LI></UL></UL>
<P><BR><STRONG>4) Space Management</STRONG></P>
<UL>
<UL>
<LI>Monitoring tablespace free space allocations</LI>
<LI>Tablespace map</LI>
<LI>Tablespace reorg</LI>
<LI>Monitoring schema object (table, index) growth </LI>
<LI>Monitoring and managing rollback and undo segments </LI>
<LI>Reorganizing data objects to reduce block and file fragmentation </LI>
<LI>Monitoring log switch frequency&nbsp; &nbsp;</LI></UL></UL>
<P><STRONG>5) Backup and Recovery</STRONG></P>
<UL>
<UL>
<LI>RMAN 10G interface</LI></UL></UL>
<P><STRONG>6) Monitoring for Performance</STRONG></P>
<UL>
<UL>
<LI>Hardware Monitoring</LI>
<LI>Memory utilization and allocation parameters</LI>
<LI>CPU utilization </LI>
<LI>Disk configuration, I/O load balancing and sizing </LI>
<LI>Database Monitoring </LI>
<LI>Memory </LI>
<LI>Disk </LI>
<LI>Process </LI></UL></UL>
<P><STRONG>7) Application code/SQL Statement Monitoring</STRONG> </P>
<UL>
<UL>
<LI>Explains and optimization</LI>
<LI>Parallelization </LI>
<LI>Performance Overview</LI>
<LI>Session Details</LI>
<LI>Top&nbsp; SQL </LI>
<LI>Top Session</LI></UL></UL>
<P><STRONG>8) Advanced database architectures</STRONG></P>
<UL>
<UL>
<LI>Replication </LI>
<LI>Transaction queuing </LI>
<LI>Distributed database </LI>
<LI>Access to disparate systems (gateways, middleware) </LI>
<LI>Highly available systems (Oracle Data Guard) </LI></UL></UL>
<P><STRONG>9) Transaction management</STRONG></P>
<UL>
<UL>
<LI>Distributed transactions </LI>
<LI>Locking </LI></UL></UL>
<P><STRONG>10)Security </STRONG></P>
<UL>
<UL>
<LI>User creation</LI>
<LI>Role creation </LI>
<LI>Security grants</LI>
<LI>Security revocation</LI>
<LI>Profiles</LI>
<LI>Password management </LI>
<LI>Account locking </LI>
<LI>Account aging and expiration </LI>
<LI>Fine-grained access control </LI></UL></UL>
<P><STRONG>11) Auditing</STRONG></P>
<UL>
<UL>
<LI>Audit trail creation</LI>
<LI>Audit trail drop </LI></UL></UL>
<P><STRONG>12) Oracle Utilities</STRONG></P>
<UL>
<UL>
<LI>Export/Import </LI>
<LI>Loads </LI>
<LI>LogMiner Interface</LI></UL></UL>
<P><STRONG>13) Process Management</STRONG></P>
<UL>
<UL>
<LI>Monitoring </LI>
<LI>Killing sessions</LI></UL></UL>
<P><STRONG>14) Change Manger</STRONG></P>
<UL>
<UL>
<LI>Take a baseline</LI>
<LI>Compare database to baseline</LI>
<LI>Compare database to database</LI>
<LI>DB propagate</LI>
<LI>Quick Change</LI></UL></UL>
<P><STRONG>15) Resource Manger</STRONG></P>
<UL>
<UL>
<LI>Manage resource consumer groups</LI>
<LI>Manage resource plans</LI></UL></UL>
<P><STRONG>16) Alerts</STRONG></P>
<UL>
<UL>
<LI>Node up</LI>
<LI>Database up</LI>
<LI>Listener up</LI>
<LI>Archiver hung</LI>
<LI>0600 in alert log</LI>
<LI>Process deadlocks</LI>
<LI>Target directory full</LI>
<LI>Tablespace freespace alerts</LI></UL></UL>
<P><STRONG>17) Jobs</STRONG></P>
<UL>
<UL>
<LI>Analyze schema objects </LI>
<LI>Export </LI>
<LI>Backup </LI>
<LI>Statspack </LI></UL></UL>
<P><STRONG>Next Up<BR></STRONG>An analysis of our initial performance results and a review of our recent discussions on&nbsp;Automatic Storage Management (ASM) with EMC and Oracle.</P>
<P><BR>&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Devising a 10G Testing Strategy and the Anatomy of a 10G Data Warehouse.</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/teststrategydboverview</link>
                      <description>Let's take a quick look at our first 10G data warehouse database.  Well begin by reviewing some basic reports that describe the general database environment and database structures.  As a gift from your friendly ex-Oracle instructor, I'll also provide you with the scripts that generated them.  I'll finish the blog with an overview of our Oracle10G testing strategies.</description>
                      <pubDate>Sat, 22 Jan 2005 16:40:41 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>I have attached a few files to this blog.&nbsp;&nbsp; When I was consulting, one of my primary responsibilities was to perform database assessments for our customers.&nbsp; The assessments were performed on every database that we intended to support remotely. They helped us to determine what we were in for when we began to administer the new environments.&nbsp;&nbsp; After we assumed support for the database, we immediately initiated a project to correct all of the issues that were identified in the assessment.&nbsp;&nbsp;&nbsp; This process resulted in a higher quality database environment for our customers and less administrative problems for us.&nbsp; I guess you could describe it as a "win-win" situation.</P>
<P>We also performed database assessments to generate additional revenue, charging a couple of thousand dollars per assessment.&nbsp;&nbsp; I would run a dozen or so scripts, spend some "quiet time" reviewing the output and create several recommendation documents that would be printed, bound and delivered to the customer.&nbsp;&nbsp; I continue to perform database assessments here at Giant Eagle.&nbsp;&nbsp; I can safely say that I have performed&nbsp;six or seven dozen&nbsp;of these database assessments during my career.&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P><BR><STRONG>Analysis Scripts</STRONG><BR>The analysis scripts were condensed from my rather large SQL library into six sets of scripts that focused on general database info, database structures, statistics, performance, recovery and security.&nbsp; I collect scripts like some folks collect baseball cards.&nbsp;&nbsp; I also write scripts as a hobby and for articles such as this one. The two files I'm giving you contain SQL statements that provide information about the database environment (<A href="http://createwebsuccess.com/10g/dbinfo.txt" target=_blank>dbinfo.txt</A>) and database structures (<A href="http://createwebsuccess.com/10g/structure.txt" target=_blank>structure.txtl</A>).&nbsp; Rest assured, I'm not giving away any of my old company's trade secrets.&nbsp; The SQL statements are generally available on the Internet and are very basic by their nature.&nbsp;&nbsp; Their output allowed me to have an understanding of the database size and configuration before I began reviewing the statistics and performance reports.</P>
<P><STRONG><BR>Analysis Output</STRONG><BR>The output of these two files (<A href="http://createwebsuccess.com/10g/dbinfo_output.txt" target=_blank>dbinfo_output.txt</A> and <A href="http://createwebsuccess.com/10g/structure_output.txt" target=_blank>structure_output.txt</A>) will provide you with the general layout of our first data warehouse we intend to convert to 10G.&nbsp; I removed some of the output generated because I felt it was irrelevant to this discussion.&nbsp;&nbsp; If you want to see all of the output, just download the scripts and run them.&nbsp; Don't worry about the "9I Only" displays in the headings.&nbsp; They were only reminders to let me know that there was some Oracle9I specific information coming.</P>
<P>"Weighing in" at less than 500 GIGs in size, this environment is not large by data warehouse standards.&nbsp; The database is actually the newest data warehouse we have here at Giant Eagle.&nbsp; You could describe it as our "infant" data warehouse that will eventually grow to three or four terabytes in size as it matures.&nbsp; In addition, it is currently not as mission critical to us as some of its big brothers, so this makes it the obvious choice for our first warehouse to convert.&nbsp;&nbsp; <BR><BR>The developers responsible for testing this application are absolutely top-notch.&nbsp;&nbsp; They'll be able to tell us what works and what doesn't.&nbsp; I think I can safely classify the entire warehouse developement team&nbsp;as "access path experts."&nbsp;&nbsp; As a result, I know that they will be able to identify any access path changes that occur as a result of the database upgrade.&nbsp; I haven't seen a release yet that didn't change access paths, so I expect that 10G won't be any different.&nbsp; Let's just hope that any access path changes result in faster (and not slower) performance.&nbsp;&nbsp; </P>
<P><BR><STRONG>Application Testing Strategies</STRONG><BR>We wanted to create an "apples to apples" comparison environment here at Giant Eagle.&nbsp; Take it from your friendly ex-Oracle instructor, it is difficult to compare access paths and query performance on databases that have different amounts of data and different parameter configurations.&nbsp; We all know that the optimizer often takes a different access path based on the number of rows in the tables being accessed.&nbsp;&nbsp;&nbsp; </P>
<P>But what if you don't have the disk available to clone your production environment?&nbsp; Oracle provides a PL/SQL utility (DBMS_STATS) that allows administrators to transfer data dictionary information used by the optimizer from one database to another.&nbsp;&nbsp; You won't be able to compare execution times but you will be able to compare access paths.</P>
<P>We have a quality control environment called DWQUAL that is currently an exact duplicate of production.&nbsp; Ace DBA Jim Dojonovic created a duplicate of DWQUAL on the same test server called DWQUAL2 and upgraded it to Oracle10G.&nbsp; These two environments are almost exact duplicates of each other.&nbsp; We have reviewed the database parameters, database statistics, I/O load on EMC drives - absolutely everything that we could think of that would possibly taint the results was checked and double-checked.&nbsp;&nbsp; If something out of the ordinary happens, we intend to blame the software FIRST and not our environment.&nbsp; I say that tongue-in-cheek because if we have problems, we will also investigate environmental differences as a possible cause.&nbsp; Oh, one last thing, we now secure DWQUAL2 like our production environments.&nbsp; It contains production data and it is treated accordingly.&nbsp; </P>
<P>Let's finish this blog with a quick review of our Oracle10G testing strategy.</P>
<P><STRONG>Base Functionality Testing</STRONG><BR>Our base functionality test plan includes: startup/shutdown, remote access, utility execution (SQLLOADER, Export/Import), interoperability with the UNIX and LINUX operating systems, querying the data dictionary, backup/recovery, basic DML and DDL statement execution.&nbsp; Please note that since we have been testing Oracle10G in our labs for some time now, most of this will be just a quick review to ensure that everything works like it did during our initial functionality tests.&nbsp;&nbsp;&nbsp; </P>
<P><STRONG>10G OEM Testing</STRONG><BR>The database isn't any use to use if we can't administer it effectively.&nbsp; Of course, 10G OEM will be our 10G database administrative tool of choice.&nbsp; I haven't found another Sissy GUI Tool as effective as OEM.&nbsp;&nbsp; But 10G OEM is radically different than its 9I counterpart.&nbsp; The difference between the tools is so dramatic that it requires a separate testing plan.&nbsp; I'll provide the details on Giant Eagle's 10G OEM testing plan in my next blog.</P>
<P><STRONG>Application Functionality Testing</STRONG><BR>Our application team counterparts have created their own formal10G test plans.&nbsp; Some of the components that they will be testing are:</P>
<UL>
<LI>Business rules enforced by constraints, triggers and procedures </LI>
<LI>Data feeds from other architectures </LI>
<LI>Load utility processing </LI>
<LI>Nightly batch processing </LI>
<LI>Online transaction processing</LI>
<LI>Development tools used to build front-end application screens</LI>
<LI>Third-party tools used to provide Ad-Hoc query access</LI>
<LI>Procedural language used to build business logic (Java, PL/SQL)</LI>
<LI>Advanced features required (replication, advanced queuing, partitioning, parallelism)</LI></UL>
<P>Although application functionality testing isn't intended to identify performance problems, general run times will be evaluated.&nbsp; If something runs twice as fast or twice as slow (ouch!) as we expected, we'll be digging into it.</P>
<P><STRONG>Performance Testing</STRONG><BR>Performance testing will allow us to compare the performance of various SQL statements in the new Oracle10G database with the statements' performance in the old release (in this case Oracle Version 9.2).&nbsp; We intend to run selected online transactions and batch jobs in DWQUAL and DWQUAL2 and compare their execution times and performance statistics.&nbsp; </P>
<P>We won't have to run traditional stress tests.&nbsp; Like many data warehouses,&nbsp; a high number of concurrent users is not&nbsp;the pressing issue for this database.&nbsp;&nbsp;&nbsp; We are concerned&nbsp;about loading lots of data and SQL statements that scan millions and millions of rows.&nbsp; If&nbsp;the database can survive our nightly batch processing job stream,&nbsp;&nbsp;I'll know that 10G can handle virtually everything we throw at it.</P>
<P>We have numerous Oracle supplied and third-party toolsets available.&nbsp;&nbsp; Since 10G and 9i have different versions of Oracle Enterprise Manager, we won't use them during our performance evaluation.&nbsp; As a result, we intend to use the basic toolsets at our disposal.&nbsp; </P>
<P>We'll begin by comparing the elapsed execution times of both workloads.&nbsp; We'll use explain plans to compare access paths and STATSPACK to generate statistical performance reports.&nbsp; Yes, even though 10G has all kinds of high-tech tuning gadgets, we will be using the old tried-and-true STATSPACK tool to generate our performance statistics.&nbsp;&nbsp; We also intend to use SQL Trace and TKPROF when more in-depth analysis is warranted.&nbsp; The same tools I have been using since Scott's tiger was a cub.</P>
<P>In addition, our UNIX team will also be involved.&nbsp; They will be using NMON, VMSTAT, IOSTAT and various third-party toolsets to measure the overall load on the system during each of the test runs.&nbsp;&nbsp; We'll keep the admins happy by feeding them a couple of raw slabs of beef (or a hapless developer) from time to time.</P>
<P><STRONG>10G New Feature Testing</STRONG><BR>Once again, most of this testing has been performed in our labs.&nbsp; Rather than provide you with a listing of all of the 10G features we intend to test, I'll just cover each test in its own quickie blog!&nbsp; That's the great thing about writing blogs - there is always more to come!</P>
<P><BR><STRONG>Next up</STRONG><BR>In the next blog, we'll review Giant Eagle's OEM 10G test plan.&nbsp; <BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Migrating Data to Oracle10G Part 2 - A Comparison of Upgrade Tools and Procedures.</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10gconversionparttwo</link>
                      <description>In Part 2 of our series on upgrading databases to 10G, we review the different upgrade mechanisms available to us:  Export/Import, manual upgrade, data copy and the Database Upgrade Assistant (DBUA).  I'll finish by providing you with some hints and tips that will help you choose the most appropriate upgrade method for your environment.</description>
                      <pubDate>Sat, 15 Jan 2005 16:47:44 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>Let me start this discussion by stating that I won't be telling you how to perform the upgrade.&nbsp; If you have been reading my past blogs, you know that I am a firm believer in following the manual like a cookbook when installing and upgrading Oracle databases.&nbsp;&nbsp;&nbsp; I will be providing you with hints and tips to help you along the way but the primary source of information should be from the Oracle documentation.</P>
<P>Don't assume from the above rant that I am against all third-party documentation.&nbsp; Hey, I wrote a book myself!&nbsp; Third-party books are an excellent source of information. The big advantage third-party books have over the technical reference manuals is that they are able to quickly deliver the information that most of us feel is important. Technical reference manuals must provide all of the information on the entire Oracle environment while third-party books are able to focus on just what the author felt was important. </P>
<P>Instead of listing books, I'll list my favorite authors. You'll have the best chance of buying a great book if you select one from the following authors: any of the experts from TUSC, Don Burleson, Michael Ault, Michael Abbey, George Koch, and Kevin Loney. But, I'm digressing from the topic at hand so let's get back to our discussion on upgrade mechanisms.</P>
<P>The migration manual provides the DBA with several different methods to perform the upgrade.&nbsp; Let's take a quick look at some of the alternatives that Oracle recommends:</P>
<P><STRONG>Data Copy</STRONG><BR>Ok, I must admit, I have NEVER used this method of migrating data to a newer release.&nbsp; The first step required would be to duplicate the entire database being converted to Oracle10G.&nbsp;&nbsp; Everything but the data would have to be cloned to the new environment.&nbsp; I would create the 10G database using the Database Configuration Assistant SGT (Sissy GUI Tool) and use Export/Import to clone all of the data objects, programs, users and security to the new environment.&nbsp; The next step would be to create database links between the two databases to enable the data transfer.&nbsp;&nbsp;&nbsp; The two primary tools I would recommend to copy the data to the 10G database would be the SQL*Plus COPY command and the INSERT INTO… SELECT FROM SQL statements.&nbsp; </P>
<P><STRONG>Export/Import</STRONG><BR>Using Export/Import to perform database upgrades can be described as follows:&nbsp; the utility has been around forever (I have been using it since Version 6), it is very reliable and it is very, very slow.&nbsp; Export/Import is often the only method that allows the DBA to migrate databases from very old releases to more current versions.&nbsp; The DBA uses the Export utility to migrate the database data to a flat file from the old release and uses the Import utility&nbsp;to load the data into the database created using the new release's binaries.&nbsp;&nbsp; The DBUA only allows direct upgrades from a handful of previous releases.&nbsp;&nbsp; If you are not on versions 8.0.6, 8.1.7, 9.0.1, and 9.2.0 (and you don't want to perform a double upgrade), Export/Import may be your only alternative.</P>
<P>Export/Import is not the preferred method of upgrading large databases due to its slow performance and additional disk space requirements for the Export's output files and duplicate database data files. Since the database is duplicated, switching back to the old release is simple and straight-forward.&nbsp; Unlike its migration utility counterpart, Export/Import can be used to move the database to a new server or operating system during the migration process.&nbsp; </P>
<P>Like the data copy method, I would create the new 10G database using the Database Configuration Assistant and use the Export/Import utilities to transfer the data, data structures, programs, users and security from the older database to Oracle10G. </P>
<P>One last thing to consider, the Import may set the status column of stored PL/SQL programs and views in DBA_OBJECTS to 'INVALID'.&nbsp;&nbsp; Have a script ready that recompiles all invalid stored PL/SQL programs to validate them.&nbsp; Because of object dependencies, you may have to run the script several times before all invalid objects are successfully recompiled.&nbsp;&nbsp; Oracle provides a script in $ORACLE_HOME/rdbms/admin called utlrp.sql which recompiles invalid objects.</P>
<P><STRONG>Manual Upgrade</STRONG><BR>The database administrator manually executes all of the steps that the Database Upgrade Assistant performs automatically.&nbsp;&nbsp; Is my preference for DBUA starting to show through a little?&nbsp; Oracle recommends that the DBA begin the manual upgrade process by running a script in $ORACLE_HOME/RDBMS/ADMIN called UTLU101I.SQL.&nbsp; This script, which is automatically run by DBUA, evaluates your current environment and details the changes required to ensure a successful upgrade to Oracle10G.</P>
<P>Instead of me regurgitating the information provided by these scripts, I have provided two output files created by UTLU101I.SQL.&nbsp; The first file <A href="http://createwebsuccess.com/10g/92to10upgrade.txt" target=_blank>92to10g.txt </A>is the output from a 9.2 database evaluation and <A href="http://createwebsuccess.com/10g/817to10gupgrade.txt" target=_blank>817to10g.txt</A> is the output from an 8.1.7 evaluation.&nbsp; You'll see that the script is very thorough, providing you with all the information you need to ensure a successful upgrade.&nbsp;&nbsp; </P>
<P>After running the assessment script, there are about 25 more steps listed in the Oracle10G Database Upgrade Guide Documentation that you'll need to perform to complete the upgrade.&nbsp; Did I tell you that the Database Upgrade Assistant performs these steps for you automatically? </P>
<P>Administrators performing the upgrade must then run a few SQL scripts to perform the actual database conversion.&nbsp; The script that is run depends upon the release you are migrating from. For example, you would run script u0902000.sql to upgrade a database from Oracle Version 9.2 to Oracle10G.</P>
<P>&nbsp;At the end of the steps, you can run UTLU101S.SQL to verify that the upgrade completed successfully.&nbsp; </P>
<P>&nbsp;Here is an example of the output from UTLU101S.SQL after I upgraded my desktop database:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>Oracle Database 10.1 Upgrade Status Tool 13-JAN-2005 11:21:34<BR>--&gt; Oracle Database Catalog Views&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Normal successful completion<BR>--&gt; Oracle Database Packages and Types&nbsp; Normal successful completion<BR>No problems detected during upgrade<BR>PL/SQL procedure successfully completed.</P></BLOCKQUOTE>
<P><STRONG>Database Upgrade Assistant</STRONG><BR>The migration utility has matured over time to where it has become one of the preferred methods of performing database upgrades&nbsp;&nbsp; The utility walks the DBA through the migration process which reduces the possibility of user error.&nbsp; Because the utility does not require additional disk space to perform the migration, databases of any size can be easily migrated.&nbsp;&nbsp; One of the drawbacks is that the DBA is unable to move the database to a new server or operating system while performing the migration.</P>
<P>The tool automatically executes the majority of steps you are required to run to perform the upgrade. It automatically modifies or creates tablespaces, disables archiving during the upgrade phase, executes the appropriate upgrade scripts, runs ORADIM for Windows platforms, updates the listener and locks all new accounts to ensure the data remains secured.&nbsp; In addition, DBUA asks you if you want it to back up your database before it performs the upgrade and it will recompile your invalid objects in parallel at the end of its upgrade processing.</P>
<P>DBUA records informational, warning and error messages in log files to help you debug any problems that may occur during the upgrade process.&nbsp; In addition, the tool will also produce a HTML report that provides detailed information on the upgrade that can be viewed at your leisure.&nbsp; </P>
<P>&nbsp;The upgrade utility allows you to upgrade databases automatically using silent mode.&nbsp; I have never done an upgrade in batch but I would like to hear comments from the folks who have.&nbsp;&nbsp; So, if you performed automatic upgrades, please respond to this blog with a comment.&nbsp; </P>
<P><STRONG>Evaluating the Upgrade Tools</STRONG><BR>We'll finish our discussion on data migration with a listing of benefits and issues that are inherent to each of the upgrade choices available:</P>
<P><STRONG>Data Copy</STRONG></P>
<UL>
<LI>Simplifies and speeds the failed upgrade recovery process.&nbsp; The source database is still available for use if the upgrade process fails.</LI>
<LI>Database, tablespace and data object structures must be precreated.</LI>
<LI>Administrators are able to&nbsp;to migrate only the data they want.</LI>
<LI>Precreating data objects allows you to reduce the number of extents per object and defragment files during the upgrade process.</LI>
<LI>Provides the ability to restructure the database during the upgrade.</LI>
<LI>All data being migrated will be duplicated.</LI></UL>
<P><BR><STRONG>Export/Import</STRONG></P>
<UL>
<LI>Simplifies and speeds the failed upgrade recovery process.&nbsp; The source database is still available for use if the upgrade process fails.</LI>
<LI>Database, tablespace and data object structures must be precreated.</LI>
<LI>Setting the COMPRESS=Y flag in the Export utility allows you to reduce the number of extents and defragment the data.</LI>
<LI>Creating a duplicate database will require double the amount of space.</LI>
<LI>Performance can be an issue.</LI>
<LI>Allows administrator to import selected user objects.</LI>
<LI>All data being migrated will be duplicated. </LI>
<LI>Provides administrators with the ability to upgrade from releases not supported by the DBUA.&nbsp; So, if you aren't running 8.0.6, 8.1.7, 9.0.1, or&nbsp; 9.2.0 and you don't want to do a double upgrade,&nbsp; this is the only alternative you have.</LI>
<LI>Database can be upgraded AND migrated to a different platform/operating system combination in one, single step.&nbsp;&nbsp;&nbsp; </LI></UL>
<P>If you go to the 2004 Oracle Open World presentations now on <A href="http://technet.oracle.com">technet.oracle.com</A>, make sure you take a look at presentation numbers 1127 and 1163.&nbsp; In presentation 1163, the author describes how they used Oracle's transportable tablespace feature and not Export/Import to upgrade from 8I to 10G and migrate data from HP/UX to Linux at the same time.&nbsp; As one of my favorite developers has a habit of saying "this sounds like crazy-talk."&nbsp; But the authors felt it was faster to upgrade the source database to 10G then transfer the database data to Linux by using the transportable tablespace feature.</P>
<P><BR><STRONG>Manual</STRONG></P>
<UL>
<LI>Upgrade backoff process is more complex than Data Copy and Export/Import upgrade methods.&nbsp; You don't have a duplicate database to fall back to if a catastrophic upgrade failure occurs.</LI>
<LI>Abundant number of manual steps required makes upgrade process more susceptible to human error.</LI>
<LI>Provides a finer control over the upgrade process.</LI>
<LI>Database can't be upgraded AND migrated to a different platform/operating system combination in one, single step.&nbsp;&nbsp;&nbsp; </LI>
<LI>Since the data is not duplicated, less space is required to perform the upgrade.</LI></UL>
<P><BR><STRONG>DBUA</STRONG></P>
<UL>
<LI>Backoff process is more complex than Data Copy and Export/Import upgrade methods.&nbsp; You don't have a duplicate database to fall back to if a catastrophic upgrade failure occurs.</LI>
<LI>Automates the upgrade process, which reduces both the amount of human intervention involved, and the resulting number of human errors.</LI>
<LI>This DBUA performs most of the steps in rapid succession.&nbsp; Much faster than a database administrator would be able to. </LI>
<LI>Database can't be upgraded AND migrated to a different platform/operating system combination in one, single step.&nbsp;&nbsp;&nbsp; </LI>
<LI>Because you don't duplicate data, this is the preferred method for migrating large data stores to Oracle10G.</LI>
<LI>Since the data is not duplicated, less space is required to perform the upgrade.</LI></UL>
<P><BR><STRONG>Next Up</STRONG><BR>In my next blog, I'll provide you with a structural description of the upgraded data warehouse that we will be using to perform our final 10G testing.&nbsp;&nbsp; In addition, I'll highlight some of the tests we will be performing to ensure there won't be any surprises when we go live with our first 10G multi-terabyte data warehouse.<BR>&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Migrating Data to Oracle10G Part 1  - a Review of Database Upgrade Best Practices and an Introduction to the Database Upgrade Assistant SGT (Sissy GUI Tool)</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10gconversionpartone</link>
                      <description>Oracle10G, like all previous releases, allows administrators to choose their conversion toolsets.  Let's take a couple of minutes to investigate, compare and contrast the primary Oracle10g upgrade mechanisms that are available.  I'll start our discussion by providing you with some upgrade hints and tips that will help you create a successful Oracle10G upgrade strategy.</description>
                      <pubDate>Mon, 10 Jan 2005 11:06:16 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>My Oracle career now spans two decades (give or take a year or two).&nbsp;&nbsp; During this time, I have upgraded my fair share of databases.&nbsp; Actually, I have had the good fortune of upgrading databases to Oracle Versions 6, 7, 8, 9i and now 10G.&nbsp;&nbsp;&nbsp;When I was working as the technical lead for a remote database consulting company, I made a semi-career out of coordinating and performing database upgrade activities with our many customers.&nbsp;&nbsp; We offered database upgrades for free if potential customers chose our remote database administration services.&nbsp;&nbsp; Believe me, our customers took full advantage of that free upgrade policy.&nbsp; I think you could safely estimate that I have been involved in dozens and dozens (and dozens) of database upgrades.&nbsp;&nbsp;&nbsp; </P>
<P>There are two activities that can make any DBA lose sleep - the database recovery and the database upgrade.&nbsp;&nbsp; It is a simple process to become confident in both of them.&nbsp;&nbsp; To build&nbsp;your recovery skills, you create a recovery database and restore it again and again and again.&nbsp;&nbsp; Then verify your backups are actually working on a regular basis, ensure your tape retention policies are what you think they are and you are well on your way to achieving "Recovery Zen" (at least database-wise).</P>
<P>Like database recoveries, database upgrades become easier as you gain experience with them.&nbsp;&nbsp; Once you get one or two (or a ½ dozen) under your belt, the rest become easier.&nbsp;&nbsp; The first upgrade to a new release will always be a little nerve wracking.&nbsp;&nbsp; Remember, the more prepared you are - the more confident you will be.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P><STRONG>Helpful Hints and Tips</STRONG><BR>The following recommendations will help increase your chances of success:</P>
<UL>
<LI>If you have the luxury of choosing the first database to upgrade, choose one that is small, easy to recover, not mission critical and has an adequate outage window.&nbsp;&nbsp; Choosing an Electronic Funds Transfer or a Financial Application for your first upgrade instead of your unit's internal vacation database could be a mistake.&nbsp; </LI>
<LI>Sell the benefits that 10G has to offer to management.&nbsp;&nbsp; 10G has dozens of new features so it should be easy.&nbsp;&nbsp;&nbsp; Let's face it; the database upgrade process is costly and to be quite frank, a little dangerous.&nbsp;&nbsp; You'll need their buy in to push the upgrade process through the organization.</LI>
<LI>Sell the reasons why this upgrade is important to the application development teams.&nbsp; These are the folks that will be spending the numerous hours required to test their application.&nbsp;&nbsp; I know of few organizations that have developers with enough free time to test a new release without impacting other projects.&nbsp;&nbsp; Understand that they have production deadlines that also must be met.&nbsp;&nbsp;&nbsp; If you have many different databases to convert (like we do), create a conversion strategy that takes application workload into consideration.&nbsp;&nbsp; Juggle the application conversion sequence until you come up with a set of conversion dates that all can agree upon.&nbsp; Lastly, don't take it personal (as I used to) when an application team is forced to change a conversion date.&nbsp;&nbsp; Rest assured, they don't usually dream up ways of making you miserable.&nbsp; They are being driven by the business. </LI>
<LI>Read the migration manual and follow it like a cookbook.&nbsp; Scour the web for information on the upgrade process and potential pitfalls.&nbsp; Start with <A href="http://metallink.oracle.com/">metallink.oracle.com </A>and <A href="http://technet.oracle.com/">technet.oracle.com</A> and then do some Googling.&nbsp; Currently, Technet has the the 2004 Oracle Open World Presentations available for downloading.&nbsp; A few of the&nbsp;presentations&nbsp;focus specifically&nbsp;on the 10G upgrade process.&nbsp; In addition, don't forget to visit the various database discussion forums.&nbsp; One thing about the DBA community - we are a helpful bunch and always willing to give advice.&nbsp; Choose it wisely.</LI>
<LI>Hope for the best but prepare for the worst-case scenario.&nbsp; When reading the migration manual, pay special attention to the common migration problems and back-off procedure sections. </LI>
<LI>You'll need to determine the upgrade path required.&nbsp; Oracle supports a direct upgrade to Oracle10G from versions 8.0.6, 8.1.7, 9.0.1, and 9.2.0.&nbsp;&nbsp; Upgrades from other releases require upgrading to an intermediate release before migrating to 10G.&nbsp;&nbsp; For example, a database on release 7.3.4 would first be upgraded to 9.2.0, and then to 10.1.0.</LI>
<LI>Create an upgrade database and convert it before you upgrade a test database that is used by application developers.&nbsp;&nbsp; You can fight through any conversion errors at your leisure. Use this conversion database to test the latest, high-tech features to ensure they work as advertised (and they don't crash the database). </LI>
<LI>Create a migration document that includes checklists, application test plans, back-off procedures and business user contacts.&nbsp; Include a step-by-step description of the activities that will be executed during the migration process.&nbsp;&nbsp; Contact information for everyone involved in the migration should also be included in the migration document.</LI>
<LI>Perform the upgrade in test and ask the developers to run a complete test of the applications that access the database being upgraded.&nbsp; A formalized test plan should be created that tests application functionality, compares application performance to the old release and evaluates any new features that the application will be utilizing in the near future.</LI>
<LI>Create application developer and business user sign off documents.&nbsp; Once the developers and business users have completed their testing, the documents will be signed and the initial migration process will be complete.&nbsp; I have been burned once or twice by applications that were inadequately tested.</LI>
<LI>Schedule a meeting with operating system administrators, application developers, operations personnel and business users to discuss the migration process.&nbsp; Discuss and verify the contents of the turnover document.&nbsp;&nbsp; This meeting will also ensure that everyone understands what is expected of him or her during the migration process.</LI>
<LI>A cold database backup of all datafiles, control files, redo logs, parameter file and password file will provide the foundation for successful database restoration.</LI></UL>
<P><STRONG>Up Next - The Database Upgrade Assistant (DBUA)</STRONG><BR>I have been burned by Oracle's "automatic" upgrade utilities several times in the past.&nbsp;&nbsp; Although I am an OEM afficianado, I have never been a big fan of other Sissy GUI Tools that Oracle has provided in the past.&nbsp; &nbsp;As a&nbsp;result, I took a very cynical approach during my DBUA evaluation.&nbsp;&nbsp; I spent a great deal of time reading and evaluating&nbsp;DBUA problems on Metalink and scoured the internet for all of the information I could find on DBUA.&nbsp; I have talked to Oracle personnel and users that have used DBUA numerous times.&nbsp;&nbsp;I have personally reviewed close to two dozen upgrades by folks that have used DBUA to perform the upgrade.</P>
<P>So, I am now forced to&nbsp;admit&nbsp;that I am quite fond of the DBUA (even though it is still a Sissy GUI Tool).&nbsp; The Database Upgrade Assistant is so much more robust than previous upgrade tools that&nbsp;it has made a&nbsp;believer out of me.&nbsp; It is smarter, more user-friendly and, best of all, &nbsp;it works.&nbsp;&nbsp; In the next blog, we'll take an in-depth look&nbsp;at all of the different upgrade mechanisms available for us to choose from.&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>An Interview with Linux Advocate Jason Heese on Oracle10G and Linux</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracleonlinux</link>
                      <description>Before we continue with our discussion on Oracle 10G, I'd like to take a quick literary detour into the world of 10G on Linux.   One of our warehouse developers, Jason Heese, has been testing and benchmarking Oracle10G on Linux for some time now.  Since I respect Jason's opinion, I thought I'd reserve this blog for Jason's thoughts on the Oracle10G/Linux combination.   </description>
                      <pubDate>Tue, 04 Jan 2005 10:58:50 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>Although Jason's still a young pup, (which is anyone under 30 for me) I have met few folks in my career that can match his intelligence and raw technical skill sets.&nbsp; He's one of the best SQL super tuners I've seen.&nbsp;&nbsp; He's not intimidated by ANY new technology or my DBA team&nbsp;(why are ALL DBAs Type A personalities?) so he is an excellent resource for us to draw upon.&nbsp;&nbsp;&nbsp; Before his head gets any bigger, let's proceed with the interview:<BR>&nbsp;<BR><STRONG>Question:</STRONG><BR>OK Jason, let's start with a quick review of your Linux experience.&nbsp; <BR>&nbsp;<BR><STRONG>Response:</STRONG><BR>I've been playing around with LINUX for some time now.&nbsp; I started in the early to mid 90's when the operating system first became available for downloading.&nbsp; Since that time, I've used Linux quite extensively.&nbsp; I have run close to a dozen different flavors of the O/S - Debian, Sourcerer, Mandrake, Red Hat, YellowDog, etc.. </P>
<P>I guess you could describe me as a LINUX advocate and a heavy Linux user.&nbsp; During my spare time, I work on open source projects using Python and C++.&nbsp;&nbsp; Many of those projects involve the Linux operating system.&nbsp; If you're interested in learning more about open source coding projects, take a look at <A href="http://www.sourceforge.net/">www.sourceforge.net</A>.&nbsp; If you have some free time, working on open source projects is an excellent way of sharpening your coding skills.&nbsp; We can always use the help.<BR>&nbsp;<BR>&nbsp;<BR><STRONG>Question:</STRONG><BR>It seems that there is a community of developers that almost have a religious fervor for the Linux operating system.&nbsp; What is the lure of Linux for you personally?&nbsp; <BR>&nbsp;<BR><STRONG>Answer:</STRONG><BR>It's the whole open-source development environment that intrigues me… I'm a coder at heart and it allows me to add functionality to the operating system or specific tools by writing additional code or customizing the code provided by the original developer(s).&nbsp; I enjoy tuning, tweaking and coding and Linux allows me to do that.&nbsp;&nbsp;&nbsp; Working on O/S code is challenging.&nbsp; If you like this kind of stuff, the more complex the better.<BR>&nbsp;<BR>&nbsp;<BR><STRONG>Question:</STRONG><BR>What Linux environments and versions are you currently running at home?<BR>&nbsp;<BR><STRONG>Answer:</STRONG><BR>I'm currently running Red Hat and Gentoo.&nbsp; There's really no specific version for either product.&nbsp; I have the core products installed and then upgrade them with the different packages as they become available.&nbsp;&nbsp; Both operating systems are truly customized.&nbsp; <BR>&nbsp;<BR>&nbsp;<BR><STRONG>Question:<BR></STRONG>Red Hat is pretty well known.&nbsp; What is Gentoo?<BR>&nbsp;<BR><STRONG>Answer:<BR></STRONG>Gentoo is just another flavor of Linux.&nbsp; I like it because it is a little more customizable than some of the other Linux distributions.&nbsp; Gentoo allows me to compile the source code with my own optimizations and merge them into the existing Linux code set using the Gentoo Portage System.&nbsp; The Portage System keeps track of installed packages and allows me to update packages with automatic dependency checking.&nbsp; </P>
<P>Think of Gentoo as a coding enthusiast's version of Linux.&nbsp;&nbsp; Red Hat is downloaded as a set of packages, which are really binary executables.&nbsp; They are already compiled for you so everyone gets the same vanilla install depending upon what architecture they chose.&nbsp;&nbsp;&nbsp; If you're interested in learning more about Gentoo, take a look at <A href="http://www.gentoo.org/">www.gentoo.org</A>.&nbsp; There's&nbsp; a lot of information on that site.&nbsp; <BR>&nbsp;<BR><STRONG><BR>Question:<BR></STRONG>So you have installed Oracle10G on both Linux and Gentoo? </P>
<P><STRONG>Answer:<BR></STRONG>Yes, I have it running on both systems.&nbsp;&nbsp;&nbsp; But Oracle is not really available on Gentoo.&nbsp;&nbsp; However, you can create a release file on your system to fool the installer that you're using Red Hat or United Linux.&nbsp; Another option is to run the Oracle10G installer and tell it to ignore the system PREREQs.&nbsp; Either way should work.</P>
<P><BR><STRONG>Question:</STRONG><BR>How would you compare the 10G and Oracle9i installs on Red Hat?</P>
<P><STRONG>Answer:<BR></STRONG>It's like night and day.&nbsp; The 10G installer ran so much faster that I first thought it might have blown up.&nbsp; The 10G install was smoother and required less hacking.&nbsp;&nbsp; I had to do a lot of Googling to fix the problems I ran into with the 9i installer.&nbsp; I'll admit that some of the problems were dependency issues, but most were just esoteric setting changes to try and appease the installer.&nbsp; Compared to the 9i install, the 10G install was a dream.&nbsp; The only downside was that I didn't have any time to take a nap while the installer ran which left me cranky when I had to use the DBCA utility.&nbsp; It was that much smoother and faster.</P>
<P><BR><STRONG>Question:</STRONG><BR>What 10G feature impresses you the most?</P>
<P><STRONG>Answer:</STRONG><BR>I'm a coder, not a DBA.&nbsp;&nbsp; So all of the new diagnostic tools that come with the database are of great benefit to me.&nbsp;&nbsp;&nbsp; If you set up ADDM and the internal database alerting features correctly, the 10G database can actually tell you what's wrong with it. </P>
<P>10G also contains several new V$ tables that will be of great benefit to both developers and DBAs.&nbsp; The first one is&nbsp;V$LOCK_TYPE&nbsp; Since I'm not a DBA, I have no idea what most of the lock types mean so having a look up table is very helpful.&nbsp; I also find the V$WAIT_SESSION_CLASS&nbsp;table very informative when I'm trying to pinpoint specific performance bottlenecks.&nbsp; The V$SYSTEM_WAIT_HISTORY is another table that will provide you with good tuning information, especially if you are unable to monitor a process as it was running.&nbsp; V$SYSTEM_WAIT_HISTORY allows you to look at previous performance stats at your leisure.&nbsp;&nbsp; Oracle continues to enhance the database to make it easier for us to debug performance problems that occurred in the past.&nbsp; This capability was unheard of a few years ago.</P>
<P>The new recycle bin feature for dropping objects could be very helpful when you've made a big mistake.&nbsp;&nbsp; In addition, the new SQL Model Clause is undoubtedly one of the most powerful enhancements made to the SQL language.&nbsp;&nbsp; In a very over simplified explanation, it allows you to do spreadsheet type manipulations in SQL.&nbsp; It also allows you to treat your result set as a multidimensional array.&nbsp;&nbsp;&nbsp; If I could provide one single reading recommendation to developers, it would be to read all of the information they can on the 10G SQL Model Clause enhancements.&nbsp;&nbsp; </P>
<P>In general, it looks like Oracle really focused on performance and database&nbsp;tuning with&nbsp;this release. Pretty soon we won't need you guys (DBAs) anymore.&nbsp;&nbsp; The database will tune itself.</P>
<P><BR><STRONG>Question:</STRONG><BR>Real funny.&nbsp; I think I'll revoke some of your security when we are done with this interview.&nbsp;&nbsp; Is there anything else that you would tell us about 10G?</P>
<P><STRONG>Answer:</STRONG><BR>The database just seems to be faster right out of the box.&nbsp;&nbsp; I haven't had a chance to look into the reasons yet but trust me; it's just faster than previous releases.&nbsp;&nbsp;&nbsp; The optimizer is also more intelligent.&nbsp; I know the access paths most of my statements should take.&nbsp;&nbsp; I know my data and I've read the 9i optimizer code so I know how Oracle's access paths work.&nbsp;&nbsp; I had to use a lot of hints in 9i to get it to take the access paths I wanted.&nbsp;&nbsp; I felt like I was smarter than the optimizer.&nbsp; 10G is taking the correct access paths without me using hints.&nbsp; This is across the board too, not just for a particular type of query or join.&nbsp; </P>
<P>One more thing, the new PL/SQL compiler along with the PLSQL_OPTIMIZE_LEVEL settings can be quite helpful.&nbsp; The setting ranges from 0 to 2.&nbsp; The higher the number, the greater the effort made by the complier to optimize the PL/SQL library units. This is actually one of the first features I played around with after getting the database set up.&nbsp; Now, I know that everyone will want to set the optimizer to level '2', which is also the default.&nbsp; However, anyone who's had any experience optimizing C code knows that the highest setting is not always the best in all cases.&nbsp;&nbsp; I recommend using '1' as your optimizer level to start and then experimenting with the optimization level set at '2'.</P>
<P>I'm also impressed with 10G's smaller footprint on Linux. 10G provides more features than 9i with less code.&nbsp; It makes me feel that the code set is just cleaner in general.&nbsp;&nbsp; I was never a real fan of some of the 9i releases - especially 9.2.0.5.&nbsp; The optimizer just seemed to "flake out" on me occasionally.&nbsp;&nbsp;&nbsp; The 10G optimizer is pretty rock solid.&nbsp;&nbsp; I can't wait to look at the optimizer's code set to see how it makes access path decisions.</P>
<P><BR><STRONG>Question:</STRONG><BR>&nbsp;Where do you go when you are looking for Linux information?</P>
<P><STRONG>Answer:<BR></STRONG>Oracle's websites are a great place to start.&nbsp;&nbsp; Technet (<A href="http://technet.oracle.com/">technet.oracle.com</A>) has a LOT of Linux information to offer.&nbsp; Technet has white papers, articles, downloads and there's a whole area pretty much devoted to running Oracle on Linux.&nbsp;&nbsp; I also visit <A href="http://www.kernel.org/">www.kernel.org</A> and <A href="http://www.gentoo.org/">www.gentoo.org</A>.&nbsp; Both of those sites have a lot of Linux information.&nbsp;&nbsp; In addition, <A href="http://www.puschitz.com/InstallingOracle10g.shtml">www.puschitz.com/InstallingOracle10g.shtml</A>&nbsp; has a great FAQ on installing oracle on Linux.&nbsp; If you are interested,&nbsp; <A href="http://gentoo-wiki.com/HOWTO_Install_Oracle_10g">gentoo-wiki.com/HOWTO_Install_Oracle_10g</A> is a WIKI devoted to Gentoo and has information on installing Oracle on the Gentoo distribution.&nbsp; </P>
<P>If anyone would like to ask me any questions, they can usually find me on the #gentoo channel at <A href="http://irc.freenode.net/">irc.freenode.net</A>.&nbsp;&nbsp; It's an interactive discussion (chat) area.&nbsp; It'll require that you download an IRC client but that's where I can be found.&nbsp;&nbsp;&nbsp;&nbsp; You'll find some Oracle Corporation tekkies hanging out there sometimes too.&nbsp; They are very knowledgeable and always willing to answer questions.</P>
<P><BR><STRONG>Question:</STRONG><BR>What is the future for Linux?<BR>&nbsp;<BR><STRONG>Answer:<BR></STRONG>Linux will continue to grow and continue to challenge both Windows and UNIX operating systems for market share.&nbsp;&nbsp; The O/S is becoming easier to install and administer.&nbsp; That's one of the reasons why mainstream technical personnel stayed away from Linux when it was first released.&nbsp; A lot of hacking was required to get it to install.&nbsp;&nbsp; It also took too many alterations to the kernel to get all of the applications to work.&nbsp;&nbsp; The libraries in earlier releases were also a pain; one application required one version of the GLIBC library to compile correctly while other applications required a different version.&nbsp; You were always switching back and forth…<BR>&nbsp;<BR>Red Hat's Anaconda installer simplified the installation process and changed people's perception of Linux.&nbsp; Some pretty big players are also pushing Linux.&nbsp;&nbsp; IBM, Oracle - it seems like everyone but Microsoft is jumping on the bandwagon.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; It's the best of both worlds - open source code that is being supported by some of the major players in the industry.</P>
<P><BR><STRONG>Question:</STRONG><BR>What are your thoughts on Oracle supporting the Red Hat operating system directly?&nbsp; </P>
<P><STRONG>Answer:</STRONG><BR>I think being able to call one company to provide both O/S and database support is an excellent idea.&nbsp;&nbsp; It reduces the amount of finger pointing.&nbsp;&nbsp; No matter where the problem resides, O/S or database server, you can talk to one support unit to help you fix it. </P>
<P>I think that Oracle and Red Hat should take the partnership one step further by combining both the database and O/S binaries into one combined product set.&nbsp;&nbsp;&nbsp; Let's face it, the database and the O/S are so co-dependent that it makes sense to combine them.&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Creating an Oracle10G Multi-Terabyte Data Warehouse Database</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10gdbcreate</link>
                      <description>In my last blog, I reviewed some of of the Oracle10G parameter changes uncovered by our resident 10G researcher, Jim Dojonovic.  In this next installment of our epic 10G testing saga, Jim reviews the CREATE DATABASE DDL statement, double checks the operating system environment to ensure the statement will run successfully and finally executes the DDL to create our data warehouse test database.</description>
                      <pubDate>Tue, 28 Dec 2004 12:57:10 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>Database Creation Hints and Tips<BR></STRONG>Before we review the CREATE DATABASE DDL statement we'll be using to create our warehouse, let's cover a few guidelines that will increase our chances of successfully creating a database on the first try.&nbsp;&nbsp; Hey, no SGTs (Sissy GUI Tools) like DBCA for us, we'll be creating the database the old-fashioned DBA way - manually!&nbsp; I have always been a proponent of learning command line first.&nbsp; I will admit that DBCA provides you with a lot of neat "bells and whistles" (templates,&nbsp;error-checking,&nbsp;automatically creating services and password files, etc.)&nbsp;but for this discussion, we'll be using the manual method (insert series of Tim the Toolman Taylor&nbsp;grunts here).</P>
<P>During my career as an Oracle instructor, I have created dozens of Oracle databases and have watched hundreds created by my students.&nbsp; The Create Database Lab was always one of the most challenging exercises in any of the intro classes.&nbsp; I've seen a LOT of mistakes made and I am not afraid to say I have made&nbsp;quite a few myself.&nbsp;&nbsp; I think that's one of the reasons I received good reviews from my students.&nbsp; I tried to impart 15 years of tips, tricks and techniques so that my students wouldn't make the same mistakes I did. If you believe the adage "We all learn from our mistakes", then you can truly classify me as an Oracle expert.&nbsp; So, before we review our DDL, I'll provide you with a few hints and tips that will help you improve your chances of successfully creating a database in one attempt:</P>
<UL>
<LI>Read the "Creating an Oracle Database" Chapter in the 10G Administrator's Guide.&nbsp; This chapter will provide you with the majority of information you will need to know to successfully create an Oracle10G database.&nbsp; Follow the "Steps to Create the Database" section like a cookbook and you will be well on your way to success.&nbsp; </LI>
<LI>For those of you creating a database on UNIX and LINUX systems, re-read the "Installation Guide for XXXX Systems" replacing the XXXX with the flavor of the UNIX/LINUX operating system you will be using.&nbsp;&nbsp; After reviewing the installation guides, turn your attention to the "Administrator's Reference for UNIX Systems". Pay close attention to the sections titled "Setting Environment Variables."&nbsp; These system variables (ORACLE_HOME, ORACLE_BASE, etc. )will need to be set correctly to ensure a successful database create.</LI>
<LI>Avoid common mistakes that are obvious but often overlooked. The first step is to verify that the names of all the directories you'll be using in your CREATE DATABASE DDL statement are created on the system. While you're at it, verify that the directories have adequate space allocated to them.&nbsp; Then review all of the directory and file names you are referencing in your parameter file. Ensure that they also exist and have enough space.&nbsp; If you are using UNIX/LINUX, verify that the directories have the proper permissions. In addition, you'll have to make sure you have enough semaphores and shared memory allocated.&nbsp; The "Administrator's Reference for UNIX Systems" will provide you with the details. If you are manually creating a database&nbsp; on Windows systems, don't forget to execute the ORADIM command to create the Oracle database service.&nbsp; Last thing - don't forget to set YOUR ORACLE SID!</LI>
<LI>Follow OFA naming conventions.&nbsp; OFA stands for Optimal Flexible Architecture. The OFA standard is a set of naming conventions and configuration guidelines that are designed to improve database performance by distributing the data to reduce I/O overloads and&nbsp;protect against drive failures.&nbsp; &nbsp;In addition, because OFA standards are well documented by the Oracle Corporation, newly hired DBA and consultants are able to more quickly assume administration responsibilities.<BR></LI>
<LI>I almost forgot!&nbsp; If you will be using a password file (to allow remote startups and shutdowns) you'll need to create a password file.&nbsp;&nbsp; For those of you running Windows systems, ORADIM will do that for you.&nbsp; DBAs using UNIX/LINUX will run the ORAPWD utility to create the password file. Of course, the DBCA SGT does all that for you...</LI></UL>
<P><BR><STRONG>CREATE DATABASE DDL Statement<BR></STRONG>Let's take a look at the database DDL statement that DBA Dojonovic executed.</P>
<P align=left>create database "dwqual2"<BR>&nbsp;&nbsp;&nbsp; user sys identified by XXXXXXX&nbsp;&nbsp; - (you didn't think I was going to show you these, did you?)<BR>&nbsp;&nbsp;&nbsp; user system identified by XXXXXX<BR>&nbsp;&nbsp;&nbsp; maxinstances 1<BR>&nbsp;&nbsp;&nbsp; maxlogmembers 5<BR>&nbsp;&nbsp;&nbsp; maxlogfiles&nbsp; 15<BR>&nbsp;&nbsp;&nbsp; maxdatafiles 2000<BR>&nbsp;&nbsp;&nbsp; character set "UTF8"<BR>logfile<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 1 ('/dev/rdwq2redo1_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 2 ('/dev/rdwq2redo2_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 3 ('/dev/rdwq2redo3_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 4 ('/dev/rdwq2redo4_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 5 ('/dev/rdwq2redo5_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 6 ('/dev/rdwq2redo6_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 7 ('/dev/rdwq2redo7_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GROUP 8 ('/dev/rdwq2redo8_01.01')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 767m<BR>&nbsp;datafile<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '/dev/rdwq2system1.01' size 825m<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent management local<BR>&nbsp;sysaux datafile<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '/dev/rdwq2sysaux1.01' size 325m<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent management local<BR>&nbsp;default tablespace user_default datafile<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '/dev/rdwq2default.01' size 250m<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent management local<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uniform size 1m <BR>&nbsp;default temporary tablespace temp01<BR>&nbsp;&nbsp; tempfile '/dev/rdwq2temp_01.01' size 51199m<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent management local<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uniform size 4m<BR>&nbsp;undo tablespace undo01 datafile<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '/dev/rdwq2undo_01.01'&nbsp;&nbsp; size 25599m<BR>&nbsp;</P>
<P>If our file names look a little odd to you, it's because we have found that raw logical volumes continue to provide us with a distinct performance advantage over both JFS and JFS2 file systems.&nbsp; I know that IBM's JFS2 concurrent I/O feature is supposed to provide I/O performance that is comparable to RAW but we have found no reason (performance or otherwise) that would compel us to migrate from RAW to JFS2.</P>
<P>Since this is our 10G testing database and we utilize EMC storage here at Giant Eagle, we won't mirror our online redo logs.&nbsp; If we lose or corrupt a member (and its associated EMC mirror), we'll recover the database from the previous night's backup. That's if the trusty ALTER DATABASE CLEAR LOGFILE or ALTER DATABASE DROP LOGFILE GROUP XXXX&nbsp; commands don't work.&nbsp;&nbsp; </P>
<P>The SYSTEM, SYSAUX, DEFAULT and TEMPORARY tablespaces are all locally managed.&nbsp; You'll notice that some of the file sizes are quite large.&nbsp; Since we will be working with lots of data, we'll need big UNDO and TEMPORARY sort files to support the work we'll be pumping through this environment.&nbsp; As stated previously, we use EMC which allows our disk administrators to distribute our files on multiple drives to ensure that we don't overheat any single disk device.&nbsp;&nbsp; With the amount of I/O we push through these systems, I'm surprised that we haven't melted any of them…&nbsp;<BR>&nbsp;&nbsp; </P>
<P><STRONG>Default User Tablespace</STRONG><BR>Oracle10G allows administrators to specify a DEFAULT TABLESPACE clause in the CREATE DATABASE statement. The clause creates a default tablespace for the database.&nbsp;&nbsp; Oracle will assign all users to this tablespace that do not have a default tablespace explicity assigned to them during user creation. If this clause is omitted, the SYSTEM tablespace will continue to be used as the default tablespace for the database. If you forget to specify a default tablespace during database creation, you can use the ALTER DATABASE command to set the databases's default tablespace to a non-SYSTEM tablespace.<BR><BR><BR><STRONG>SYSAUX Tablespace</STRONG><BR>SYSAUX is a new tablespace that is required in 10G.&nbsp; The SYSAUX tablespace will store the objects for Oracle features that used to be stored in multiple, different tablespaces. The SYSAUX tablespace consolidates the objects into one easy-to-manage storage area.&nbsp; </P>
<P>The listing below provides you with the Oracle feature and the name of the tablespace its components used to be stored in:</P>
<UL>
<UL>
<UL>
<UL>
<UL>
<LI>Analytical Workspace Object Table (SYSTEM) </LI>
<LI>Enterprise Manager Repository (OEM_REPOSITORY) </LI>
<LI>LogMiner (SYSTEM)&nbsp; </LI>
<LI>Logical Standby (SYSTEM)&nbsp; </LI>
<LI>OLAP API History Tables (CWMLITE) </LI>
<LI>Oracle Data Mining (ODM) </LI>
<LI>Oracle Spatial (SYSTEM)&nbsp; </LI>
<LI>Oracle Streams (SYSTEM)&nbsp; </LI>
<LI>Oracle Text (DRSYS) </LI>
<LI>Oracle Ultra Search (DRSYS) </LI>
<LI>Oracle interMedia ORDPLUGINS Components (SYSTEM)&nbsp;</LI>
<LI>Oracle interMedia ORDSYS Components (SYSTEM)&nbsp; </LI>
<LI>Oracle interMedia SI_INFORMTN_SCHEMA Components (SYSTEM)&nbsp; </LI>
<LI>Server Manageability Components (New in Oracle Database 10G)</LI>
<LI>Statspack Repository (User-defined) </LI>
<LI>Unified Job Scheduler (New in Oracle Database 10G)</LI>
<LI>Workspace Manager (SYSTEM) </LI></UL></UL></UL></UL></UL>
<P>Each set of objects that support a particular feature is known as a "Component" in Oracle10G.&nbsp; Oracle provides a new view, V$SYSAUX_OCCUPANTS that allows administrators to view the amount of space used by each component and the name of the Oracle-supplied stored procedure that can be used to move its objects into and out of the SYSAUX tablespace. These stored procedures allow administrators to store objects for a particular feature in tablespaces other than SYSAUX.&nbsp; </P>
<P>The query below will provide you with the name of the feature, the schema name that owns the objects, the space used by the feature and the Oracle-supplied stored procedure that can used to migrate the component to a different tablespace.</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>SELECT occupant_name, schema_name, space_usage_kbytes, move_procedure FROM v$sysaux_occupants;</P></BLOCKQUOTE>
<P><STRONG>Next Up</STRONG><BR>&nbsp;In our next blog, we'll take a look at the messages generated by our CREATE DATABASE DDL statement and create our application data tablespaces.<BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>A Discussion of Obsolete parameters in 10G or "Hey - Where Did LOG_ARCHIVE_START Go?"</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10parameters</link>
                      <description>Before creating their first data warehouse test database, the DBAs at Giant Eagle review the parameter changes contained in Oracle's latest release.</description>
                      <pubDate>Tue, 14 Dec 2004 20:56:20 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>During startup, Oracle must read either an initialization parameter file or a server parameter file. These files contain a list of configuration parameters&nbsp;that are used to&nbsp;name things, set limits or size constructs within the database instance.&nbsp; Database admnistrators are able to adjust or "tweak" selected parameters to improve the performance of the database system.&nbsp; Determining which parameters&nbsp;to adjust depends upon the performance characteristics of the database being tuned.&nbsp;Each new release&nbsp;contains&nbsp;new parameters and makes other parameters deprecated or obsolete.&nbsp;&nbsp; If we want our database create statement to run successfully the first time, we'll need to find out what the changes are.&nbsp;&nbsp;</P>
<P>Ace DBA Jim Dojonovic, Giant Eagle's resident 10G researcher, has already done the bulk of the work for us. Jim did what every good DBA should do before creating a database using a new release; he read the Database Upgrade Guide!&nbsp; The Upgrade Guide is required reading for those that plan to use a new release or perform Oracle database upgrades.&nbsp; It provides hints, tips and&nbsp;tricks - the "rules of the road" that help you achieve a trouble-free upgrade.&nbsp;&nbsp; You are able to access the&nbsp;entire&nbsp;10G documentation set&nbsp;by visiting Technet's <A href="http://otn.oracle.com/pls/db10g/portal.portal_demo3?selected=1">Oracle10G Documentation Portal</A>.&nbsp;&nbsp;&nbsp;Then choose the link titled "Upgrade Guide" to access the 10G upgrade documentation.&nbsp; If you don't have an account on Technet, the web page&nbsp;will prompt you to create one.&nbsp;&nbsp; If you are serious about learning you trade,&nbsp;go ahead and create the account&nbsp; The benefits are numerous and the price can't be beat (it's free!).</P>
<P>After reviewing the 10G Upgrade Guide, Jim then turned his attention to the new features section of the Oracle10G Reference Guide.&nbsp; The Reference Guide has a section that contains a listing of all of the parameters that can be specified in the database's parameter file.&nbsp; </P>
<P>Database upgrades are one of the more stressful activities DBAs are required to perform.&nbsp;&nbsp; There's nothing like an upgrade "gone bad" to bring unwanted attention upon you.&nbsp; How do you reduce the chances of that event&nbsp;occurring?&nbsp; You prepare for the migration process by reading the Database Upgrade Guide, reviewing upgrade problems on Oracle's Metalink support website and searching the World Wide Web looking for any tidbits of information you can find.&nbsp;&nbsp; </P>
<P><STRONG>Oracle10G Deprecated Parameters</STRONG><BR>DBA Dojonovic found that there were several parameters that were deprecated in Oracle10G. Deprecated parameters are often made obsolete in a future release but they continue to be supported to provide backward compatibility.&nbsp;&nbsp; If a deprecated parameter is specified in the parameter file, Oracle displays a warning message during instance startup.&nbsp; In addition, Oracle displays&nbsp;a listing of all deprecated parameters&nbsp;found in the database's parameter file in the alert log.</P>
<P>Here's an example of the error message that is returned when a 10G database is started with one or more obsolete and/or deprecated parameters specified:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>SQL&gt;STARTUP<BR>ORA-32004: obsolete and/or deprecated parameter(s) specified <BR>ORACLE instance started.</P></BLOCKQUOTE>
<P>Here's an excerpt from the alert log from one of our 10G databases showing the warning message:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>Deprecated system parameters with specified values:<BR>&nbsp; log_archive_start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp; max_enabled_roles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp; parallel_automatic_tuning<BR>End of deprecated system parameter listing</P></BLOCKQUOTE>
<P>The following initialization parameters were deprecated in release 10.1:</P>
<UL>
<UL>
<LI>BUFFER_POOL_KEEP (replaced by DB_KEEP_CACHE_SIZE)</LI>
<LI>BUFFER_POOL_RECYCLE (replaced by DB_RECYCLE_CACHE_SIZE)</LI>
<LI>GLOBAL_CONTEXT_POOL_SIZE</LI>
<LI>LOCK_NAME_SPACE&nbsp; (superseded by sp-name parameter)</LI>
<LI>LOG_ARCHIVE_START (ARCH process is automatically started) </LI>
<LI>MAX_ENABLED_ROLES&nbsp; (min = max =148 in 10G)</LI>
<LI>PARALLEL_AUTOMATIC_TUNING&nbsp; (set automatically)</LI>
<LI>PLSQL_COMPILER_FLAGS (replaced by PLSQL_CODE_TYPE and PLSQL_DEBUG)&nbsp;&nbsp;&nbsp; </LI></UL></UL>
<P>You can issue the following SQL statement to get a list of all deprecated initialization parameters:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>SQL&gt; SELECT name FROM v$parameter WHERE isdeprecated = 'TRUE'; </P></BLOCKQUOTE>
<P><STRONG>Oracle10G Obsolete Parameters</STRONG><BR>We also found that Oracle made numerous parameters obsolete in 10G.&nbsp; Remember that a 10G database will successfully start even if one or more obsolete parameters are specified.&nbsp; Like their deprecated counterparts, Oracle will return a warning during startup and record a message in the database's alert log.&nbsp; But the obsolete parameter will not have any affect on the database environment.&nbsp; Oracle will often decide to make a particular parameter obsolete and then "hide" it by placing an underscore "_" in front of it.&nbsp;&nbsp; These parameters, often called underscored or hidden parameters, are not documented by Oracle but can still be specified under the supervision of Oracle support.&nbsp;&nbsp; An example of this would be OPTIMIZER_MAX_PERMUATATIONS, which is now hidden in Oracle10G.</P>
<P>The following initialization parameters were made obsolete in release 10.1:</P>
<UL>
<UL>
<LI>DBLINK_ENCRYPT_LOGIN&nbsp;</LI>
<LI>HASH_JOIN_ENABLED&nbsp; </LI>
<LI>LOG_PARALLELISM&nbsp;&nbsp;</LI>
<LI>MAX_ROLLBACK_SEGMENTS&nbsp; </LI>
<LI>MTS_CIRCUITS&nbsp; </LI>
<LI>MTS_DISPATCHERS&nbsp; </LI>
<LI>MTS_LISTENER_ADDRESS&nbsp; </LI>
<LI>MTS_MAX_DISPATCHERS&nbsp; </LI>
<LI>MTS_MAX_SERVERS&nbsp; </LI>
<LI>MTS_MULTIPLE_LISTENERS&nbsp; </LI>
<LI>MTS_SERVERS&nbsp; </LI>
<LI>MTS_SERVICE&nbsp; </LI>
<LI>MTS_SESSIONS&nbsp; </LI>
<LI>OPTIMIZER_MAX_PERMUTATIONS</LI>
<LI>ORACLE_TRACE_COLLECTION_NAME </LI>
<LI>ORACLE_TRACE_COLLECTION_PATH</LI>
<LI>ORACLE_TRACE_COLLECTION_SIZE&nbsp; </LI>
<LI>ORACLE_TRACE_ENABLE&nbsp; </LI>
<LI>ORACLE_TRACE_FACILITY_NAME</LI>
<LI>ORACLE_TRACE_FACILITY_PATH&nbsp; </LI>
<LI>PARTITION_VIEW_ENABLED&nbsp; </LI>
<LI>PLSQL_NATIVE_C_COMPILER&nbsp; </LI>
<LI>PLSQL_NATIVE_LINKER&nbsp; </LI>
<LI>PLSQL_NATIVE_MAKE_FILE_NAME</LI>
<LI>PLSQL_NATIVE_MAKE_UTILITY&nbsp; </LI>
<LI>ROW_LOCKING</LI>
<LI>SERIALIZABLE&nbsp; </LI>
<LI>TRANSACTION_AUDITING&nbsp; </LI>
<LI>UNDO_SUPPRESS_ERRORS</LI></UL></UL>
<P>The major change in this batch of obsolete parameters is that you no longer need to preconfigure initialization parameters for Oracle's Multi-Threaded or Shared Server.&nbsp; </P>
<P>DBAs can query the V$OBSOLETE_PARAMETER dynamic performance view to display all obsolete and hidden parameters.&nbsp;&nbsp; The view contains the NAME column (which is self-explanatory) and the ISSPECIFIED column that contains the value "TRUE" if the parameter has been set in the database's parameter file.&nbsp; <BR>&nbsp;<BR>You can issue the SQL statement below to create a listing of all of the obsolete parameters:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>SQL&gt; select name, isspecified from v$obsolete_parameter;</P></BLOCKQUOTE>
<P><STRONG>New Parameters</STRONG><BR>Instead of providing you with a laundry list of all of the new parameters contained in 10G, I'll discuss each one in depth when I discuss the feature they pertain to.&nbsp; Hey, that's the great thing about blogs - you can always write another one!&nbsp; Rest assured that the DBAs at Giant Eagle will be thoroughly investigating the majority of new features contained in Oracle's latest release.</P>
<P><STRONG>Next Up</STRONG><BR>Jim will be creating our first data warehouse test database to finally begin the testing phase of our 10G evaluation process.<BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle10G Binary Installation</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/10gbinaryinstallation</link>
                      <description>Our intrepid DBAs at Giant Eagle continue their exploration of Oracle10G by installing the database binaries on HP, IBM and LINUX.</description>
                      <pubDate>Wed, 08 Dec 2004 19:46:12 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>In my last blog, I discussed the Oracle10G media and documentation.&nbsp; Let's continue our examination of Oracle10G with a few quick notes on our Oracle binary installation. In the past, installing Oracle used to be "a pain."&nbsp;&nbsp; Actually describing it as "a pain" is being considerate.&nbsp; I've spent more than a few hours of my career muttering under my breath and taking the installer's name in vain.&nbsp;&nbsp; </P>
<P>I remember the good old days.&nbsp;&nbsp; Installations used to take hours and experiencing problem after problem was commonplace. Successfully installing Oracle became a rite of passage as a DBA.&nbsp; With each new release, the installer became easier to use, installation speeds increased and the number of installation problems decreased.&nbsp; In a few years, I'll be telling new DBAs "You don't know how good you have it.&nbsp; I remember when installations used to take three days...&nbsp; We were real DBAs back then. We even had to log in at NIGHT TIME to do work."&nbsp; </P>
<P>We have installed 10G on AIX, HP and one of our ace developers, Jason Heese, has it up and running on LINUX Redhat.&nbsp; All of the installations went well. The 10G installer is easier to use, has less screens and is more intelligent than previous versions. The 10G executables consume less space than their 9I counterparts.&nbsp; On AIX Release 5.2 (our operating system of choice), 9.2.0.6 consumed 4 GIGs of disk space while a comparable installation of 10.1.0.3 on the same box consumed a little under 3.5 GIGs of disk. Oracle10G consumed 3 GIGs of disk on our HP test platform and 2 GIGs on LINUX.</P>
<P><STRONG>Installation Hints and Tips</STRONG><BR>The most important thing to remember is to use the installation manual like a cookbook. Follow the steps that Oracle recommends and DO NOT DEVIATE from them. The installation guide is your friend and if you don't understand some of the operating system commands provided in the manual, make friends with your local O/S administrator. </P>
<P>You'll also need to find out the prerequisites for your system.&nbsp;&nbsp; Instead of me repeating reams of information that not everyone wants to read, let me tell you where to look.&nbsp; Log on to <A href="http://metalink.oracle.com/">Oracle Metalink</A> (if you don't have an account, you'll need your CSI Number to create one) and do a search using the following keywords "pre-install checks for 10g RDBMS XXXX'.&nbsp; Just replace the 'XXXX' with your operating system and you'll find the "prereqs" for it.&nbsp; Don't have a CSI number yet?&nbsp; Never fear, the documentation is also available on Oracle's Technet website (<A href="http://www.oracle.com/technology/documentation/database10g.html">http://www.oracle.com/technology/documentation/database10g.html</A>).&nbsp; Remember, you also have to create an account on Technet but it's free! It's a great deal too.&nbsp; Technet has articles, white papers, discussion forums and product and documentation download areas.&nbsp; Even if you have found the prereqs for your operating system on Metalink, there is information on Technet that is required reading before you begin your install. After you log on to Technet, make sure you read the "Oracle Database Installation Guide for XXXX Systems' and "Oracle Database Release Notes 10g for XXXXX'.&nbsp; Just replace the 'XXXX' with your operating system.</P>
<P>Once you are finished reading the suggested documentation, you can be really proactive and go back to Metalink and do a search for "10G installation problems XXXX".&nbsp; Once again, replacing the 'XXXX' with your operating system.&nbsp; That way you'll make sure there are no hidden bugs for your particular operating system release.</P>
<P><STRONG>Common Installation problems</STRONG><BR>Most installations fail because of a few common issues:</P>
<UL>
<UL>
<LI>Insufficient disk space - Check the installation guide before you start the install. If you are going to create a starter database during the install, make sure you have enough disk space available. Oracle10G requires up to 4 GIGs of disk space for the binaries alone. Some windows installations may have a slightly smaller footprint, but not by much. For UNIX systems, the Oracle Universal Installer requires up to 600 MB of space in the /tmp directory. </LI>
<LI>Improper permissions - The installation guide details the security permissions required to do a successful install.</LI>
<LI>UNIX/LINUX - Shared memory and semaphore parameters. The system configuration file (/etc/system in the many UNIX systems) contains parameters used to configure shared memory parameters and semaphores. </LI></UL></UL>
<P><STRONG>Next Up</STRONG><BR>We'll discuss some new 10G parameters, discontinued parameters and the DDL for our first 10G database create.</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle10G - Let the Installation Begin!</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10ginstall1</link>
                      <description>Now that we have a pretty firm understanding of Oracle10G's new features, lets continue our discussion on 10G by laying the groundwork for our first production conversion.   In this blog, we'll talk about how to obtain the Oracle10G product set, Oracle10G's documentation and the Oracle10G media.</description>
                      <pubDate>Sun, 05 Dec 2004 12:33:28 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P>In my previous four blogs, I provided you with a laundry list of new features in Oracle10G.&nbsp; I felt it was important that readers have a general understanding of some of the features we'll be testing here at Giant Eagle.&nbsp; I purposely kept the information at a high-level.&nbsp;&nbsp; I wanted to make sure I covered as many of the new features as possible without turning them into the world's longest blogs.&nbsp;&nbsp; I also kept the tone of those blogs a little less conversational and more informational.&nbsp; I wanted to make sure we had a firm foundation on which to build future discussions upon.&nbsp; I think that must be the ex-Oracle instructor coming out in me.&nbsp;&nbsp;&nbsp;&nbsp; Rest assured, I'll be providing you with more in-depth information as we move forward with our Oracle10G testing.&nbsp; That's the great thing about blogs!</P>
<P>Since my name isn't easily recognizable, some background information is in order.&nbsp; Compared to the other authors on the site, I sometimes feel like it is the "Who's Who" (Burleson, Ault, Lewis, Nanda) and the "Who's He?" (that would be me).&nbsp;&nbsp; I actually spoke after Rich Niemiec at an Oracle Open World a few years ago.&nbsp; Now I know how the guy that bats AFTER Barry Bonds or Sammy Sosa feels.&nbsp; </P>
<P>I have been administering Oracle since Version6 and have&nbsp;had a pretty varied career&nbsp;during that time. I've bought Oracle, sold it, learned it and taught it.&nbsp;&nbsp;I've worked as a DBA,&nbsp;Database Architect, Database Technologies Specialist&nbsp;as well as a consultant specializing in&nbsp;tuning/performance and advanced architectures.&nbsp;&nbsp; I have also been employed&nbsp;as a&nbsp;senior-level certified Oracle Instructor for an Oracle training center.&nbsp;&nbsp; Achieving the senior-level title allowed me to certify my fellow instructors.&nbsp;&nbsp; The greatest accomplishment in my career came was when I was awarded the Oracle Approved Education Center (OAEC) Quality Achievement Award. These awards are given to the top 4 instructors in the OAEC program.&nbsp;&nbsp;&nbsp;But teaching and too much travel go hand in hand.&nbsp; &nbsp;I'd still be teaching if it weren't for my wife forgetting who I was occasionally.&nbsp; </P>
<P>I am currently employed as the Database Manager for Giant Eagle in Pittsburgh, Pennsylvania.&nbsp; My unit currently administers 75 Oracle and 60 Microsoft SQL Server databases.&nbsp;&nbsp; Giant Eagle has several data warehouses in the multi-terabyte range with a few tables having 5 billion rows (plus or minus a few million).&nbsp;&nbsp;&nbsp; It is a challenging and exciting environment here.&nbsp;&nbsp; We look forward to continuing our implementation of Oracle10G and taking advantage of the advanced features and benefits that Oracle's latest release provides.</P>
<P>We have rigorously tested many of 10G's new features in our labs and are currently beginning our first real application conversion process.&nbsp; I'll be providing you with all of the gory details, from our first installation in our test environments to final production migration.&nbsp; The DBA leading the charge, Jim Dojonovic, likes to "aggressively" test and implement new technologies.&nbsp;&nbsp; Aggressive is the key word; he already has the developers running a little scared.&nbsp; Luckily, the developers that will be testing Oracle10G are strong technically and aren't easily intimidated by new technologies (or Dojonovic for that matter).&nbsp;&nbsp; It promises to be an interesting ride.&nbsp; Now that you at least have a general understanding about our environment, let's move on to the information.&nbsp;&nbsp; </P>
<P><BR><STRONG>Oracle10G Documentation</STRONG><BR>Like most shops, we started our initial 10G evaluation by downloading the documentation.&nbsp;&nbsp; After reviewing it and using it for a few months, my review can be classified as "two thumbs up."&nbsp;&nbsp; What can I say, the Oracle10G documentation is organized better, easier to navigate and easier to search than its Oracle9i counterpart.&nbsp; I like the new splash page that comes up featuring the "Getting Started", "Most Popular" and "New Features" sections.&nbsp;&nbsp; The 10G documentation's search function is also more robust and less error-prone.&nbsp; </P>
<P>The splash page provides a true documentation portal look and feel.&nbsp;&nbsp; The tabs across the top divide the documentation into loosely grouped categories such as "Getting Started", "Administration", "Application Development", "Data Warehousing", etc..&nbsp; For those of you that know the exact book you need, Oracle continues to provide the "Book Listing" page that provides a listing of all Oracle books in alphabetical order.&nbsp; </P>
<P>The documentation took up 800 MEGs on my PC at home.&nbsp; If you will only be using the HTML documentation pages, you can reduce the amount of disk required by searching for all of the PDF files in the documentation directory and deleting them.</P>
<P>If you remember anything from this blog, make it the following sentence: "The hallmark of a being a good DBA is not knowing everything, but knowing where to look when you don't."&nbsp;&nbsp; But there is so much information available on Oracle that it tends to become overwhelming. How do you find that one facet of information, that one explanation you are looking for when you are confronted with seemingly endless sources of information? Here's a hint, GO TO THE MANUALS FIRST.&nbsp;&nbsp; </P>
<P>Call me old school, but I still read the entire set of documentation for every new Oracle release.&nbsp;&nbsp; The order of the first few books&nbsp; is always the same:&nbsp; "New Features", "Concepts", "Administrators Guide", "Reference",&nbsp; "SQL Reference", "Performance Tuning Guide" and "Data Warehousing Guide".&nbsp;&nbsp; The remaining books are read in no particular order.&nbsp; It's pretty much what I feel like reading at the time.&nbsp;&nbsp; When I was teaching, I always reinforced to my students that they needed to reference the Oracle documentation FIRST.</P>
<P>There are numerous industry pundits out there claiming to be "The Expert" on Oracle technologies.&nbsp; Take some advice from your friendly ex-Oracle instructor.&nbsp;&nbsp; The only sources of information that you should bet your career on are the Oracle Documentation, MetaLink (metalink.oracle.com) and Technet (technet.oracle.com).&nbsp;&nbsp;&nbsp; As a database manager, the last thing I want to hear is&nbsp;&nbsp; "Well, in Nick Knowitall's latest book it says it should have worked" when you're explaining to me why you crashed one of our production databases.&nbsp;&nbsp; Don't get me wrong; third party resources are an invaluable source of information.&nbsp; Just trust (and read) the documentation first.</P>
<P><BR><STRONG>Oracle10G Media</STRONG><BR>Oracle allows you to download its documentation and product sets from its technical discussion site called Technet.&nbsp;&nbsp; If you are new to Oracle, just sign up and you can immediately start downloading the 10G product set and documentation.&nbsp;&nbsp; Technet also provides frequently asked questions, articles, discussion forums and best of all - it's free! </P>
<P>Customers are also able to request CDs by logging on to MetaLink. Oracle's premier web support service is available to all customers who have current support service contracts. Oracle MetaLink allows customers to log and track service requests and search Oracle's support and bug databases.&nbsp; The website also contains a patch and patchset download area, product availability and life cycle information and technical libraries containing white papers and informational documents. </P>
<P>Log on to MetaLink (new users will have to create an account using their Oracle CSI number) and ask Oracle to send you a copy of Oracle10G for your operating system.&nbsp; Oracle ships CDs QUICK.&nbsp; They have always arrived here at Giant Eagle within a few days.&nbsp; For those of you that haven't purchased Oracle before, Oracle's website (<A href="http://www.oracle.com/">www.oracle.com</A>) will allow you to purchase any product Oracle markets.</P>
<P>When our first set of 10G CDs arrived, the DBA opened up the package and said "Hey, where's the rest of them?&nbsp; I think they forgot to send me all of the CDs I need to do the install."&nbsp;&nbsp; We checked MetaLink and found that Oracle10G only needs a couple of CDs.&nbsp;&nbsp; One main CD and another called "The Companion CD" which really should be called "The Companion CD that is required for all installs" since it pretty much has to be installed when you install Oracle.&nbsp;<BR></P>
<P><STRONG>Next Up<BR></STRONG>In my next blog, I'll describe the environment we are installing Oracle10G in and a detailed description of the installation process on HP, IBM RISC and LINUX.&nbsp; <BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G Hidden Features Part II</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10ghiddenfeat2</link>
                      <description>With all of new features contained in this release,  Oracle10G promises to be the most exciting Oracle release to date.  This is part two of a series highlighting some of the hidden features that Oracle customers can look forward to when using the "latest and greatest" version of Oracle’s flagship database product, Oracle10G.   

 </description>
                      <pubDate>Thu, 02 Dec 2004 13:00:50 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>The Hidden Secrets of Oracle10G Blog Part II</STRONG></P>
<P>Consider this to be the exciting sequel to The Hidden Secrets of Oracle10G Blog Part I.&nbsp; This series of blogs are not intended to be an inclusive list of Oracle10G hidden features.&nbsp;&nbsp; I'm hoping to provide readers with information on some of the 10G benefits not covered by other authors.&nbsp;&nbsp; If you have a hidden feature you would like to highlight, please feel free to respond to this blog.&nbsp; That's what blogging is all about!</P>
<P><BR><STRONG>Shrinking Tables</STRONG><BR>Getting rid of unused space in a table improves the performance of full table scans.&nbsp; Removing unused space in index structures provides quicker index access due to a more compact tree.&nbsp; The additional benefit is a more efficient utilization of space because the space freed is available for other objects. In releases prior to Oracle10G, getting rid of free space above and below a table's high-water mark was usually done by the tried-and-true, Export, Drop Table, Import commands.&nbsp; Administrators could also use the ALTER INDEX REBUILD statement to reorganize index segments to create a more compact index tree.</P>
<P>Oracle10G objects that reside in Automatic Segment Space Managed (ASSM) tablespaces can be shrunk using the "ALTER………SHRINK" statement.&nbsp;&nbsp;&nbsp; The shrink statement is not limited to just heap tables and indexes, Oracle also allows index-organized tables, partitions, subpartitions, materialized views and materialized view logs to be shrunk using ALTER commands.&nbsp; In addition, the CASCADE option can be used to propagate the shrink operation to all dependent objects except materialized views, LOB indexes, IOT mapping tables and overflow segments.</P>
<P>It is interesting to note that because the shrink operation may change the ROWIDS in heap-organized tables, row movement must first be enabled by executing the "ALTER TABLE tablename ENABLE ROW MOVEMENT" statement. The shrink operation can be performed while the table is on-line and active and does not require any extra database data file space.&nbsp; The shrink operation itself is performed by the database internally executing INSERT and DELETE statements.&nbsp; Since the data itself is not changed (just rearranged), DML triggers are not fired during shrink operations. </P>
<P>Oracle uses the high water mark to identify the highest amount of space used by a particular segment.&nbsp; It acts as the boundary between used and unused space.&nbsp; As the amount of data grows, the segment's high water mark grows accordingly.&nbsp; But as the amount of data shrinks (i.e. row deletes), the high water mark is not altered to reflect the segment's new characteristics.&nbsp; The high water mark not being adjusted as the data shrinks has the tendency to create a somewhat confusing performance problem.</P>
<P>During a full table scan, Oracle scans all blocks up to the table's high water mark.&nbsp; This happens regardless of whether those blocks contain data or not.&nbsp;&nbsp; Business needs often require that all rows of a table be scanned. DBAs often attempt to increase the performance of the aforementioned table scans by trying to store as little data as possible in the scanned table.&nbsp; If the table is purged by SQL DELETE statements, the high water mark will not be moved and the table scans will continue to perform poorly.&nbsp; Please note that future INSERT statements can reuse the space.&nbsp; Until that happens, you may be scanning a lot of blocks and not retrieving any data.&nbsp; 10G's new shrink command will definitely help in this situation.</P>
<P>If all of the rows are being deleted, the administrator should use the TRUNCATE statement to remove the unwanted rows.&nbsp; TRUNCATE adjusts the high water mark to the first block in the segment.&nbsp; If a partial purge is being performed, the administrator should reorganize the table with EXPORT/IMPORT or the ALTER TABLE MOVE command in Oracle9i or the new segment shrink command in Oracle10G.</P>
<P><BR><STRONG>Segment Advisor</STRONG> <BR>Administrators are able to use Oracle10G's Segment Advisor to identify candidates for shrink operations.&nbsp; The advisor estimates the amount of unused space that will be released when the shrink operation is run on the particular object.&nbsp; A wizard is available that allows users to evaluate all objects in the database, all objects in a specific tablespace or all objects owned by a particular schema.&nbsp; </P>
<P>Although we have tested this in our labs, we have yet to test the segment advisor in an active 10G environment.&nbsp; The DBA running the 10G project here likes to "aggressively test and implement" new releases here.&nbsp;&nbsp; Rest assured that in future blogs, I'll be providing you with a wealth of information on the segment shrink statement and the segment advisor.&nbsp;</P>
<P><BR><STRONG>Tablespace Rename</STRONG><BR>Tablespaces can be renamed in Oracle10G by executing the "ALTER TABLESPACE old_name TO new_ name" SQL statement.&nbsp;&nbsp; Oracle10G allows permanent, temporary and undo tablespaces to be renamed.&nbsp; Oracle will automatically update all tablespace name references in the data dictionary, control files and on-line data file headers.&nbsp; If the tablespace being renamed is an undo tablespace, Oracle will perform the additional step of updating the UNDO_TABLESPACE parameter in the SPFILE.&nbsp; If an SPFILE is not used, a message is written to the database's alert log notifying administrators that the parameter file must be manually changed to reflect the undo tablespace's new name.&nbsp;&nbsp; </P>
<P>The way my DBAs type, I'm happy to see ANY new rename statement become available in Oracle.&nbsp;&nbsp; I'll put it to you this way, if Mavis Beacon ever stopped by and saw our DBAs in action; she'd probably have to use the old paper bag trick to stop from hyperventilating.&nbsp; I won't be cringing as much now when I hear "what do you mean I spelled the name wrong?" coming from my team.&nbsp; </P>
<P><BR><STRONG>Oracle File Copies</STRONG><BR>Oracle10G's DBMS_FILE_TRANSFER PL/SQL package provides administrators with a mechanism to copy binary files between Oracle databases without using OS commands or FTP.&nbsp;&nbsp; The transfer package can be executed locally to transfer files to another database server or can be executed remotely to transfer files between two remote databases.&nbsp; </P>
<P>Currently, the only files that can be copied using this mechanism are Data Pump dump sets and tablespace data files.&nbsp; In addition, the file size must be a multiple of 512 bytes and less than 2 terabytes.&nbsp; Using the file transfer package in conjunction with Oracle's transportable tablespace feature allows administrators to totally automate tablespace data transfers from one database to another.&nbsp;&nbsp; The process to unplug tablespace data files from the source database, copy the files to the destination server and plug the tablespace data files into the target database can now be executed on a recurring basis by batch jobs initiated by DBMS_JOBS, OEM, KRON, AT and third-party schedulers. The transferred files created on the target platforms are owned by the Oracle account and can be accessed by all database processes. For long copy operations, progress is displayed in the V$SESSION_LONGOPS view.</P>
<P><BR><STRONG>Redo Logfile Size Advisor</STRONG><BR>Describing the process of determining the size of a database's redo logfile as "somewhat error-prone" is like stating that the Titanic sprung a small leak.&nbsp; Administrators must balance the performance implications of redo logfiles that are too small with the recovery implications of having redo logfiles that are too large.&nbsp;&nbsp; Oracle10G comes to the rescue with another new advisor, the Redo Logfile Size Advisor.&nbsp; The advisor suggests the smallest on-line redo logfile based on the current FAST_START_MTTR_TARGET parameter and workload statistics.&nbsp; Like database managed undo segments, Oracle must have thought we were doing such a "bang up" job sizing redo logfiles that they felt we needed help.&nbsp; For many of us, they were right!</P>
<P>I can't under estimate the importance that redo logfile sizing has on database performance.&nbsp; When I was a high-priced Oracle consultant on a tuning gig, one of the first things I looked at when I performed my database environment performance review was to look at log switch frequency.&nbsp; If I saw "checkpoint not complete" messages in the alert log, I'd start to salivate knowing that fixing this problem was going to be an easy way to tune the client's environment.</P>
<P>A common rule of thumb is to adjust the redo log's size so that Oracle performs a log switch every 15 to 30 minutes. Log switches that occur more frequently may have a negative impact on performance. Log switches that occur several times a minute have a definite impact on database performance. Checking messages in the alert log is one way to determine how fast Oracle is filling and switching logs. If the following messages are found, you can be sure that performance is being affected:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>Thread 1 advanced to log sequence 248 <BR>Current log# 2 seq# 248 mem# 0: /orant/oradata/logs/redolog2a.log<BR>Thread 1 cannot allocate new log, sequence 249<BR>Checkpoint not complete</P></BLOCKQUOTE>
<P>The "checkpoint not complete" messages are generated because the logs are switching so fast that the checkpoint associated with the log switch isn't complete.&nbsp; During that time, Oracle's LGWR process has filled up the other redo log groups and is now waiting for the first checkpoint to successfully execute.&nbsp; Oracle will stop processing until the checkpoint completes successfully.&nbsp; </P>
<P>One easy way to prevent improper redo logfile sizing from affecting database performance in Oracle10G is to use the handy new redo logfile size advisor. </P>
<P><BR><STRONG>Flushing the Buffer Cache</STRONG><BR>The buffer cache can magically increase the performance of SQL benchmarking tests.&nbsp;&nbsp; The first run will incur the I/O to load the data buffers and subsequent runs may be faster because the data is now cached.&nbsp; The "ALTER SYSTEM FLUSH SHARED POOL" empties the database buffer cache and allows users to establish and maintain a consistent SQL benchmark environment.&nbsp;&nbsp; Administrators are able to flush the buffer cache between statement executions to determine if their tuning changes have made a positive impact on the execution times of the SQL statement being tuned.</P>
<P>Even though I am an ex-Oracle instructor, I still have a strong desire to train others.&nbsp;&nbsp; If it wasn't for my wife forgetting who I was, I would still be teaching.&nbsp; One of my favorite teases for really new DBAs was to run a query and time it, tap the top of the monitor and run it again.&nbsp;&nbsp; Becuase the first query "primed" or pre-loaded the buffers, the run-time would magically be reduced!&nbsp;&nbsp; It was an excellent way to start our discussion on the benefits of properly sizing the database buffer cache. </P>
<P><BR><STRONG>Active Session History</STRONG><BR>Oracle10G contains a new internal utility, called Active Session History, to provide administrators with access to current performance information.</P>
<P>Active Session History samples data from the V$SESSION dynamic performance table every second and stores the information in V$ACTIVE_SESSON_HISTORY.&nbsp; The information contains the events that current sessions are waiting for.&nbsp; The information pertains to active sessions only; information from inactive sessions is not recorded.&nbsp; The view contains one row per active session for each one-second sample.&nbsp; Administrators are able to access V$ACTIVE_SESSON_HISTORY as they would any other V$ dynamic performance table.</P>
<P>It is important to note that like V$SQLAREA, V$ACTIVE_SESSION_HISTORY is a rolling buffer in memory.&nbsp; Oracle's internal documentation states that current workload analysis most often requires detailed performance statistics on activity within the last five to ten minute time-period.&nbsp; As new information is added, earlier information contained in the view will be removed.&nbsp; Active Session History consumes 2 megabytes of memory per CPU and is fixed for the lifetime of the instance.&nbsp; </P>
<P>I've been tuning for a long time, having started with Oracle Version 6.&nbsp; I've also been teaching Oracle for a long time.&nbsp;&nbsp; Here is some helpful advice, learn as much as you can about Active Session History.&nbsp;&nbsp; This new feature WILL REDUCE the amount of time you spend tuning applications that use Oracle.&nbsp; </P>
<P><BR><STRONG>Conclusion</STRONG><BR>As stated previously, the intent of these blogs were to highlight a few of the interesting, but often overlooked, new features in Oracle10G. Thanks for reading and good luck with Oracle10G.&nbsp; Please feel free to respond back with any comments, corrections or questions!</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><BR>&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle10G Hidden Features Part I</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10ghiddenfeat1</link>
                      <description>The first in a series of blogs that provides information on the little-known features, the "Hidden Secrets of 10G", that are rarely discussed but are designed to improve the overall quality of the Oracle database environment.  </description>
                      <pubDate>Thu, 02 Dec 2004 12:44:38 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>"The Hidden Secrets of Oracle10G Blog Part I"</STRONG></P>
<P>This set of blogs, (I feel so tekkie when I say stuff like that) is intended to be a little different than others you may read.&nbsp; They will not focus on some of the more popular features that are most often discussed by other authors.&nbsp;&nbsp; Because of space considerations, and to not turn this into the world's largest blog, the topics will be covered at a high-level.&nbsp;&nbsp; That's the cool thing about blogs; I'll have lots of time in the future to discuss each feature in depth.&nbsp; If you have a hidden feature you would like to highlight, please feel free to respond to this blog.&nbsp; That's what blogging is all about!</P>
<P>In Oracle10G Hidden Secrets Blog Part I, we'll take a look at database cloning, cross platform transportable tablespace, new external table definition, automatic SGA segment sizing, automatic statistics generation and server-generated alerts.</P>
<P>In Oracle10G Hidden Secrets Blog Part II, or "son of blog", I'll discuss some of the other hidden secrets that are destined to make Oracle10G easier to tune, recover and administer.</P>
<P><BR><STRONG>Clone Database</STRONG><BR>Duplicating a database is a common task for database administrators.&nbsp; Whether it is to create a mirror-image of a production environment on another platform, duplicate test databases for specific testing and debugging purposes or provide a standby database for Oracle Data Guard, cloning is a popular, yet time-consuming and error-prone task.</P>
<P>10G database administrators are able to use the Enterprise Manager Clone Database wizard to clone databases to another existing Oracle Home (Clone Home - get it?).&nbsp; The wizard steps users through the database clone operation, which provides the following benefits:</P>
<UL>
<UL>
<LI>Saves time and reduces the number of errors associated with duplicating an Oracle database</LI>
<LI>Capability to clone database releases from 8.1.7 and later</LI>
<LI>The source database can remain open during the cloning operation</LI>
<LI>The cloning operation restores the source datafiles on the target and recovers them resulting in a clone database that is consistent with the source database up to the point in time which the archived logs were backed up</LI>
<LI>Creates the initialization files, password files and network files</LI></UL></UL>
<P>Just a quick note from your friendly blogger.&nbsp;&nbsp; If you are going to clone a production database for testing, you must then secure that new QA or test environment as if it were production.&nbsp; Hey, you have production data in there so you better treat it as production.&nbsp;&nbsp; If I were going to steal your data, I wouldn't start with your production databases because I know that they are the most tightly secured.&nbsp; I would be looking for databases with the letters "QA" in them, test databases, database export files, flat files in the database's UTIL output directory, database backups, etc…&nbsp; Rest assured I'm not giving anything away that hackers don't already know.&nbsp;&nbsp;</P>
<P><BR><STRONG>Cross-Platform Transportable Tablespace</STRONG> <BR>Oracle8i introduced the transportable tablespace feature, which allowed DBAs to "unplug" datafiles associated with a tablespace, manually transport the datafiles to another environment and "plug" the datafiles (and data) into that environment.&nbsp; This enhancement greatly improved the performance and operational simplicity of transferring data from one system to another.&nbsp; In previous releases, the transportable tablespace feature could only be used to transfer data to databases running on the same operating system. In Oracle10G, Oracle has enhanced the transportable tablespace feature to allow the tablespace to be transferred to databases running on different operating systems. <BR>&nbsp;<BR>The source and target systems must be on an O/S and hardware combination (see Oracle documentation) that supports cross-platform transportable tablespace and both databases must use the same character sets.&nbsp; In addition, both databases must have their COMPATIBLE initialization parameter set to 10.0.0 or higher before they can use the cross-platform transportable tablespace feature. </P>
<P>The list of platforms is kind of limited right now, but it's a start!&nbsp; The platforms my shop uses are on there, so I'm good to go.</P>
<P><BR><STRONG>New External Table Definition</STRONG><BR>Oracle9i introduced external tables, which provided a mechanism to view data stored in external sources as if it were a table in the database. This ability to read external data provided a more straightforward method of loading and transforming data from external sources. Administrators were no longer required to allocate space inside the database for staging tables or write external programs to transform the data outside of the database environment. By making it no longer necessary to stage data in the Oracle database, Oracle9i's external tables have essentially streamlined the ETL function by merging the transformation and loading processes.<BR>&nbsp;<BR>In Oracle9i, the database was unable to populate external tables for use as input to other systems.&nbsp;&nbsp; The initial implementation's intention was to allow data created outside of the database environment to be used as input to populate tables inside the database. Oracle10G users are now able to populate data stored in flat files using SQL.&nbsp; The data can then be used as input to other applications that are able to use flat files as input.&nbsp; </P>
<P>Index creation is still not allowed on external tables and administrators must use the "CREATE TABLE AS SELECT" command to populate them.&nbsp;&nbsp; The external table must be created using the ORACLE_DATAPUMP access driver.&nbsp; Administrators loading external tables will not be able to use the "CREATE TABLE AS SELECT" command to populate tables that are defined using the original (ORACLE_LOADER) access driver. <BR>&nbsp;<BR>Once the external table has been populated with the "CREATE TABLE AS SELECT" statement, the table's contents can not be modified by INSERT, UPDATE or DELETE statements.&nbsp; In addition, external tables can only be read by the ORACLE_DATAPUMP access driver. <BR>&nbsp;<BR>This new external table specification will allow database administrators to pump large volumes of database data into flat files using the "CREATE TABLE AS SELECT STATEMENT. "&nbsp; Being able to activate parallelism increases the performance of the flat file data creation process.&nbsp; These flat files can then be used to propagate the data into other systems or used as an archival storage mechanism.</P>
<P>We intend to use this feature in our data warehouses to transport data to other data stores (both Oracle and non-Oracle). We have several in the multi-terabyte range.&nbsp; Saying that my shop likes data is like stating that the Titanic sprung a small leak.&nbsp; We have a common saying that we never met a piece of data we didn't like.&nbsp; I found that statement amusing until I met with one of the folks that use that data.&nbsp; I had a general understanding of how competitive our line-of-business was - or so I thought.&nbsp;&nbsp; After talking with this person, I now understand that the decisions they make using this data not only provide us with a competitive advantage; it is a requirement for our competitive survival.&nbsp;&nbsp; I knew this data was important, but I now have a better perspective.&nbsp;&nbsp; A suggestion to my fellow DBA managers, send your folks to meet with the business users (not business liaisons or business mangers but the end users).&nbsp; They will come back with a fresh understanding of how important the data is that they are charged with administering.&nbsp; I had just started with my company so I had an excuse.&nbsp; There is no excuse for DBAs not knowing how important the data is they work with.&nbsp;&nbsp;</P>
<P><BR><STRONG>Automatic SGA Segment Sizing</STRONG><BR>The automatic SGA segment sizing feature of Oracle10G simplifies administration of the various memory components that make up the System Global Area (SGA).&nbsp; In previous releases, database administrators were required to specify the amount of memory allocated to the buffer cache, shared pool, java pool and large pool.&nbsp; Setting, monitoring and adjusting these parameters was time-consuming and oftentimes guesswork.&nbsp; The process could be described as being more of an "art" than a "science."&nbsp; Sizing them incorrectly usually led to poor performance and/or out-of-memory conditions.&nbsp;&nbsp; <BR>&nbsp;<BR>Oracle10G administrators are able to set a single, dynamic parameter, SGA_TARGET, to allocate memory to the entire Oracle SGA.&nbsp;&nbsp; Oracle10G uses the value contained in SGA_TARGET to determine how much memory to allocate to the buffer cache, shared pool, large pool and java pool.&nbsp;&nbsp; During normal database operations, the database engine periodically reviews memory usage and redistributes memory between the components accordingly.&nbsp; Setting the SGA_TARGET to 0 disables automatic SGA segment sizing and requires that the SHARED_POOL_SIZE, LARGE_POOL_SIZE, and JAVA_POOL_SIZE parameters be set.&nbsp;&nbsp; The parameters controlled by automatic segment SGA sizing are now referred to as auto-tuned SGA parameters and the segments not controlled (log buffer, streams pool, internal SGA allocations) are referred to as manually sized parameters.&nbsp; Automatic SGA sizing requires that the STATISTICS_LEVEL parameter be set to TYPICAL or ALL.</P>
<P><BR><STRONG>Automatic Statistics Generation</STRONG><BR>In releases prior to Oracle10G, administrators were required to schedule DBMS_STATS jobs on a regular basis to ensure that valid statistics were available to the query optimizer.&nbsp; The optimizer uses statistics as input to generate optimal SQL execution plans or "access paths" to the desired data.&nbsp; In addition, it was necessary to "guess" how much of the data changed to determine if statistics collection was necessary.&nbsp; </P>
<P>In Oracle9i, the GATHER AUTO option of the DBMS_STATS procedure could be used to help determine if statistics generation was required.&nbsp; Administrators ran the ALTER TABLE MONITOR command to begin tracking the number of rows affected by DML statements over a period of time.&nbsp;&nbsp; If more than 10% of the rows changed in the table since the last analyze was performed, the DBMS_STATS procedure (with the GATHER_AUTO option activated) analyzed the table.&nbsp;&nbsp; </P>
<P>By default, Oracle10G automates these tasks by evaluating the statistics for all of the tables in the database and running analyze when required.&nbsp;&nbsp; Oracle10G's default maintenance window is nightly from 10 PM to 6 AM and all day on weekends.&nbsp; During these time periods, statistics are automatically collected using the GATHER_STATS_JOB procedure.&nbsp; The maintenance window time-periods can be adjusted to tailor it to each individual application's business processing requirements.</P>
<P><BR><STRONG>Server Generated Alerts</STRONG><BR>Oracle10G provides early warning mechanisms to alert administrators of possible error conditions.&nbsp; The database itself collects numerous metrics that were previously collected by Oracle Enterprise Manager.&nbsp; Administrators are able to select from 161 server-generated alerts. </P>
<P>Server generated alerts, as opposed to their Oracle Enterprise Manager (OEM) counterparts, are generated by a new background process called MMON.&nbsp; MMON is able to access the SGA directly (OEM's monitoring daemon was unable to do this) and performs the metrics calculations and threshold monitoring.&nbsp; Administrators use the Database Control administration page to set up e-mail and pager notifications.&nbsp;&nbsp; In addition, all server-generated alerts are displayed on the Database Control home page. The following server-generated alerts are enabled by default: tablespace out-of-space, snapshot too old, recovery area low on freespace and resumable session suspended.</P>
<P>We are heavy users of Oracle's Oracle Enterprise Manager (OEM) product.&nbsp; We use OEM, and its associated packs, to administer and tune databases.&nbsp; We also use jobs and events to proactively monitor them.&nbsp;&nbsp; We have tested the server generated alert feature of Oracle10G.&nbsp; We are happy that we can still use OEM, the "SGT - Sissy GUI Tool" as I used to call it when I was an Oracle instructor, to administer the server generated alerts.&nbsp;&nbsp; What we have found is that there are a LOT more canned alerts available in 10G - and that is a good thing.&nbsp;&nbsp; I would rather wade through dozens of alerts I don't want to activate than spend ANY time coding an alert that wasn't provided by the toolset.</P>
<P>If you would like to learn about some additional features available in 10G,&nbsp; go to Part II of this series of blogs titled "Oracle10G Hidden Secrets Blog Part II".&nbsp; Thanks for reading.&nbsp; <BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle10G New Features Part II</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10gnewfeatures2</link>
                      <description>Part two of a two-part blog series that describes the new features contained in Oracle10G.  In this blog, we'll review the following 10G new features:  Automatic SGA Managment, Automatic Workload Repository, Automatic Database Diagnostic Monitor, SQL Access Advisor, Transportble Tablesace and Data Pump.    Maybe 10G should have been named 10A for automatic!</description>
                      <pubDate>Thu, 02 Dec 2004 12:14:16 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>Oracle10G Enhancements Blog Part II</STRONG></P>
<P>This is the second of two blogs on general Oracle10G features.&nbsp; As I said in the first blog, consider these two to be the first of many blogs on Oracle10G, so we'll keep them at a high level.&nbsp; We have a very active Oracle10G implementation project underway here at Giant Eagle.&nbsp; Rest assured I will be keeping you up to date with all of the latest tidbits of information as we move forward.</P>
<P><BR><STRONG>Automatic SGA Management</STRONG><BR>Oracle has simplified the management of the Oracle SGA.&nbsp; In previous releases, database administrators allocated chunks of memory to the different caches (data buffer, shared pool, large pool, java pool etc.) by setting their associated parameters in the database's parameter file.</P>
<P>Oracle10G has reduced the number of memory allocation parameters to two, one for the SGA and one for the PGA.&nbsp; Oracle10G will divide the memory resources among the different SGA memory areas and change these allocations dynamically based on application workload changes.&nbsp;&nbsp; For more detailed information, refer to my blog on Oracle10G Hidden Secrets.</P>
<P>During our initial Oracle10G beta testing, we found that allowing Oracle to control the memory allocations for our SGA did provide some benefits.&nbsp; But members of my team have enough experience to set the individual parameters correctly on their own.&nbsp; They are a knowledgeable bunch and enthusiastic about learning Oracle10G.&nbsp; If I could only generate that same level of enthusiasm in them to attend my staff meetings, I'd be OK.&nbsp;&nbsp; We will be testing automatic SGA management more thoroughly in the future so stay tuned.</P>
<P><BR><STRONG>Automatic Workload Repository (AWR)<BR></STRONG>The Automatic Workload Repository collects performance statistics (and the SQL text itself) for all SQL statements executed in the database.&nbsp; It is a historical performance datawarehouse that stores SQL statement CPU, memory and I/O resource consumption. AWR runs by default and Oracle states that it does not add a noticeable level of overhead.&nbsp;&nbsp; The information in this repository is used as input for the toolsets discussed later in this blog.&nbsp;&nbsp; This historical information will help administrators finally answer questions like "my program ran long two days ago, can you fix it?"</P>
<P>A new background server process (MMON) takes snapshots of the in-memory database statistics (much like STATSPACK) and stores this information in the repository.&nbsp; MMON also provides Oracle10G with a server initiated alert feature, which notifies database administrators of potential problems (out of space, max extents reached, performance thresholds, etc.).&nbsp; </P>
<P>It looks like the days of us manually configuring STATSPACK to run every hour may be over.&nbsp; What I like about AWR is that if you run out of space in the tablespace, Oracle begins to age out old information.&nbsp;&nbsp; I've been paged too many times on STATSPACK tablespaces running out of space to not be very enthused about this particular 10G feature.&nbsp; I used to have my Intro to Oracle students repeat over and over "We administer by day so we don't get paged at night."&nbsp;&nbsp; </P>
<P><BR><STRONG>Automatic Database Diagnostic Monitor (ADDM)</STRONG><BR>The Automatic Database Diagnostic Monitor analyzes the information contained in the Automatic Workload Repository every 30 minutes to pinpoint problems and provide automated recommendations to DBAs.&nbsp; If ADDM requires additional information to make a decision, it will activate other advisories to gather more information.&nbsp; ADDM's output includes a plethora of reports, charts, graphs, hearbeats and related visual aids.&nbsp;&nbsp; </P>
<P>ADDM can also be manually activated from OEM or the command line to provide users with a top-down analysis of performance bottlenecks and their associated resolutions.</P>
<P><BR><STRONG>SQL Access Advisor and SQL Tuning Advisor</STRONG><BR>These two new advisories will help Oracle DBAs with the "fine art" of SQL tuning.&nbsp; In the past SQL tuning could be defined more of an art than as a science.&nbsp; Hopefully, these two new advisories will put the science back into the SQL tuning process.&nbsp; </P>
<P>The SQL Access Advisor uses the Automated Workload Repository to provide recommendations on creating Oracle objects (additional indexes, materialized views, etc.)&nbsp; to increase the performance of poorly performing SQL statements.&nbsp;&nbsp; </P>
<P>The SQL Tuning Advisor also uses the Automated Workload Repository to capture and identify high resource consuming SQL statements.&nbsp; An intelligent analyzer is then used to assist administrators in tuning the offending SQL statements.&nbsp;&nbsp; The SQL Tuning Advisor will be especially beneficial to administrators who support third-party applications.&nbsp; </P>
<P>In previous releases, once the administrator identified the canned application's poorly performing SQL, the third-party vendor was contacted to change the SQL code and the changed code then implemented in test and finally the production environment to effect the tuning change.&nbsp; Anyone who has experience with third-party application vendors knows that this is often a time consuming (if not impossible) process.&nbsp; </P>
<P>The SQL Tuning Advisor uses the Oracle10G cost based optimizer to rewrite the poorly performing SQL and create a SQL profile, which is stored in the data dictionary.&nbsp; Each time the poorly performing SQL statement executes, the rewritten statement stored in the data dictionary is used in its place.&nbsp; No vendor assistance required!&nbsp;&nbsp; </P>
<P>Working with third-party application vendors is usually painful to begin with.&nbsp;&nbsp; The less I need them to tune (in most cases) the better.&nbsp; I've found that members of my unit are better tuners than most vendor DBAs to begin with.&nbsp;&nbsp; In their defense, it is sometimes impossible for a vendor to tune their database to match each individual customer's access requirements.</P>
<P><BR><STRONG>Transportable Tablespace</STRONG><BR>In previous releases, the transportable tablespace feature could only be used to transfer data to databases running on the same operating system. In Oracle10G, Oracle has enhanced the transportable tablespace feature to allow the tablespace to be transferred to databases running on different operating systems.&nbsp; Once again, please refer to my blog on hidden Oracle secrets for more information on the cross-platform transportable transportable tablespace feature.</P>
<P><BR><STRONG>Data Pump</STRONG><BR>Comparing the performance of Oracle Export and Import to Data Pump is like comparing the performance of a VW to a Ferrari.&nbsp; Stories of Export and Import executions running for hours (and sometime days) are commonplace.&nbsp; During my career as a high-priced Oracle consultant (and before the transportable tablespace feature was available), one of my fellow consultants was an "Export Expert".&nbsp; He had the reputation of being one of the few DBAs to get Exports requiring execution times measured in days to successfully execute.</P>
<P>Oracle has finally created a new utility, called Data Pump, to increase the performance of data transfers.&nbsp; Oracle states that Data Pump's performance on data retrieval is 60% faster than Export and 15 to 20 times faster on data input than Import.&nbsp; In addition, Oracle states that Data Pump is able to take advantage of parallel processing to increase performance.&nbsp; Hopefully, this will alleviate the performance issues related to transferring data between Oracle databases.&nbsp; I'm sure my old consultant buddy is resting easier.&nbsp;&nbsp; Of course he no longer has the Export "badge of honor" to wear anymore.</P>
<P><BR><STRONG>Oracle Streams Database Transfer</STRONG><BR>Oracle10G also utilizes the cross-platform feature of transportable tablespaces to allow administrators to move or copy entire databases from one platform to another.&nbsp; The database can be detached, moved to another server, attached and the workload moved with one command.&nbsp; The primary use of this feature will be to load balance the different servers in a grid environment.</P>
<P><BR><STRONG>Conclusion</STRONG><BR>As stated previously, the intent of this blog was to highlight a few of the interesting new features in Oracle10G.&nbsp; In future blogs, I'll delve a little deeper into some of these enhancements as well as keep you apprised of new developments in Oracle10G.&nbsp; Feel free to respond back with comments, corrections and additions.&nbsp;&nbsp; Thanks for reading.&nbsp; </P>
<P>&nbsp;</P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        
        
            
                  <item>
                      <title>Oracle 10G New Features Part I</title>
                      <link>http://www.dbazine.com/blogs/blog-cf/chrisfoot/oracle10gnewfeatures1</link>
                      <description>Oracle claims that Oracle10G raises the competitive bar by which all future database servers will be judged.   Oracle's latest release contains enhancements in virtually all areas of the database server, resulting in an Oracle database with improvements in scalability, availability, performance, manageability, multimedia datatype support and functionality.  This blog is part one of a two part blog series that provide a  high level overview of some of the more important (and hopefully, interesting) changes contained in Oracle’s latest release.   </description>
                      <pubDate>Thu, 18 Nov 2004 12:35:00 -0600</pubDate>
                              
      <content:encoded><![CDATA[<P><STRONG>Oracle10G Enhancements Blog Part I</STRONG></P>
<P>These two blogs (I’m still getting used to that term) contain just a small subset of Oracle10G new features.&nbsp; Consider this the first of many blogs on Oracle10G, so we’ll keep these first two at the 30,000-foot level.&nbsp; In future blogs, we’ll take an in-depth look at each of the features described in these first two installments.</P>
<P>We are currently testing Oracle10G here at Giant Eagle.&nbsp;&nbsp;&nbsp; We have several large, multiple-terabyte data warehouses.&nbsp;&nbsp; Tables that contain billions of rows are quite common, with our largest having 5 billion rows (plus or minus a few million).&nbsp;&nbsp; Tuning pages of SQL is a common practice here.&nbsp; It is a challenging environment and we look forward to putting Oracle10G through its paces.&nbsp; We have thoroughly tested numerous 10G features in our labs but have not converted any of our test database environments.&nbsp;&nbsp; </P>
<P>In the future, I’ll provide you with all of the interesting information we learn from our first installation in our test environments to final production migration.&nbsp; The DBA leading the charge, Jim Dojonovic, likes to “aggressively” test and implement new technologies.&nbsp; Aggressive would be an understatement.&nbsp;&nbsp; Jim is the perfect DBA for putting each new Oracle release through its paces.&nbsp;&nbsp;&nbsp;&nbsp; Luckily, the developers that will be testing Oracle10G are strong technically and aren’t easily intimidated by new technologies (or Dojonovic for that matter).&nbsp;&nbsp; It promises to be an interesting ride.</P>
<P><STRONG><BR>Grid Computing<BR></STRONG>Let's get started with a brief overview of Oracle Grid Computing. Oracle describes grid computing as "separate groups of users dynamically sharing computer resources across high-speed networks to meet changing computational needs."&nbsp; Grid environments utilize farms of low-cost computer servers in a shared environment.&nbsp; Oracle uses its Real Application Cluster technology (discussed below) along with the 10G database and 10G application server to create the shared computing infrastructure required to implement grid computing.&nbsp; See figure below:<BR></P>
<P></P>
<P align=center><IMG src="/images/foot10_1.gif"></P>
<P><BR>The optimal grid environment uses an interconnected server farm with each server containing one to four CPUs.&nbsp; The servers are connected to a shared disk system using network-attached storage (NAS) or a storage area network (SAN) technologies as the connectivity mechanism.&nbsp; High-speed network connectivity between the hardware servers themselves and from the hardware servers to the shared disk system allows the environment to be viewed as a single application architecture.</P>
<P>Real Application Cluster enhancements in Oracle10G allow hardware servers to be seamlessly added to an application requiring more resources for a particular time period.&nbsp; Conversely, when hardware resource requirements are low, the extra computing horsepower can be easily freed and used by other applications in the grid. </P>
<P>I will be creating a separate blog about Giant Eagle’s initial foray into Oracle Grid computing.&nbsp; We are currently testing the waters by implementing a low-end Oracle RAC environment using LINUX as the operating system running on Intel-based hardware platforms.&nbsp;&nbsp;&nbsp; We are going to compare the initial price tag and ongoing administrative costs between LINUX-Intel/RAC and their UNIX “big iron” counterparts.&nbsp; I seem to remember calling mainframes “big iron” just a few years ago.&nbsp;&nbsp; I guess in a few more years, I’ll be comparing PDA-sized hardware platforms running the latest operating system of choice to their “big iron” LINUX counterparts.&nbsp; I’m starting to think the only constant in this profession is change itself.&nbsp; But that’s a good thing.</P>
<P><BR><STRONG>Automatic Storage Management (ASM)</STRONG> <BR>Oracle10G provides its own disk storage management system.&nbsp; Database administrators are no longer required to use hardware vendor or third-party (Veritas, EMC, etc) disk volume managers to provide striping and mirroring functionality.&nbsp; ASM manages the raw disks within the Oracle database architecture.&nbsp; Administrators are able to assign disks to disk groups, which can then be striped and/or mirrored to provide high performance and high availability.&nbsp; During tablespace creation, the administrator assigns the tablespace datafile to a disk group.&nbsp; This differs from previous Oracle releases which required that datafiles be assigned to the individual disks themselves.</P>
<P>Interestingly enough, Oracle’s default stripe size is one megabyte.&nbsp; This differs from most disk storage management systems, which often utilize 32K or 64K stripe sizes.&nbsp;&nbsp; Oracle found that one-megabyte stripes on disks provided a very high level of data transfer and best met the needs of disk intensive applications.&nbsp; One can only assume that advancements in disk storage technology have allowed Oracle to access the data in one-megabyte chunks and not drive disk utilization to unacceptable levels.</P>
<P>Administrators provide disk mirroring by creating failure groups.&nbsp; The DBA creates the appropriate number of failure groups to accommodate the data requiring disk fault tolerance.&nbsp; ASM’s mirroring capability ranges from the mirroring of individual datafiles to entire disk arrays, providing administrators with a high level of flexibility when creating fault-tolerant disk subsystems. The data is duplicated on separate disks in one-megabyte mirror “chunks”.</P>
<P>Administrators can choose from the following mirroring options in ASM:</P>
<UL>
<UL>
<LI>External – no mirroring</LI>
<LI>Normal – data is mirrored on two separate disks.&nbsp; This is the default setting.</LI>
<LI>High Redundancy – data is mirrored on there separate disks providing three-way mirroring capabilities.<BR>&nbsp;&nbsp; </LI></UL></UL>
<P>ASM requires its own instance, which identifies the various disk groups and files during instance startup.&nbsp; The ASM instance then mounts the disks under its control and creates an extent map, which is passed to the database instances.&nbsp; ASM does not perform the I/O for the database instances; it is only used to manage the various disk groups under its control.&nbsp; ASM is only activated when individual datafiles are created or dropped or disks are added and removed from the disk groups.&nbsp; When new disks are added or removed from the disk group, ASM automatically rebalances the files contained in the disk group while the database is open and functioning. </P>
<P>Oracle Enterprise Manager (OEM) for Oracle10G and the Database Configuration Assisstant (DBCA) have been updated to allow administrators to configure and manage databases using ASM.</P>
<P>With Oracle data in double-digit terabytes, we are very interested in ASM and are starting a separate project to determine its viability. The ability to have the database pro-actively tune I/O on its own bears further investigation.</P>
<P>We have been actively scouring both Oracle’s internal websites and Googling the world-wide web to gather as much information as we can before we begin testing.&nbsp;&nbsp; We have found that reviews vary widely, ranging from “this works great” to others that can be describes as “less than stellar”.&nbsp; We continue to be cautiously optimistic.&nbsp; Feel free to comment; I’d like to hear as many opinions I can before tying up a DBA’s precious time testing ASM.</P>
<P><BR><STRONG>Real Application Clusters (RAC)<BR></STRONG>One of RAC’s requirements is that clustering software be used to connect the hardware platforms together.&nbsp; This underlying clustering software was purchased either from the hardware vendor or a third-party clustering software provider.&nbsp;&nbsp; RAC is installed on top of the cluster environment and works in conjunction with the underlying clustering software to allow the application programs to view the multiple instances as a single entity.&nbsp;&nbsp; </P>
<P>One of the problems using previous release of RAC was identifying exactly whose software it was causing the problem in the first place.&nbsp; Was it the RAC software or was it the clustering software provided by the hardware or third party vendor?&nbsp; Oracle10G solves this problem by providing its own clustering software called Integrated Clusterware.&nbsp; Integrated Clusterware can now be used in place of the hardware or third-pary vendor’s clustering software.&nbsp; </P>
<P>This will help prevent the age-old problem of multiple vendors pointing the blame at each other.&nbsp; I’ve worked with some that were so good at passing the buck; you would have thought their suits were made of Teflon.</P>
<P><BR><STRONG>Flashback Database<BR></STRONG>How many times have database recoveries been performed because of incorrect changes made to database data?&nbsp; A user deletes or updates “one too many rows” by mistake and the result is a time-consuming and error prone process to restore and recover the database to a point-in-time before the error occurred.&nbsp; </P>
<P>Oracle Education states that point-in-time recoveries are responsible for the majority of DBA errors and the resulting unrecoverable databases.&nbsp; When I was teaching Oracle as an Oracle-certified instructor, I ran my backup and recovery classes like a boot camp (one of the high-points of my career was when I won one of Oracle's Top Instructor Titles).&nbsp;Some of my students referred to&nbsp;my classes&nbsp;as&nbsp;“Foot Camp” because of my last name.&nbsp;&nbsp;&nbsp;&nbsp;When my students were done; they may not have liked me but they certainly knew how to back up and recover a database.&nbsp; I wasn’t going to lay awake nights thinking I was sending them on their way to future Oracle stardom without having all of&nbsp;the information they needed to safeguard the data stores they were charged with protecting.&nbsp;&nbsp; </P>
<P>A common question in the Oracle DBA backup and recovery class was “why can’t I just roll the database back to remove unwanted changes instead of restoring the database from a backup and applying the redo logs to roll forward to a point-in-time before the error occurred?”&nbsp;&nbsp;&nbsp; The question was invariably followed by “don’t you think that would be easier?”&nbsp; The answer was always the same “yes, it would be easier, but the Oracle database doesn’t have that capability.”</P>
<P>Until Oracle10G that is…&nbsp; Oracle10G’s Flashback Database feature provides a new tool in the DBA’s recovery toolbox.&nbsp; Flashback Database allows the DBA to “roll back” a table, set of tables or the entire database to a previous point-in-time. </P>
<P>A flashback log is used to capture old versions of changed data blocks.&nbsp; During Flashback execution, the Oracle database restores the old versions of the data blocks to their original locations which allows the database to be rolled back to a previous point-in-time.&nbsp; Oracle provides the following example in its sales collateral to highlight how simple this new Flashback Database Feature is:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P>SQL&gt; flashback database to ‘2:05 PM’;</P></BLOCKQUOTE>
<P>Compare that to previous point-in-time recovery procedures, which required the entire database to be restored to a previous backup and then rolled forward using archived and online redo log files to replay the changes to a point-in-time before the error occurred.</P>
<P><BR><STRONG>Flashback Backup</STRONG><BR>Oracle10G also uses the flashback logs to provide the mechanism for its Flashback Backup feature.&nbsp; Flashback Backup allows administrators to take a base level backup and then perform nightly incremental backups to roll the backup database forward to the current point-in-time. Since the changed blocks are recorded by the database, a full scan of all of the database blocks is no longer required to keep the backup database synchronized with its production counterpart.&nbsp; </P>
<P>OK, that was a LOT of information.&nbsp; If you have any questions on any of these features, please feel free to comment.&nbsp;&nbsp; I would also like to encourage readers to respond with any hints, tips, tricks and techniques on administering these Oracle10G features.&nbsp; That’s the great benefit of a blog!&nbsp;&nbsp; I have more information on Oracle10G in other blogs on this site.&nbsp; <BR></P> ]]>
</content:encoded>
     

                  </item>

            
	   	
        


    </channel>

</rss>

