<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2621027477756791149</id><updated>2012-02-16T17:12:20.402-08:00</updated><category term='MIGRATION OF ORACLE DATABASE.'/><category term='Oracle DataPump Quick Sstart  -By JK - Associate.'/><title type='text'>Oracle DBA</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-3487392785628007383</id><published>2012-01-13T01:23:00.000-08:00</published><updated>2012-01-13T01:28:59.511-08:00</updated><title type='text'>Estimate / calculate the memory will be consumed during opatch</title><content type='html'>&lt;i&gt;&lt;br /&gt;Formula:&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Memory Consumed = (Number of Oracle Processes + 1) X (Size of Patched)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Example:&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;memory consumed = [ (select value from v$parameter where name='processes' ; ) + 1 ] X (du -sm &lt;patch Directory&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;memory consumed = [ (select value from v$parameter where name='processes' ; ) + 1 ] X (du -sm 9795214)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;memory consumed = 600+1 X 0.89MB&lt;br /&gt;&lt;br /&gt;memory consumed = 601 X 0.89MB&lt;br /&gt;&lt;br /&gt;&lt;b&gt;memory consumed = 534.89 MB&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-3487392785628007383?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/3487392785628007383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=3487392785628007383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3487392785628007383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3487392785628007383'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2012/01/estimate-calculate-memory-will-be.html' title='Estimate / calculate the memory will be consumed during opatch'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-4932619944159364681</id><published>2011-03-17T12:17:00.000-07:00</published><updated>2011-03-17T12:17:18.584-07:00</updated><title type='text'>TUNING DB BUFFER CACHE</title><content type='html'>&lt;b&gt;Point to remember:&lt;br /&gt;##################&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;.    Resizing the BUFFER CACHE memory allocation&lt;br /&gt;.    Setting the Dynamic Buffer Cache Advisory Parameter&lt;br /&gt;        ON&lt;br /&gt;        OFF   &lt;br /&gt;        READY&lt;br /&gt;.    The Lease Recenty Used(LRU) List.&lt;br /&gt;.    The Dirty List&lt;br /&gt;.    The DB writer Process(DBwn)&lt;br /&gt;.    Check the SGA Memory maximum allocation size&lt;br /&gt;.    Using the v$parameter view&lt;br /&gt;.    Checking the Buffer Cache size&lt;br /&gt;.    Checking the Redo log buffer Size.&lt;br /&gt;.    Checking the Java Pool Size&lt;br /&gt;.    Decreasing the Shared Pool Memory size&lt;br /&gt;.     Increasing the Buffer Cache memory size&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Commands:&lt;br /&gt;#########&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Show parameter DB_buffer&lt;br /&gt;&lt;br /&gt;alter system set db_cache_advice=ON/OFF/READY;&lt;br /&gt;alter system set db_cache_size =80M;&lt;br /&gt;alter system set shared_pool_size=60M;&lt;br /&gt;alter system set db_cache_size=80M;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LRU &amp; Dirty Buffer&lt;br /&gt;###################&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The buffers in the buffer cache are organized in two lists:&lt;br /&gt;&lt;br /&gt;    Least Recently Used(LRU)&lt;br /&gt;    Dirty List.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dirty List:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Dirty buffers are blocks in the buffer cache that have been changed.&lt;br /&gt;The dirty buffers are moved to the dirty list and written to datafiles by the db writer processs(DBwn)&lt;br /&gt;When a free buffer is found, the data block is read from the disk into the free buffer and the buffer is moved higher in the LRU list&lt;br /&gt;The Least Recently Used(LRU) list is the list of blocks that have been used at the least amount of time recently at the SGA memory&lt;br /&gt;&lt;br /&gt;If the buffer size is too High/ too Low. That will result in too much I/O or poorly utilized real memory.&lt;br /&gt;To assist you proper configuration, Oracle provide you with the DB_CACHE_ADVICE parameter.&lt;br /&gt;When the parameter is set to ON. Oracle will collect statistics about cache utilization and projects the physical I/O for 20 Cache sizes&lt;br /&gt;Ranging from 10 to 200 percent of the current size.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Using Buffer Cache Advise:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    alter system set db_cache_advise=ON/OFF/READY&lt;br /&gt;        ON    -- Allocates memory and gather statistics.&lt;br /&gt;        OFF    -- Disables advise statistics gathering.&lt;br /&gt;        Ready    -- Allocates memrory, but statistics are not gathered.&lt;br /&gt;&lt;br /&gt;    -- Check at which size blocks are increasing and physical reads are decreasing&lt;br /&gt;    -- That Estimated cached size is good for DB_CACHE_BUFFER.&lt;br /&gt;&lt;br /&gt;    select  SIZE_FOR_ESTIMATE "Estimated Cached Size(MB)",&lt;br /&gt;            BUFFERS_FOR_ESTIMATE "Buffers",&lt;br /&gt;            ESTD_PHYSICAL_READS "Physical Reads"&lt;br /&gt;    from    v$db_cache_advice&lt;br /&gt;    order by 1;   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resizing Buffer Cache:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;first check SGA_MAX_SIZE &amp; SGA_TARGET&lt;br /&gt;&lt;br /&gt;Now check the maximum size that SGA that can grow on.&lt;br /&gt;Compare the SGA Parameter size with the calculated size from the Shared Pool, Buffer Cache and Redo log sizes along with the java pool.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    show parameter sga_max_size&lt;br /&gt;   &lt;br /&gt;    select sum(value) as "SGA Size"&lt;br /&gt;    from V$parameter&lt;br /&gt;    Where name in ('Shared_pool_size','db_cache_size','log_buffer','java_pool-size');&lt;br /&gt;&lt;br /&gt;If the size is very close then decrease one size in order to increase the other.&lt;br /&gt;Check the shared_pool and buffer_cache sizes individually.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To increase of decrease DB_cache&lt;br /&gt;&lt;br /&gt;alter system set DB_cache_size=100M;&lt;br /&gt;alter system set shared_pool_size=200m;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;####################################################################################&lt;br /&gt;        More of Resizing and measuring the Buffer Cache Hit Ratio.&lt;br /&gt;####################################################################################&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Points to remember to resolve performance issues.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.    Measuring the Buffer Cache Hit Ratio.&lt;br /&gt;.    Creating a Cache Table&lt;br /&gt;.    Calculating the Hit Ratio for Multiple Pools&lt;br /&gt;.    Displaying the Hit Ratio for the KEEP buffer Pool&lt;br /&gt;.    Caching the Oralce Objects in the Buffer Pools&lt;br /&gt;.    Diagnosing the FREELIST Contentions&lt;br /&gt;.    Adding a FREELIST to a table&lt;br /&gt;.    Using the DEFAULT pool&lt;br /&gt;.    Using the KEEP Pool&lt;br /&gt;.    Using the RECYCLE pOOL&lt;br /&gt;.     Using the v$sysstat view&lt;br /&gt;.    Using the V$buffer_pool View&lt;br /&gt;.    Using the V$BUFFER_POOL_STATISTICS dictionary view&lt;br /&gt;.    Using the DBA_SEGMENTS view&lt;br /&gt;.    Using the V$SESSION_WAIT view&lt;br /&gt;.     Dropping a table&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Buffere Cache Hit Ratio:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Calculate the Buffer Cache Hit Ratio from the V$SYSSTAT&lt;br /&gt;The view V$SYSSTAT contains the oracle system usages such as session logical reads,&lt;br /&gt;physical reads direct, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    select 1-((p.value - l.value - d.value) / s.value) as " Buffer Cache Hit Ratio"&lt;br /&gt;    from v$sysstat s, v$sysstat l, v$sysstat d, v$sysstat p&lt;br /&gt;    where s.name='session logical reads'&lt;br /&gt;    and d.name='physical reads direct'&lt;br /&gt;    and l.name='physical reads direct(LOB)'&lt;br /&gt;    and p.name='physical reads';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    select 1 - ((p.value - l.value - d.value) / s.value) as " Buffer Cache Hit Ratio"&lt;br /&gt;    from v$sysstat s, v$sysstat l, v$sysstat d, v$sysstat p&lt;br /&gt;    where s.name='session logical reads'&lt;br /&gt;    and d.name='physical reads direct'&lt;br /&gt;    and l.name='physical reads direct(LOB)'&lt;br /&gt;    and p.name='physical reads';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note if the Buffer Cache Hit Ratio is more the 90% then there is no problem.&lt;br /&gt;If the Buffer Cache Hit Ratio is between 70% to 90% then there could be a problem.&lt;br /&gt;If the Buffer Cache Hit Ratio is less then 70% there is Definitly a problem and buffer size need to be increased.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resize Buffer Cache:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;    alter system set db_cache_size=60M;&lt;br /&gt;    alter system set db_keep_cache_size=15M;&lt;br /&gt;&lt;br /&gt;    -- to add a table to keep cache.&lt;br /&gt;&lt;br /&gt;    alter table &lt;table_name&gt; keep cache;&lt;br /&gt;&lt;br /&gt;    select name, buffers from v$buffer_pool;&lt;br /&gt;&lt;br /&gt;Keep Buffer Pool:    Keep buffer pool is used to keep buffers in the pool as long as possible for data blocks that are likely to be reused.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Wz4LesnRt9k/TYJbRvaHMOI/AAAAAAAAAEU/-7mGBOMpY6M/s1600/CAM_0116.JPG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="300" width="400" src="http://2.bp.blogspot.com/-Wz4LesnRt9k/TYJbRvaHMOI/AAAAAAAAAEU/-7mGBOMpY6M/s400/CAM_0116.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-4932619944159364681?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/4932619944159364681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=4932619944159364681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/4932619944159364681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/4932619944159364681'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2011/03/tuning-db-buffer-cache.html' title='TUNING DB BUFFER CACHE'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Wz4LesnRt9k/TYJbRvaHMOI/AAAAAAAAAEU/-7mGBOMpY6M/s72-c/CAM_0116.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-8635643344508059024</id><published>2011-03-17T11:43:00.000-07:00</published><updated>2011-03-17T11:46:20.813-07:00</updated><title type='text'>Tunning Shared_pool</title><content type='html'>&lt;b&gt;Tunning Shared_pool&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Point to remember:&lt;br /&gt;###################&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;.    Resizing the shared pool memory allocation&lt;br /&gt;.    Keeping an object in the shared pool memory&lt;br /&gt;.    Displaying the library cache hit ratio&lt;br /&gt;.    Displaying the object from the shared pool memory&lt;br /&gt;.    Remobing an object from the shared pool memory&lt;br /&gt;.    Calculating the dictionay cache hit ratio&lt;br /&gt;.     The major components of the shared Pool memory&lt;br /&gt;.    The library cache&lt;br /&gt;.    the dictionary cache&lt;br /&gt;.    The user Global Area&lt;br /&gt;.    Using the shared_pool_reserved_size&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Commands:&lt;br /&gt;##########&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Set serveroutput on&lt;br /&gt;execute sys.dbms_shared_pool.sizes(150);&lt;br /&gt;execute sys.dbms_shared_pool.keep('SYS'.STANDARD);&lt;br /&gt;execute sys.dbms_shared_pool.unkeep('SYS'.STANDARD);&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The major components of SHARED POOL are library cache, data dictionary and UGA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Caculate Library Cache Hit Ratio.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;    select sum(pins-reloads), sum(pins)*100 as "library cache hit ratio"&lt;br /&gt;from v$librarycache;&lt;br /&gt;&lt;br /&gt;select sum(pins-reloads)/sum(pins)*100 as "library cache hit ratio"    -- the hit ratio must be above 99%&lt;br /&gt;from v$librarycache;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Details of Library cache Hit ratio:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-- GETHITRATIO must not be below 99%&lt;br /&gt;&lt;br /&gt;&lt;i&gt;    select namespace, gethitratio    &lt;br /&gt;from v$librarycache&lt;br /&gt;where gethitratio&gt;0;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;View Cached Objects:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-- Shows details of each object type that was cached more then 100 times.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;    select type, count(*) as "Number of Objects"&lt;br /&gt;from v$db_object_cache&lt;br /&gt;group by type&lt;br /&gt;having count(*)&gt;100;   &lt;/i&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;View Large objects:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-- Shows object with size larger then 150K.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;    set serveroutput on&lt;br /&gt;execute SYS.DBMS_SHARED_POOL.SIZES(150); &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cache a pl/sql Procedure:&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;SYS.DBMS_SHARED_POOL.KEEP('SYS',STANDARD);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;unCache a pl/sql Procedure:&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;SYS.DBMS_SHARED_POOL.UNKEEP('SYS',STANDARD);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dictionary Cache Hit Ratio:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-- Hit ratio must be above 98%&lt;br /&gt;-- Low hit ratio indiates object not loaded into cache yet.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;    select parameter, gets , getmisses, 100*(gets-getmisses)/(gets) HIT_RATIO, modifications&lt;br /&gt;from v$rowcache &lt;br /&gt;where gets&gt;0;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Overall Dictionary Cache Hit Ratio:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;--The hit ratio should be above 85%&lt;br /&gt;--If the Hit Ratio is belwo 85% then need to increase the Shared pool size.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;    select ((sum(gets-getmisses))/sum(gets))*100 as "Dictionary Hit Ratio"&lt;br /&gt;from v$rowcache;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-0fegvYgXP3s/TYJWVNXh3bI/AAAAAAAAAD0/u1J-voIBMEY/s1600/DSC00391.JPG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="300" width="400" src="http://2.bp.blogspot.com/-0fegvYgXP3s/TYJWVNXh3bI/AAAAAAAAAD0/u1J-voIBMEY/s400/DSC00391.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-8635643344508059024?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/8635643344508059024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=8635643344508059024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/8635643344508059024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/8635643344508059024'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2011/03/tunning-sharedpool.html' title='Tunning Shared_pool'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-0fegvYgXP3s/TYJWVNXh3bI/AAAAAAAAAD0/u1J-voIBMEY/s72-c/DSC00391.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-3861191682885726226</id><published>2011-03-13T13:13:00.003-07:00</published><updated>2011-03-17T13:05:42.751-07:00</updated><title type='text'>Segment Tunning.</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-oHYrI9Tvso0/TYJo8rJaCGI/AAAAAAAAAEc/ULFSGnA3RmY/s1600/CAM_0109.JPG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="300" width="400" src="http://1.bp.blogspot.com/-oHYrI9Tvso0/TYJo8rJaCGI/AAAAAAAAAEc/ULFSGnA3RmY/s400/CAM_0109.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Segment Tuning:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;################&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;what is Fragmentations in a table.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;when there is huge delete operations done on a table,&lt;br /&gt;&lt;br /&gt;The blocks which occupied the data will be get free from data but it will not release the space.&lt;br /&gt;&lt;br /&gt;as there is free space but when you do insert oracle will occupy the new blocks not the used one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;High water mark: &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The blocks which is once used ( means after delete blocks are free from data but not from space)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;difference between truncate &amp; delete&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Truncate                  Delete&lt;br /&gt;&lt;br /&gt;----------                -----------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DDl                      DML&lt;br /&gt;&lt;br /&gt;No Where Clause          Where Clause.&lt;br /&gt;&lt;br /&gt;No Rollback              Rollback&lt;br /&gt;&lt;br /&gt;It releases space        It will not release Space.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note : When a table is 20% or more fragmented Then go for re- organizing the table.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Disadvantage if Table is Fragmented:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If tables is fragmented more then 20% queries with full table scan, scan's upto high water mark.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Advantages if you re- org (TABLE/INDEX):&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; FTS Queries time reduces ( out of 10GB table after re- org it will scan 6GB)&lt;br /&gt;&lt;br /&gt;--&gt; Definitely Space will be released.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to find out table fragmentation:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; we need to have upto date statistics gathered for table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;formulae&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;table_size= (blocks * block_size) / 1024 / 1024    ( table size including free space)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;table_free_space = (num_rows * avg_row_length) / 1024 / 1024   ( table free space size)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fragmentations= table_size - table_free_space&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Query&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--Author             : Syed Kaleemuddin.&lt;br /&gt;&lt;br /&gt;--Script name     : Tab_frag.sql&lt;br /&gt;&lt;br /&gt;--Description      : check fragmentations in table (fragmentation size displayed in MB)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select (((blocks * (select value from v$parameter where name= 'db_block_size')) /1024 /1024) - ((num_rows * avg_row_len) / 1024 / 1024) ) "Fragmentation MB",&lt;br /&gt;&lt;br /&gt;(((blocks * (select value from v$parameter where name= 'db_block_size')) /1024/1024/1024) - ((num_rows * avg_row_len) /1024/1024/1024) ) "Fragmentation GB"&lt;br /&gt;&lt;br /&gt;from dba_tables&lt;br /&gt;&lt;br /&gt;--where block_size=(select value from v$parameter where name= 'db_block_size')&lt;br /&gt;&lt;br /&gt;where owner=upper('&amp;owner')&lt;br /&gt;&lt;br /&gt;and table_name=upper('&amp;Table_name');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;How to Re - Organize Table:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1) MOVE Command.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;pre Check's -- Check table size as we need same amount of space in another tablespace where we are moving and same amount of space in temp also.&lt;br /&gt;&lt;br /&gt;suppose table size = 10GB in users tablespace&lt;br /&gt;&lt;br /&gt;need 10GB space in tablespace where we are moving this table and&lt;br /&gt;&lt;br /&gt;need 10GB space in temp tablespace also.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Syntax:  alter table &lt;owner.tablename&gt; move;                                                                 --&gt; if not moving to any other tablespace.&lt;br /&gt;&lt;br /&gt;alter table &lt;tablename&gt; move tablespace &lt;tablespace name&gt;;                            --&gt; if moving table to different tablespace.&lt;br /&gt;&lt;br /&gt;alter table &lt;owner.tablename&gt; move parallel 8;                                       --&gt; if use parallel option it will be fast simultaneously 8           &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;process will move.&lt;br /&gt;&lt;br /&gt;alter table &lt;owner.tablename&gt; move tablespace &lt;tablespace name&gt; parallel 8;    --&gt; move table to diff tablespace using parallel option.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; After moving tables indexes become unusable state, Rebuild the indexes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; rebuild;&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; rebuild parallel 8;   (once rebuild index make to no parallel)&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; noparallel;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To check indexes in parallel mode.&lt;br /&gt;&lt;br /&gt;select index_name, ownere, degree from dba_indexes where degree &gt; '1';   --&gt; if you see any indexes whose degree is more&lt;br /&gt;&lt;br /&gt;Make that index NOPARALLEL.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; Gather stats on table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2) SHRINK Command.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This method is introduced in Oracle 10g&lt;br /&gt;&lt;br /&gt;This method does not require Down time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Condition:&lt;br /&gt;&lt;br /&gt;i.          Tablespace must be ASSM ( Automatics Segment Space Management)&lt;br /&gt;&lt;br /&gt;parameter Automatic_segment_space_management=Auto&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ii.          Table Should not contain Function Based Indexes.&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;i.          Enable Row movement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select table_name, row_movement&lt;br /&gt;&lt;br /&gt;from dba_tables&lt;br /&gt;&lt;br /&gt;where table_name=upper('&amp;table_name');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; if it is disabled enable it&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;alter table &lt;table_name&gt; enable row movement;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ii.          Shrink table.&lt;br /&gt;&lt;br /&gt;alter table &lt;table_name&gt; Shrink space cascade;              --&gt; using cascade option indexes will not go unusable state.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iii.         Gather Stats.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iv.         Disable Row Movement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;alter table &lt;table_name&gt; disable row movement;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3)  Export - Import.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Export Table.                             --&gt; Dangerous if export dump is currupted.                      &lt;br /&gt;&lt;br /&gt;Truncate table.&lt;br /&gt;&lt;br /&gt;Import Table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4) CTAS  (Create Table as select)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;i.          create table &lt;new_table&gt; as select * from &lt;old_table;                        ii.          Truncate table &lt;old_table&gt;;&lt;br /&gt;&lt;br /&gt;iii.         insert into &lt;old_table&gt; select * from &lt;new_table&gt;;&lt;br /&gt;&lt;br /&gt;iv.         Drop table &lt;new_table&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5) online Re-Defination:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;need to prepare  Notes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to Re - Organize Indexes:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if DEL_LF_ROWS of (sys.index_stats) &gt; 20%                  --&gt; index is fragmented&lt;br /&gt;&lt;br /&gt;and BLEVEL of (sys.dba_indexes) = 4                             --&gt; index is fragmented&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select index_name, blevel&lt;br /&gt;&lt;br /&gt;from dba_indexes&lt;br /&gt;&lt;br /&gt;where table_name=upper('&amp;table_name');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select index_name, blevel&lt;br /&gt;&lt;br /&gt;from dba_indexes&lt;br /&gt;&lt;br /&gt;where BLEVEL &gt; 3;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Check index Size.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select segment_name, bytes/1024/1024&lt;br /&gt;&lt;br /&gt;from dba_segments&lt;br /&gt;&lt;br /&gt;where segment_name in (select index_name&lt;br /&gt;&lt;br /&gt;from dba_indexes&lt;br /&gt;&lt;br /&gt;where table_name=upper('&amp;table_name'));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select segment_name, bytes/1024/1024&lt;br /&gt;&lt;br /&gt;from dba_segments&lt;br /&gt;&lt;br /&gt;where segment_name in (select index_name&lt;br /&gt;&lt;br /&gt;from dba_indexes&lt;br /&gt;&lt;br /&gt;where BLEVEL &gt; 1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;once get the index fragmented to bubble out space rebuild the indexes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select name, height, lf_blks, del_lf_rows, blocks, distinct_keys&lt;br /&gt;&lt;br /&gt;from index_stats&lt;br /&gt;&lt;br /&gt;where name=upper('&amp;index_name');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--&gt; if del_lf_rows is 20%  of lf_blks           --&gt; Re - Organize ( Rebuild) the indexe.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; rebuild;&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; rebuild online;&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; rebuild online parallel 8;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if using parallel then after rebuilding indexes make indexes to noparallel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;alter index &lt;index_name&gt; noparallel;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Gather stats.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;exec dbms_stats.gather_stats('SCOTT', 'TEST', Cascade=&gt;True, Degree=&gt;4);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;exec dbms_stats.gather_stats('owner', 'table_name', Cascade=&gt;True, Degree=&gt;4);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select name, height, lf_blks, del_lf_rows, blocks, distinct_keys&lt;br /&gt;&lt;br /&gt;from index_stats&lt;br /&gt;&lt;br /&gt;where name=upper('&amp;index_name');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--&gt;        if no output&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Analyze index &lt;index_name&gt; validate Structure;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; output will display as you done rebuild indexes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; del_lf_rows = 0.&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-h5yyGIJPPjA/TX0lMLjgwsI/AAAAAAAAADs/rHPEK4Os-R0/s1600/jk.JPG" imageanchor="1" style="clear:right; float:right; margin-left:1em; margin-bottom:1em"&gt;&lt;img border="0" height="400" width="260" src="http://4.bp.blogspot.com/-h5yyGIJPPjA/TX0lMLjgwsI/AAAAAAAAADs/rHPEK4Os-R0/s400/jk.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-3861191682885726226?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/3861191682885726226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=3861191682885726226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3861191682885726226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3861191682885726226'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2011/03/segment-tunning.html' title='Segment Tunning.'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-oHYrI9Tvso0/TYJo8rJaCGI/AAAAAAAAAEc/ULFSGnA3RmY/s72-c/CAM_0109.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-6958251574767566130</id><published>2011-01-10T02:14:00.000-08:00</published><updated>2011-01-10T02:14:23.232-08:00</updated><title type='text'>Differences between Data Pump impdp and import utility</title><content type='html'>command differences of traditional exp- imp and datapump ( expdp – impdp)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Original Import Parameter&lt;br /&gt; Comparable Data Pump Import Parameter&lt;br /&gt; &lt;br /&gt;BUFFER&lt;br /&gt; A parameter comparable to BUFFER is not needed.&lt;br /&gt; &lt;br /&gt;CHARSET&lt;br /&gt; A parameter comparable to CHARSET is not needed.&lt;br /&gt; &lt;br /&gt;COMMIT&lt;br /&gt; A parameter comparable to COMMIT is not supported.&lt;br /&gt; &lt;br /&gt;COMPILE&lt;br /&gt; A parameter comparable to COMPILE is not supported.&lt;br /&gt; &lt;br /&gt;CONSTRAINTS&lt;br /&gt; EXCLUDE=CONSTRAINT&lt;br /&gt; &lt;br /&gt;DATAFILES&lt;br /&gt; TRANSPORT_DATAFILES&lt;br /&gt; &lt;br /&gt;DESTROY&lt;br /&gt; REUSE_DATAFILES&lt;br /&gt; &lt;br /&gt;FEEDBACK&lt;br /&gt; STATUS&lt;br /&gt; &lt;br /&gt;FILE&lt;br /&gt; DUMPFILE&lt;br /&gt; &lt;br /&gt;FILESIZE&lt;br /&gt; Not necessary. It is included in the dump file set.&lt;br /&gt; &lt;br /&gt;FROMUSER&lt;br /&gt; SCHEMAS&lt;br /&gt; &lt;br /&gt;FULL&lt;br /&gt; FULL&lt;br /&gt; &lt;br /&gt;GRANTS&lt;br /&gt; EXCLUDE=GRANT&lt;br /&gt; &lt;br /&gt;HELP&lt;br /&gt; HELP&lt;br /&gt; &lt;br /&gt;IGNORE&lt;br /&gt; TABLE_EXISTS_ACTION&lt;br /&gt; &lt;br /&gt;INDEXES&lt;br /&gt; EXCLUDE=INDEX&lt;br /&gt; &lt;br /&gt;INDEXFILE&lt;br /&gt; SQLFILE with INCLUDE INDEX&lt;br /&gt; &lt;br /&gt;LOG&lt;br /&gt; LOGFILE&lt;br /&gt; &lt;br /&gt;PARFILE&lt;br /&gt; PARFILE&lt;br /&gt; &lt;br /&gt;RECORDLENGTH&lt;br /&gt; A parameter comparable to RECORDLENGTH is not needed.&lt;br /&gt; &lt;br /&gt;RESUMABLE&lt;br /&gt; A parameter comparable to RESUMABLE is not needed. It is automatically defaulted for privileged users.&lt;br /&gt; &lt;br /&gt;RESUMABLE_NAME&lt;br /&gt; A parameter comparable to RESUMABLE_NAME is not needed. It is automatically defaulted for privileged users.&lt;br /&gt; &lt;br /&gt;RESUMABLE_TIMEOUT&lt;br /&gt; A parameter comparable to RESUMABLE_TIMEOUT is not needed. It is automatically defaulted for privileged users.&lt;br /&gt; &lt;br /&gt;ROWS=N&lt;br /&gt; CONTENT=METADATA_ONLY&lt;br /&gt; &lt;br /&gt;ROWS=Y&lt;br /&gt; CONTENT=ALL&lt;br /&gt; &lt;br /&gt;SHOW&lt;br /&gt; SQLFILE&lt;br /&gt; &lt;br /&gt;SKIP_UNUSABLE_INDEXES&lt;br /&gt; SKIP_UNUSABLE_INDEXES&lt;br /&gt; &lt;br /&gt;STATISTICS&lt;br /&gt; A parameter comparable to STATISTICS is not needed. If the source table has statistics, they are imported.&lt;br /&gt; &lt;br /&gt;STREAMS_CONFIGURATION&lt;br /&gt; STREAMS_CONFIGURATION&lt;br /&gt; &lt;br /&gt;STREAMS_INSTANTIATION&lt;br /&gt; A parameter comparable to STREAMS_INSTANTIATION is not needed.&lt;br /&gt; &lt;br /&gt;TABLES&lt;br /&gt; TABLES&lt;br /&gt; &lt;br /&gt;TABLESPACES&lt;br /&gt; This parameter still exists, but some of its functionality is now performed using the TRANSPORT_TABLESPACES parameter.&lt;br /&gt; &lt;br /&gt;TOID_NOVALIDATE&lt;br /&gt; A command comparable to TOID_NOVALIDATE is not needed. OIDs are no longer used for type validation.&lt;br /&gt; &lt;br /&gt;TOUSER&lt;br /&gt; REMAP_SCHEMA&lt;br /&gt; &lt;br /&gt;TRANSPORT_TABLESPACE&lt;br /&gt; TRANSPORT_TABLESPACES (see command description)&lt;br /&gt; &lt;br /&gt;TTS_OWNERS &lt;br /&gt; A parameter comparable to TTS_OWNERS is not needed because the information is stored in the dump file set.&lt;br /&gt; &lt;br /&gt;USERID&lt;br /&gt; A parameter comparable to USERID is not needed. This information is supplied as the username/password when you invoke Import.&lt;br /&gt; &lt;br /&gt;VOLSIZE&lt;br /&gt; A parameter comparable to VOLSIZE is not needed because tapes are not supported.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-6958251574767566130?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/6958251574767566130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=6958251574767566130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/6958251574767566130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/6958251574767566130'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2011/01/differences-between-data-pump-impdp-and.html' title='Differences between Data Pump impdp and import utility'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-679348667506880915</id><published>2010-11-17T22:52:00.001-08:00</published><updated>2010-11-17T22:52:32.640-08:00</updated><title type='text'>Materialized View</title><content type='html'>+++++++++++++++++++++++++++++++++++++&lt;br /&gt;MVIEW refresh Status on MASTER Site :&lt;br /&gt;+++++++++++++++++++++++++++++++++++++&lt;br /&gt;set pages 1000&lt;br /&gt;set linesize 180&lt;br /&gt;col SNAPSHOT_SITE for a30&lt;br /&gt;select r.name, r.snapshot_site, l.current_snapshots&lt;br /&gt;from dba_registered_snapshots r, dba_snapshot_logs l&lt;br /&gt;where r.snapshot_id = l.snapshot_id   and l.master in (select master &lt;br /&gt;from dba_snapshot_logs) ;&lt;br /&gt;CLEAR COLUMNS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Show all materialized and resfresh times&lt;br /&gt;========================================&lt;br /&gt;set lines 100 pages 999&lt;br /&gt;col last_refresh format a20&lt;br /&gt;select owner&lt;br /&gt;, mview_name&lt;br /&gt;, to_char(last_refresh_date, 'dd/mm/yy hh24:mi') last_refresh&lt;br /&gt;from dba_mviews&lt;br /&gt;order by owner, last_refresh&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Manually start a refresh&lt;br /&gt;===========================&lt;br /&gt;&lt;br /&gt;execute dbms_mview.refresh ('&lt;owner.mv_table&gt;');&lt;br /&gt;&lt;br /&gt;List all materialized view logs&lt;br /&gt;=================================&lt;br /&gt;select  log_owner, log_table from dba_mview_logs;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-679348667506880915?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/679348667506880915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=679348667506880915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/679348667506880915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/679348667506880915'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/11/materialized-view.html' title='Materialized View'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-4979983153291581076</id><published>2010-09-10T19:11:00.000-07:00</published><updated>2010-09-12T07:11:07.310-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MIGRATION OF ORACLE DATABASE.'/><title type='text'>MIGRATING AN ORACLE DATABASE FROM ONE PLATFORM TO ANOTHER PLATFORM (SOLARIS - LINUX)</title><content type='html'>As per project requirement if database's needs to be moved from one platform to another&lt;br /&gt;say if your current oracle database is running on &lt;span style="font-weight:bold;"&gt;SOLARIS&lt;/span&gt; platfrom and now need to move to a server on &lt;span style="font-weight:bold;"&gt;LINUX&lt;/span&gt; platform&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then one of the easist way you can follow this steps.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;From xxx platform to any new platform ( solaris -- linux)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;step 1) Take full db export backup of source (solaris)&lt;br /&gt;                   &lt;span style="font-style:italic;"&gt;exp full=y file=ab.dmp log=log.log&lt;br /&gt;                   password: / as sysdba&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;step 2)  Take a picture of all tablespaces and its size's &lt;br /&gt;  and datafile counts for each tablespace in source db&lt;br /&gt; &lt;br /&gt;&lt;span style="font-style:italic;"&gt; &lt;span style="font-weight:bold;"&gt;SQL&gt; select tablespace_name, file_name, bytes/1024/1024 from dba_data_files;&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;step 3) Create an empty database in target server (linux) with same init&lt;db&gt;.ora parameter file&lt;br /&gt;&lt;br /&gt;step 4) run  in target database&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt; SQL&gt; conn / as sysdba&lt;br /&gt; SQL&gt; @?/rdbms/admin/catalog.sql&lt;br /&gt; SQL&gt; @?/rdbms/admin/catproc.sql&lt;br /&gt; &lt;br /&gt; SQL&gt; conn system/passwd &lt;br /&gt; SQL&gt; @?/sqlplus/admin/pupbld.sql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;step 5) in target db (LINUX)&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;create tablespaces same as in source (SOLARIS) with same size&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt; eg:  source (SOLARIS)    target ( LINUX)&lt;br /&gt;     Tablespace_name  size | Tablespace_name  size&lt;/span&gt;&lt;br /&gt;     --------------- ---- | ---------------- ----&lt;br /&gt;  users  2048 | create  users  2048&lt;br /&gt;  tools   16GB | create  tools   16GB&lt;br /&gt; &lt;br /&gt; like this create all tablespace except &lt;span style="font-weight:bold;"&gt;(SYSTEM, SYSAUX)&lt;/span&gt; as this tablespaces will be &lt;br /&gt; create while creating db&lt;br /&gt; now create undo , temp tablespaces.&lt;br /&gt;&lt;br /&gt;step 6) scp the export dump from source( SOLARIS ) To target ( LINUX) server&lt;br /&gt; &lt;br /&gt;step 7) import the dump into target (LINUX) new db&lt;br /&gt;&lt;br /&gt; imp file=ab.dmp log=imp_mig_solaris-linux.log full=y buffer=500000 commit=y statistics=none&lt;br /&gt;&lt;br /&gt;or you can also do one thing &lt;br /&gt;import only the users which are not there in new database.&lt;br /&gt;leaving (SYSTEM, SYSAUX, DBSNMP, etc) and importing only applications schema.&lt;br /&gt;&lt;br /&gt;imp file=ab.dmp log=imp_mig-user-sol-lin.log commit=y, buffer=500000 statistics=none&lt;br /&gt;fromuser=appdata touser=appdata&lt;br /&gt;&lt;br /&gt;like this import all schemas if you dont want to do a full import.&lt;br /&gt;&lt;br /&gt; once import completes your migration is over, just run this to compile all invalids.&lt;br /&gt; &lt;br /&gt; &lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;SQL&gt; @?/rdbms/admin/utlrp.sql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;if you are migrating and upgrading at the same time then also no issues&lt;br /&gt;in source db(SOLARIS) run this first&lt;br /&gt;&lt;br /&gt; SQL&gt; @?/rdbms/admin/utlu102i.sql&lt;br /&gt;&lt;br /&gt;it will display all the requirement to upgrade a db&lt;br /&gt;while you create a new db in target (LINUX) use the same requirements&lt;br /&gt;&lt;br /&gt;normally it will be &lt;br /&gt;&lt;br /&gt; system tablespace size must be = XXXX MB&lt;br /&gt; sysaux tablespac size must be = xxxx MB&lt;br /&gt; temp          = xxxx MB&lt;br /&gt; undo_tbs         = xxxx MB&lt;br /&gt;&lt;br /&gt;in init&lt;db&gt;.ora if recommends then you can modify it while creating a new db.&lt;br /&gt;&lt;br /&gt;   ONCE YOU ARE DONE WITH THIS ---&gt; NOW TIME TO UPGRADE.&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;UPGRADE:   &lt;/span&gt;&lt;/span&gt;  In target server (linux) &lt;br /&gt;  bring down the db&lt;br /&gt;  startup in upgrade mode&lt;br /&gt;  -- SQL&gt; shutdown immediate&lt;br /&gt;  -- SQL&gt; starup upgrade&lt;br /&gt;  -- SQL&gt; @?/rdbms/admin/catupgrd.sql&lt;br /&gt;  -- SQL&gt; @?/rdbms/admin/utlrp.sql&lt;br /&gt;  -- SQL&gt; shutdown immediate&lt;br /&gt;  -- SQL&gt; startup &lt;br /&gt;  -- $ update the listener entry in listener.ora and tnsnames.ora&lt;br /&gt;  -- $ bring up the lister&lt;br /&gt;  -- $ lsnrctl start &lt;listener_name&gt;&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;You can follow the same procedure to migrate an oracle database&lt;br /&gt;&lt;br /&gt;windows to linux &amp; vice versa&lt;br /&gt;windows to solaris &amp; vice versa&lt;br /&gt;solaris to linux &amp; vice versa.&lt;br /&gt;linux to AIX  &amp; vice versa&lt;br /&gt;Aix to linux &amp; vice versa&lt;br /&gt;HP to linux &amp; vice versa&lt;br /&gt;windows to HP &amp; vice versa&lt;br /&gt;AIX to HP &amp; vice versa&lt;br /&gt;HP to AIS &amp; vice versa&lt;br /&gt;&lt;br /&gt;In windows only need to create an oradim service and it needs to be started.&lt;br /&gt;&lt;br /&gt;Create instance - The following command can be used to create an instance with oradim:&lt;br /&gt;&lt;br /&gt;C:\oracle\bin\oradim –new –sid MYSID –intpwd –maxusers 20 startmode auto –pfile initMYSID.ora&lt;br /&gt;&lt;br /&gt;  Startup - The following command can be used to start the instance with oradim:&lt;br /&gt;&lt;br /&gt;C:\oracle\bin\oradim –startup –sid MYSID&lt;br /&gt;&lt;br /&gt;Shutdown - The following command can be used to shutdown the instance with oradim:&lt;br /&gt;&lt;br /&gt;C:\oracle\bin\oradim -shutdown -sid MYSID -shutttype SRVC,INST –shutmode A &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for more information on ORADIM utility &lt;br /&gt;refer this &lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;span style="font-weight:bold;"&gt;http://javeedkaleem.blogspot.com/2009/12/starting-and-stopping-oracle-on-windows.html&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-4979983153291581076?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/4979983153291581076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=4979983153291581076' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/4979983153291581076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/4979983153291581076'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/09/migrating-oracle-database-from-one.html' title='MIGRATING AN ORACLE DATABASE FROM ONE PLATFORM TO ANOTHER PLATFORM (SOLARIS - LINUX)'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2489608522599887757</id><published>2010-05-11T17:26:00.001-07:00</published><updated>2010-05-11T17:37:41.878-07:00</updated><title type='text'>How to apply oracle database patch (OPatch) without downtime.</title><content type='html'>&lt;span style="font-weight: bold;"&gt;HOW TO APPLY ORACLE PATCH (OPATCH) WITHOUT DOWNTIME.&lt;/span&gt;&lt;br /&gt;====================================================&lt;br /&gt;&lt;br /&gt;This is commonly asked question in interviews.&lt;br /&gt;&lt;br /&gt;To apply Opatch&lt;br /&gt;coditions are db and listener both must be down as opatch will update your current ORACLE_HOME with patches.&lt;br /&gt;in single instance its not possible.&lt;br /&gt;but for RAC instance its possible.&lt;br /&gt;as in RAC there will be two seperate oracle home and two seperate instances running once instance on each oracle_home&lt;br /&gt;&lt;br /&gt;use this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;opatch napply -skip_subset -skip_duplicate -local -oh $ORACLE_HOME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;when using -local parameter  and -oh $ORACLE_HOME this means this patch session will only apply patch to current sourced ORACLE_HOME.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;steps before applying patch&lt;/span&gt;:&lt;br /&gt;----------------------------&lt;br /&gt;&lt;br /&gt;1) &lt;span style="font-weight: bold;"&gt;check the database status.&lt;/span&gt;&lt;br /&gt;wch_db.sql&lt;br /&gt;-----------&lt;br /&gt;select     name,&lt;br /&gt;                               open_mode,&lt;br /&gt;                             database_name,&lt;br /&gt;                    created,&lt;br /&gt;                    log_mode,&lt;br /&gt;                    platform_name&lt;br /&gt;from        v$database;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) &lt;span style="font-weight: bold;"&gt;Check the object's invalid.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;user_inv.sql&lt;br /&gt;============&lt;br /&gt;SELECT  owner,&lt;br /&gt;COUNT(*)&lt;br /&gt;FROM  dba_objects&lt;br /&gt;WHERE  status = 'INVALID'&lt;br /&gt;GROUP BY owner;&lt;br /&gt;&lt;br /&gt;count_inv.sql&lt;br /&gt;-------------&lt;br /&gt;select count(*)&lt;br /&gt;from  dba_objects&lt;br /&gt;WHERE  status ='INVALID';&lt;br /&gt;&lt;br /&gt;3) &lt;span style="font-weight: bold;"&gt;Take backup of invalid's&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;create table bk_inv_&lt;date&gt; as select * from dba_objects&lt;br /&gt;where status='INVALID';&lt;br /&gt;&lt;br /&gt;4) &lt;span style="font-weight: bold;"&gt;check opatch version using &lt;/span&gt;&lt;br /&gt;opatch -v&lt;br /&gt;if opatch version is not compatible check the readme file and&lt;br /&gt;     download the latest version and uncompress&lt;br /&gt;in $ORACLE_HOME.&lt;br /&gt;&lt;br /&gt;5) &lt;span style="font-weight: bold;"&gt;check oraInst.loc file pointing to your current $ORACLE_HOME or not.&lt;/span&gt;&lt;br /&gt;cat /etc/oraInst.loc&lt;br /&gt;&lt;br /&gt;inventory_loc=/u01/app/oracle/10.2.0/GlobalOraInv&lt;br /&gt;inst_group=dba&lt;br /&gt;&lt;br /&gt;if your server have more then one $ORACLE_HOME then comment the other $ORACLE_HOME and&lt;br /&gt;uncomment the current $ORACLE_HOME&lt;br /&gt;&lt;br /&gt;inventory must point to the current $ORACLE_HOME which is getting patched.&lt;br /&gt;&lt;br /&gt;6) &lt;span style="font-weight: bold;"&gt;check free space on $ORACLE_HOME &lt;/span&gt;&lt;br /&gt;df -h $ORACLE_HOME&lt;br /&gt;&lt;br /&gt;7) &lt;span style="font-weight: bold;"&gt;chek the utilities like &lt;/span&gt;&lt;br /&gt;which ld&lt;br /&gt;which ar&lt;br /&gt;which make&lt;br /&gt;etc as per readme file.&lt;br /&gt;&lt;br /&gt;8) &lt;span style="font-weight: bold;"&gt;unzip the patch &lt;/span&gt;&lt;br /&gt;unzip -d /loc_2_unzip p&lt;patch_numere&gt;.zip&lt;br /&gt;&lt;br /&gt;9) &lt;span style="font-weight: bold;"&gt;Go the patch directory&lt;/span&gt;&lt;br /&gt;cd /loc_2_unzip/patch_number&lt;br /&gt;&lt;br /&gt;10) &lt;span style="font-weight: bold;"&gt;Bring down the listner.&lt;/span&gt;&lt;br /&gt;cd $ORACLE_HOME/bin&lt;br /&gt;lsnrctl stop &lt;listener_name&gt;&lt;br /&gt;&lt;br /&gt;11) &lt;span style="font-weight: bold;"&gt;Bring down the database&lt;/span&gt;&lt;br /&gt;Shutdown immediate.&lt;br /&gt;&lt;br /&gt;12) &lt;span style="font-weight: bold;"&gt;export opatch &lt;/span&gt;&lt;br /&gt;export PATH=$PATH:$HOME:$ORACLE_HOME/OPatch:/bin&lt;br /&gt;&lt;br /&gt;13) &lt;span style="font-weight: bold;"&gt;Start the patch&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;opatch napply -skip_subset -skip_duplicate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for RAC database then database can be up&lt;br /&gt;as it may be having more then one instance&lt;br /&gt;so you can bring down one instance and listener and apply the patch and open it&lt;br /&gt;and then do the same on another node.&lt;br /&gt;like this db will be up and no user will face issue in outage also.&lt;br /&gt;&lt;br /&gt;to apply opatch in RAC instance&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;opatch napply -skip_subset -skip_duplicate -local -oh $ORACLE_HOME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;when using &lt;span style="font-weight: bold;"&gt;-local&lt;/span&gt; parameter  and&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-oh $ORACLE_HOME&lt;/span&gt; this means this patch session will only apply patch to current ORACLE_HOME only.&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;. All-Node Patch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   . Shutdown all Oracle instances on all nodes&lt;br /&gt;   . Apply the patch to all nodes&lt;br /&gt;   . Bring all nodes up&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;. Minimum downtime&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   . Shutdown the Oracle instance on node 1&lt;br /&gt;   . Apply the patch to the Oracle instance on node 1&lt;br /&gt;   . Shutdown the Oracle instance on node 2&lt;br /&gt;   . Apply the patch to the Oracle instance on node 2&lt;br /&gt;   . Shutdown the Oracle instance on node 3&lt;br /&gt;   . At this point, instances on nodes 1 and 2 can be brought up&lt;br /&gt;   . Apply the patch to the Oracle instance on node 3&lt;br /&gt;   . Startup the Oracle instance on node 3&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;.  (no downtime) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   . Shutdown the Oracle instance on node 1&lt;br /&gt;   . Apply the patch to the Oracle instance on node 1&lt;br /&gt;   . Start the Oracle instance on node 1&lt;br /&gt;   . Shutdown the Oracle instance on node 2&lt;br /&gt;   . Apply the patch to the Oracle instance on node 2&lt;br /&gt;   . Start the Oracle instance on node 2&lt;br /&gt;   . Shutdown the Oracle instance on node 3&lt;br /&gt;   . Apply the patch to the Oracle instance on node 3&lt;br /&gt;   . Start the Oracle instance on node 3&lt;br /&gt;-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;14) &lt;span style="font-weight: bold;"&gt;Once patch installation is completed need to do post patching steps.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) &lt;span style="font-weight: bold;"&gt;starup the instance&lt;/span&gt;&lt;br /&gt;startup&lt;br /&gt;b) &lt;span style="font-weight: bold;"&gt;Loading modified sqlfiles into the database.&lt;/span&gt;&lt;br /&gt;@$ORACLE_HOME/rdbms/admin/catbundle.sql cpu apply&lt;br /&gt;&lt;br /&gt;to check the logs generated&lt;br /&gt;catbundle_CPU_&lt;database sid=""&gt;_APPLY_&lt;timestamp&gt;.log&lt;br /&gt;catbundle_CPU_&lt;database sid=""&gt;_GENERATE_&lt;timestamp&gt;.log&lt;br /&gt;&lt;br /&gt;c) &lt;span style="font-weight: bold;"&gt;Recompiling Views in the Database&lt;/span&gt;&lt;br /&gt;shutdown immediate&lt;br /&gt;startup upgrade&lt;br /&gt;@$ORACLE_HOME/cpu/view_recompile/view_recompile_jan2008cpu.sql&lt;br /&gt;shutdown immediate&lt;br /&gt;startup&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;If it is a RAC instance.&lt;/span&gt;&lt;br /&gt;shutdown&lt;br /&gt;startup nomount&lt;br /&gt;alter database set cluster database=false scope=spfile;&lt;br /&gt;shutdown&lt;br /&gt;startup upgrade&lt;br /&gt;@?/cpu/view_recompile/view_recompile_jan2008cpu.sql&lt;br /&gt;shutdown&lt;br /&gt;startup&lt;br /&gt;alter database set cluster database=true scope=spfile;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;restart the database.&lt;/span&gt;&lt;br /&gt;cd $CRS_HOME/bin&lt;br /&gt;srvctl start database -d &lt;database-name&gt;&lt;br /&gt;15) &lt;span style="font-weight: bold;"&gt;If any invalid objects were reported, run the utlrp.sql script as follows&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;user_inv.sql&lt;br /&gt;============&lt;br /&gt;SELECT  owner,&lt;br /&gt;COUNT(*)&lt;br /&gt;FROM  dba_objects&lt;br /&gt;WHERE  status = 'INVALID'&lt;br /&gt;GROUP BY owner;&lt;br /&gt;&lt;br /&gt;count_inv.sql&lt;br /&gt;-------------&lt;br /&gt;select count(*)&lt;br /&gt;from  dba_objects&lt;br /&gt;WHERE  status ='INVALID';&lt;br /&gt;&lt;br /&gt;if any new invalids seen then again take backup of invalid objects and compile it.&lt;br /&gt;&lt;br /&gt;create table bk_inv_&lt;date&gt; as select * from dba_objects&lt;br /&gt;where status='INVALID';&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/utlrp.sql    --- to compile the invalid objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16) &lt;span style="font-weight: bold;"&gt;Confirm that patch has been applied successfully or not at db level also.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    post_patch.sql&lt;br /&gt;    --------------&lt;br /&gt;     col action_time for a40&lt;br /&gt;     col action for a15&lt;br /&gt;     col namespace for a15&lt;br /&gt;     col version for a15&lt;br /&gt;     col comments for a40&lt;br /&gt;     set pages 1000&lt;br /&gt;     set lines 170&lt;br /&gt;     select * from registry$history ;&lt;br /&gt;&lt;/date&gt;&lt;/database-name&gt;&lt;/timestamp&gt;&lt;/database&gt;&lt;/timestamp&gt;&lt;/database&gt;&lt;/listener_name&gt;&lt;/patch_numere&gt;&lt;/date&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-2489608522599887757?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/2489608522599887757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=2489608522599887757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2489608522599887757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2489608522599887757'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/05/how-to-apply-oracle-database-patch.html' title='How to apply oracle database patch (OPatch) without downtime.'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-5288893420083329535</id><published>2010-05-06T16:44:00.000-07:00</published><updated>2010-05-06T16:56:04.262-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle DataPump Quick Sstart  -By JK - Associate.'/><title type='text'>Oracle DataPump Quick Sstart</title><content type='html'>&lt;span style="font-weight:bold;"&gt;INTRODUCTION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle Data Pump is the replacement for the original Export and Import utilities.&lt;br /&gt;Available starting in Oracle Database 10g, Oracle Data Pump enables very high-speed&lt;br /&gt;movement of data and metadata from one database to another.&lt;br /&gt;&lt;br /&gt;The new Data Pump Export and Import utilities have a similar look and feel to the&lt;br /&gt;original utilities, but they are much more efficient and give you greater control and&lt;br /&gt;management of your import and export jobs.&lt;br /&gt;&lt;br /&gt;This paper gives users of the original Export and Import utilities a primer on how to move&lt;br /&gt;up to the faster, more powerful, and more flexible Data Pump Export and Import utilities.&lt;br /&gt;See the Oracle Database 10g Utilities Guide for more comprehensive information about&lt;br /&gt;Oracle Data Pump.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NEW CONCEPTS IN ORACLE DATA PUMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are two new concepts in Oracle Data Pump that are different from original Export&lt;br /&gt;and Import.&lt;br /&gt;&lt;br /&gt;DIRECTORY OBJECTS&lt;br /&gt;Data Pump differs from original Export and Import in that all jobs run primarily on the&lt;br /&gt;server using server processes. These server processes access files for the Data Pump&lt;br /&gt;jobs using directory objects that identify the location of the files. The directory objects&lt;br /&gt;enforce a security model that can be used by DBAs to control access to these files.&lt;br /&gt;&lt;br /&gt;INTERACTIVE COMMAND-LINE MODE&lt;br /&gt;Besides regular operating system command-line mode, there is now a very powerful&lt;br /&gt;interactive command-line mode which allows the user to monitor and control Data Pump&lt;br /&gt;Export and Import operations.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CHANGING FROM ORIGINAL EXPORT/IMPORT TO ORACLE DATA PUMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CREATING DIRECTORY OBJECTS&lt;br /&gt;&lt;br /&gt;In order to use Data Pump, the database administrator must create a directory object&lt;br /&gt;and grant privileges to the user on that directory object. If a directory object is not&lt;br /&gt;specified, a default directory object called data_pump_dir is provided. The default&lt;br /&gt;data_pump_dir is available only to privileged users unless access is granted by the DBA.&lt;br /&gt;In the following example, the following SQL statement creates a directory object named&lt;br /&gt;dpump_dir1 that is mapped to a directory located at /usr/apps/datafiles.&lt;br /&gt;&lt;br /&gt;You would login to SQL*Plus as system and enter the following SQL command to&lt;br /&gt;create a directory.&lt;br /&gt;&lt;br /&gt;1. SQL&gt; CREATE DIRECTORY dpump_dir1 AS ‘/usr/apps/datafiles’;&lt;br /&gt;&lt;br /&gt;After a directory is created, you need to grant READ and WRITE permission on the&lt;br /&gt;directory to other users. For example, to allow the Oracle database to read and to write&lt;br /&gt;to files on behalf of user scott in the directory named by dpump_dir1, you must execute&lt;br /&gt;the following command:&lt;br /&gt;&lt;br /&gt;2. SQL&gt; GRANT READ,WRITE ON DIRECTORY dpump_dir1 TO scott;&lt;br /&gt;&lt;br /&gt;Note that READ or WRITE permission to a directory object means only that the Oracle&lt;br /&gt;database will read or write that file on your behalf. You are not given direct access to&lt;br /&gt;those files outside of the Oracle database unless you have the appropriate operating&lt;br /&gt;system privileges. Similarly, the Oracle database requires permission from the operating&lt;br /&gt;system to read and write files in the directories.&lt;br /&gt;&lt;br /&gt;Once the directory access is granted, the user scott can export his database objects with&lt;br /&gt;command arguments:&lt;br /&gt;&lt;br /&gt;3. &gt;expdp username/password DIRECTORY=dpump_dir1 dumpfile=scott.dmp&lt;br /&gt;&lt;br /&gt;COMPARISON OF COMMAND-LINE PARAMETERS FROM ORIGINAL EXPORT AND IMPORT&lt;br /&gt;TO DATA PUMP&lt;br /&gt;&lt;br /&gt;Data Pump commands have a similar look and feel to the Original Export and Import&lt;br /&gt;commands, but are different. Below are a few examples that demonstrate some of&lt;br /&gt;these differences.&lt;br /&gt;&lt;br /&gt;1) &lt;span style="font-weight:bold;"&gt;Example import of tables from scott’s account to jim’s account&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Original Import:&lt;br /&gt;&gt; imp username/password FILE=scott.dmp FROMUSER=scott TOUSER=jim&lt;br /&gt;TABLES=(*)&lt;br /&gt;&lt;br /&gt;Data Pump Import:&lt;br /&gt;&gt; impdp username/password DIRECTORY=dpump_dir1 DUMPFILE=scott.dmp&lt;br /&gt;TABLES=scott.emp REMAP_SCHEMA=scott:jim&lt;br /&gt;&lt;br /&gt;Note how the FROMUSER/TOUSER syntax is replaced by the REMAP_SCHEMA&lt;br /&gt;option.&lt;br /&gt;&lt;br /&gt;2) &lt;span style="font-weight:bold;"&gt;Example export of an entire database to a dump file with all GRANTS, INDEXES,&lt;br /&gt;and data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&gt; exp username/password FULL=y FILE=dba.dmp GRANTS=y INDEXES=y ROWS=y&lt;br /&gt;&lt;br /&gt;&gt; expdp username/password FULL=y INCLUDE=GRANT INCLUDE= INDEX&lt;br /&gt;DIRECTORY=dpump_dir1 DUMPFILE=dba.dmp CONTENT=ALL&lt;br /&gt;&lt;br /&gt;Data Pump offers much greater metadata filtering than Original Export and Import. The&lt;br /&gt;INCLUDE parameter allows you to specify which object (and its dependent objects) you&lt;br /&gt;want to keep in the export job. The EXCLUDE parameter allows you to specify which&lt;br /&gt;object (and its dependent objects) you want to keep out of the export job. You cannot&lt;br /&gt;mix the two parameters in one job. Both parameters work with Data Pump Import as&lt;br /&gt;well, and you can use different INCLUDE and EXCLUDE options for different operations&lt;br /&gt;on the same dump file.&lt;br /&gt;&lt;br /&gt;3) &lt;span style="font-weight:bold;"&gt;Tuning Parameters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unlike Original Export and Import, which used the BUFFER, COMMIT, COMPRESS,&lt;br /&gt;CONSISTENT, DIRECT, and RECORDLENGTH parameters, Data Pump needs no&lt;br /&gt;tuning to achieve maximum performance. Data Pump chooses the best method to&lt;br /&gt;ensure that data and metadata are exported and imported in the most efficient manner.&lt;br /&gt;Initialization parameters should be sufficient upon installation.&lt;br /&gt;&lt;br /&gt;4) &lt;span style="font-weight:bold;"&gt;Moving data between versions &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Data Pump method for moving data between different database versions is different&lt;br /&gt;from the method used by original Export and Import. With original Export, you had to run&lt;br /&gt;an older version of Export to produce a dump file that was compatible with an older&lt;br /&gt;database version. With Data Pump, you use the current Export version and simply use&lt;br /&gt;the VERSION parameter to specify the target database version. You cannot specify&lt;br /&gt;versions earlier than Oracle Database 10g (since Data Pump did not exist before 10g).&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&gt; expdp username/password TABLES=hr.employees VERSION=10.1&lt;br /&gt;DIRECTORY=dpump_dir1 DUMPFILE=emp.dmp&lt;br /&gt;&lt;br /&gt;Data Pump Import can always read dump file sets created by older versions of Data&lt;br /&gt;Pump Export.&lt;br /&gt;&lt;br /&gt;Note that Data Pump Import cannot read dump files produced by original Export.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;MAXIMIZING THE POWER OF ORACLE DATA PUMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Data Pump works great with default parameters, but once you are comfortable with Data&lt;br /&gt;Pump, there are new capabilities that you will want to explore.&lt;br /&gt;&lt;br /&gt;PARALLELISM&lt;br /&gt;&lt;br /&gt;Data Pump Export and Import operations are processed in the database as a Data&lt;br /&gt;Pump job, which is much more efficient that the client-side execution of original Export&lt;br /&gt;and Import. Now Data Pump operations can take advantage of the server’s parallel&lt;br /&gt;processes to read or write multiple data streams simultaneously (PARALLEL is only&lt;br /&gt;available in the Enterprise Edition of Oracle Database 10g.)&lt;br /&gt;&lt;br /&gt;The number of parallel processes can be changed on the fly using Data Pump’s&lt;br /&gt;interactive command-line mode. You may have a certain number of processes running&lt;br /&gt;during the day and decide to change that number if more system resources become&lt;br /&gt;available at night (or vice versa). For best performance, you should do the following:&lt;br /&gt;&lt;br /&gt;    • Make sure your system is well balanced across CPU, memory, and I/O.&lt;br /&gt;&lt;br /&gt;    • Have at least one dump file for each degree of parallelism. If there aren’t enough&lt;br /&gt;    dump files, performance will not be optimal because multiple threads of&lt;br /&gt;    execution will be trying to access the same dump file.&lt;br /&gt;&lt;br /&gt;     • Put files that are members of a dump file set on separate disks so that they will&lt;br /&gt;    be written and read in parallel.&lt;br /&gt;&lt;br /&gt;    • For export operations, use the %U variable in the DUMPFILE parameter so&lt;br /&gt;    multiple dump files can be automatically generated.&lt;br /&gt;&lt;br /&gt;    Example:&lt;br /&gt;    &gt; expdp username/password DIRECTORY=dpump_dir1 JOB_NAME=hr&lt;br /&gt;    DUMPFILE=par_exp%u.dmp PARALLEL=4 &lt;br /&gt;&lt;br /&gt;REMAP&lt;br /&gt;&lt;br /&gt;     • REMAP_TABLESPACE – This allows you to easily import a table into a different&lt;br /&gt;    tablespace from which it was originally exported. The databases have to be 10.1&lt;br /&gt;    or later.&lt;br /&gt;&lt;br /&gt;    Example:&lt;br /&gt;    &gt; impdp username/password REMAP_TABLESPACE=tbs_1:tbs_6&lt;br /&gt;    DIRECTORY=dpumpdir1 DUMPFILE=employees.dmp&lt;br /&gt;&lt;br /&gt;    • REMAP_DATAFILES – This is a very useful feature when you move databases&lt;br /&gt;    between platforms that have different file naming conventions. This parameter&lt;br /&gt;    changes the source datafile name to the target datafile name in all SQL&lt;br /&gt;    statements where the source datafile is referenced. Because the&lt;br /&gt;    REMAP_DATAFILE value uses quotation marks, it’s best to specify the&lt;br /&gt;    parameter within a parameter file.&lt;br /&gt;&lt;br /&gt;    Example:&lt;br /&gt;    The parameter file, payroll.par, has the following content:&lt;br /&gt;    DIRECTORY=dpump_dir1&lt;br /&gt;    FULL=Y&lt;br /&gt;    DUMPFILE=db_full.dmp&lt;br /&gt;    REMAP_DATAFILE=”’C:\DB1\HRDATA\PAYROLL\tbs6.dbf’:’/db1/hrdata/payroll/t&lt;br /&gt;    bs6.dbf’”&lt;br /&gt;    You can then issue the following command:&lt;br /&gt;    &gt; impdp username/password PARFILE=payroll.par&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;EVEN MORE ADVANCED FEATURES OF ORACLE DATA PUMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Beyond the command-line and performance features of Oracle Data Pump are new&lt;br /&gt;capabilities that DBAs will find invaluable. A couple of prominent features are described&lt;br /&gt;here.&lt;br /&gt;&lt;br /&gt;INTERACTIVE COMMAND-LINE MODE&lt;br /&gt;&lt;br /&gt;You have much more control in monitoring and controlling Data Pump jobs with&lt;br /&gt;interactive command-line mode. Because Data Pump jobs run entirely on the server,&lt;br /&gt;you can start an export or import job, detach from it, and later reconnect to the job to&lt;br /&gt;monitor its progress. Here are some of the things you can do while in this mode:&lt;br /&gt;&lt;br /&gt;    • See the status of the job. All of the information needed to monitor the job’s&lt;br /&gt;    execution is available.&lt;br /&gt;&lt;br /&gt;    • Add more dump files if there is insufficient disk space for an export file.&lt;br /&gt;&lt;br /&gt;     • Change the default size of the dump files.&lt;br /&gt;&lt;br /&gt;     • Stop the job (perhaps it is consuming too many resources) and later restart it&lt;br /&gt;    (when more resources become available).&lt;br /&gt;&lt;br /&gt;    • Restart the job. If a job was stopped for any reason (system failure, power&lt;br /&gt;    outage), you can attach to the job and then restart it.&lt;br /&gt;&lt;br /&gt;    • Increase or decrease the number of active worker processes for the job.&lt;br /&gt;    (Enterprise Edition only.)&lt;br /&gt;&lt;br /&gt;    • Attach to a job from a remote site (such as from home) to monitor status. &lt;br /&gt;&lt;br /&gt;NETWORK MODE&lt;br /&gt;&lt;br /&gt;Data Pump gives you the ability to pass data between two databases over a network (via&lt;br /&gt;a database link), without creating a dump file on disk. This is very useful if you’re&lt;br /&gt;moving data between databases, like data marts to data warehouses, and disk space is&lt;br /&gt;not readily available. Note that if you are moving large volumes of data, Network mode&lt;br /&gt;is probably going to be slower than file mode.&lt;br /&gt;&lt;br /&gt; Network export creates the dump file set on the instance where the Data Pump job is&lt;br /&gt;running and extracts the metadata and data from the remote instance.&lt;br /&gt;&lt;br /&gt;Network export gives you the ability to export read-only databases. (Data Pump Export&lt;br /&gt;cannot run locally on a read-only instance because the job requires write operations on&lt;br /&gt;the instance.) This is useful when there is a need to export data from a standby&lt;br /&gt;database.&lt;br /&gt;&lt;br /&gt; GENERATING SQLFILES&lt;br /&gt;&lt;br /&gt;In original Import, the INDEXFILE parameter generated a text file which contained the&lt;br /&gt;SQL commands necessary to recreate tables and indexes that you could then edit to get&lt;br /&gt;a workable DDL script.&lt;br /&gt;&lt;br /&gt;With Data Pump, it’s a lot easier to get a workable DDL script. When you run Data&lt;br /&gt;Pump Import and specify the SQLFILE parameter, a text file is generated that has the&lt;br /&gt;necessary DDL (Data Definition Language) in it to recreate all object types, not just&lt;br /&gt;tables and indexes. Although this output file is ready for execution, the DDL statements&lt;br /&gt;are not actually executed, so the target system will not be changed.&lt;br /&gt;&lt;br /&gt;SQLFILEs can be particularly useful when pre-creating tables and objects in a new&lt;br /&gt;database. Note that the INCLUDE and EXCLUDE parameters can be used for tailoring&lt;br /&gt;sqlfile output. For example, if you want to create a database that contains all the tables&lt;br /&gt;and indexes of the source database, but that does not include the same constraints,&lt;br /&gt;grants, and other metadata, you would issue a command as follows:&lt;br /&gt;&lt;br /&gt;&gt;impdp username/password DIRECTORY=dpumpdir1 DUMPFILE=expfull.dmp&lt;br /&gt;SQLFILE=dpump_dir2:expfull.sql INCLUDE=TABLE,INDEX&lt;br /&gt;&lt;br /&gt;The SQL file named expfull.sql is written to dpump_dir2 and would include SQL DDL&lt;br /&gt;that could be executed in another database to create the tables and indexes as desired.&lt;br /&gt;&lt;br /&gt;FREQUENTLY ASKED QUESTIONS&lt;br /&gt;&lt;br /&gt; Why are directory objects needed?&lt;br /&gt;They are needed to ensure data security and integrity. Otherwise, users would be able&lt;br /&gt;to read data that they should not have access to and perform unwarranted operations on&lt;br /&gt;the server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What makes Data Pump faster than original Export and Import?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are three main reasons that Data Pump is faster than original Export and Import.&lt;br /&gt;First, the Direct Path data access method (which permits the server to bypass SQL and&lt;br /&gt;go right to the data blocks on disk) has been rewritten to be much more efficient and&lt;br /&gt;now supports Data Pump Import and Export. Second, because Data Pump does its&lt;br /&gt;processing on the server rather than in the client, much less data has to be moved&lt;br /&gt;between client and server. Finally, Data Pump was designed from the ground up to take&lt;br /&gt;advantage of modern hardware and operating system architectures in ways that original&lt;br /&gt;Export/ and Import cannot. These factors combine to produce significant performance&lt;br /&gt;improvements for Data Pump over original Export and Import&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How much faster is Data Pump than the original Export and Import utilities?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For a single stream, Data Pump Export is approximately 2 times faster than original&lt;br /&gt;Export and Data Pump Import is approximately 15 to 40 times faster than original Import.&lt;br /&gt;Speed can be dramatically improved using the PARALLEL parameter.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Why is Data Pump slower on small jobs?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Data Pump was designed for big jobs with lots of data. Each Data Pump job has a&lt;br /&gt;master table that has all the information about the job and is needed for restartability.&lt;br /&gt;The overhead of creating this master table makes small jobs take longer, but the speed&lt;br /&gt;in processing large amounts of data gives Data Pump a significant advantage in medium&lt;br /&gt;and larger jobs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Are original Export and Import going away?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Original Export is being deprecated with the Oracle Database 11g release. Original&lt;br /&gt;Import will always be supported so that dump files from earlier releases (release 5.0 and&lt;br /&gt;later) will be able to be imported. Original and Data Pump dump file formats are not&lt;br /&gt;compatible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Are Data Pump dump files and original Export and Import dump files compatible?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, the dump files are not compatible or interchangeable. If you have original Export&lt;br /&gt;dump files, you must use original Import to load them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How can I monitor my Data Pump jobs to see what is going on?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In interactive mode, you can get a lot of detail through the STATUS command. In&lt;br /&gt;SQL, you can query the following views:&lt;br /&gt;&lt;br /&gt;    • DBA_DATAPUMP_JOBS - all active Data Pump jobs and the state of each&lt;br /&gt;    job&lt;br /&gt;    • USER_DATAPUMP_JOBS – summary of the user’s active Data Pump jobs&lt;br /&gt;    • DBA_DATAPUMP_SESSIONS – all active user sessions that are attached to&lt;br /&gt;    a Data Pump job&lt;br /&gt;    • V$SESSION_LONGOPS – shows all progress on each active Data Pump job &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Can I use Oracle Enterprise Manager with Data Pump?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, OEM supports a fully functional interface to Data Pump.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Can I use gzip with Data Pump?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can do a Data Pump Export and then run the dump files through gzip to compress&lt;br /&gt;them. You cannot compress the dump files prior to writing them. (The new&lt;br /&gt;COMPRESS parameter can be used to compress metadata, and metadata compression&lt;br /&gt;is enabled by default in Oracle Database 10g Release 2.)&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CONCLUSION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Data Pump is fast and flexible. It replaces original Export and Import starting in Oracle&lt;br /&gt;Database 10g. Moving to Data Pump is easy, and opens up a world of new options and&lt;br /&gt;features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-5288893420083329535?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/5288893420083329535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=5288893420083329535' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/5288893420083329535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/5288893420083329535'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/05/oracle-datapump-quick-sstart.html' title='Oracle DataPump Quick Sstart'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-884184869594751701</id><published>2010-04-01T12:38:00.000-07:00</published><updated>2010-04-01T12:39:33.555-07:00</updated><title type='text'>Guide to configuring   HP Omniback integration with Oracle RMAN</title><content type='html'>PURPOSE&lt;br /&gt;&lt;br /&gt; The purpose of this document is to act as a 'quick start' guide to configuring &lt;br /&gt; HP Omniback integration with Oracle RMAN.&lt;br /&gt; &lt;br /&gt;SCOPE &amp; APPLICATION&lt;br /&gt;&lt;br /&gt; This document is aimed at Support Personnel. It is not intended as a replacement&lt;br /&gt; for detailed Omniback or RMAN documentation.&lt;br /&gt; Omniback queries should be directed at the Omniback / Dataprotector Support Centre.&lt;br /&gt;&lt;br /&gt;NOTE: This document describes a setup in a certain configuration and might&lt;br /&gt;      be bound to the used versions.&lt;br /&gt;      New versions of OmniBack / Dataprotector might have a different setup.&lt;br /&gt;      Contact your Omniback / Dataprotector Support Centre for more specific information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RELATED DOCUMENTS&lt;br /&gt;&lt;br /&gt; Note:50875.1  Getting started with Server-Managed Recovery (SMR) and RMAN&lt;br /&gt; Note:73431.1  RMAN Compatibility Matrix&lt;br /&gt;&lt;br /&gt; Oracle8i &amp; 9i Server Backup &amp; Recovery Guide&lt;br /&gt; Omniback documentation&lt;br /&gt;  http://ovweb.external.hp.com/lpe/doc_serv&lt;br /&gt;&lt;br /&gt;0. Introduction&lt;br /&gt;===============&lt;br /&gt;This Note can be used as a starting point when configuring Omniback with&lt;br /&gt;RMAN. The examples in this Note used the following software:&lt;br /&gt;&lt;br /&gt;    i. HP Omniback 4.10 for HP-UX 11&lt;br /&gt;   ii. Oracle 8.1.7 (32 bit)&lt;br /&gt;&lt;br /&gt;The Oracle commands are not specific to HP-UX. However, many of the Omniback&lt;br /&gt;references may not be relevant to other operating systems (Omniback is also&lt;br /&gt;available on NT and Solaris). &lt;br /&gt;&lt;br /&gt;1. Create Recovery Catalog&lt;br /&gt;==========================&lt;br /&gt;Create a recovery catalog, as detailed in Note:50875.1. &lt;br /&gt;The recovery catalog schema can be initially sized at 20MB.&lt;br /&gt;Note that creating/using a recovery catalog is optional.&lt;br /&gt; &lt;br /&gt;2. Setup SQLNet Connectivity to Recovery Catalog&lt;br /&gt;================================================&lt;br /&gt;A TCP loopback test to the catalog should be performed.&lt;br /&gt;   &lt;br /&gt;   % sqlplus rman/rman@catalog&lt;br /&gt;   where the SQL*Net alias for the catalog database is 'catalog'.&lt;br /&gt;&lt;br /&gt;3. Setup SQLNet Connectivity to Target Database&lt;br /&gt;===============================================&lt;br /&gt;A user with SYSDBA privileges is required to connect to the target database.&lt;br /&gt;   &lt;br /&gt;   i. set up remote logins to the target database&lt;br /&gt;      a. add the following to the init.ora:&lt;br /&gt;         remote_login_passwordfile=exclusive&lt;br /&gt;      b. create a password file&lt;br /&gt;         orapwd file=$ORACLE_HOME/dbs/orapw$SID password=oracle&lt;br /&gt;  ii. for the above changes to take affect, stop/start the target instance&lt;br /&gt; iii. create a user, and grant SYSDBA priveleges&lt;br /&gt;      This step is optional, as the 'internal' or '/' could be used.&lt;br /&gt;      SVRMGR&gt; create user targdba identified by targdba&lt;br /&gt;              temporary tablespace temp&lt;br /&gt;              default tablespace users quota unlimited on users;&lt;br /&gt;      SVRMGR&gt; grant connect, resource to targdba;&lt;br /&gt;      SVRMGR&gt; grant sysdba to targdba;&lt;br /&gt;&lt;br /&gt;      Note, if (i) and (ii) have not succeeded, this step will fail with&lt;br /&gt;      ORA 1994 - GRANT failed: cannot add users to public password file&lt;br /&gt;&lt;br /&gt;  iv. Do a loopback test as the SYSDBA user&lt;br /&gt;&lt;br /&gt;      % sqlplus targdba/targdba@target&lt;br /&gt;        or&lt;br /&gt;      % sqlplus internal/oracle@target&lt;br /&gt;      where the SQLnet alias for the target database is 'target'.&lt;br /&gt;&lt;br /&gt;  NB. Certain operations in the Omniback GUI require access to tables/views that&lt;br /&gt;      are not available to all users.&lt;br /&gt;      For example, expanding the 'database' icon into a list if tablespaces&lt;br /&gt;      requires access to DBA_TABLESPACES.&lt;br /&gt;      The targdba user given above does not have SELECT privilege on DBA_TABLESPACES.&lt;br /&gt;      For this reason, it may be preferable to use the internal/oracle example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Enable Archiving &lt;br /&gt;===================&lt;br /&gt;Both the RMAN catalog and the target database may need to have archiving enabled. &lt;br /&gt;   eg, init.ora changes:&lt;br /&gt;   log_archive_dest   = /oracle/OFA_base/app/oracle/admin/V817/arch/arch_&lt;br /&gt;   log_archive_format = _%s.arc&lt;br /&gt;   log_archive_start  = true&lt;br /&gt;&lt;br /&gt;   SQL&gt; startup mount&lt;br /&gt;   SQL&gt; alter database archivelog;&lt;br /&gt;   SQL&gt; alter database open;&lt;br /&gt;&lt;br /&gt;5. Install Omniback&lt;br /&gt;===================&lt;br /&gt;Follow the Omniback documentation to install Omniback. A common problem is not&lt;br /&gt;being able to find the Omniback API Library after installation. This is because&lt;br /&gt;initial installation only installs the Oracle installation packet (referred to&lt;br /&gt;as OB2-ORA). This installation packet needs to be pushed to the Oracle server &lt;br /&gt;(in this context, Oracle servers are Omniback clients).&lt;br /&gt;&lt;br /&gt;To do this, open the Omniback GUI, and choose clients. Choose the client that&lt;br /&gt;has the Oracle server, and right click. Choose 'add components', and follow&lt;br /&gt;the wizard.&lt;br /&gt;&lt;br /&gt;After installation, Omniback creates the following base directories:&lt;br /&gt;     /var/opt/omni&lt;br /&gt;     /opt/omni&lt;br /&gt;     /etc/opt/omni&lt;br /&gt;&lt;br /&gt;Omniback patches can be found at&lt;br /&gt;  http://support.openview.hp.com/patches/patch_index.jsp&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. Integrate RMAN with the Omniback API Library&lt;br /&gt;===============================================&lt;br /&gt;The instance (in fact, all instances with this ORACLE_HOME) need to be shutdown &lt;br /&gt;prior to the following, and restarted after. This assumes the default location&lt;br /&gt;of /opt/omni/lib for the Omniback library.&lt;br /&gt;&lt;br /&gt;   For 32 bit Oracle8i:&lt;br /&gt;   % cd $ORACLE_HOME/lib&lt;br /&gt;   % mv libobk.sl libob.sl.orig&lt;br /&gt;   % ln -s /opt/omni/lib/libob2oracle8.sl libobk.sl&lt;br /&gt;&lt;br /&gt;   For 64 bit Oracle8i&lt;br /&gt;   % cd $ORACLE_HOME/lib64&lt;br /&gt;   % mv libobk.sl libob.sl.orig&lt;br /&gt;   % ln -s /opt/omni/lib/libob2oracle8_64bit.sl libobk.sl&lt;br /&gt;&lt;br /&gt;   For Oracle 9i (on HP-UX, this is available as 64 bit only)&lt;br /&gt;   % cd $ORACLE_HOME/lib&lt;br /&gt;   % mv libobk.sl libob.sl.orig&lt;br /&gt;   % ln -s /opt/omni/lib/libob2oracle8_64bit.sl libobk.sl&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   To verify the relink was succesful, &lt;br /&gt;   % cd $ORACLE_HOME/bin&lt;br /&gt;   % chatr oracle&lt;br /&gt;     oracle: &lt;br /&gt;         shared executable &lt;br /&gt;         shared library dynamic path search:&lt;br /&gt;             SHLIB_PATH     disabled  second &lt;br /&gt;             embedded path  disabled  first  Not Defined&lt;br /&gt;         shared library list:&lt;br /&gt;             dynamic   /oracle2/OFA_base/app/oracle/product/8.1.7/lib/libjox8.sl&lt;br /&gt;             dynamic   /oracle2/OFA_base/app/oracle/product/8.1.7/lib/libobk.sl&lt;br /&gt;        &lt;...more output here...&gt; &lt;br /&gt;&lt;br /&gt;   % ls -la /oracle2/OFA_base/app/oracle/product/8.1.7/lib/libobk.sl&lt;br /&gt;     lrwxr-xr-x   1 hpsupp     support         30 Apr 29 12:48 &lt;br /&gt;            /oracle2/OFA_base/app/oracle/product/8.1.7/lib/libobk.sl@ -&gt; /opt/omni/lib/libob2oracle8.sl&lt;br /&gt;&lt;br /&gt;   Note that the Omniback API is now linked into the oracle 8i executable.&lt;br /&gt;&lt;br /&gt;   Note that for Oracle9i the libobk file is no longer linked in with the oracle&lt;br /&gt;   executable. The libobk is linked in at runtime by looking for the libobk in&lt;br /&gt;   the $ORACLE_HOME/lib directory or by setting RMAN allocate or configure channel&lt;br /&gt;   parameter SBT_LIBRARY.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Create the 'oracle' user in Omniback&lt;br /&gt;=======================================&lt;br /&gt;Start /opt/omni/bin/xomni as root&lt;br /&gt;&lt;br /&gt;   i. from the Omniback 'Main' window, choose 'Users' from dropdown list&lt;br /&gt;  ii. right click on 'operator' or 'admin' in 'Users' list, and choose 'Add Users...'&lt;br /&gt;      NB. The user must be in the admin or operator group&lt;br /&gt; iii. 'Type' field is UNIX&lt;br /&gt;      'Name' field is the oracle software owner eg, oracle&lt;br /&gt;      'UNIX Group' is the UNIX group of the oracle software owner eg, dba&lt;br /&gt;      'Description' is some string that identifies this user&lt;br /&gt;      'Client' should be the host on which the target instance resides&lt;br /&gt;&lt;br /&gt;  NB. If text cannot be entered into the input boxes, choose '&lt;Any&gt;' from the&lt;br /&gt;      dropdown list of values, and edit user afterwards.&lt;br /&gt;&lt;br /&gt;8. Register the Target Database via Omniback&lt;br /&gt;============================================&lt;br /&gt;This step uses a Omniback script to&lt;br /&gt;   a. tell Omniback about the target and catalog databases&lt;br /&gt;   b. register the target database with the catalog (if not already registered)&lt;br /&gt;&lt;br /&gt;The simplest way to do this is to run 'Create New Backup' from the Omniback GUI.&lt;br /&gt;If the target database is not already registered with Omniback, then Omniback&lt;br /&gt;prompts for relevant parameters, and runs /opt/omni/lbin/util_oracle8.exe&lt;br /&gt;transparently. The GUI can also be used to check the configuration.&lt;br /&gt;&lt;br /&gt;Alternatively, run /opt/omni/lbin/util_oracle8.exe manually, as shown below.&lt;br /&gt;&lt;br /&gt;   i. run /opt/omni/lbin/util_oracle8.exe. The usage is:&lt;br /&gt;      /opt/omni/lbin/util_oracle8.exe -CONFIG \&lt;br /&gt;                       &lt;ORACLE_SID&gt; &lt;ORACLE_HOME&gt; \&lt;br /&gt;                       &lt;TARGET DATABASE CONNECT STRING&gt; \&lt;br /&gt;                       &lt;RECOVERY DATABASE CONNECT STRING&gt;&lt;br /&gt;&lt;br /&gt;  ii. this will cause SQLNet connections to be established to the &lt;br /&gt;      catalog and target databases. Consequently, TNS_ADMIN must be set if&lt;br /&gt;      required.&lt;br /&gt;&lt;br /&gt;    For example, using the info from steps (2) and (3)&lt;br /&gt;    % export TNS_ADMIN=/oracle/TNS_ADMIN&lt;br /&gt;    % /opt/omni/lbin/util_oracle8.exe -CONFIG RMAN81T \&lt;br /&gt;               /oracle2/OFA_base/app/oracle/product/8.1.7 \&lt;br /&gt;               targdba/targdba@81targ \&lt;br /&gt;               rman/rman@81cat &lt;br /&gt;&lt;br /&gt;   This step creates the following files in the directory&lt;br /&gt;   /etc/opt/omni/integ/config/Oracle8&lt;br /&gt;      i. &lt;machine name&gt;%&lt;ORACLE_SID of target&gt;&lt;br /&gt;         - this contains encrypted logon info, ORACLE_HOME, ORACLE_VERSION&lt;br /&gt;         - replaces the following, found in previous releases of Omnniback&lt;br /&gt;              /etc/opt/omni/oracle8/&lt;ORACLE_SID&gt;&lt;br /&gt;                  catconn - an encrypted catalog connect string&lt;br /&gt;                  tgtconn - an encrypted target connect string&lt;br /&gt;                  oracle_home - ORACLE_HOME for the target&lt;br /&gt;     ii. &lt;machine name&gt;%_OB2_GLOBAL&lt;br /&gt;         - global configuration file for Omniback &lt;br /&gt;         - contains a list of instances configured for Omniback&lt;br /&gt;                    a list of Omniback global variables&lt;br /&gt; &lt;br /&gt;   Note that if TNS_ADMIN needs to be set in the environment, then the file&lt;br /&gt;   /etc/opt/omni/oracle8/&lt;ORACLE_SID&gt;/.profile&lt;br /&gt;   needs to be created to set TNS_ADMIN. The contents of this file need to &lt;br /&gt;   be of the form:&lt;br /&gt;    TNS_ADMIN=/oracle/TNS_ADMIN&lt;br /&gt;    export TNS_ADMIN&lt;br /&gt;&lt;br /&gt;   To check the config, run the following&lt;br /&gt;   %/opt/omni/lbin/util_oracle8.exe -CHKCONF &lt;ORACLE_SID&gt;&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;   For a succesful configuration, the output is:&lt;br /&gt;   % /opt/omni/lbin/util_oracle8.exe -CHKCONF RMAN81T&lt;br /&gt;   *RETVAL*0&lt;br /&gt;&lt;br /&gt;   NB - any non-zero RETVAL is an error&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;9. Configure and Run an Omniback Backup&lt;br /&gt;=======================================&lt;br /&gt;This cannot be fully described in this Note. However, the main points encountered &lt;br /&gt;during setup are documented here.&lt;br /&gt;&lt;br /&gt;   i. from the Omniback 'Main' window, click on 'Backup'&lt;br /&gt;  ii. from the 'Backup' Window menu, expand the 'Backup' tree to:&lt;br /&gt;      Backup&lt;br /&gt;        --&gt; Backup Specification&lt;br /&gt;          --&gt; Oracle8 Server (this is the case for Oracle9 also)&lt;br /&gt;      Right click on 'Oracle8 Server'. Choose 'Add Backup'&lt;br /&gt; iii. Fill in the 'Client and 'Application Database' values from the list of values&lt;br /&gt;      given.&lt;br /&gt;      The list of 'Application Databases' is from /etc/oratab.&lt;br /&gt;&lt;br /&gt;      The 'User' and 'Group' are the UNIX user that will carry out the backup,&lt;br /&gt;      typically oracle/dba.&lt;br /&gt;&lt;br /&gt;  iv. Complete the remaining steps. &lt;br /&gt;&lt;br /&gt;      The RMAN script produced will be of the following form (assuming the script&lt;br /&gt;      is saved with as 'test_full'):&lt;br /&gt;&lt;br /&gt;      run {&lt;br /&gt;      allocate channel 'dev_0' type 'sbt_tape'&lt;br /&gt;      parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=RMAN81T,OB2BARLIST=test_full)';&lt;br /&gt;      backup incremental level &lt;incr_level&gt; filesperset 1&lt;br /&gt;      format 'test_full&lt;RMAN81T_%s:%t:%p&gt;.dbf'&lt;br /&gt;      database&lt;br /&gt;      include current controlfile&lt;br /&gt;      ;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      This is saved as a Omniback script /etc/opt/omni/barlists/oracle8/test_full.&lt;br /&gt;      The script is referred to as the 'backup specification name'.&lt;br /&gt;      Note the ENV parameters in the 'allocate channel' command. These are Omniback&lt;br /&gt;      specific; the meanings are&lt;br /&gt;         OB2BARTYPE - this will be 'Oracle8' for RDBMS 8i and 9i&lt;br /&gt;         OB2APPNAME - this is the target database ORACLE_SID&lt;br /&gt;         OB2BARLIST - this is the name of the RMAN script&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The 'rman' executable is called by the Omniback executable ob2rman.exe.&lt;br /&gt;&lt;br /&gt;By default, Omniback will take an export of the RMAN Catalog (a user level export, &lt;br /&gt;as 'rman' user), and backs that up to tape. The export is initially dumped in &lt;br /&gt;/var/opt/omni/tmp.&lt;br /&gt;&lt;br /&gt;Note: This section has omitted many steps, such as:&lt;br /&gt;       - setting the protection levels on the device&lt;br /&gt;       - setting concurrency on the device&lt;br /&gt;       - pre and post exec scripts (see below)&lt;br /&gt;       - reporting levels&lt;br /&gt;&lt;br /&gt;The progress of a backup can be monitored with :&lt;br /&gt;  /opt/omni/bin/omnistat&lt;br /&gt;&lt;br /&gt;Restrictions imposed on backup scripts are discussed below.&lt;br /&gt;&lt;br /&gt;If the backup does not run, verify the integration as follows:&lt;br /&gt;&lt;br /&gt;i.   ensure the configuration has been checked (see Step (8))&lt;br /&gt;ii.  ensure the cell server name is correct in&lt;br /&gt;     /etc/opt/omni/cell/cell_server&lt;br /&gt;     Try replacing this with the IP address if hostname lookup is problematic&lt;br /&gt;iii. verify Omniback internal data transfer. The following command will write&lt;br /&gt;     a very small amount of data to  tape, simulating a backup&lt;br /&gt;&lt;br /&gt;     /opt/omni/bin/utilns/testbar -type:Oracle8 \&lt;br /&gt;          -appname:&lt;ORACLE_SID&gt; -bar:&lt;backup specification name&gt; -perform:backup&lt;br /&gt;&lt;br /&gt;     The Monitor window in the Omniback GUI will report any errors, which should&lt;br /&gt;     be followed accordingly.&lt;br /&gt;&lt;br /&gt;10. Restoring an Omniback Backup&lt;br /&gt;================================&lt;br /&gt;Omniback does not have functionallity for a RMAN restore. The restore must be &lt;br /&gt;carried out manually.&lt;br /&gt;&lt;br /&gt;For example, using the connect info already provided in the note.&lt;br /&gt;% rman catalog rman/rman@81cat target targdba/targdba@81targ &lt;br /&gt;&lt;br /&gt;RMAN&gt; run {&lt;br /&gt;2&gt; allocate channel c1 type 'sbt_tape' ;&lt;br /&gt;3&gt; restore database;&lt;br /&gt;4&gt; }&lt;br /&gt;&lt;br /&gt;During the restore, the Omniback GUI 'Monitor' Window will track progress. This&lt;br /&gt;info can also be found in sbtio.log (user_dump_dest).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To diagnose restore problems, Omniback provides 'omnidb' to interrogate the&lt;br /&gt;Omniback database, and 'testbar' to simulate restore of identified backup sets.&lt;br /&gt;&lt;br /&gt;omnidb is used to gather details about the backup that needs to be restored. This&lt;br /&gt;also verifies that the object exists in the Omniback catalog.&lt;br /&gt;&lt;br /&gt;For example&lt;br /&gt;% omnidb -session -detail &lt;br /&gt;   - execute this if no details known about the backup&lt;br /&gt;% omnidb -session -datalist "Oracle8 &lt;backup specification name&gt;"&lt;br /&gt;   - execute this to limit the output (if backup spec name known)&lt;br /&gt;   eg, omnidb -session -datalist "Oracle8 test_full"&lt;br /&gt;&lt;br /&gt;Look through the output, and pick out the SessionID for the session that carried&lt;br /&gt;out the backup. The SessionID wil be of the form "2002/05/15-7".&lt;br /&gt;&lt;br /&gt;To obtain the names of Omniback Objects (backup sets), execute&lt;br /&gt;% omnidb -session  &lt;SessionID&gt;&lt;br /&gt;  eg, omnidb -session  2002/05/15-7&lt;br /&gt;&lt;br /&gt;Note the "Object Name" values.&lt;br /&gt;&lt;br /&gt;Armed with this info, call testbar to simulate a recovery session. This will &lt;br /&gt;restore a small amount of data from the specified Object Name.&lt;br /&gt;&lt;br /&gt;  /opt/omni/bin/utilns/testbar -type:Oracle8 -appname:&lt;ORACLE_SID&gt; \&lt;br /&gt;    -perform:restore -object:"&lt;object name&gt;"  \&lt;br /&gt;    -bar:&lt;backup specification name&gt; -version:&lt;version&gt;&lt;br /&gt;&lt;br /&gt;  where&lt;br /&gt;  &lt;object name&gt; is the ObjectName returned by omnidb (see above)&lt;br /&gt;                 Do not inlcude the "hostname:" returned by omnidb&lt;br /&gt;  &lt;version&gt; is the SessionID given above&lt;br /&gt;&lt;br /&gt;  eg,&lt;br /&gt;  testbar -type:Oracle8 -appname:RMAN81T -perform:restore \&lt;br /&gt;   -object:"test_full&lt;RMAN81T_33:461944988:1&gt;.dbf" \&lt;br /&gt;   -bar:test_full  -version:2002/05/15-7&lt;br /&gt;&lt;br /&gt;The Monitor window in the Omniback GUI will report any errors, which should be &lt;br /&gt;followed accordingly.&lt;br /&gt;&lt;br /&gt;11. Log Files &amp; Debugging&lt;br /&gt;=========================&lt;br /&gt;a. There are many log files in /var/opt/omni/log, notably&lt;br /&gt;    oracle8.log - oracle related messages &lt;br /&gt;    debug.log - Omniback system messages and unexpected errors&lt;br /&gt;    media.log - Omniback tape related messages&lt;br /&gt;&lt;br /&gt;b. sbtio.log in user_dump_dest&lt;br /&gt;&lt;br /&gt;c. Omniback Debugging&lt;br /&gt;   Most Omniback commands can take the -debug parameter. The format of the &lt;br /&gt;   debug switch is&lt;br /&gt;     -debug 1-200 XYZ "host"&lt;br /&gt;       where 1-200 is the debug range - HP should be able to advise on this&lt;br /&gt;             XYZ is the debug trc file suffix&lt;br /&gt;             host is where debug is to be turned on (optional)&lt;br /&gt;&lt;br /&gt;   Debug will cause many trace files to be created in /tmp, with names of the form&lt;br /&gt;   OBprogram_Host_OBPid_XYZ&lt;br /&gt;   &lt;br /&gt;   From an Oracle perspective, turn on debugging by executing a command like:&lt;br /&gt;&lt;br /&gt;   /opt/omni/lbin/util_cmd -putopt Oracle8 RMAN81T OB2OPTS \&lt;br /&gt;    '-debug 1-200 debug_RMAN81T.txt' \&lt;br /&gt;    -sublist Environment&lt;br /&gt;&lt;br /&gt;   Turn the debugging off with :&lt;br /&gt;   /opt/omni/lbin/util_cmd -putopt Oracle8 RMAN81T OB2OPTS \&lt;br /&gt;    '' \&lt;br /&gt;    -sublist Environment&lt;br /&gt;&lt;br /&gt;   In the above RMAN81T is the ORACLE_SID&lt;br /&gt;&lt;br /&gt;   This updates /etc/opt/omni/integ/config/Oracle8/&lt;host&gt;%&lt;ORACLE_SID&gt; with an&lt;br /&gt;   entry in the Environment string, such as&lt;br /&gt;     Environment={&lt;br /&gt;      OB2OPTS='-debug 1-200 debug_RMAN81T.txt';&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;    From now on, all Omniback commands for this instance will give debug output.&lt;br /&gt;    The debug filenames will of the form /tmp/*debug_RMAN81T.txt.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;    HP should be consulted before enabling Omniback debugging.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;APPENDIX A - Miscellaneuos Omniback Commands&lt;br /&gt;==========&lt;br /&gt;% /opt/omni/lbin/util_cmd&lt;br /&gt;  util_cmd -getconf Oracle8 &lt;ORACLE_SID&gt;&lt;br /&gt;     - get config for an instance&lt;br /&gt;&lt;br /&gt;  util_cmd -putopt Oracle8 &lt;ORACLE_SID&gt; OB2OPTS \&lt;br /&gt;  '-debug 1-200 INSTANCE.txt' -sublist Environment&lt;br /&gt;     - set global environment (debugging in this case)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% /opt/omni/lbin/omnigetmsg&lt;br /&gt;  omnigetmsg &lt;set number&gt; &lt;error number&gt;&lt;br /&gt;     - get an error description for a given error in a given set&lt;br /&gt;  omnigetmsg 12 &lt;error number&gt;&lt;br /&gt;     - Oracle errors are in set 12&lt;br /&gt;  &lt;br /&gt;  Note that the error descriptions tend to be high level &lt;br /&gt;  eg, [12:8324] This Oracle8 Server instance is not configured&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% /opt/omni/bin/utilns/testbase -perform:checkuser&lt;br /&gt;  - verifies permissions of current user&lt;br /&gt;   should run as oracle/dba&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% /opt/omni/lbin/util_oracle8.exe -CHKCONF &lt;ORACLE_SID&gt;&lt;br /&gt;  - check config of Oracle server&lt;br /&gt;&lt;br /&gt;% /opt/omni/sbin/utilns/get_info&lt;br /&gt;  - gather Omniback system info, in preparation for submitting a Omniback &lt;br /&gt;    support call to HP&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;APPENDIX B - PRE-EXEC, POST-EXEC SCRIPTS&lt;br /&gt;==========&lt;br /&gt;When configuring a backup, pre-exec and post-exec scripts can be entered. These&lt;br /&gt;are scripts/commands that are started on the Oracle server prior/post backup.&lt;br /&gt;&lt;br /&gt;ob2rman.exe is called with arguments "-pre &lt;script name&gt; -post &lt;script name&gt;".&lt;br /&gt;&lt;br /&gt;ob2rman.exe then calls the pre/post exec script, which runs as the user that&lt;br /&gt;owns the backup specification (typically oracle/dba).&lt;br /&gt;&lt;br /&gt;The full path name to the script should be entered, such as &lt;br /&gt;/tmp/preexec&lt;br /&gt;where this file contains (for illustrative purposes only):&lt;br /&gt;&lt;br /&gt;    #!/bin/ksh&lt;br /&gt;&lt;br /&gt;    export ORACLE_HOME=/oracle2/OFA_base/app/oracle/product/8.1.7&lt;br /&gt;    export ORACLE_SID=RMAN81T&lt;br /&gt;&lt;br /&gt;    $ORACLE_HOME/bin/sqlplus /nolog &lt;&lt; EOF&lt;br /&gt;    connect sys/change_on_install as SYSDBA&lt;br /&gt;    shutdown&lt;br /&gt;    EOF&lt;br /&gt;&lt;br /&gt;execute permission should be granted&lt;br /&gt;    %chmod +x /tmp/preexec&lt;br /&gt;&lt;br /&gt;The script should set the ORACLE_HOME and ORACLE_SID environment variables. Also,&lt;br /&gt;the full path to sqlplus is given.&lt;br /&gt;&lt;br /&gt;NB. /tmp is not a sensible place for such scripts&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;APPENDIX C - backup script limitations/issues&lt;br /&gt;==========&lt;br /&gt;1. Channel definitions should always be of the form&lt;br /&gt;parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=&lt;ORACLE_SID&gt;,OB2BARLIST=&lt;backup specification name&gt;)';&lt;br /&gt;&lt;br /&gt;2. Omniback limits filesperset to 1&lt;br /&gt;   filesperset=1&lt;br /&gt;&lt;br /&gt;3. Omniback must have the backup file format as&lt;br /&gt;   format '&lt;backup specification name&gt;&lt;&lt;ORACLE_SID&gt;_%s:%t:%p&gt;.dbf'&lt;br /&gt;&lt;br /&gt;The %s:%t:%p substitution variables are mandatory. Other variables can be added.&lt;br /&gt;&lt;br /&gt;4. Omniback supplied backup script templates&lt;br /&gt;   Users should use the supplied scripts with caution. The following are examples&lt;br /&gt;   of bad RMAN practise that have been noted in these scripts:&lt;br /&gt;    i. archive logs switched prior to backup of datafiles, rather than afterwards&lt;br /&gt;       (this seems to have been corrected in Omniback 4.1)&lt;br /&gt;   ii. current archive log not switched and backed up after database/archive &lt;br /&gt;       logs backup&lt;br /&gt;  iii. controlfile not backed up after datafiles and archivelogs, but included&lt;br /&gt;       in database backup instead&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-884184869594751701?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/884184869594751701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=884184869594751701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/884184869594751701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/884184869594751701'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/04/guide-to-configuring-hp-omniback.html' title='Guide to configuring   HP Omniback integration with Oracle RMAN'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-4949060566424284016</id><published>2010-04-01T12:34:00.000-07:00</published><updated>2010-04-01T12:35:29.834-07:00</updated><title type='text'>Find the space used by materialized views using different DBA views</title><content type='html'>USEFUL SCRIPTS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DBA_EXTENTS and DBA_MVIEWS&lt;br /&gt;============================&lt;br /&gt;SQL&gt; select segment_name,sum((BYTES)/(1024*1024)) "Allocated(MB)"&lt;br /&gt;from dba_extents&lt;br /&gt;where segment_name in (select mview_name from dba_mviews)&lt;br /&gt;group by segment_name ;&lt;br /&gt;&lt;br /&gt;DBA_EXTENTS and DBA_OBJECTS&lt;br /&gt;=============================&lt;br /&gt;SQL&gt;select segment_name,sum((BYTES)/(1024*1024)) "Allocated(MB)"&lt;br /&gt;from dba_extents&lt;br /&gt;where segment_name in (select object_name from dba_objects where object_type='MATERIALIZED VIEW')&lt;br /&gt;group by segment_name;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt;select a.object_name, sum(b.bytes)/(1024*1024) "ALLOCATED(MB)"&lt;br /&gt;from dba_objects a, dba_extents b&lt;br /&gt;where a.owner = 'SH' and b.owner ='SH'&lt;br /&gt;and a.object_name = b.segment_name&lt;br /&gt;and a.object_type = 'MATERIALIZED VIEW'&lt;br /&gt;group by object_name;&lt;br /&gt;&lt;br /&gt;DBA_SEGMENTS and DBA_MVIEWS&lt;br /&gt;===============================&lt;br /&gt;SQL&gt;select a.mview_name, sum(b.bytes)/(1024*1024) "ALLOCATED(MB)"&lt;br /&gt;from dba_mviews a, dba_segments b&lt;br /&gt;where a.owner = 'SH' and b.owner = 'SH'&lt;br /&gt;and a.mview_name = b.segment_name&lt;br /&gt;group by mview_name;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DBA_SEGMENTS and DBA_OBJECTS&lt;br /&gt;===============================&lt;br /&gt;SQL&gt;select segment_name,sum((BYTES)/(1024*1024)) "Allocated(MB)"&lt;br /&gt;from dba_segments&lt;br /&gt;where segment_name in (select object_name from dba_objects where object_type='MATERIALIZED VIEW')&lt;br /&gt;group by segment_name;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-4949060566424284016?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/4949060566424284016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=4949060566424284016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/4949060566424284016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/4949060566424284016'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/04/find-space-used-by-materialized-views.html' title='Find the space used by materialized views using different DBA views'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-8938594798568451184</id><published>2010-04-01T12:27:00.000-07:00</published><updated>2010-04-01T12:31:33.578-07:00</updated><title type='text'>Statistics Package (STATSPACK) Guide</title><content type='html'>Goal&lt;br /&gt;&lt;br /&gt;RDBMS version 10g offers a new and improved tool for diagnosing Database Perfromance issues. It is the Automated WorkLoad Repository (AWR).&lt;br /&gt;However, there are still a number of customers using statistics package (statspack) intially introduced in RDBMS version 8.1.&lt;br /&gt;The goal of this document is to further assist customers/engineers when installing and using the database performance tool Statspack.&lt;br /&gt;&lt;br /&gt;During install of the RDBMS product, Oracle stores a document entitled spdoc.txt.&lt;br /&gt;The spdoc.txt file will be located in the following directory upon successful install of the RDBMS product 8.1.7 or higher: $ORACLE_HOME/rdbms/admin/.&lt;br /&gt;The StatsPack README files (spdoc.txt) include specific updated information, and history on this tool as well as platform and release specific information that will help when installing and using this product.&lt;br /&gt;&lt;br /&gt;A number of cutomers do not realize spdoc.txt is available on their systems, or would like to have it available through Oracle's Knowledge Repository for easy access.&lt;br /&gt;Therefore, the latest version, 10.2, spdoc.txt is published in this note.&lt;br /&gt;Please find below spdoc.txt for version 10.2 in it's entirety to help guide you through installation, and the most common issues you may encounter while running statspack.&lt;br /&gt;&lt;br /&gt;Information in this document will help you with all versions of RDBMS statspack product. However, Oracle still suggests you go to your $ORACLE_HOME/rdbms/admin/spdoc.txt to reference your statspack platform and version specific information on running statspack reports (i.e section 4 below).&lt;br /&gt;Solution&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Statistics Package (STATSPACK) README (spdoc.txt)&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;TABLE OF CONTENTS&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;0. Introduction and Terminology&lt;br /&gt;1. Enterprise Manager (EM), Automatic Workload Repository (AWR) and Statspack&lt;br /&gt;2. Statspack Configuration&lt;br /&gt;2.1. Database Space Requirements&lt;br /&gt;2.2. Installing the Tool&lt;br /&gt;2.3. Errors during Installation&lt;br /&gt;3. Gathering data - taking a snapshot&lt;br /&gt;3.1. Automating Statspack Statistics Gathering&lt;br /&gt;3.2. Using dbms_job&lt;br /&gt;4. Running the Performance reports&lt;br /&gt;4.1. Running the instance report&lt;br /&gt;4.2. Running the instance report when there are multiple instances&lt;br /&gt;4.3. Configuring the Instance Report&lt;br /&gt;4.4. Running the SQL report&lt;br /&gt;4.5. Running the SQL report when there are multiple instances&lt;br /&gt;4.6. Configuring the SQL report&lt;br /&gt;4.7. Gathering optimizer statistics on the PERFSTAT schema&lt;br /&gt;5. Configuring the amount of data captured&lt;br /&gt;5.1. Snapshot Level&lt;br /&gt;5.2. Snapshot SQL thresholds&lt;br /&gt;5.3. Changing the default values for Snapshot Level and SQL Thresholds&lt;br /&gt;5.4. Snapshot Levels - details&lt;br /&gt;5.5. Specifying a Session Id&lt;br /&gt;5.6. Input Parameters for the SNAP and&lt;br /&gt;MODIFY_STATSPACK_PARAMETERS procedures&lt;br /&gt;6. Time Units used for Performance Statistics&lt;br /&gt;7. Event Timings&lt;br /&gt;8. Managing and Sharing performance data&lt;br /&gt;8.1. Baselining performance data&lt;br /&gt;8.1.1. Input Parameters for the MAKE_BASELINE and CLEAR_BASELINE&lt;br /&gt;procedure and function which accept Begin and End Snap Ids&lt;br /&gt;8.1.2. Input Parameters for the MAKE_BASELINE and CLEAR_BASELINE&lt;br /&gt;procedure and function which accept Begin and End Dates&lt;br /&gt;8.2. Purging/removing unnecessary data&lt;br /&gt;8.2.1. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept Begin Snap Id and End Snap Id&lt;br /&gt;8.2.2. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept Begin Date and End Date&lt;br /&gt;8.2.3. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept a single Purge Before Date&lt;br /&gt;8.2.4. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept the Number of Days of data to keep&lt;br /&gt;8.2.5. Using sppurge.sql&lt;br /&gt;8.3. Removing all data&lt;br /&gt;8.4. Sharing data via export&lt;br /&gt;9. New and Changed Features&lt;br /&gt;9.1. Changes between 10.1 and 10.2&lt;br /&gt;9.2. Changes between 9.2 and 10.1&lt;br /&gt;9.3. Changes between 9.0 and 9.2&lt;br /&gt;9.4. Changes between 8.1.7 and 9.0&lt;br /&gt;9.5. Changes between 8.1.6 and 8.1.7&lt;br /&gt;10. Compatibility and Upgrading from previous releases&lt;br /&gt;10.1. Compatibility Matrix&lt;br /&gt;10.1.1. Using Statspack shipped with 10.1&lt;br /&gt;10.1.2. Using Statspack shipped with 10.0&lt;br /&gt;10.1.3. Using Statspack shipped with 9.2&lt;br /&gt;10.1.4. Using Statspack shipped with 9.0&lt;br /&gt;10.1.5. Using Statspack shipped with 8.1.7 on 9i releases&lt;br /&gt;10.2. Upgrading an existing Statspack schema to a newer release&lt;br /&gt;10.2.1. Upgrading the Statspack schema from 10.1 to 10.2&lt;br /&gt;10.2.2. Upgrading the Statspack schema from 9.2 to 10.1&lt;br /&gt;10.2.3. Upgrading the Statspack schema from 9.0 to 9.2&lt;br /&gt;10.2.4. Upgrading the Statspack schema from 8.1.7 to 9.0&lt;br /&gt;10.2.5. Upgrading the Statspack schema from 8.1.6 to 8.1.7&lt;br /&gt;10.2.6. Upgrading the Statspack schema from 8.1.6 to 9.2&lt;br /&gt;10.2.7. Upgrading the Statspack schema from 8.1.6 to 9.0&lt;br /&gt;10.2.8. Upgrading the Statspack schema from 8.1.7 to 9.2&lt;br /&gt;11. Oracle Real Application Clusters specific considerations&lt;br /&gt;11.1. Changing Instance Numbers&lt;br /&gt;11.2. Cluster Specific Reports&lt;br /&gt;11.3. Cluster Specific Data&lt;br /&gt;12. Conflicts and differences compared to UTLBSTAT/UTLESTAT&lt;br /&gt;12.1. Running BSTAT/ESTAT in conjunction to Statspack&lt;br /&gt;12.2. Differences between Statspack and BSTAT/ESTAT&lt;br /&gt;13. Removing the package&lt;br /&gt;14. Supplied Scripts Overview&lt;br /&gt;15. Limitations and Modifications&lt;br /&gt;15.1. Limitations&lt;br /&gt;15.2. Modifications&lt;br /&gt;&lt;br /&gt;0. Introduction and Terminology&lt;br /&gt;-----------------------------------&lt;br /&gt;&lt;br /&gt;To effectively perform reactive tuning, it is vital to have an established baseline for later comparison when the system is running poorly. Without a baseline data point, it becomes very difficult to identify what a new problem is attributable to: Has the volume of transactions on the system increased? Has the transaction profile or application changed? Has the&lt;br /&gt;number of users increased?&lt;br /&gt;&lt;br /&gt;Statspack fundamentally differs from the well known UTLBSTAT/UTLESTAT tuning scripts by collecting more information, and also by storing the performance statistics permanently in Oracle tables, which can later be used for reporting and analysis. The data collected can be analyzed using the report provided, which includes an 'instance health and load' summary page, high resource SQL statements, as well as the traditional wait events and initialization parameters.&lt;br /&gt;&lt;br /&gt;Statspack improves on the existing UTLBSTAT/UTLESTAT performance scripts in the following ways:&lt;br /&gt;&lt;br /&gt;- Statspack collects more data, including high resource SQL (and the optimizer execution plans for those statements)&lt;br /&gt;&lt;br /&gt;- Statspack pre-calculates many ratios useful when performance tuning, such as cache hit ratios, per transaction and per&lt;br /&gt;second statistics (many of these ratios must be calculated manually when using BSTAT/ESTAT)&lt;br /&gt;&lt;br /&gt;- Permanent tables owned by PERFSTAT store performance statistics; instead of creating/dropping tables each time, data is inserted into the pre-existing tables. This makes historical data comparisons easier&lt;br /&gt;&lt;br /&gt;- Statspack separates the data collection from the report generation. Data is collected when a 'snapshot' is taken; viewing the data collected is in the hands of the performance engineer when he/she runs the performance report&lt;br /&gt;&lt;br /&gt;- Data collection is easy to automate using either dbms_job or an OS utility&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NOTE: The term 'snapshot' is used to denote a set of statistics gathered at a single time, identified by a unique Id which includes the snapshot number (or snap_id). This term should not be confused with Oracle's Snapshot Replication technology.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How does Statspack work?&lt;br /&gt;&lt;br /&gt;Statspack is a set of SQL, PL/SQL and SQL*Plus scripts which allow the collection, automation, storage and viewing of performance data. A user is automatically created by the installation script - this user, PERFSTAT, owns all objects needed by this package. This user is granted limited query-only privileges on the V$views required for performance tuning.&lt;br /&gt;&lt;br /&gt;Statspack users will become familiar with the concept of a 'snapshot'. 'snapshot' is the term used to identify a single collection of performance data. Each snapshot taken is identified by a 'snapshot id' which is a unique number generated at the time the snapshot is taken; each time a new collection is taken, a new snap_id is generated.&lt;br /&gt;&lt;br /&gt;The snap_id, along with the database identifier (dbid) and instance number (instance_number) comprise the unique key for a snapshot (using this unique combination allows storage of multiple instances of a Clustered database in the same tables).&lt;br /&gt;&lt;br /&gt;Once snapshots are taken, it is possible to run the performance report. The performance report will prompt for the two snapshot id's the report will process. The report produced calculates the activity on the instance between the two snapshot periods specified, in a similar way to the BSTAT/ESTAT report; to compare - the first snap_id supplied can be considered the equivalent of running BSTAT; the second snap_id specified can be considered the equivalent of ESTAT. Unlike BSTAT/ESTAT which can by its nature only compare two static data points, the report can compare any two snapshots specified.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Enterprise Manager (EM), Automatic Workload Repository (AWR) and Statspack&lt;br /&gt;----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Enterprise Manager&lt;br /&gt;------------------&lt;br /&gt;Statspack allows you to capture Oracle instance-related performance data, and report on this data in a textual format.&lt;br /&gt;&lt;br /&gt;For EM managed databases in 9i, Oracle Enterprise Manager uses Statspack data and displays it graphically. Starting with 10g, Enterprise Manager instead uses data collected by the Automatic Workload Repository (AWR). AWR data is internally captured and stored by Oracle 10g databases.&lt;br /&gt;&lt;br /&gt;For more information about Oracle Enterprise Manager visit the Oracle website oracle.com --&gt; Database --&gt; Manageability&lt;br /&gt;&lt;br /&gt;Automatic Workload Repository and Statspack&lt;br /&gt;-------------------------------------------&lt;br /&gt;The Automatic Workload Repository (AWR) is an integrated part of the Oracle server. Its purpose is to collect server-related performance data automatically every 60 minutes (by default) when the statistics_level parameter is set to 'typical' (or 'all'). As the data is collected by the server itself, the Automated Database Diagnostic Monitor (ADDM) component of the server uses this data automatically to diagnose performance issues.&lt;br /&gt;DBAs and performance engineers can access the performance recommendations by using EM, or view the captured data in the AWR report, which is similar to the Statspack Instance report.&lt;br /&gt;&lt;br /&gt;To compare, Statspack is a manually installed and configured set of SQL and PL/SQL scripts which gather performance statistics. The data gathered is used by DBAs and performance engineers to manually diagnose performance&lt;br /&gt;problems.&lt;br /&gt;&lt;br /&gt;The AWR schema was initially based on the Statspack schema, but has since been modified. Because of this shared history, there are some similarities (e.g. concept of a snapshot, similar base tables). However, AWR is separate from Statspack.&lt;br /&gt;&lt;br /&gt;For more information on using AWR, please see the Oracle 10g Server Performance Tuning Guide. For license information regarding AWR, please see the Oracle database Licensing Information Manual.&lt;br /&gt;&lt;br /&gt;If you are going to use AWR instead of Statspack, and you have been using Statspack at your site, it is recommended that you continue to capture Statspack data for a short time (e.g. one month) after the upgrade to 10g. This is because comparing post-upgrade Statspack data to pre-upgrade Statspack data may make diagnosing initial upgrade problems easier to detect.&lt;br /&gt;&lt;br /&gt;WARNING: If you choose to continue Statspack data collection after upgrading to 10g, and statistics_level is set to typical or&lt;br /&gt;all (which enables AWR collection), it is advised to stagger Statspack data collection so it does not coincide with AWR&lt;br /&gt;data collection (AWR data collection is by default is every hour, on the hour). Staggering data collection should be done to avoid the potential for any interference (e.g. stagger data collection by 30 minutes).&lt;br /&gt;&lt;br /&gt;Long term, typically, there is little reason to collect data through both AWR and Statspack. If you choose to use AWR instead of Statspack, you should ensure you should keep a representative set of baselined Statspack data for future reference.&lt;br /&gt;&lt;br /&gt;2. Statspack Configuration&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;2.1. Database Space Requirements&lt;br /&gt;&lt;br /&gt;The amount of database space required by the package will vary considerably based on the frequency of snapshots, the size of the database and instance, and the amount of data collected (which is configurable).&lt;br /&gt;&lt;br /&gt;It is therefore difficult to provide general storage clauses and space utilization predictions that will be accurate at each site.&lt;br /&gt;&lt;br /&gt;Space Requirements&lt;br /&gt;------------------&lt;br /&gt;The default initial and next extent sizes are 100k, 1MB, 3MB or 5MB for all Statspack tables and indexes. To install Statspack, the minimum space requirement is approximately 100MB. However, the amount of space actually allocated will depend on the Tablespace storage characteristics of the tablespace Statspack is installed in (for example, if your minimum&lt;br /&gt;extent size is 10m, then the storage requirement will be considerably more than 100m).&lt;br /&gt;&lt;br /&gt;Using Locally Managed Tablespaces&lt;br /&gt;---------------------------------&lt;br /&gt;If you install the package in a locally-managed tablespace, such as SYSAUX, modifying storage clauses is not required, as the storage characteristics are automatically managed.&lt;br /&gt;&lt;br /&gt;Using Dictionary Managed Tablespaces&lt;br /&gt;------------------------------------&lt;br /&gt;If you install the package in a dictionary-managed tablespace, Oracle suggests you monitor the space used by the objects created, and adjust the storage clauses of the segments, if required.&lt;br /&gt;&lt;br /&gt;2.2. Installing the Tool&lt;br /&gt;&lt;br /&gt;Installation scripts create a user called PERFSTAT, which will own all PL/SQL code and database objects created (including the STATSPACK tables, constraints and the STATSPACK package).&lt;br /&gt;&lt;br /&gt;During the installation you will be prompted for the PERFSTAT user's password and default and temporary tablespaces.&lt;br /&gt;&lt;br /&gt;The default tablespace will be used to create all Statspack objects (such as tables and indexes). Oracle recommend using the&lt;br /&gt;SYSAUX tablespace for the PERFSTAT user's default tablespace; the SYSAUX tablespace will be the tablespace defaulted during the installation, if no other is specified.&lt;br /&gt;&lt;br /&gt;A temporary tablespace is used for workarea activities, such as sorting (for more information on temporary tablespaces, see&lt;br /&gt;the Oracle10g Concepts Manual). The Statspack user's temporary tablespace will be set to the database's default temporary tablespace by the installation, if no other temporary tablespace is specified.&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;o A password for PERFSTAT user is mandatory and there is no default password; if a password is not specified, the installation will abort with an error indicating this is the problem.&lt;br /&gt;&lt;br /&gt;o For security reasons, keep PERFSTAT's password confidential.&lt;br /&gt;&lt;br /&gt;o Do not specify the SYSTEM tablespace for the PERFSTAT users DEFAULT or TEMPORARY tablespaces; if SYSTEM is specified the installation will terminate with an error indicating this is the problem. This is enforced as Oracle does not recommend using the SYSTEM tablespace to store statistics data, nor for workareas. Use the SYSAUX (or a TOOLS) tablespace to store the data, and your instance's TEMPORARY tablespace for workareas.&lt;br /&gt;&lt;br /&gt;o During the installation, the dbms_shared_pool PL/SQL package is created. dbms_shared_pool is used to pin the Statspack&lt;br /&gt;package in the shared pool dbms_job is no longer created as part of the installation, as it is already created by catproc.sql (dbms_job can be used by the DBA to schedule periodic snapshots automatically).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To install the package, either change directory to the ORACLE_HOME rdbms/admin directory, or fully specify the ORACLE_HOME/rdbms/admin directory when calling the installation script, spcreate.&lt;br /&gt;&lt;br /&gt;To run the installation script, you must use SQL*Plus and connect as a user with SYSDBA privilege.&lt;br /&gt;&lt;br /&gt;e.g. Start SQL*Plus, then:&lt;br /&gt;on Unix:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @?/rdbms/admin/spcreate&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;on Windows:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @%ORACLE_HOME%\rdbms\admin\spcreate&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The spcreate install script runs 3 other scripts - you do not need to run these - these scripts are called automatically:&lt;br /&gt;1. spcusr -&gt; creates the user and grants privileges&lt;br /&gt;2. spctab -&gt; creates the tables&lt;br /&gt;3. spcpkg -&gt; creates the package&lt;br /&gt;&lt;br /&gt;Check each of the three output files produced (spcusr.lis, spctab.lis, spcpkg.lis) by the installation to ensure no errors were encountered, before continuing on to the next step.&lt;br /&gt;&lt;br /&gt;Note that there are two ways to install Statspack - interactively (as shown above), or in 'batch' mode; batch mode is useful when you do not wish to be prompted for the PERFSTAT user's password, and default and temporary tablespaces.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Batch mode installation&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;To install in batch mode, you must assign values to the SQL*Plus variables which specify the password and the default and temporary tablespaces before running spcreate.&lt;br /&gt;&lt;br /&gt;The variables are:&lt;br /&gt;perfstat_password -&gt; for the password&lt;br /&gt;default_tablespace -&gt; for the default tablespace&lt;br /&gt;temporary_tablespace -&gt; for the temporary tablespace&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;on Unix:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; define default_tablespace='tools'&lt;br /&gt;SQL&gt; define temporary_tablespace='temp'&lt;br /&gt;SQL&gt; define perfstat_password='erg8oiw'&lt;br /&gt;SQL&gt; @?/rdbms/admin/spcreate&lt;br /&gt;SQL&gt; undefine perfstat_password&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;spcreate will no longer prompt for the above information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.3. Errors during installation&lt;br /&gt;&lt;br /&gt;Specifying SYSTEM tablespace A possible error during installation is to specify the SYSTEM tablespace for the PERFSTAT user's DEFAULT or TEMPORARY tablespace. In such a situation, the installation will fail, stating the problem.&lt;br /&gt;&lt;br /&gt;To install Statspack after receiving errors during the installation To correctly install Statspack after such errors, first run the&lt;br /&gt;de-install script, then the install script. Both scripts must be run from SQL*Plus.&lt;br /&gt;&lt;br /&gt;e.g. Start SQL*Plus, connect as a user with SYSDBA privilege, then:&lt;br /&gt;SQL&gt; @spdrop&lt;br /&gt;SQL&gt; @spcreate&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Gathering data - taking a snapshot&lt;br /&gt;--------------------------------------------------&lt;br /&gt;&lt;br /&gt;The simplest interactive way to take a snapshot is to login to SQL*Plus as the PERFSTAT user, and execute the procedure statspack.snap:&lt;br /&gt;e.g.&lt;br /&gt;SQL&gt; connect perfstat/perfstat_password&lt;br /&gt;SQL&gt; execute statspack.snap;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: In a Clustered database environment, you must connect to the instance you wish to collect data for.&lt;br /&gt;&lt;br /&gt;This will store the current values for the performance statistics in the Statspack tables, and can be used as a baseline snapshot&lt;br /&gt;for comparison with another snapshot taken at a later time.&lt;br /&gt;&lt;br /&gt;For better performance analysis, set the initialization parameter timed_statistics to true; this way, Statspack data collected will include important timing information. The timed_statistics parameter is also dynamically changeable using the 'alter system' command. Timing data is important and is usually required by Oracle support to diagnose performance problems.&lt;br /&gt;&lt;br /&gt;The default level of data collection is level 5. It is possible to change the amount of data captured by changing the snapshot level, and the default thresholds used by Statspack. For information on how to do this, please see the 'Configuring the amount of data captured' section of this file.&lt;br /&gt;&lt;br /&gt;Typically, in the situation where you would like to automate the gathering and reporting phases (such as during a benchmark), you may need to know the snap_id of the snapshot just taken. To take a snapshot and display the snap_id, call the statspack.snap function. Below is an example of calling the snap function using an anonymous PL/SQL block in SQL*Plus:&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;SQL&gt; variable snap number;&lt;br /&gt;SQL&gt; begin :snap := statspack.snap; end;&lt;br /&gt;2 /&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;SQL&gt; print snap&lt;br /&gt;SNAP&lt;br /&gt;----------&lt;br /&gt;12&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.1. Automating Statspack statistics gathering&lt;br /&gt;&lt;br /&gt;To be able to make comparisons of performance from one day, week or year to the next, there must be multiple snapshots taken over a period of time.&lt;br /&gt;&lt;br /&gt;The best method to gather snapshots is to automate the collection on a regular time interval. It is possible to do this:&lt;br /&gt;&lt;br /&gt;- within the database, using the Oracle dbms_job procedure to schedule the snapshots&lt;br /&gt;&lt;br /&gt;- using Operating System utilities. On Unix systems, you could use utilities such as 'cron' or 'at'. On Windows, you could schedule a task (e.g. via Start&gt; Programs&gt; Accessories&gt; System Tools&gt; Scheduled Tasks).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.2. Using dbms_job&lt;br /&gt;&lt;br /&gt;To use an Oracle-automated method for collecting statistics, you can use dbms_job. A sample script on how to do this is supplied in spauto.sql, which schedules a snapshot every hour, on the hour.&lt;br /&gt;&lt;br /&gt;You may wish to schedule snapshots at regular times each day to reflect your system's OLTP and/or batch peak loads. For example take snapshots at 9am, 10am, 11am, 12 midday and 6pm for the OLTP load, then a snapshot at&lt;br /&gt;12 midnight and another at 6am for the batch window.&lt;br /&gt;&lt;br /&gt;In order to use dbms_job to schedule snapshots, the job_queue_processes initialization parameter must be set to a value greater than 0 for the job to run automatically.&lt;br /&gt;&lt;br /&gt;Example of setting the job_queue_processes parameter in an init.ora file:&lt;br /&gt;# Set to enable the job queue process to start. This allows dbms_job&lt;br /&gt;# to schedule automatic statistics collection using STATSPACK&lt;br /&gt;job_queue_processes=1&lt;br /&gt;&lt;br /&gt;If using spauto.sql in a Clustered database environment, the spauto.sql script must be run once on each instance in the cluster. Similarly, the job_queue_processes parameter must also be set for each instance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Changing the interval of statistics collection&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;To change the interval of statistics collection use the dbms_job.interval procedure&lt;br /&gt;e.g.&lt;br /&gt;execute dbms_job.interval(1,'SYSDATE+(1/48)');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Where 'SYSDATE+(1/48)' will result in the statistics being gathered each 1/48th of a day (i.e. every 30 minutes).&lt;br /&gt;&lt;br /&gt;To force the job to run immediately, execute dbms_job.run(&lt;job number&gt;);&lt;br /&gt;&lt;br /&gt;To remove the auto collect job,&lt;br /&gt;execute dbms_job.remove(&lt;job number&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For more information on dbms_job, see the Supplied Packages Reference Manual.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Running the Performance reports&lt;br /&gt;----------------------------------------&lt;br /&gt;&lt;br /&gt;Once snapshots are taken, it is possible to generate a performance report.&lt;br /&gt;&lt;br /&gt;There are two reports available - an Instance report, and a SQL report:&lt;br /&gt;&lt;br /&gt;- The Instance Report (spreport.sql and sprepins.sql) is a general instance health report, covering all aspects of instance&lt;br /&gt;performance. The instance report calculates and prints ratios, increases etc. for all statistics between the two snapshot periods,&lt;br /&gt;in a similar way to the BSTAT/ESTAT report.&lt;br /&gt;&lt;br /&gt;Note: spreport.sql calls sprepins.sql, first defaulting the dbid and instance number of the instance you are connected to. For more information on the difference between sprepins and spreport, see the 'Running the instance report when there are multiple&lt;br /&gt;instances' section of this document.&lt;br /&gt;&lt;br /&gt;- The SQL report (sprepsql.sql and sprsqins.sql) is a report for a specific SQL statement. The SQL report is usually&lt;br /&gt;run after examining the high-load SQL sections of the instance health report. The SQL report provides detailed statistics and data for a single SQL statement (as identified by the Hash Value).&lt;br /&gt;&lt;br /&gt;Note: sprepsql.sql calls sprsqins.sql, first defaulting the dbid and instance number of the instance you are connected to. For more information on the difference between sprsqins and sprepsql, see the 'Running the SQL report when there are multiple instances' section of this document.&lt;br /&gt;&lt;br /&gt;Both reports prompt for the beginning snapshot id, the ending snapshot id, and the report name. The SQL report additionally requests the Hash Value for the SQL statement to be reported on.&lt;br /&gt;&lt;br /&gt;Note: It is not correct to specify begin and end snapshots where the begin snapshot and end snapshot were taken from different instance startups. In other words, the instance must not have been shutdown between the times that the begin and end snapshots were taken.&lt;br /&gt;&lt;br /&gt;We ask that you reference file $ORACLE_HOME/rdbms/admin/spdoc.txt, as mentioned in "Goal" section above, for details on running your specific version of statspack reports.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Configuring the amount of data captured&lt;br /&gt;-----------------------------------------------&lt;br /&gt;&lt;br /&gt;Both the snapshot level, and the thresholds specified will affect the amount of data Statspack captures.&lt;br /&gt;&lt;br /&gt;5.1. Snapshot Level&lt;br /&gt;&lt;br /&gt;It is possible to change the amount of information gathered by the package, by specifying a different snapshot 'level'. In other words, the level chosen (or defaulted) will decide the amount of data collected.&lt;br /&gt;&lt;br /&gt;The higher the snapshot level, the more data is gathered. The default level set by the installation is level 5.&lt;br /&gt;&lt;br /&gt;For typical usage, level 5 snapshot is effective on most sites. There are certain situations when using a level 6 snapshot is beneficial, such as when taking a baseline.&lt;br /&gt;&lt;br /&gt;The events listed below are a subset of events which should prompt taking a new baseline, using level 6:&lt;br /&gt;- when taking the first snapshots&lt;br /&gt;- when a new application is installed, or an application is modified/upgraded&lt;br /&gt;- after gathering optimizer statistics&lt;br /&gt;- before and after upgrading&lt;br /&gt;&lt;br /&gt;The various levels are explained in detail 'Snapshot Levels - details' section of this document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.2. Snapshot SQL thresholds&lt;br /&gt;&lt;br /&gt;There are other parameters which can be configured in addition to the snapshot level.&lt;br /&gt;&lt;br /&gt;These parameters are used as thresholds when collecting data on SQL statements; data will be captured on any SQL statements that breach the specified thresholds.&lt;br /&gt;&lt;br /&gt;Snapshot level and threshold information used by the package is stored in the stats$statspack_parameter table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.3. Changing the default values for Snapshot Level and SQL Thresholds&lt;br /&gt;&lt;br /&gt;If you wish to, you can change the default parameters used for taking snapshots, so that they are tailored to the instance's workload.&lt;br /&gt;&lt;br /&gt;The full list of parameters which can be passed into the modify_statspack_parameter procedure are the same as those for the&lt;br /&gt;snap procedure. These are listed in the 'Input Parameters for the SNAP and MODIFY_STATSPACK_PARAMETERS procedures' section of this document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Temporarily using new values&lt;br /&gt;------------------------------&lt;br /&gt;To temporarily use a snapshot level or threshold which is different to the instance's default snapshot values, simply specify the required threshold or snapshot level when taking the snapshot. This value will only be used for immediate snapshot taken - the new value will not be saved as the default.&lt;br /&gt;&lt;br /&gt;e.g. Take a single level 6 snapshot (do not save level 6 as the default):&lt;br /&gt;SQL&gt; execute statspack.snap(i_snap_level=&gt;6);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Saving new defaults&lt;br /&gt;--------------------&lt;br /&gt;If you wish to save the new value as the instance's default, you can do this either by:&lt;br /&gt;&lt;br /&gt;o Taking a snapshot, and specifying the new defaults to be saved to the database (using statspack.snap, and using the i_modify_parameter input variable).&lt;br /&gt;SQL&gt; execute statspack.snap -&lt;br /&gt;(i_snap_level=&gt;10, i_modify_parameter=&gt;'true');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting the i_modify_parameter value to true will save the new thresholds in the stats$statspack_parameter table; these thresholds will be used for all subsequent snapshots.&lt;br /&gt;&lt;br /&gt;If the i_modify_parameter was set to false or if it were omitted, the new parameter values would not be saved. Only the snapshot taken at that point will use the specified values, any subsequent snapshots will use the preexisting values in the stats$statspack_parameter table.&lt;br /&gt;&lt;br /&gt;o Changing the defaults immediately without taking a snapshot, using the statspack.modify_statspack_parameter procedure. For example to change the snapshot level to 10, and the SQL thresholds for buffer_gets and disk_reads, the following statement can be issued:&lt;br /&gt;&lt;br /&gt;SQL&gt; execute statspack.modify_statspack_parameter -&lt;br /&gt;(i_snap_level=&gt;10, i_buffer_gets_th=&gt;10000, i_disk_reads_th=&gt;1000);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This procedure changes the values permanently, but does not take a snapshot.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.4 Snapshot Levels - details&lt;br /&gt;&lt;br /&gt;Levels &gt;= 0 General performance statistics Statistics gathered:&lt;br /&gt;This level and any level greater than 0 collects general performance statistics, such as: wait statistics, system events,&lt;br /&gt;system statistics, rollback segment data, row cache, SGA, background events, session events, lock statistics, buffer pool statistics,&lt;br /&gt;latch statistics, resource limit, enqueue statistics, and statistics for each of the following, if enabled: automatic undo management, buffer cache advisory data, auto PGA memory management, Cluster DB statistics.&lt;br /&gt;&lt;br /&gt;Levels &gt;= 5 Additional data: SQL Statements&lt;br /&gt;&lt;br /&gt;This level includes all statistics gathered in the lower level(s),&lt;br /&gt;and additionally gathers the performance data on high resource usage SQL statements.&lt;br /&gt;&lt;br /&gt;In a level 5 snapshot (or above), note that the time required for the snapshot to complete is dependent on the shared_pool_size and on the number of SQL statements in the shared pool at the time the snapshot is taken: the larger the shared pool, the longer the time taken to complete the snapshot.&lt;br /&gt;&lt;br /&gt;SQL 'Thresholds'&lt;br /&gt;The SQL statements gathered by Statspack are those which exceed one of six predefined threshold parameters:&lt;br /&gt;- number of executions of the SQL statement (default 100)&lt;br /&gt;&lt;br /&gt;- number of disk reads performed by the SQL statement (default 1,000)&lt;br /&gt;- number of parse calls performed by the SQL statement (default 1,000)&lt;br /&gt;- number of buffer gets performed by the SQL statement (default 10,000)&lt;br /&gt;- size of sharable memory used by the SQL statement (default 1m)&lt;br /&gt;- version count for the SQL statement (default 20)&lt;br /&gt;&lt;br /&gt;The values of each of these threshold parameters are used when deciding which SQL statements to collect - if a SQL statement's resource usage exceeds any one of the above threshold values, it is captured during the snapshot.&lt;br /&gt;&lt;br /&gt;The SQL threshold levels used are either those stored in the table stats$statspack_parameter, or by the thresholds specified when the snapshot is taken.&lt;br /&gt;&lt;br /&gt;Levels &gt;= 6 Additional data: SQL Plans and SQL Plan usage&lt;br /&gt;&lt;br /&gt;This level includes all statistics gathered in the lower level(s),&lt;br /&gt;and additionally gathers optimizer execution plans, and plan usage data for each of the high resource usage SQL statements captured.&lt;br /&gt;&lt;br /&gt;A level 6 snapshot gathers information which is invaluable when determining whether the execution plan used for a SQL statement has changed. Therefore level 6 snapshots should be used whenever there is the possibility a plan may change, such as after large data loads, or after gathering new optimizer statistics.&lt;br /&gt;&lt;br /&gt;To capture the plan for a SQL statement, the statement must be in the shared pool at the time the snapshot is taken, and must exceed one of the SQL thresholds. To gather plans for all statements in the shared pool, you can temporarily specify the executions threshold (i_executions_th) to be zero (0) for those snapshots. For information on how to do this, see the 'Changing the default values for Snapshot Level and SQL Thresholds' section of this document.&lt;br /&gt;&lt;br /&gt;Levels &gt;= 7 Additional data: Segment level statistics&lt;br /&gt;This level includes all statistics gathered in the lower level(s), and additionally gathers the performance data on highly used segments.&lt;br /&gt;&lt;br /&gt;A level 7 snapshot captures Segment-level statistics for segments which are heavily accessed or heavily contended for.&lt;br /&gt;&lt;br /&gt;Segment-level statistics captured are:&lt;br /&gt;- logical reads&lt;br /&gt;- db block changes&lt;br /&gt;- physical reads&lt;br /&gt;- physical writes&lt;br /&gt;- physical reads direct&lt;br /&gt;- physical writes direct&lt;br /&gt;- global cache cr blocks served *&lt;br /&gt;- global cache current blocks served *&lt;br /&gt;- buffer busy waits&lt;br /&gt;- ITL waits&lt;br /&gt;- row lock waits&lt;br /&gt;&lt;br /&gt;* Denotes the Statistic is Real Application Clusters specific.&lt;br /&gt;&lt;br /&gt;There are many uses for segment-specific statistics. Below are three examples:&lt;br /&gt;- The statistics relating to physical reads and writes can help you decide to modify the physical layout of some segments (or of the tablespaces they reside in). For example, to better spread the segment IO load, you can add files residing on different disks to a tablespace storing a heavily accessed segment, or you can (re)partition a segment.&lt;br /&gt;- High numbers of ITL waits for a specific segment may indicate a need to change segment storage attributes such as PCTFREE and/or INITRANS.&lt;br /&gt;- In a Real Application Clusters database, global cache statistics make it easy to spot the segments responsible for much of the&lt;br /&gt;cross-instance traffic.&lt;br /&gt;&lt;br /&gt;Although Statspack captures all segment statistics, it only displays the following statistics in the Instance report:&lt;br /&gt;- logical reads&lt;br /&gt;- physical reads&lt;br /&gt;- buffer busy waits&lt;br /&gt;- ITL waits&lt;br /&gt;- row lock waits&lt;br /&gt;- global cache cr blocks served *&lt;br /&gt;- global cache current blocks served *&lt;br /&gt;&lt;br /&gt;Segment statistics 'Thresholds'&lt;br /&gt;The segments for which statistics are gathered are those whose statistics exceed one of the following seven threshold parameters:&lt;br /&gt;- number of logical reads on the segment (default 10000)&lt;br /&gt;- number of physical reads on the segment (default 1000)&lt;br /&gt;- number of buffer busy waits on the segment (default 100)&lt;br /&gt;- number of row lock waits on the segment (default 100)&lt;br /&gt;- number of ITL waits on the segment (default 100)&lt;br /&gt;- number of global cache Consistent Read blocks served* (default 1000)&lt;br /&gt;- number of global cache CUrrent blocks served* (default 1000)&lt;br /&gt;&lt;br /&gt;The values of each of these thresholds are used when deciding which segments to collect statistics for. If any segment's statistic value exceeds its corresponding threshold value, all statistics for this segment are captured.&lt;br /&gt;&lt;br /&gt;The threshold levels used are either those stored in the table stats$statspack_parameter, or by the thresholds specified when&lt;br /&gt;the snapshot is taken.&lt;br /&gt;&lt;br /&gt;Levels &gt;= 10 Additional statistics: Parent and Child latches&lt;br /&gt;This level includes all statistics gathered in the lower levels, and additionally gathers Parent and Child Latch information. Data&lt;br /&gt;gathered at this level can sometimes cause the snapshot to take longer to complete i.e. this level can be resource intensive, and should only be used when advised by Oracle personnel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.5. Specifying a Session Id&lt;br /&gt;&lt;br /&gt;If you would like to gather session statistics and wait events for a particular session (in addition to the instance statistics and wait events), it is possible to specify the session id in the call to Statspack. The statistics gathered for the session will include session statistics, session events and lock activity. The default behaviour is to not to gather session level statistics.&lt;br /&gt;SQL&gt; execute statspack.snap(i_session_id=&gt;3);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that in order for session statistics to be included in the report output, the session's serial number (serial#) must be the same in the begin and end snapshot. If the serial numbers differ, it means the session is not the same session, so it is not valid to generate session statistics. If the serial numbers differ, the following warning will appear (after the begin/end snapshot has been entered by the user) to signal the session statistics cannot be printed:&lt;br /&gt;&lt;br /&gt;WARNING: SESSION STATISTICS WILL NOT BE PRINTED, as session statistics captured in begin and end snapshots are for different sessions (Begin Snap sid,serial#: 10,752, End Snap sid,serial#: 10,754).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.6. Input Parameters for the SNAP and MODIFY_STATSPACK_PARAMETERS procedures&lt;br /&gt;&lt;br /&gt;Parameters able to be passed in to the statspack.snap and statspack.modify_statspack_parameter procedures are as follows:&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;&lt;br /&gt;---------------------------------------------------&lt;br /&gt;i_snap_level                                0,5,6,7,10 5                            Snapshot Level&lt;br /&gt;i_ucomment                                Text &lt;blank&gt;                            Comment to be stored with Snapshot&lt;br /&gt;i_executions_th                           Integer &gt;=0 100                        SQL Threshold: number of times the statement was executed&lt;br /&gt;i_disk_reads_th                          Integer &gt;=0 1,000                     SQL Threshold: number of disk reads the statement made&lt;br /&gt;i_parse_calls_th                          Integer &gt;=0 1,000                   SQL Threshold: number of parse&lt;br /&gt;calls the statement made&lt;br /&gt;i_buffer_gets_th Integer &gt;=0 10,000 SQL Threshold: number of buffer&lt;br /&gt;gets the statement made&lt;br /&gt;i_sharable_mem_th Integer &gt;=0 1048576 SQL Threshold: amount of sharable&lt;br /&gt;memory&lt;br /&gt;i_version_count_th Integer &gt;=0 20 SQL Threshold: number of versions&lt;br /&gt;of a SQL statement&lt;br /&gt;i_seg_phy_reads_th Integer &gt;=0 1,000 Segment statistic Threshold: number&lt;br /&gt;of physical reads on a segment.&lt;br /&gt;i_seg_log_reads_th Integer &gt;=0 1,0000 Segment statistic Threshold: number&lt;br /&gt;of logical reads on a segment.&lt;br /&gt;i_seg_buff_busy_th Integer &gt;=0 100 Segment statistic Threshold: number&lt;br /&gt;of buffer busy waits for a segment.&lt;br /&gt;i_seg_rowlock_w_th Integer &gt;=0 100 Segment statistic Threshold: number&lt;br /&gt;of row lock waits for a segment.&lt;br /&gt;i_seg_itl_waits_th Integer &gt;=0 100 Segment statistic Threshold: number&lt;br /&gt;of ITL waits for a segment.&lt;br /&gt;i_seg_cr_bks_sd_th Integer &gt;=0 1000 Segment statistic Threshold: number&lt;br /&gt;of Consistent Reads blocks served by&lt;br /&gt;the instance for the segment*.&lt;br /&gt;i_seg_cu_bks_sd_th Integer &gt;=0 1000 Segment statistic Threshold: number&lt;br /&gt;of CUrrent blocks served by the&lt;br /&gt;instance for the segment*.&lt;br /&gt;i_session_id Valid sid 0 (no Session Id of the Oracle Session&lt;br /&gt;from session) to capture session granular&lt;br /&gt;v$session statistics for&lt;br /&gt;i_modify_parameter True,False False Save the parameters specified for&lt;br /&gt;future snapshots?  &lt;br /&gt;&lt;br /&gt;6. Time Units used for Performance Statistics&lt;br /&gt;--------------------------------------------------&lt;br /&gt;&lt;br /&gt;Oracle now supports capturing certain performance data with millisecond and&lt;br /&gt;microsecond granularity.&lt;br /&gt;&lt;br /&gt;Views which include microsecond timing include:&lt;br /&gt;- v$session_wait, v$system_event, v$session_event (time_waited_micro column)&lt;br /&gt;- v$sql, v$sqlarea (cpu_time, elapsed_time columns)&lt;br /&gt;- v$latch, v$latch_parent, v$latch_children (wait_time column)&lt;br /&gt;- v$sql_workarea, v$sql_workarea_active (active_time column)&lt;br /&gt;&lt;br /&gt;Views which include millisecond timings include:&lt;br /&gt;- v$enqueue_stat (cum_wait_time)&lt;br /&gt;&lt;br /&gt;Note that existing columns in other views continue to capture centi-second&lt;br /&gt;times.&lt;br /&gt;&lt;br /&gt;As centi-second and microsecond timing may not be appropriate for rolled&lt;br /&gt;up data such as that displayed by Statspack, Statspack displays most&lt;br /&gt;cumulative times in seconds, and average times in milliseconds (for easier&lt;br /&gt;comparison with Operating System monitoring utilities which often report&lt;br /&gt;timings in milliseconds).&lt;br /&gt;&lt;br /&gt;For clarity, the time units used are specified in the column headings of&lt;br /&gt;each timed column in the Statspack report. The convention used is:&lt;br /&gt;(s) - a second&lt;br /&gt;(cs) - a centisecond - which is 100th of a second&lt;br /&gt;(ms) - a millisecond - which is 1,000th of a second&lt;br /&gt;(us) - a microsecond - which is 1,000,000th of a second&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Event Timings&lt;br /&gt;-----------------&lt;br /&gt;If timings are available, the Statspack report will order wait events by time&lt;br /&gt;(in the Top-5 and background and foreground Wait Events sections).&lt;br /&gt;&lt;br /&gt;If timed_statistics is false for the instance, however a subset of users or&lt;br /&gt;programs set timed_statistics set to true dynamically, the Statspack report&lt;br /&gt;output may look inconsistent, where some events have timings (those which the&lt;br /&gt;individual programs/users waited for), and the remaining events do not.&lt;br /&gt;The Top-5 section will also look unusual in this situation.&lt;br /&gt;&lt;br /&gt;Optimally, timed_statistics should be set to true at the instance level for&lt;br /&gt;ease of diagnosing performance problems.&lt;br /&gt;&lt;br /&gt;8. Managing and Sharing performance data&lt;br /&gt;-----------------------------------------&lt;br /&gt;&lt;br /&gt;8.1. Baselining performance data&lt;br /&gt;&lt;br /&gt;It is possible to identify snapshot data worthy of keeping, which will not&lt;br /&gt;be purged by the Statspack purge. This is called baselining. Once you have&lt;br /&gt;determined which snap Ids or times of day most represent a particular&lt;br /&gt;workload whose performance data you would like to keep, you can mark the&lt;br /&gt;data representing those times as baselines. Baselined snapshots will not&lt;br /&gt;be purged by the Statspack purge.&lt;br /&gt;&lt;br /&gt;If you later decide you no longer want to keep previously baselined&lt;br /&gt;snapshots, you can clear the baseline (clearing the baseline does not&lt;br /&gt;remove the data, it just identifies the data as candidates for purging).&lt;br /&gt;&lt;br /&gt;NOTE: Statspack baseline does not perform any consistency checks on the&lt;br /&gt;snapshots requested to be baselined (e.g. it does not check whether&lt;br /&gt;the specified baselines span an instance shutdown). Instead, the&lt;br /&gt;baseline feature merely marks Snapshot rows as worthy of keeping,&lt;br /&gt;while other data can be purged.&lt;br /&gt;&lt;br /&gt;New procedures and functions have been added to the Statspack package to&lt;br /&gt;make and clear baselines: MAKE_BASELINE, and CLEAR_BASELINE. Both of these&lt;br /&gt;are able to accept varying parameters (e.g. snap Ids, or dates, etc), and&lt;br /&gt;can be called either as a procedure, or as a function (the function returns&lt;br /&gt;the number of rows operated on, whereas the procedure does not).&lt;br /&gt;&lt;br /&gt;Snap Ids or Begin/End dates&lt;br /&gt;---------------------------&lt;br /&gt;The Statspack MAKE_BASELINE procedures and functions provide flexibility in&lt;br /&gt;the manner baselines are made or cleared. These can take various input&lt;br /&gt;parameters:&lt;br /&gt;&lt;br /&gt;- Begin Snap Id and End Snap Id&lt;br /&gt;&lt;br /&gt;A begin and end snap Id pair can be specified. In this case, you choose&lt;br /&gt;either to baseline the range of snapshots between the begin and end&lt;br /&gt;snapshot pair, or just the two snapshots. The default is to baseline&lt;br /&gt;the entire range of snapshots.&lt;br /&gt;&lt;br /&gt;- Begin Date and End Date&lt;br /&gt;&lt;br /&gt;A begin and end date pair can be specified. All snapshots which fall in&lt;br /&gt;the date range specified will be marked as baseline data.&lt;br /&gt;&lt;br /&gt;Similarly to the MAKE_BASELINE procedures and functions, the CLEAR_BASELINE&lt;br /&gt;procedures and functions accept the same arguments.&lt;br /&gt;&lt;br /&gt;Procedure or Function&lt;br /&gt;---------------------&lt;br /&gt;It is possible to call either the MAKE_BASELINE procedure, or the&lt;br /&gt;MAKE_BASELINE function. The only difference is the MAKE_BASELINE function&lt;br /&gt;returns the number of snapshots baselined, whereas the MAKE_BASELINE&lt;br /&gt;procedure does not.&lt;br /&gt;Similarly, the CLEAR_BASELINE procedure performs the same task as the&lt;br /&gt;CLEAR_BASELINE function, however the function returns the number of&lt;br /&gt;baselined snapshots which were cleared (i.e. no longer identified as&lt;br /&gt;baselines).&lt;br /&gt;&lt;br /&gt;8.1.1. Input Parameters for the MAKE_BASELINE and CLEAR_BASELINE&lt;br /&gt;procedure and function which accept Begin and End Snap Ids&lt;br /&gt;&lt;br /&gt;This section describes the input parameters for the MAKE_BASELINE and&lt;br /&gt;CLEAR_BASELINE procedure and function which accept Snap Ids. The input&lt;br /&gt;parameters for both MAKE and CLEAR baseline are identical. The&lt;br /&gt;procedures/functions will either baseline (or clear the baseline for) the&lt;br /&gt;range of snapshots between the begin and end snap Ids identified (the&lt;br /&gt;default), or if i_snap_range parameter is FALSE, will only operate on&lt;br /&gt;the two snapshots specified.&lt;br /&gt;If the function is called, it will return the number of snapshots&lt;br /&gt;operated on.&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;------------------ ----------------- ------- -------------------------------&lt;br /&gt;i_begin_snap Any Valid Snap Id - SnapId to start the baseline at&lt;br /&gt;i_end_snap Any valid Snap Id - SnapId to end the baseline at&lt;br /&gt;i_snap_range TRUE/FALSE TRUE Should the range of snapshots&lt;br /&gt;between the begin and end snap&lt;br /&gt;be included?&lt;br /&gt;i_dbid | Any valid DBId/ Current Caters for RAC databases&lt;br /&gt;i_instance_number | inst number DBId/ where you may wish to baseline&lt;br /&gt;combination Inst # snapshots on one instance&lt;br /&gt;in this which were physically taken&lt;br /&gt;Statspack on another instance&lt;br /&gt;schema&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;To make a baseline of snaps 45 and 50 including the range of snapshots&lt;br /&gt;in between (and you do not wish to know the number of snapshots&lt;br /&gt;baselined, so call the MAKE_BASELINE procedure). Log into the PERFSTAT&lt;br /&gt;user in SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.make_baseline -&lt;br /&gt;(i_begin_snap =&gt; 45, -&lt;br /&gt;i_end_snap =&gt; 50);&lt;br /&gt;&lt;br /&gt;Or without specifying the parameter names:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.make_baseline(45, 50);&lt;br /&gt;&lt;br /&gt;Example 2:&lt;br /&gt;To make a baseline of snaps 1237 and 1241 (including the range of&lt;br /&gt;snapshots in between), and be informed of the number of snapshots&lt;br /&gt;baselined (by calling the function), log into the PERFSTAT&lt;br /&gt;user in SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; variable num_snaps number;&lt;br /&gt;SQL&gt; begin&lt;br /&gt;SQL&gt; :num_snaps := statspack.make_baseline(1237, 1241);&lt;br /&gt;SQL&gt; end;&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; print num_snaps&lt;br /&gt;&lt;br /&gt;Example 3:&lt;br /&gt;To make a baseline of only snapshots 1237 and 1241 (excluding the&lt;br /&gt;snapshots in between), log into the PERFSTAT user in SQL*Plus,&lt;br /&gt;and:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.make_baseline(5, 12, false);&lt;br /&gt;&lt;br /&gt;All of the prior examples apply equally to CLEAR_BASELINE.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.1.2. Input Parameters for the MAKE_BASELINE and CLEAR_BASELINE&lt;br /&gt;procedure and function which accept Begin and End Dates&lt;br /&gt;&lt;br /&gt;The input parameters for the MAKE_BASELINE and CLEAR_BASELINE procedure and&lt;br /&gt;function which accept begin and end dates are identical. The procedures/&lt;br /&gt;functions will either baseline (or clear the baseline for) all snapshots&lt;br /&gt;which were taken between the begin and end dates identified.&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;------------------ ----------------- ------- -------------------------------&lt;br /&gt;i_begin_date Any valid date - Date to start the baseline at&lt;br /&gt;i_end_date Any valid date &gt; - Date to end baseline at&lt;br /&gt;begin date&lt;br /&gt;i_dbid | Any valid DBId/ Current Caters for RAC databases&lt;br /&gt;i_instance_number | inst number DBId/ where you may wish to baseline&lt;br /&gt;combination Inst # snapshots on one instance&lt;br /&gt;in this which were physically taken&lt;br /&gt;Statspack on another instance&lt;br /&gt;schema&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;To make a baseline of snapshots taken between 12-Feb-2003 at 9am, and&lt;br /&gt;12-Feb-2003 at 12 midday (and be informed of the number of snapshots&lt;br /&gt;affected), call the MAKE_BASELINE function. Log into the PERFSTAT&lt;br /&gt;user in SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; variable num_snaps number;&lt;br /&gt;SQL&gt; begin&lt;br /&gt;SQL&gt; :num_snaps := statspack.make_baseline&lt;br /&gt;(to_date('12-FEB-2003 09:00','DD-MON-YYYY HH24:MI'),&lt;br /&gt;to_date('12-FEB-2003 12:00','DD-MON-YYYY HH24:MI'));&lt;br /&gt;SQL&gt; end;&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; print num_snaps&lt;br /&gt;&lt;br /&gt;Example 2:&lt;br /&gt;To clear an existing baseline which covers the times 13-Dec-2002 at&lt;br /&gt;11pm and 14-Dec-2002 at 2am (without wanting to know how many&lt;br /&gt;snapshots were affected), log into the PERFSTAT user in SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.clear_baseline -&lt;br /&gt;(to_date('13-DEC-2002 23:00','DD-MON-YYYY HH24:MI'), -&lt;br /&gt;to_date('14-FEB-2002 02:00','DD-MON-YYYY HH24:MI'));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.2. Purging/removing unnecessary data&lt;br /&gt;&lt;br /&gt;It is possible to purge unnecessary data from the PERFSTAT schema using the&lt;br /&gt;PURGE procedures/functions. Any Baselined snapshots will not be purged.&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;o It is good practice to ensure you have sufficient baselined snapshots&lt;br /&gt;before purging data.&lt;br /&gt;o It is recommended you export the schema as a backup before running this&lt;br /&gt;script, either using your own export parameters, or those provided in&lt;br /&gt;spuexp.par&lt;br /&gt;o WARNING: It is no longer possible to rollback a requested purge operation.&lt;br /&gt;o The functionality which was in the sppurge.sql SQL script has been moved&lt;br /&gt;into the STATSPACK package. Moving the purge functionality into the&lt;br /&gt;STATSPACK package has allowed significantly more flexibility in how&lt;br /&gt;the data to be purged can be specified by the performance engineer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Purge Criteria for the STATSPACK PURGE procedures and functions&lt;br /&gt;---------------------------------------------------------------&lt;br /&gt;Data to be purged can either be specified by:&lt;br /&gt;&lt;br /&gt;- Begin Snap Id and End Snap Id&lt;br /&gt;&lt;br /&gt;A begin and end snap Id pair can be specified. In this case, you choose&lt;br /&gt;either to purge the range of snapshots between the begin and end&lt;br /&gt;snapshot pair (inclusive, which is the default), or just the two&lt;br /&gt;snapshots specified.&lt;br /&gt;The preexisting Statspack sppurge.sql SQL script has been modified to&lt;br /&gt;use this PURGE procedure (which purges by begin/end snap Id range).&lt;br /&gt;&lt;br /&gt;- Begin Date and End Date&lt;br /&gt;&lt;br /&gt;A begin and end date pair can be specified. All snapshots which were&lt;br /&gt;taken between the begin and end date will be purged.&lt;br /&gt;&lt;br /&gt;- Purge before date&lt;br /&gt;&lt;br /&gt;All snapshots which were taken before the specified date will be purged.&lt;br /&gt;&lt;br /&gt;- Number of days (N)&lt;br /&gt;&lt;br /&gt;All snapshots which were taken N or more days prior to the current date&lt;br /&gt;and time (i.e. SYSDATE) will be purged.&lt;br /&gt;&lt;br /&gt;Extended Purge&lt;br /&gt;--------------&lt;br /&gt;In prior releases, Statspack identifier tables which contained SQL Text,&lt;br /&gt;SQL Execution plans, and Segment identifiers were not purged.&lt;br /&gt;&lt;br /&gt;It is now possible to purge the unreferenced data in these tables. This is&lt;br /&gt;done by requesting the 'extended purge' be performed at the same time as&lt;br /&gt;the normal purge. Requesting the extended purge be performed along with a&lt;br /&gt;normal purge is simply a matter of setting the input parameter&lt;br /&gt;i_extended_purge to TRUE when calling the regular purge.&lt;br /&gt;&lt;br /&gt;Purging this data may be resource intensive, so you may choose to perform&lt;br /&gt;an extended purge less frequently than the normal purge.&lt;br /&gt;&lt;br /&gt;Procedure or Function&lt;br /&gt;---------------------&lt;br /&gt;Each of the purge procedures has a corresponding function. The function&lt;br /&gt;performs the same task as the procedure, but returns the number of&lt;br /&gt;Snapshot rows purged (whereas the procedure does not).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.2.1. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept Begin Snap Id and End Snap Id&lt;br /&gt;&lt;br /&gt;This section describes the input parameters for the PURGE procedure and&lt;br /&gt;function which accept Snap Ids. The input parameters for both procedure&lt;br /&gt;and function are identical. The procedure/function will purge all&lt;br /&gt;snapshots between the begin and end snap Ids identified (inclusive, which&lt;br /&gt;is the default), or if i_snap_range parameter is FALSE, will only purge&lt;br /&gt;the two snapshots specified. If i_extended_purge is TRUE, an extended purge&lt;br /&gt;is also performed.&lt;br /&gt;If the function is called, it will return the number of snapshots purged.&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;------------------ ----------------- ------- -------------------------------&lt;br /&gt;i_begin_snap Any Valid Snap Id - SnapId to start purging from&lt;br /&gt;i_end_snap Any valid Snap Id - SnapId to end purging at&lt;br /&gt;i_snap_range TRUE/FALSE TRUE Should the range of snapshots&lt;br /&gt;between the begin and end snap&lt;br /&gt;be included?&lt;br /&gt;i_extended_purge TRUE/FALSE FALSE Determines whether unused&lt;br /&gt;SQL Text, SQL Plans and&lt;br /&gt;Segment Identifiers will be&lt;br /&gt;purged in addition to the&lt;br /&gt;normal data purged&lt;br /&gt;i_dbid | Any valid DBId/ Current Caters for RAC databases&lt;br /&gt;i_instance_number | inst number DBId/ where you may wish to baseline&lt;br /&gt;combination Inst # snapshots on one instance&lt;br /&gt;in this which were physically taken&lt;br /&gt;Statspack on another instance&lt;br /&gt;schema&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;Purge all snapshots between the specified begin and end snap ids. Also&lt;br /&gt;purge unused SQL Text, SQL Plans and Segment Identifiers, and&lt;br /&gt;return the number of snapshots purged. Log into the PERFSTAT user&lt;br /&gt;in SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; variable num_snaps number;&lt;br /&gt;SQL&gt; begin&lt;br /&gt;SQL&gt; :num_snaps := statspack.purge&lt;br /&gt;( i_begin_snap=&gt;1237, i_end_snap=&gt;1241&lt;br /&gt;, i_extended_purge=&gt;TRUE);&lt;br /&gt;SQL&gt; end;&lt;br /&gt;SQL&gt; /&lt;br /&gt;SQL&gt; print num_snaps&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.2.2. Input Parameters for the PURGE procedures and functions&lt;br /&gt;which accept Begin Date and End Date&lt;br /&gt;&lt;br /&gt;This section describes the input parameters for the PURGE procedure and&lt;br /&gt;function which accept a begin date and an end date. The procedure/&lt;br /&gt;function will purge all snapshots taken between the specified begin and&lt;br /&gt;end dates. The input parameters for both procedure and function are&lt;br /&gt;identical. If i_extended_purge is TRUE, an extended purge is also performed.&lt;br /&gt;If the function is called, it will return the number of snapshots purged.&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;------------------ ----------------- ------- -------------------------------&lt;br /&gt;i_begin_date Date - Date to start purging from&lt;br /&gt;i_end_date End date &gt; begin - Date to end purging at&lt;br /&gt;date - SnapId to end the baseline at&lt;br /&gt;i_extended_purge TRUE/FALSE FALSE Determines whether unused&lt;br /&gt;SQL Text, SQL Plans and&lt;br /&gt;Segment Identifiers will be&lt;br /&gt;purged in addition to the&lt;br /&gt;normal data purged&lt;br /&gt;i_dbid | Any valid DBId/ Current Caters for RAC databases&lt;br /&gt;i_instance_number | inst number DBId/ where you may wish to baseline&lt;br /&gt;combination Inst # snapshots on one instance&lt;br /&gt;in this which were physically taken&lt;br /&gt;Statspack on another instance&lt;br /&gt;schema&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;Purge all snapshots which fall between 01-Jan-2003 and 02-Jan-2003.&lt;br /&gt;Also perform an extended purge. Log into the PERFSTAT user in&lt;br /&gt;SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.purge -&lt;br /&gt;(i_begin_date=&gt;to_date('01-JAN-2003', 'DD-MON-YYYY'), -&lt;br /&gt;i_end_date =&gt;to_date('02-JAN-2003', 'DD-MON-YYYY'), -&lt;br /&gt;i_extended_purge=&gt;TRUE);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.2.3. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept a single Purge Before Date&lt;br /&gt;&lt;br /&gt;This section describes the input parameters for the PURGE procedure and&lt;br /&gt;function which accept a single date. The procedure/function will purge&lt;br /&gt;all snapshots older than the date specified. If i_extended_purge is TRUE,&lt;br /&gt;also perform an extended purge. The input parameters for both&lt;br /&gt;procedure and function are identical.&lt;br /&gt;If the function is called, it will return the number of snapshots purged.&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;------------------ ----------------- ------- -------------------------------&lt;br /&gt;i_purge_before_date Date - Snapshots older than this date&lt;br /&gt;will be purged&lt;br /&gt;i_extended_purge TRUE/FALSE FALSE Determines whether unused&lt;br /&gt;SQL Text, SQL Plans and&lt;br /&gt;Segment Identifiers will be&lt;br /&gt;purged in addition to the&lt;br /&gt;normal data purged.&lt;br /&gt;i_dbid | Any valid DBId/ Current Caters for RAC databases&lt;br /&gt;i_instance_number | inst number DBId/ where you may wish to baseline&lt;br /&gt;combination Inst # snapshots on one instance&lt;br /&gt;in this which were physically taken&lt;br /&gt;Statspack on another instance&lt;br /&gt;schema&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;To purge data older than a specified date, without wanting to know the&lt;br /&gt;number of snapshots purged, log into the PERFSTAT user in SQL*Plus,&lt;br /&gt;and:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.purge(to_date('31-OCT-2002','DD-MON-YYYY'));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.2.4. Input Parameters for the PURGE procedure and function&lt;br /&gt;which accept the Number of Days of data to keep&lt;br /&gt;&lt;br /&gt;This section describes the input parameters for the PURGE procedure and&lt;br /&gt;function which accept the number of days of snapshots to keep. All data&lt;br /&gt;older than the specified number of days will be purged. The input&lt;br /&gt;parameters for both procedure and function are identical. If&lt;br /&gt;i_extended_purge is TRUE, also perform an extended purge.&lt;br /&gt;If the function is called, it will return the number of snapshots purged.&lt;br /&gt;&lt;br /&gt;Range of Default&lt;br /&gt;Parameter Name Valid Values Value Meaning&lt;br /&gt;------------------ ----------------- ------- -------------------------------&lt;br /&gt;i_num_days Number &gt; 0 - Snapshots older than this&lt;br /&gt;number of days will be purged&lt;br /&gt;i_extended_purge TRUE/FALSE FALSE Determines whether unused&lt;br /&gt;SQL Text, SQL Plans and&lt;br /&gt;Segment Identifiers will be&lt;br /&gt;purged in addition to the&lt;br /&gt;normal data purged&lt;br /&gt;i_dbid | Any valid DBId/ Current Caters for RAC databases&lt;br /&gt;i_instance_number | inst number DBId/ where you may wish to baseline&lt;br /&gt;combination Inst # snapshots on one instance&lt;br /&gt;in this which were physically taken&lt;br /&gt;Statspack on another instance&lt;br /&gt;schema&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;To purge data older than 31 days, without wanting to know the number&lt;br /&gt;of snapshots operated on, log into the PERFSTAT user in SQL*Plus, and:&lt;br /&gt;&lt;br /&gt;SQL&gt; exec statspack.purge(31);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.2.5. Using sppurge.sql&lt;br /&gt;&lt;br /&gt;When sppurge is run, the instance currently connected to, and the&lt;br /&gt;available snapshots are displayed. The DBA is then prompted for the&lt;br /&gt;low Snap Id and high Snap Id. All snapshots which fall within this&lt;br /&gt;range will be purged.&lt;br /&gt;&lt;br /&gt;WARNING: sppurge.sql has been modified to use the new Purge functionality&lt;br /&gt;in the STATSPACK package, therefore it is no longer possible to&lt;br /&gt;rollback a requested purge operation - the purge is automatically&lt;br /&gt;committed.&lt;br /&gt;&lt;br /&gt;e.g. Purging data - connect to PERFSTAT using SQL*Plus, then run the&lt;br /&gt;sppurge.sql script - sample example output appears below.&lt;br /&gt;&lt;br /&gt;SQL&gt; connect perfstat/perfstat_password&lt;br /&gt;SQL&gt; set transaction use rollback segment rbig;&lt;br /&gt;SQL&gt; @sppurge&lt;br /&gt;&lt;br /&gt;Database Instance currently connected to&lt;br /&gt;========================================&lt;br /&gt;&lt;br /&gt;Instance&lt;br /&gt;DB Id DB Name Inst Num Name&lt;br /&gt;----------- ---------- -------- ----------&lt;br /&gt;720559826 PERF 1 perf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Snapshots for this database instance&lt;br /&gt;====================================&lt;br /&gt;&lt;br /&gt;Base- Snap&lt;br /&gt;Snap Id Snapshot Started line? Level Host Comment&lt;br /&gt;-------- --------------------- ----- ----- --------------- --------------------&lt;br /&gt;1 30 Feb 2000 10:00:01 6 perfhost&lt;br /&gt;2 30 Feb 2000 12:00:06 Y 6 perfhost&lt;br /&gt;3 01 Mar 2000 02:00:01 Y 6 perfhost&lt;br /&gt;4 01 Mar 2000 06:00:01 6 perfhost&lt;br /&gt;&lt;br /&gt;WARNING&lt;br /&gt;~~~~~~~&lt;br /&gt;sppurge.sql deletes all snapshots ranging between the lower and&lt;br /&gt;upper bound Snapshot Id's specified, for the database instance&lt;br /&gt;you are connected to. Snapshots identified as Baseline snapshots&lt;br /&gt;which lie within the snapshot range will not be purged.&lt;br /&gt;&lt;br /&gt;It is NOT possible to rollback changes once the purge begins.&lt;br /&gt;&lt;br /&gt;You may wish to export this data before continuing.&lt;br /&gt;&lt;br /&gt;Specify the Lo Snap Id and Hi Snap Id range to purge&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Enter value for losnapid: 1&lt;br /&gt;Using 1 for lower bound.&lt;br /&gt;&lt;br /&gt;Enter value for hisnapid: 2&lt;br /&gt;Using 2 for upper bound.&lt;br /&gt;&lt;br /&gt;Deleting snapshots 1 - 2&lt;br /&gt;&lt;br /&gt;Purge of specified Snapshot range complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; -- end of example output&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Batch mode purging&lt;br /&gt;------------------&lt;br /&gt;To purge in batch mode, you must assign values to the SQL*Plus&lt;br /&gt;variables which specify the low and high snapshot Ids to purge.&lt;br /&gt;&lt;br /&gt;The variables are:&lt;br /&gt;losnapid -&gt; Begin Snapshot Id&lt;br /&gt;hisnapid -&gt; End Snapshot Id&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;SQL&gt; connect perfstat/perfstat_password&lt;br /&gt;SQL&gt; define losnapid=1&lt;br /&gt;SQL&gt; define hisnapid=2&lt;br /&gt;SQL&gt; @sppurge&lt;br /&gt;&lt;br /&gt;sppurge will no longer prompt for the above information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.3. Removing all data&lt;br /&gt;&lt;br /&gt;If you wish to truncate all performance data indiscriminately, it is&lt;br /&gt;possible to do this using sptrunc.sql This script truncates all&lt;br /&gt;statistics data gathered, including snapshots marked as baselines.&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;It is recommended you export the schema as a backup before running this&lt;br /&gt;script either using your own export parameters, or those provided in&lt;br /&gt;spuexp.par&lt;br /&gt;&lt;br /&gt;If you run sptrunc.sql in error, the script allows you to exit before&lt;br /&gt;beginning the truncate operation (you do this at the 'begin_or_exit'&lt;br /&gt;prompt by typing in 'exit').&lt;br /&gt;&lt;br /&gt;To truncate all data, connect to the PERFSTAT user using SQL*Plus,&lt;br /&gt;and run the script - sample output which truncates data is below:&lt;br /&gt;&lt;br /&gt;SQL&gt; connect perfstat/perfstat_password&lt;br /&gt;SQL&gt; @sptrunc&lt;br /&gt;&lt;br /&gt;Warning&lt;br /&gt;~~~~~~~&lt;br /&gt;Running sptrunc.sql removes ALL data from Statspack tables. You may&lt;br /&gt;wish to export the data before continuing.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;About to Truncate Statspack Tables&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;If would like to exit WITHOUT truncating the tables, enter any text at the&lt;br /&gt;begin_or_exit prompt (e.g. 'exit'), otherwise if you would like to begin&lt;br /&gt;the truncate operation, press &lt;return&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enter value for begin_or_exit:&lt;br /&gt;Entered at the 'begin_or_exit' prompt&lt;br /&gt;&lt;br /&gt;... Starting truncate operation&lt;br /&gt;&lt;br /&gt;Table truncated.&lt;br /&gt;Table truncated.&lt;br /&gt;&lt;etc...&gt;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;Package altered.&lt;br /&gt;&lt;br /&gt;... Truncate operation complete&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.4. Sharing data via export&lt;br /&gt;&lt;br /&gt;If you wish to share data with other sites (for example if Oracle&lt;br /&gt;Support requires the raw statistics), it is possible to export&lt;br /&gt;the PERFSTAT user.&lt;br /&gt;&lt;br /&gt;An export parameter file (spuexp.par) has been supplied for this&lt;br /&gt;purpose. To use this file, supply the export command with the&lt;br /&gt;userid parameter, along with the export parameter file name.&lt;br /&gt;e.g.&lt;br /&gt;exp userid=perfstat/perfstat_password parfile=spuexp.par&lt;br /&gt;&lt;br /&gt;This will create a file called spuexp.dmp and the log file spuexp.log&lt;br /&gt;&lt;br /&gt;If you wish to load the data into another database, use the import&lt;br /&gt;command. For more information on using export and import, please&lt;br /&gt;see the Oracle Utilities manual.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9. New and Changed Features&lt;br /&gt;----------------------------&lt;br /&gt;&lt;br /&gt;9.1. Changes between 10.1 and 10.2&lt;br /&gt;&lt;br /&gt;Changes on the Summary Page of the Instance Report&lt;br /&gt;o The front summary page of the instance report has been modified to show&lt;br /&gt;- Host CPU and Memory configuration&lt;br /&gt;- begin/end buffer cache and shared pool sizes (end values are only&lt;br /&gt;shown if they differ from the begin values)&lt;br /&gt;- Ave Wait (ms) for the Top-5 Timed Events section&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Continuation of Summary Page on Page 2&lt;br /&gt;o Page 2 of the Statspack report should be considered a continuation of&lt;br /&gt;the front-page summary of the Statspack report. This page includes:&lt;br /&gt;- Memory and CPU statistics captured by Oracle in the v$osstat view&lt;br /&gt;- ratios derived from v$osstat and the Time model data&lt;br /&gt;(v$sys_time_model)&lt;br /&gt;- the raw Time-model system statistics data&lt;br /&gt;&lt;br /&gt;These statistics should be consulted in conjunction with page 1 data&lt;br /&gt;during the initial performance analysis stage, when formulating the&lt;br /&gt;list of potential drill-down data to examine:&lt;br /&gt;o The Operating System statistics data should be used to identify&lt;br /&gt;whether the host is CPU bound, and if so, how much this Oracle&lt;br /&gt;instance is contributing to the CPU usage.&lt;br /&gt;o The Memory usage statistics show how much of physical memory is&lt;br /&gt;consumed, and how much physical memory is used by the SGA and&lt;br /&gt;PGA for this instance.&lt;br /&gt;Please note that not all of the OS statistics are available on all&lt;br /&gt;platforms.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sections moved in the Instance Report&lt;br /&gt;o The Time Model System Stats section has moved to page 2 of the report&lt;br /&gt;(see Continuation of Summary Page on Page 2, above).&lt;br /&gt;&lt;br /&gt;o The OS Stats section has been moved to follow the System Statistics&lt;br /&gt;sections.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Modified sections of the Instance Report&lt;br /&gt;o The Wait Events and Background Wait Events section of the report have&lt;br /&gt;been modified to only show events with a total wait time of &gt; .001s&lt;br /&gt;to filter out unimportant events.&lt;br /&gt;&lt;br /&gt;o The Timeouts column in the System Event and Background Event sections have&lt;br /&gt;changed to be %Timeouts (as compared to Waits). Note that to avoid&lt;br /&gt;loss of data, a %Timeouts value of 0 indicates timeouts occurred in &lt; .5%.&lt;br /&gt;A value of null indicates 0 timeouts.&lt;br /&gt;&lt;br /&gt;o The SGA regions section of the report now shows the Begin and End sizes&lt;br /&gt;of the various regions (the end sizes are only shown if different to&lt;br /&gt;the begin sizes).&lt;br /&gt;&lt;br /&gt;o The File IO Histogram section has been modified to include a new&lt;br /&gt;bucket (&lt;=2ms).&lt;br /&gt;&lt;br /&gt;o The Buffer Pool Statistics section now shows the number of buffers in&lt;br /&gt;K, M or G (where K is 1000 buffers, M is 1000000 buffers and G&lt;br /&gt;is 1000000000 buffers)&lt;br /&gt;&lt;br /&gt;o Omitting sections from the Statspack report&lt;br /&gt;- The Rollstat sections of the report are omitted from the output when&lt;br /&gt;Automatic Undo Management is used. If you still wish to see these&lt;br /&gt;sections when using AUM, modify the display_rollstat parameter in&lt;br /&gt;the sprepcon.sql file.&lt;br /&gt;- It is also possible to avoid including the following sections in the&lt;br /&gt;Instance report. However modifying these default settings is not&lt;br /&gt;recommended, as valuable data may be missing during performance&lt;br /&gt;diagnosis.&lt;br /&gt;o Undo stat (Automatic Undo data)&lt;br /&gt;o File IO details&lt;br /&gt;&lt;br /&gt;o Undo Segment Summary section now also shows the Min and Max values for&lt;br /&gt;Tuned Undo Retention.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Changes in Data captured/reported on - Level 1&lt;br /&gt;o The v$sgastat view has been modified in 10gR2 to show separate&lt;br /&gt;rows for all memory allocations, without the summary 'Miscellaneous'&lt;br /&gt;row. This now results over 500 individual rows.&lt;br /&gt;To avoid capturing excessive and unneeded data, Statspack has been&lt;br /&gt;optimized to capture only that data which will be useful when&lt;br /&gt;investigating memory usage. It is expected Statspack will capture&lt;br /&gt;in the order of 50 rows per snapshot.&lt;br /&gt;To avoid showing all of these rows in the report, only the top rows&lt;br /&gt;are shown (by default 35 rows are shown, although this can be&lt;br /&gt;increased if needed by modifying the sgastat_top_n in sprepcon.sql).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;New sections of the Instance Report&lt;br /&gt;o Some SGA resizes can be detected by Statspack, when the individual&lt;br /&gt;cache sizes are different at the time the snapshot is taken.&lt;br /&gt;Any changes in cache sizes visible at snapshot time are shown&lt;br /&gt;in the Cache Size Changes section of the report.&lt;br /&gt;&lt;br /&gt;o Two new SQL sections have been added - SQL ordered by CPU and&lt;br /&gt;SQL ordered by Elapsed time. These are now the first two&lt;br /&gt;SQL sections (i.e. they appear before 'SQL ordered by Gets')&lt;br /&gt;New thresholds for CPU and Elapsed time were not added to the data&lt;br /&gt;capture, as it is believed that the top SQL in these categories&lt;br /&gt;is already being captured by the existing thresholds.&lt;br /&gt;&lt;br /&gt;o Two new process (PGA) memory sections have been added to the&lt;br /&gt;Statspack Instance report:&lt;br /&gt;o Process Memory Summary Stats, which shows a summary&lt;br /&gt;of process memory allocation and usage for both begin and&lt;br /&gt;end snapshots&lt;br /&gt;o Top Process Memory (by component), which shows process&lt;br /&gt;information for the process which have the most memory&lt;br /&gt;allocated, broken down by component (for the begin and&lt;br /&gt;end snapshots).&lt;br /&gt;&lt;br /&gt;o The SQL Memory Statistics section has been added. This section&lt;br /&gt;displays a summary of memory usage statistics for cursors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;New Data captured/reported on - Level 1&lt;br /&gt;SGA Target Advisory (from v$sga_target)&lt;br /&gt;Streams Pool Advisory (from v$streams_pool_advice)&lt;br /&gt;PGA Memory usage (from v$process, and v$process_memory)&lt;br /&gt;(see New sections of the instance report above for more&lt;br /&gt;information)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Real Application Cluster Features&lt;br /&gt;o The 'RAC Statistics' page now computes the estimated interconnect&lt;br /&gt;traffic in KB/sec (Estd Interconnect traffic (KB/s)) in the Global&lt;br /&gt;Cache Load Profile section.&lt;br /&gt;o v$class_cache_transfer is no longer captured (and the corresponding&lt;br /&gt;Statspack table has been dropped). Instead Statspack now captures&lt;br /&gt;v$instance_cache_transfer.&lt;br /&gt;o Dynamic Remastering Statistics section had been added.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL Report (sprepsql.sql)&lt;br /&gt;o The time a plan was last active is shown in the SQL report for each&lt;br /&gt;known plan.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Obsoleted data&lt;br /&gt;o The sleeps 1-3 columns have been obsoleted in this release,&lt;br /&gt;therefore Statspack no longer captures, nor reports on this&lt;br /&gt;data (for v$latch_parent, v$latch_children, v$latch)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.2. Changes between 9.2 and 10.1&lt;br /&gt;&lt;br /&gt;Baseline&lt;br /&gt;It is now possible to identify snapshots which you wish to keep. These&lt;br /&gt;snapshots are termed baselined snapshots. Baselined snapshots will not&lt;br /&gt;be purged by the Statspack purge. For more information, see section&lt;br /&gt;'Baselining performance data'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Purge&lt;br /&gt;The purge code has been moved from sppurge.sql into the STATSPACK&lt;br /&gt;package, and has been significantly enhanced. Having the purge&lt;br /&gt;functionality in the Statspack package allows greater flexibility in&lt;br /&gt;specifying which data to purge (e.g. by date range, or by purging&lt;br /&gt;snapshots older than N days, etc). For more information, see section&lt;br /&gt;'Purging/removing unnecessary data'.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Streams&lt;br /&gt;Performance data for Streams is now captured. See section 'New Data&lt;br /&gt;captured/reported - Level 1', below for more details.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;V$SQL.HASH_VALUE and V$SQL.OLD_HASH_VALUE columns&lt;br /&gt;The algorithm used to calculate the hash_value column in the V$SQL view&lt;br /&gt;(and V$SQL* related views) has been modified in 10g. In other words, the&lt;br /&gt;hash_value for a statement in Oracle 10g will not be the same as the&lt;br /&gt;hash_value for that same statement in prior releases.&lt;br /&gt;&lt;br /&gt;To allow for backward compatibility, and comparison of the performance of&lt;br /&gt;SQL statements in releases prior to 10g, Statspack continues to use the&lt;br /&gt;old hash value as one of the columns comprising the primary key for the&lt;br /&gt;Statspack SQL related tables. The old-format hash value is visible&lt;br /&gt;in the v$sql.old_hash_value column (this has been added to the V$SQL and&lt;br /&gt;related views for backward compatibility).&lt;br /&gt;&lt;br /&gt;In the Statspack reports, Statspack continues to display the old hash&lt;br /&gt;value for backward compatibility (this column is clearly identified as&lt;br /&gt;Old Hash Value).&lt;br /&gt;&lt;br /&gt;For more information on the hash_value change, see 'Data Compatibility -&lt;br /&gt;Changing SQL Hash Value, and new SQL Id' below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running the Report&lt;br /&gt;&lt;br /&gt;o Number of Days of Snapshots to List&lt;br /&gt;It is now possible to influence certain aspects of what appears in the&lt;br /&gt;Instance report, including the number of days of snapshots to list when&lt;br /&gt;choosing the begin and end snapshots.&lt;br /&gt;The configuration is performed by modifying the 'Customer Configurable&lt;br /&gt;Report Settings' section of the file sprepcon.sql.&lt;br /&gt;For more information see 'Configuring the Report' section of this document.&lt;br /&gt;&lt;br /&gt;o Error Reporting&lt;br /&gt;Error reporting has been modified, so that an input error made when&lt;br /&gt;running the report now results in the report terminating with the&lt;br /&gt;error shown, and the session being disconnected from SQL*Plus.&lt;br /&gt;The error messages have also been modified to show the actual values&lt;br /&gt;which caused the errors - this makes it easier to identify why the&lt;br /&gt;report has been terminated, and so how the error can be avoided.&lt;br /&gt;e.g. When running spreport, if you accidentally enter a snapshot id which&lt;br /&gt;does not exist, an error is reported, and the report exits.&lt;br /&gt;declare&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-20200: Begin Snapshot Id 3469 does not exist for this database/instance&lt;br /&gt;ORA-06512: at line 25&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL sections of the Instance Report&lt;br /&gt;o The SQL ordered by Gets, Reads and Parse Calls sections have all been&lt;br /&gt;modified to:&lt;br /&gt;&lt;br /&gt;- only show rows which exceed more than 1% of the total resources&lt;br /&gt;used for entire interval. This reduces the number of rows which are&lt;br /&gt;candidates for printing. This is identified in the title of the section.&lt;br /&gt;&lt;br /&gt;e.g. For SQL ordered by Parse Calls, only those rows which exceed&lt;br /&gt;1% of the total parse calls will be candidates for displaying&lt;br /&gt;in this section.)&lt;br /&gt;&lt;br /&gt;-&gt; SQL reported below exceeded 1% of total Parse Calls&lt;br /&gt;&lt;br /&gt;This line in the title of the Parse Calls section identifies that&lt;br /&gt;only SQL statements which exceeded 1% of the total parse calls&lt;br /&gt;incurred in the interval (specified by the begin and end snapshots)&lt;br /&gt;will be included.&lt;br /&gt;&lt;br /&gt;Note that not all of the SQL that exceeded the 1% threshold are printed&lt;br /&gt;in the report, just the highest-load.&lt;br /&gt;&lt;br /&gt;- The total number of resources used by captured statements is compared&lt;br /&gt;to the total number of resources used over the entire interval (as&lt;br /&gt;specified by the begin and end snapshots). This comparison helps&lt;br /&gt;identify how much of the total load can be accounted for in the&lt;br /&gt;high-load SQL captured.&lt;br /&gt;e.g. In the title for the SQL ordered by Gets section of the report,&lt;br /&gt;a line similar to the following will appear&lt;br /&gt;&lt;br /&gt;-&gt; Captured SQL accounts for 74.8% of total Buffer Gets&lt;br /&gt;&lt;br /&gt;This identifies that 74.8% of the total Buffer gets incurred during&lt;br /&gt;the interval is attributable to the high-load SQL captured by Statspack&lt;br /&gt;(Note that not all captured statements are displayed in the report, only&lt;br /&gt;those which are the highest load).&lt;br /&gt;&lt;br /&gt;o New SQL report 'SQL ordered by Cluster Wait Time'&lt;br /&gt;There is a new SQL report added to the SQL reports section. This report&lt;br /&gt;lists the top-SQL ordered by Cluster Wait Time. This report may be useful&lt;br /&gt;in Real Application Cluster databases.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Derived Statistics&lt;br /&gt;There is one new statistic in the Instance Activity Sections which&lt;br /&gt;does not come from V$SYSSTAT: 'log switches (derived)'.&lt;br /&gt;This statistic is derived from the v$thread view which Statspack now&lt;br /&gt;captures. This statistic is shown in a new Instance Activity Stats sections&lt;br /&gt;of the instance report, as described below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Two new Instance Activity Stats sections&lt;br /&gt;There are two new Instance Activity Stats sections in the instance report.&lt;br /&gt;&lt;br /&gt;The first shows the begin and end absolute values of statistics which&lt;br /&gt;should not be diffed (typically performing a diff is incorrect, because&lt;br /&gt;the statistics show current values, rather than cumulative values).&lt;br /&gt;These statistics come from v$sysstat (as do the other Instance Activity&lt;br /&gt;statistics).&lt;br /&gt;&lt;br /&gt;Instance Activity Stats DB/Inst: MAINDB/maindb Snaps: 22-23&lt;br /&gt;-&gt; Statistics with absolute values (should not be diffed)&lt;br /&gt;-&gt; Statistics identified by '(derived)' come from sources other than SYSSTAT&lt;br /&gt;&lt;br /&gt;Statistic Begin Value End Value&lt;br /&gt;--------------------------------- --------------- ---------------&lt;br /&gt;logons current 10 10&lt;br /&gt;opened cursors current 41 49&lt;br /&gt;session cursor cache count 24 36&lt;br /&gt;&lt;br /&gt;The second shows the number of log switches, which is derived from the&lt;br /&gt;v$thread view.&lt;br /&gt;&lt;br /&gt;Instance Activity Stats DB/Inst: MAINDB/maindb Snaps: 22-23&lt;br /&gt;&lt;br /&gt;Statistic Total per Hour&lt;br /&gt;--------------------------------- ------------------ ---------&lt;br /&gt;log switches (derived) 0 .00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;New Scripts&lt;br /&gt;o sprsqins.sql - Reports on a single SQL statement (i.e. hash_value),&lt;br /&gt;including the SQL statistics for the snapshot, the&lt;br /&gt;complete SQL text and optimizer execution plan information.&lt;br /&gt;This report differs from sprepsql.sql, in that it&lt;br /&gt;can report on a SQL statement for any instance which&lt;br /&gt;the PERFSTAT schema contains, whereas sprepsql.sql defaults&lt;br /&gt;the dbid and instance number to the instance you are&lt;br /&gt;currently connected to, thus restricting reporting of&lt;br /&gt;SQL statements to those related to that instance only.&lt;br /&gt;sprsqins.sql will prompt for a dbid, instance_number,&lt;br /&gt;begin and end snap id's and the hash value of the SQL&lt;br /&gt;statement to report on.&lt;br /&gt;This report can be used when importing data from another&lt;br /&gt;instance, or in a Real Application Clusters environment&lt;br /&gt;to report on an instance which you are not directly&lt;br /&gt;connected to.&lt;br /&gt;o sprepcon.sql - This file contains SQL*Plus parameters which determine&lt;br /&gt;some aspects of what is printed out in the Statspack&lt;br /&gt;Instance report spreport.sql For more details on what&lt;br /&gt;is configurable, see the sprepcon.sql file itself.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;New Data captured/reported on - Level 1&lt;br /&gt;Time Model data (from v$sys_time_model and v$sess_time_model)&lt;br /&gt;Operating System statistics (from v$osstat)&lt;br /&gt;Streams statistics (from&lt;br /&gt;Streams Capture - v$streams_capture&lt;br /&gt;Streams Apply - v$streams_apply_coordinator/reader/server&lt;br /&gt;Propagation Sender - v$propagation_sender, dba_queue_schedules&lt;br /&gt;Propagation Receiver - v$propagation_receiver&lt;br /&gt;Buffered Queues - v$buffered_queues&lt;br /&gt;Buffered Queue Subscribers - v$buffered_subscribers&lt;br /&gt;Rule Sets - v$rule_set&lt;br /&gt;Additional RAC Sections (from v$cr_block_server, v$current_block_server,&lt;br /&gt;v$class_cache_transfer)&lt;br /&gt;Enqueue Statistics (from v$enqueue_statistics, rather than v$enqueue_stat)&lt;br /&gt;Java Pool Advisory (from v$java_pool_advice)&lt;br /&gt;Thread information (from v$thread)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;New Data captured, optionally reported on - Level 1&lt;br /&gt;Event Histogram Statistics (from v$event_histogram)&lt;br /&gt;(only displayed if SQL*Plus variable event_histogram = Y)&lt;br /&gt;File Histogram Statistics (from v$datafile_histogram and&lt;br /&gt;v$tempfile_histogram)&lt;br /&gt;(only displayed if SQL*Plus variable file_histogram = Y)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;New columns added to&lt;br /&gt;o stats$shared_pool_advice&lt;br /&gt;estd_lc_load_time, estd_lc_load_time_factor&lt;br /&gt;o stats$sql_plan&lt;br /&gt;sql_id, projection, time, object_alias, object_type, qblock_name,&lt;br /&gt;remarks&lt;br /&gt;o stats$sql_summary&lt;br /&gt;sql_id, direct_writes, application_wait_time, concurrency_wait_time,&lt;br /&gt;cluster_wait_time, user_io_wait_time, plsql_exec_time, java_exec_time,&lt;br /&gt;sql_profile, program_id, program_line#, end_of_fetch_count&lt;br /&gt;o stats$sql_text&lt;br /&gt;sql_id&lt;br /&gt;o stats$undostat&lt;br /&gt;maxqueryhash, maxqueryid, activeblks, unexpiredblks, expiredblks,&lt;br /&gt;tuned_undoretention&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cluster Features&lt;br /&gt;o Real Application Clusters Statistics page (page 2 of a clustered&lt;br /&gt;database report) has been modified to add new ratios and remove ratios&lt;br /&gt;considered less useful.&lt;br /&gt;&lt;br /&gt;o The Global Enqueue Statistics section, previously on page 3 of a RAC&lt;br /&gt;instance report, has been moved to behind the Library Cache Activity&lt;br /&gt;statistics.&lt;br /&gt;&lt;br /&gt;o Statistics for CR and CURRENT blocks served, and for INSTANCE CACHE&lt;br /&gt;TRANSFER, have been added after Global Enqueue Statistics page.&lt;br /&gt;&lt;br /&gt;o New SQL report 'SQL ordered by Cluster Wait Time' has been added.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.3. Changes between 9.0 and 9.2&lt;br /&gt;&lt;br /&gt;Changes on the Summary Page of the Instance Report (spreport.sql)&lt;br /&gt;&lt;br /&gt;o The Top 5 Wait Events has been changed to be the Top 5 Timed Events.&lt;br /&gt;&lt;br /&gt;What was previously the Top 5 Wait Events has been expanded to give the&lt;br /&gt;Top 5 timed events within the instance: i.e. in addition to including&lt;br /&gt;Wait events, this section can now include the CPU time as reported in the&lt;br /&gt;'CPU used by this session' statistic. This statistic will appear in the&lt;br /&gt;Top 5 only if it's value is one of the Top 5 users of time for the&lt;br /&gt;snapshot interval.&lt;br /&gt;&lt;br /&gt;Note that the name of the statistic 'CPU used by this session' will&lt;br /&gt;actually appear in the Top 5 section as 'CPU Time'. The statistic&lt;br /&gt;name is masked in the Top 5 to avoid the confusion of the suffix&lt;br /&gt;'by this session'.&lt;br /&gt;The statistic will continue to appear in the System Statistics&lt;br /&gt;(SYSSTAT) section of the report as 'CPU used by this session'.&lt;br /&gt;&lt;br /&gt;Additionally, instead of the percentage calculation being the % Total&lt;br /&gt;Wait Time (which is time for each wait event divided by the total wait&lt;br /&gt;time), the percentage calculation is now the % Total Call Time.&lt;br /&gt;&lt;br /&gt;Call Time is the total time spent in database calls (i.e. the total&lt;br /&gt;non-idle time spent within the database either on the CPU, or actively&lt;br /&gt;waiting).&lt;br /&gt;&lt;br /&gt;We compute 'Call Time' by adding the time spent on the CPU ('CPU used by&lt;br /&gt;this session' statistic) to the time used by all non-idle wait events.&lt;br /&gt;i.e.&lt;br /&gt;total call time = total CPU time + total wait time for non-idle events&lt;br /&gt;&lt;br /&gt;The % Total Call Time shown in the 'Top 5' heading on the summary page&lt;br /&gt;of the report, is the time for each timed event divided by the total call&lt;br /&gt;time (i.e. non-idle time).&lt;br /&gt;i.e.&lt;br /&gt;previously the calculation was:&lt;br /&gt;time for each wait event / total wait time for all events&lt;br /&gt;now the calculation is:&lt;br /&gt;time for each timed event / total call time&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Purpose&lt;br /&gt;~~~~~~~&lt;br /&gt;The purpose for including CPU time with wait events:&lt;br /&gt;&lt;br /&gt;When tuning a system, the first step is to identify where the most of the&lt;br /&gt;time is spent, in order to identify where the most productive tuning&lt;br /&gt;effort should be concentrated.&lt;br /&gt;&lt;br /&gt;The majority of time could be spent in waiting for events to complete&lt;br /&gt;(and so be identifiable in the wait event data), or the system could be&lt;br /&gt;consuming much CPU (for which Operating System statistics, and the Oracle&lt;br /&gt;CPU statistic 'CPU used by this session' in SYSSTAT are examined).&lt;br /&gt;Having the CPU Time co-located with the wait events in the Top 5 section&lt;br /&gt;of the instance report makes it easier to compare the relative values&lt;br /&gt;and to identify whether the most productive investigation would occur&lt;br /&gt;by drilling down the wait events, or in reducing Oracle CPU usage&lt;br /&gt;(e.g. by tuning SQL).&lt;br /&gt;&lt;br /&gt;Changes on the Top SQL sections of the Report (spreport.sql)&lt;br /&gt;&lt;br /&gt;o When specified by the application, the MODULE information is reported&lt;br /&gt;just before the SQL statement itself.&lt;br /&gt;This information is preceded by the mention "Module: "&lt;br /&gt;&lt;br /&gt;New columns added to&lt;br /&gt;- stats$db_cache_advice&lt;br /&gt;size_factor: compares the estimated cache size with the current cache size&lt;br /&gt;- stats$sql_plan&lt;br /&gt;search_columns: the number of index columns with matching predicates.&lt;br /&gt;access_predicates: predicates used to locate rows in an access structure.&lt;br /&gt;For example, start and/or stop predicates for an index range scan.&lt;br /&gt;filter_predicates: predicates used to filter rows before producing them.&lt;br /&gt;- stats$sql_summary&lt;br /&gt;child_latch: the library cache child latch number which protects this&lt;br /&gt;SQL statement (join to v$latch_children.child#). A parent SQL&lt;br /&gt;statement, and all it's children are protected by the same library&lt;br /&gt;cache child latch.&lt;br /&gt;fetches: the number of fetches performed for this SQL statement&lt;br /&gt;&lt;br /&gt;New Scripts&lt;br /&gt;o spup90.sql - Upgrades a 9.0 Statspack schema to the 9.2 format&lt;br /&gt;&lt;br /&gt;New Data captured/reported on - Level 1&lt;br /&gt;- Shared Pool Advisory&lt;br /&gt;- PGA statistics including PGA Advisory, PGA Histogram usage&lt;br /&gt;&lt;br /&gt;New Data captured/reported on - Level 7&lt;br /&gt;- Segment level Statistics&lt;br /&gt;&lt;br /&gt;Cluster Features&lt;br /&gt;o Real Application Clusters Statistics page (page 2 of a clustered database&lt;br /&gt;report) has been significantly modified to add new ratios and remove&lt;br /&gt;ratios deemed less useful.&lt;br /&gt;o RAC specific segment level statistics are captured with level 7&lt;br /&gt;&lt;br /&gt;SQL Plan Usage capture changed&lt;br /&gt;o The logic for capturing SQL Plan Usage data (level 6) has been modified&lt;br /&gt;significantly. Instead of capturing a Plan's Usage once the first time&lt;br /&gt;the plan is used and never again thereafter, the algorithm now captures&lt;br /&gt;the plans used each snapshot. This allows tracking whether multiple&lt;br /&gt;plans are in use concurrently, or whether a plan has reverted back to&lt;br /&gt;an older plan.&lt;br /&gt;Note that plan usage data is only captured for high-load SQL (this is&lt;br /&gt;unchanged between 9.0 and 9.2).&lt;br /&gt;&lt;br /&gt;Due to the significant change in data capture, it is not possible to&lt;br /&gt;convert existing data. Instead, any pre-existing data will be&lt;br /&gt;archived into the table STATS$SQL_PLAN_USAGE_90 (this allows querying&lt;br /&gt;the archived data, should this be necessary).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sprepsql.sql&lt;br /&gt;o 'All Optimizer Plan(s) for this Hash Value' change:&lt;br /&gt;Instead of showing the first time a plan was seen for a specific hash&lt;br /&gt;value, this section now shows each time the Optimizer Plan&lt;br /&gt;changed since the SQL statement was first seen e.g. if the SQL statement&lt;br /&gt;had the following plan changes:&lt;br /&gt;snap ids plan hash value&lt;br /&gt;-------- ---------------&lt;br /&gt;1 -&gt; 12 AAAAAAA&lt;br /&gt;13 -&gt; 134 BBBBBBB&lt;br /&gt;145 -&gt; 299 CCCCCCC&lt;br /&gt;300 -&gt; 410 AAAAAAA&lt;br /&gt;&lt;br /&gt;Then this section of the report will now show:&lt;br /&gt;snap id plan hash value&lt;br /&gt;-------- ---------------&lt;br /&gt;1 AAAAAAA&lt;br /&gt;13 BBBBBBB&lt;br /&gt;145 CCCCCCC&lt;br /&gt;300 AAAAAAA&lt;br /&gt;&lt;br /&gt;Previously, only the rows with snap_id's 1, 13 and 145 would have been&lt;br /&gt;displayed, as these were the first snap Id's these plans were found.&lt;br /&gt;However this data could not show that plan AAAAAA was found again in&lt;br /&gt;snap_id 300.&lt;br /&gt;&lt;br /&gt;The new output format makes it easier to see when an older plan is again&lt;br /&gt;in use. This is possible due to the change in the SQL Plan Usage&lt;br /&gt;capture (described above).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.4. Changes between 8.1.7 and 9.0&lt;br /&gt;&lt;br /&gt;Timing data&lt;br /&gt;o columns with cumulative times are now displayed in seconds.&lt;br /&gt;&lt;br /&gt;Changes on the Summary Page&lt;br /&gt;o All cache sizes are now reported in M or K&lt;br /&gt;&lt;br /&gt;New Statistics on the Summary page&lt;br /&gt;o open cursors per session values for the begin and end snapshot&lt;br /&gt;o comments specified when taking a snapshot are displayed for the&lt;br /&gt;begin and end snapshots&lt;br /&gt;&lt;br /&gt;Latches&lt;br /&gt;o The Latch Activity, Child and Parent Latch sections have the following&lt;br /&gt;additional column:&lt;br /&gt;- wait_time: cumulative time spent waiting for the latch&lt;br /&gt;&lt;br /&gt;New Scripts&lt;br /&gt;o spup817.sql - Upgrades an 8.1.7 Statspack schema to the 9.0 format&lt;br /&gt;o sprepsql.sql - Reports on a single hash_value, including&lt;br /&gt;the SQL statistics for the snapshot, the complete SQL&lt;br /&gt;text and optimizer execution plan information.&lt;br /&gt;o sprepins.sql - A report which can be run to query performance data&lt;br /&gt;for any instance which the PERFSTAT schema contains.&lt;br /&gt;The report will prompt for a dbid, instance_number and&lt;br /&gt;begin and end snap id's.&lt;br /&gt;This report can be used when importing data from another&lt;br /&gt;instance, or in a Real Application Clusters environment&lt;br /&gt;to report on an instance which you are not directly&lt;br /&gt;connected to.&lt;br /&gt;&lt;br /&gt;New Data captured/reported on - Level 1&lt;br /&gt;- Data from v$resource_limit&lt;br /&gt;- If the instance is a Cluster instance, v$dlm_misc data&lt;br /&gt;- Additional columns are now captured in stats$enqueue_stat&lt;br /&gt;- Automatic Undo Management statistics&lt;br /&gt;- Buffer Cache advisory data&lt;br /&gt;- New Auto-PGA memory management data&lt;br /&gt;- Support for multiple sized-block buffer pools&lt;br /&gt;- Support for resizable buffer pool and shared pool&lt;br /&gt;- Data from v$instance_recovery&lt;br /&gt;&lt;br /&gt;New Snapshot Level - Level 6&lt;br /&gt;- New SQL plans and SQL Plan usage information for high-load SQL&lt;br /&gt;statements are captured.&lt;br /&gt;&lt;br /&gt;Cluster Features&lt;br /&gt;o There is additional derived data and statistics which are now included&lt;br /&gt;in the Statspack report for a clustered database. For more information,&lt;br /&gt;see the 'Cluster Specific Data' section of this document.&lt;br /&gt;&lt;br /&gt;New SNAP function&lt;br /&gt;o the call to take a snapshot can also be a PL/SQL function call which&lt;br /&gt;returns the snapshot Id of the snapshot taken. Using the function rather&lt;br /&gt;than the procedure is useful in situations where you wish to know the&lt;br /&gt;snap_id immediately, such as when running Statspack reports in batch&lt;br /&gt;mode, or during benchmark runs.&lt;br /&gt;&lt;br /&gt;Installation&lt;br /&gt;o The installation script will no longer accept the SYSTEM tablespace for&lt;br /&gt;the PERFSTAT user's DEFAULT or TEMPORARY tablespace. If SYSTEM is&lt;br /&gt;specified, the installation will error.&lt;br /&gt;&lt;br /&gt;SQL&lt;br /&gt;o Each SQL report has two new columns CPU Time and Elapsed Time. These&lt;br /&gt;show the cumulative CPU time and Elapsed time for all executions of&lt;br /&gt;that SQL statement for the snapshot period. If cumulative CPU and&lt;br /&gt;Elapsed times are not shown, the CPU and Elapsed times per execute&lt;br /&gt;are shown.&lt;br /&gt;&lt;br /&gt;Changed&lt;br /&gt;o The SGA Breakdown difference section of the Statspack report now&lt;br /&gt;shows the difference between begin and end values as a percentage&lt;br /&gt;of the begin value, rather than in bytes.&lt;br /&gt;o The data in the Dictionary Cache Stats and Library Cache Activity&lt;br /&gt;sections are only printed if the number of gets is greater than zero.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.5. Changes between 8.1.6 and 8.1.7&lt;br /&gt;&lt;br /&gt;New Statistics on the Summary page&lt;br /&gt;o connections at the begin snapshot and connections at the end snapshot&lt;br /&gt;&lt;br /&gt;Load Profile&lt;br /&gt;o executes per transaction and per second&lt;br /&gt;o logons per transaction and per second&lt;br /&gt;&lt;br /&gt;Instance Efficiency&lt;br /&gt;o % Non-Parse CPU: which is the parse time CPU / CPU used by this session&lt;br /&gt;o Parse CPU to Parse Elapsd%: which is the parse time CPU / parse time&lt;br /&gt;elapsed&lt;br /&gt;o Execute to Parse %: The ratio of executions to parses&lt;br /&gt;&lt;br /&gt;Instance Efficiency - Shared Pool Statistics are shown for the begin and&lt;br /&gt;end snapshots.&lt;br /&gt;o Memory Usage %: The percentage of the shared pool which is used.&lt;br /&gt;o % SQL with executions&gt;1: The percentage of reused SQL (i.e. the&lt;br /&gt;percentage of SQL statements with more than one execution).&lt;br /&gt;o % Memory for SQL w/exec&gt;1: The percentage of memory used for SQL&lt;br /&gt;statements with more than one execution.&lt;br /&gt;This data is newly gathered by the 8.1.7 Statspack for level 5 snapshots&lt;br /&gt;and above, and so will not evident if the report is run against older&lt;br /&gt;data captured using the 8.1.6 Statspack.&lt;br /&gt;&lt;br /&gt;Tablespace and File IO&lt;br /&gt;o Tempfile statistics are now captured. The statistics for tempfiles are&lt;br /&gt;shown in the same sections with statistics for datafiles and tablespaces.&lt;br /&gt;o The tablespace and File IO reports have been modified to include reads/s&lt;br /&gt;and writes/s.&lt;br /&gt;&lt;br /&gt;Latches&lt;br /&gt;o The report has been modified to include parent and child latch&lt;br /&gt;sections, which only appears in the report when a level 10 snapshot&lt;br /&gt;is taken.&lt;br /&gt;&lt;br /&gt;New Scripts&lt;br /&gt;o sppurge.sql - Purges a range of Snapshot Ids&lt;br /&gt;o sptrunc.sql - Deletes all data&lt;br /&gt;o spup816.sql - Upgrades an 8.1.6 Statspack to the 8.1.7 schema&lt;br /&gt;&lt;br /&gt;Batch Mode execution&lt;br /&gt;o The installation, reporting and purge scripts (spcreate.sql, spreport.sql&lt;br /&gt;and sppurge.sql) have been modified so they can be run in batch mode, if&lt;br /&gt;the appropriate SQL*Plus variables are defined before the scripts are run.&lt;br /&gt;&lt;br /&gt;SQL&lt;br /&gt;o Two new SQL thresholds (and sections in the report) have been added:&lt;br /&gt;sharable_mem and version_count&lt;br /&gt;o The report which was previously ordered by rows processed has been&lt;br /&gt;changed to be ordered by executions&lt;br /&gt;o The full text of a SQL statement is now captured (previously only the&lt;br /&gt;first 1000 bytes of the text was captured); the text is captured once&lt;br /&gt;only. Previously, Statspack gathered all SQL related information,&lt;br /&gt;including all the SQL text for each snapshot. The new strategy will&lt;br /&gt;result less space usage.&lt;br /&gt;o The first 5 lines of a SQL statement are shown in each SQL report&lt;br /&gt;(rather than the first line)&lt;br /&gt;&lt;br /&gt;File Rename&lt;br /&gt;o The Statspack files have been renamed, with all files now beginning&lt;br /&gt;with the prefix sp.&lt;br /&gt;The new and old file names are given below. For more information on&lt;br /&gt;the purpose of each file, please see the Supplied Scripts Overview&lt;br /&gt;section.&lt;br /&gt;&lt;br /&gt;New Name Old Name&lt;br /&gt;------------ -------------&lt;br /&gt;spdoc.txt statspack.doc&lt;br /&gt;spcreate.sql statscre.sql&lt;br /&gt;spreport.sql statsrep.sql&lt;br /&gt;spauto.sql statsauto.sql&lt;br /&gt;spuexp.par statsuexp.par&lt;br /&gt;sppurge.sql - new file -&lt;br /&gt;sptrunc.sql - new file -&lt;br /&gt;spup816.sql - new file -&lt;br /&gt;spdrop.sql statsdrp.sql&lt;br /&gt;spcpkg.sql statspack.sql&lt;br /&gt;spctab.sql statsctab.sql&lt;br /&gt;spcusr.sql statscusr.sql&lt;br /&gt;spdtab.sql statsdtab.sql&lt;br /&gt;spdusr.sql statsdusr.sql&lt;br /&gt;&lt;br /&gt;o The default Statspack report output file name prefix has been modified&lt;br /&gt;to sp_ (was st_) to be consistent with the new script names.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. Compatibility and Upgrading from previous releases&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;10.1 Compatibility Matrix&lt;br /&gt;&lt;br /&gt;Database ---- Statspack Release ----&lt;br /&gt;Release 10.2 10.1 9.2 9.0 8.1.7 8.1.6&lt;br /&gt;-------- ---- ---- --- ---- ----- -----&lt;br /&gt;10.2 Y - - - - -&lt;br /&gt;10.1 - Y - - - -&lt;br /&gt;9.2 - - Y - - -&lt;br /&gt;9.0 - - - Y - -&lt;br /&gt;8.1.7 - - - - Y -&lt;br /&gt;8.1.6 - - - - - Y&lt;br /&gt;&lt;br /&gt;In summary, it is best to use the Statspack release shipped with&lt;br /&gt;the version of the database you are using.&lt;br /&gt;&lt;br /&gt;If you are already using an earlier release of Statspack must use&lt;br /&gt;a newer Statspack release (e.g. because you are upgrading the database),&lt;br /&gt;it is possible to upgrade an existing Statspack schema, and so&lt;br /&gt;keep previously captured data. See the 'Upgrading an existing Statspack&lt;br /&gt;schema to a newer release' section of this document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.1.1. Using Statspack shipped with 10.2&lt;br /&gt;&lt;br /&gt;The Statspack scripts shipped with 10.2 can not be used with any release&lt;br /&gt;earlier than 10.2, as Statspack uses new v$views (and new columns added to&lt;br /&gt;existing v$views) introduced in this server release.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.1.2. Using Statspack shipped with 10.1&lt;br /&gt;&lt;br /&gt;The Statspack scripts shipped with 10.1 can not be used with any release&lt;br /&gt;earlier than 10.1, as Statspack uses new v$views (and new columns added to&lt;br /&gt;existing v$views) introduced in this server release.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.1.3. Using Statspack shipped with 9.2&lt;br /&gt;&lt;br /&gt;The Statspack scripts shipped with 9.2 can not be used with any release&lt;br /&gt;earlier than 9.2, as Statspack uses new v$views (and new columns added to&lt;br /&gt;existing v$views) introduced in this server release.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.1.4. Using Statspack shipped with 9.0&lt;br /&gt;&lt;br /&gt;The Statspack scripts shipped with 9.0 can not be used with any release&lt;br /&gt;earlier than 9.0, as the 9.2 release uses new v$views (and new columns added&lt;br /&gt;to existing v$views) introduced in this server release.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.1.5. Using Statspack shipped with 8.1.7 on 9i releases&lt;br /&gt;&lt;br /&gt;It is not possible to use the Statspack shipped with 8.1.7 with any 9i&lt;br /&gt;instance, due to the definition of an undocumented view Statspack 8i used,&lt;br /&gt;changing between Oracle8i and Oracle9i. Attempting to use 8.1 Statspack&lt;br /&gt;on an instance running 9i will result in package compilation errors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2. Upgrading an existing Statspack schema to a newer release&lt;br /&gt;&lt;br /&gt;Scripts are provided which convert performance data in an existing&lt;br /&gt;Statspack schema running an older Statspack release, to the newer schema&lt;br /&gt;format.&lt;br /&gt;&lt;br /&gt;Although data conversion is not a supported activity, these scripts have been&lt;br /&gt;provided as a convenient way of keeping previously captured Statspack data.&lt;br /&gt;&lt;br /&gt;Due to the differences in schema layout, minor irregularities may result&lt;br /&gt;in statistics captured before conversion. An example of this is the&lt;br /&gt;Enqueue statistics data migration: do not compare Enqueue statistics data&lt;br /&gt;collected pre-10.1 to the Enqueue statistics data captured in 10.1 (for more&lt;br /&gt;details, see section 'Upgrading the Statspack schema from 9.2 to 10.1').&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Backups&lt;br /&gt;~~~~~~~&lt;br /&gt;Note: There is no downgrade script. Backup the PERFSTAT schema using&lt;br /&gt;export BEFORE attempting the upgrade, in case the upgrade fails.&lt;br /&gt;The only method of downgrading, or re-running the upgrade is to&lt;br /&gt;de-install Statspack, and import a previously made export.&lt;br /&gt;&lt;br /&gt;Before running the upgrade script, export the Statspack schema (for a&lt;br /&gt;backup), then disable any scripts which use Statspack, as these will&lt;br /&gt;interfere with the upgrade. For example, if you use a dbms_job to&lt;br /&gt;gather statistics, disable this job for the duration of the upgrade.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Volumes&lt;br /&gt;~~~~~~~~~~~~&lt;br /&gt;If there is a large volume of data in the Statspack schema (i.e. a large&lt;br /&gt;number of snapshots), to avoid a long upgrade time or avoid an unsuccessful&lt;br /&gt;upgrade:&lt;br /&gt;- ensure there is enough free space in PERFSTAT's default tablespace&lt;br /&gt;before starting the upgrade (each individual upgrade section will&lt;br /&gt;describe how to estimate the required disk space)&lt;br /&gt;- if you do not use Automatic Undo Management, ensure you specify a large&lt;br /&gt;rollback segment, if prompted&lt;br /&gt;- if you do not use Automatic Memory Management, ensure you specify a large&lt;br /&gt;sort_area_size (e.g. 1048576), if prompted&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rollback segment errors during upgrade&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;If it is required, the upgrade script will prompt you for the rollback segment&lt;br /&gt;and sort_area_size to be used on your site. If you do not need to specify a&lt;br /&gt;rollback segment or sort_area_size (e.g. because you use Automatic Undo&lt;br /&gt;Management and PGA Aggregate Target) simply press return, and ignore the&lt;br /&gt;following errors appearing in the upgrade log file:&lt;br /&gt;&lt;br /&gt;alter session set sort_area_size =&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-02017: integer value required&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;set transaction use rollback segment&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-02245: invalid ROLLBACK SEGMENT name&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Package Compilation errors during upgrade over multiple releases&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Errors in compiling the STATSPACK *package body* *while in the process* of&lt;br /&gt;running multiple Statspack upgrade scripts consecutively (e.g. when&lt;br /&gt;upgrading multiple releases) should be ignored.&lt;br /&gt;&lt;br /&gt;If your site is upgrading from (for example) 9.0 to 10.1 and has 10.1&lt;br /&gt;installed, to upgrade the Statspack schema from 9.0 to 10.1, spup90.sql&lt;br /&gt;followed by spup92.sql must be run.&lt;br /&gt;&lt;br /&gt;The Statspack package compilation which is a part of the first upgrade&lt;br /&gt;script (spup90.sql) will fail with errors; this is expected, as the schema&lt;br /&gt;is in a partially upgraded state, and will not be fully upgraded to 10.1 until&lt;br /&gt;spup92.sql is also run.&lt;br /&gt;&lt;br /&gt;The final package compilation which is run as a part of the last upgrade&lt;br /&gt;script (in this case spup92.sql), must complete successfully.&lt;br /&gt;&lt;br /&gt;Note: The above example is not specific for the 9.0 to 10.1 upgrade,&lt;br /&gt;it applies equally when upgrading Statspack through multiple&lt;br /&gt;releases, no matter which releases.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.1. Upgrading the Statspack schema from 10.1 to 10.2&lt;br /&gt;&lt;br /&gt;Follow the general instructions in section 10.2. 'Upgrading an existing&lt;br /&gt;Statspack schema to a newer release' above.&lt;br /&gt;&lt;br /&gt;To upgrade:&lt;br /&gt;- ensure you have sufficient free space in the tablespace&lt;br /&gt;- disable any programs which use Statspack&lt;br /&gt;- backup the Statspack schema (e.g. using export)&lt;br /&gt;- run the upgrade by connecting as a user with SYSDBA privilege:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @spup101&lt;br /&gt;&lt;br /&gt;Once the upgrade script completes, check the log files (spup101a.lis and&lt;br /&gt;spup101b.lis) for errors. If errors are evident, determine and rectify the&lt;br /&gt;cause. If no errors are evident, re-enable any Statspack data&lt;br /&gt;collection or reporting scripts which were previously disabled.&lt;br /&gt;&lt;br /&gt;10.2.2. Upgrading the Statspack schema from 9.2 to 10.1&lt;br /&gt;&lt;br /&gt;Follow the general instructions in section 10.2. 'Upgrading an existing&lt;br /&gt;Statspack schema to a newer release' above.&lt;br /&gt;&lt;br /&gt;This release creates new tables and indexes, and requires approx.&lt;br /&gt;20 extra MB.&lt;br /&gt;&lt;br /&gt;To upgrade:&lt;br /&gt;- ensure you have sufficient free space in the tablespace&lt;br /&gt;- disable any programs which use Statspack&lt;br /&gt;- backup the Statspack schema (e.g. using export)&lt;br /&gt;- run the upgrade by connecting as a user with SYSDBA privilege:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @spup92&lt;br /&gt;&lt;br /&gt;Once the upgrade script completes, check the log files (spup92a.lis and&lt;br /&gt;spup92b.lis) for errors. If errors are evident, determine and rectify the&lt;br /&gt;cause. If no errors are evident, re-enable any Statspack data&lt;br /&gt;collection or reporting scripts which were previously disabled.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Compatibility - 'enqueue' wait event&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Note that in 10.1, each enqueue has it's own distinct wait event, and the&lt;br /&gt;general 'enqueue' wait event will no longer be used. Instead of seeing&lt;br /&gt;'enqueue' as a wait event, you will now see 'enqueue: enqueue name -&lt;br /&gt;request reason'&lt;br /&gt;e.g.&lt;br /&gt;enqueue: Transaction - row lock contention&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Compatibility - 'latch free' wait event&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Note that in 10.1, many latches each have their distinct wait event. The&lt;br /&gt;general 'latch free' wait event is still used, but only represents data&lt;br /&gt;for those latches which do not have their own event. So it is now possible&lt;br /&gt;to see 'latch free' as well as 'latch: &lt;latch name&gt;' in the list of&lt;br /&gt;wait events&lt;br /&gt;e.g.&lt;br /&gt;latch: cache buffers chains&lt;br /&gt;latch free&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Compatibility - Enqueue Statistics&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;A new v$view has been added in 10.1 - v$enqueue_statistics. This view&lt;br /&gt;differs from the existing v$enqueue_stat view, as in addition to breaking&lt;br /&gt;down enqueue activity by enqueue Type, it also breaks down enqueue requests&lt;br /&gt;by Request Reason. So for enqueues which can be requested for multiple&lt;br /&gt;purposes, the data is broken down by reason.&lt;br /&gt;&lt;br /&gt;e.g. TX enqueue (transaction enqueue) can be requested for multiple reasons.&lt;br /&gt;&lt;br /&gt;In 10.1 the data may look like:&lt;br /&gt;Enqueue Type (Request Reason) Requests&lt;br /&gt;----------------------------------- -------------&lt;br /&gt;TX-Transaction (row lock contention) 55&lt;br /&gt;TX-Transaction (allocate ITL entry) 1&lt;br /&gt;&lt;br /&gt;Whereas in 9.2 the data would look like:&lt;br /&gt;Enqueue Type Requests&lt;br /&gt;----------------------------------- -------------&lt;br /&gt;TX 56&lt;br /&gt;&lt;br /&gt;Statspack has been enhanced to use the new v$enqueue_statistics view, rather&lt;br /&gt;than continue using v$enqueue_stat.&lt;br /&gt;The Statspack upgrade script spup92.sql migrates the data captured from&lt;br /&gt;prior releases into the new format, in order to avoid losing historical data.&lt;br /&gt;&lt;br /&gt;Note for the reasons explained in the example above, you must sum up the&lt;br /&gt;enqueue statistics by Type in a 10.1 Statspack report, to be able to&lt;br /&gt;make the equivalent comparison to the data shown in a 9.2 report.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Compatibility - Changing of RAC Statistics and Event Names&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Real Application Cluster Event Names and Statistics have been changed&lt;br /&gt;from 'global cache xxx' to 'gc xxx'. Historical performance data stored&lt;br /&gt;in the Statspack schema has not been modified to reflect the new names,&lt;br /&gt;so when comparing a Statspack report on a pre-10g system, be aware the&lt;br /&gt;statistic names and event names may have changed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Compatibility - Changing SQL Hash Value, and new SQL Id&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;The computed value of the Hash Value column in the V$SQL family of tables&lt;br /&gt;(v$sql, v$sqlarea, v$sqltext etc) has changed in release 10g. This means the&lt;br /&gt;same SQL statement will have a different hash_value in 10g than in prior&lt;br /&gt;releases. This change has been made as a consequence of introducing the&lt;br /&gt;new SQL Id column. SQL Id can be considered a 'more unique' hash_value.&lt;br /&gt;The new SQL Id has been introduced to further reduce the probability of a&lt;br /&gt;'hash collision' where two distinct SQL statements hash to the same&lt;br /&gt;hash_number.&lt;br /&gt;Statspack captures SQL Id, but does not use it as the unique identifier.&lt;br /&gt;Instead, Statspack continues to use the hash_value and first 31 bytes of the&lt;br /&gt;SQL text to uniquely identify a SQL statement (AWR uses SQL Id).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.3. Upgrading the Statspack schema from 9.0 to 9.2&lt;br /&gt;&lt;br /&gt;Follow the general instructions in section 10.2. 'Upgrading an existing&lt;br /&gt;Statspack schema to a newer release' above.&lt;br /&gt;&lt;br /&gt;This release creates new tables and indexes, and requires approx.&lt;br /&gt;20 extra MB.&lt;br /&gt;&lt;br /&gt;To upgrade:&lt;br /&gt;- ensure you have sufficient free space in the tablespace&lt;br /&gt;- disable any programs which use Statspack&lt;br /&gt;- backup the Statspack schema (e.g. using export)&lt;br /&gt;- run the upgrade by connecting as a user with SYSDBA privilege:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @spup90&lt;br /&gt;&lt;br /&gt;Once the upgrade script completes, check the log files (spup90a.lis and&lt;br /&gt;spup90b.lis) for errors. If errors are evident, determine and rectify the&lt;br /&gt;cause. If no errors are evident, re-enable any Statspack data&lt;br /&gt;collection or reporting scripts which were previously disabled.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL Plan Usage Data Upgrade note:&lt;br /&gt;If there is more than one database in a single Statspack schema (i.e.&lt;br /&gt;there are multiple distinct dbid's), AND if Level 6 snapshots have&lt;br /&gt;been taken using the 9.0 release Statspack, then the SQL plan usage&lt;br /&gt;data will be saved, but will not be queried by the sprepsql.sql&lt;br /&gt;SQL report (this is because during the data conversion, it will not&lt;br /&gt;be possible to identify which database first identified a plan&lt;br /&gt;usage).&lt;br /&gt;For more details see 'SQL Plan Usage capture changed' in the 'Changes&lt;br /&gt;between 9.0 and 9.2' section of this document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.4. Upgrading the Statspack schema from 8.1.7 to 9.0&lt;br /&gt;&lt;br /&gt;Follow the general instructions in section 10.2. 'Upgrading an existing&lt;br /&gt;Statspack schema to a newer release' above.&lt;br /&gt;&lt;br /&gt;Then, to estimate whether you have sufficient free space to run this&lt;br /&gt;upgrade, execute the following SQL statement while connected as PERFSTAT in&lt;br /&gt;SQL*Plus:&lt;br /&gt;&lt;br /&gt;select 10 + (2*sum(bytes)/1024/1024) est_space_mb&lt;br /&gt;from dba_segments&lt;br /&gt;where segment_name in ('STATS$ENQUEUESTAT');&lt;br /&gt;&lt;br /&gt;The est_space_mb column will give you a guesstimate as to the required&lt;br /&gt;free space, in megabytes.&lt;br /&gt;&lt;br /&gt;To upgrade:&lt;br /&gt;- ensure you have sufficient free space in the tablespace&lt;br /&gt;- disable any programs which use Statspack&lt;br /&gt;- backup the Statspack schema (e.g. using export)&lt;br /&gt;- run the upgrade by connecting as a user with SYSDBA privilege:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @spup817&lt;br /&gt;&lt;br /&gt;Once the upgrade script completes, check the log files (spup817a.lis and&lt;br /&gt;spup817b.lis) for errors. If errors are evident, determine and rectify&lt;br /&gt;the cause before proceeding. If no errors are evident, and you are upgrading&lt;br /&gt;to 9.2, you may proceed with the upgrade.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Compatibility&lt;br /&gt;~~~~~~~~~~~~~~~~~~&lt;br /&gt;Prior to release 9.0, the STATS$ENQUEUESTAT table gathered data based on&lt;br /&gt;an X$ table, rather than a V$view. In 9.0, the column data within the&lt;br /&gt;underlying X$ table has been considerably improved, and the data&lt;br /&gt;externalised via the V$ENQUEUE_STAT view.&lt;br /&gt;&lt;br /&gt;The Statspack upgrade script spup817.sql migrates the data captured from&lt;br /&gt;prior releases into the new format, in order to avoid losing historical data.&lt;br /&gt;&lt;br /&gt;Note however, that the column names and data contained within the columns&lt;br /&gt;has changed considerably between the two releases: the STATS$ENQUEUE_STAT&lt;br /&gt;columns in 9.0 capture different data to the columns which existed in the&lt;br /&gt;STATS$ENQUEUESTAT table in the 8.1. Statspack releases.&lt;br /&gt;&lt;br /&gt;The column data migration performed by spup817.sql is as follows:&lt;br /&gt;&lt;br /&gt;8.1 STATS$ENQUEUESTAT 9.0 STATS$ENQUEUE_STAT&lt;br /&gt;--------------------- ----------------------&lt;br /&gt;GETS TOTAL_REQ#&lt;br /&gt;WAITS TOTAL_WAIT#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To further emphasise the difference, the column definitions appear below:&lt;br /&gt;&lt;br /&gt;STATS$ENQUEUESTAT.GETS - 8.1&lt;br /&gt;Reflected the number of enqueue gets, excluding enqueue conversions.&lt;br /&gt;This statistic was incremented at the end of a get.&lt;br /&gt;&lt;br /&gt;STATS$ENQUEUE_STAT.TOTAL_REQ# - 9.0&lt;br /&gt;Is the total number of requests for an enqueue + the number of&lt;br /&gt;enqueue conversions. This statistic is incremented at the beginning&lt;br /&gt;of a get request.&lt;br /&gt;&lt;br /&gt;STATS$ENQUEUESTAT.WAITS - 8.1&lt;br /&gt;Reflected the number of times a session waited for at least 3&lt;br /&gt;seconds for an enqueue operation (get or convert). The statistic&lt;br /&gt;was incremented at the end of the wait (either if the enqueue was&lt;br /&gt;successfully gotten or if the request timed out). If a session waited&lt;br /&gt;for less than 3 seconds, this statistic was not incremented.&lt;br /&gt;&lt;br /&gt;STATS$ENQUEUE_STAT.TOTAL_WAIT# - 9.0&lt;br /&gt;Is the total number of times a session waited for any enqueue operation.&lt;br /&gt;This statistic is incremented at the beginning of the wait.&lt;br /&gt;&lt;br /&gt;For these reasons it is not valid to compare Enqueue statistics data&lt;br /&gt;collected pre-9.0, to Enqueue statistics data captured in Oracle9i.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.5. Upgrading the Statspack schema from 8.1.6 to 8.1.7&lt;br /&gt;&lt;br /&gt;Follow the general instructions in section 10.2. 'Upgrading an existing&lt;br /&gt;Statspack schema to a newer release' above.&lt;br /&gt;&lt;br /&gt;Then, to estimate whether you have sufficient free space to run this&lt;br /&gt;upgrade, execute the following SQL statement while connected as PERFSTAT in&lt;br /&gt;SQL*Plus:&lt;br /&gt;&lt;br /&gt;select 1.3*sum(bytes)/1024/1024 est_space_mb&lt;br /&gt;from dba_segments&lt;br /&gt;where segment_name in ('STATS$SQL_SUMMARY','STATS$SQL_SUMMARY_PK');&lt;br /&gt;The est_space_mb column will give you a guesstimate as to the required&lt;br /&gt;free space, in megabytes.&lt;br /&gt;The larger the SQL statements in the sql_summary table, the more space will&lt;br /&gt;be released after the upgrade is complete.&lt;br /&gt;&lt;br /&gt;To upgrade:&lt;br /&gt;- ensure you have sufficient free space in the tablespace&lt;br /&gt;- disable any programs which use Statspack&lt;br /&gt;- backup the Statspack schema (e.g. using export)&lt;br /&gt;- run the upgrade by connecting as a user with SYSDBA privilege:&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @spup816&lt;br /&gt;&lt;br /&gt;Once the upgrade script completes, check the log files (spup816a.lis and&lt;br /&gt;spup816b.lis) for errors. If errors are evident, determine and rectify&lt;br /&gt;the cause before proceeding. If no errors are evident, and you are upgrading&lt;br /&gt;to 9.0, you may proceed with the upgrade.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.6. Upgrading the Statspack schema from 8.1.6 to 9.2&lt;br /&gt;&lt;br /&gt;If you are running 8.1.6 Statspack and wish to upgrade to 9.2 Statspack, you&lt;br /&gt;must follow the upgrade steps - in the following order:&lt;br /&gt;- 10.2.4. Upgrading the Statspack schema from 8.1.6 to 8.1.7&lt;br /&gt;- 10.2.3. Upgrading the Statspack schema from 8.1.7 to 9.0&lt;br /&gt;- 10.2.2. Upgrading the Statspack schema from 9.0 to 9.2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.7. Upgrading the Statspack schema from 8.1.6 to 9.0&lt;br /&gt;&lt;br /&gt;If you are running 8.1.6 Statspack and wish to upgrade to 9.0 Statspack, you&lt;br /&gt;must follow the upgrade steps - in the following order:&lt;br /&gt;- 10.2.4. Upgrading the Statspack schema from 8.1.6 to 8.1.7&lt;br /&gt;- 10.2.3. Upgrading the Statspack schema from 8.1.7 to 9.0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.2.8. Upgrading the Statspack schema from 8.1.7 to 9.2&lt;br /&gt;&lt;br /&gt;If you are running 8.1.7 Statspack and wish to upgrade to 9.2 Statspack, you&lt;br /&gt;must follow the upgrade steps - in the following order:&lt;br /&gt;- 10.2.2. Upgrading the Statspack schema from 8.1.7 to 9.0&lt;br /&gt;- 10.2.1. Upgrading the Statspack schema from 9.0 to 9.2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. Oracle Real Application Clusters specific considerations&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;11.1. Changing Instance Numbers&lt;br /&gt;&lt;br /&gt;The unique identifier for a database instance used by Statspack is the&lt;br /&gt;dbid and the instance_number. When in a Real Application Clusters environment,&lt;br /&gt;it is possible the instance_number may change between startups (either&lt;br /&gt;because the instance_number initialization parameter is set, or&lt;br /&gt;because the instances are started in a different order).&lt;br /&gt;&lt;br /&gt;In this case, as Statspack uses the instance_number and the dbid to identify&lt;br /&gt;the instance's snapshot preferences, it is important to note that this may&lt;br /&gt;inadvertently result in a different set of levels or thresholds being&lt;br /&gt;used when snapshotting an instance.&lt;br /&gt;&lt;br /&gt;There are three conditions which must be met for this to occur:&lt;br /&gt;- the instance numbers must have switched between startups&lt;br /&gt;- the DBA must have modified the default Statspack parameters used for&lt;br /&gt;at least one of the instances&lt;br /&gt;- the parameters used (e.g. thresholds and snapshot level) must not be&lt;br /&gt;the same on all instances&lt;br /&gt;&lt;br /&gt;Note that the only way the parameters will differ is if the parameters&lt;br /&gt;have been explicitly modified by the DBA after installation, either by&lt;br /&gt;saving the specified values or by using the modify_statspack_parameter&lt;br /&gt;procedure.&lt;br /&gt;&lt;br /&gt;It is easy to check whether any of the Statspack snapshot parameters are&lt;br /&gt;different for the instances by querying the STATS$STATSPACK_PARAMETER table.&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;If you have changed the default Statspack parameters you may&lt;br /&gt;wish to avoid encountering this problem by hard-coding the instance_number&lt;br /&gt;initialization parameter for each of the instances of a Clustered&lt;br /&gt;database - this will avoid encountering this problem.&lt;br /&gt;For recommendations and issues with setting the instance_number&lt;br /&gt;initialization parameter, please see the Real Application Clusters&lt;br /&gt;documentation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11.2. Real Application Clusters Specific Reports&lt;br /&gt;&lt;br /&gt;sprepins.sql&lt;br /&gt;sprepins.sql can be run to query performance data for any instance which the&lt;br /&gt;PERFSTAT schema contains. The report will prompt for a dbid,&lt;br /&gt;instance_number and begin and end snap id's.&lt;br /&gt;&lt;br /&gt;This report can be used when importing data from another instance, or in a&lt;br /&gt;Real Application Clusters environment to report on an instance which you are&lt;br /&gt;not connected to.&lt;br /&gt;&lt;br /&gt;For more information on sprepins.sql, see the 'Running the instance report&lt;br /&gt;when there are multiple instances' section of this document.&lt;br /&gt;&lt;br /&gt;sprsqins.sql&lt;br /&gt;sprsqins.sql can be run to query SQL performance data for any instance&lt;br /&gt;which the PERFSTAT schema contains. The report will prompt for a dbid,&lt;br /&gt;instance_number, begin and end snap id's, and hash value.&lt;br /&gt;&lt;br /&gt;This report can be used when importing data from another instance, or in a&lt;br /&gt;Real Application Clusters environment to report on an instance which you&lt;br /&gt;are not connected to.&lt;br /&gt;&lt;br /&gt;For more information on sprsqins.sql, see the 'Running the SQL report&lt;br /&gt;when there are multiple instances' section of this document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11.3 Real Application Clusters Specific Data&lt;br /&gt;&lt;br /&gt;New Real Application Clusters specific data displayed in Statspack instance&lt;br /&gt;report:&lt;br /&gt;&lt;br /&gt;- Page 2 of the Statspack report for a RAC instance displays RAC specific&lt;br /&gt;derived statistics.&lt;br /&gt;- RAC segment statistics&lt;br /&gt;- RAC-specific data for Library Cache and Dictionary Cache&lt;br /&gt;- Global Enqueue Statistics from v$ges_statistics&lt;br /&gt;- Global CR Served Statistics&lt;br /&gt;- Global CURRENT Served Statistics&lt;br /&gt;- Global Cache Transfer Statistics&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. Conflicts and differences compared to UTLBSTAT/UTLESTAT&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;12.1. Running BSTAT/ESTAT in conjunction to Statspack&lt;br /&gt;&lt;br /&gt;If you choose to run BSTAT/ESTAT in conjunction to Statspack, do not do&lt;br /&gt;run both as the same user, as there is a table name conflict - this table&lt;br /&gt;is stats$waitstat.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12.2. Differences between Statspack and BSTAT/ESTAT&lt;br /&gt;&lt;br /&gt;Statspack considers a transaction to either finish with a commit or a&lt;br /&gt;rollback, and so calculates the number of transactions thus:&lt;br /&gt;'user commits' + 'user rollbacks'&lt;br /&gt;&lt;br /&gt;BSTAT/ESTAT considers a transaction to complete with a commit only, and&lt;br /&gt;so assumes that transactions = 'user commits'&lt;br /&gt;&lt;br /&gt;For this reason, comparing per transaction statistics between Statspack and&lt;br /&gt;BSTAT/ESTAT may result in significantly different per transaction ratios.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;13. Removing the package&lt;br /&gt;-------------------------&lt;br /&gt;&lt;br /&gt;To deinstall the package, connect as a user with SYSDBA privilege and run&lt;br /&gt;the following script from SQL*Plus: spdrop&lt;br /&gt;e.g.&lt;br /&gt;SQL&gt; connect / as sysdba&lt;br /&gt;SQL&gt; @spdrop&lt;br /&gt;&lt;br /&gt;This script actually calls 2 other scripts:&lt;br /&gt;1. spdtab -&gt; Drops tables and public synonyms&lt;br /&gt;2. spdusr -&gt; Drops the user&lt;br /&gt;&lt;br /&gt;Check each of the two output files produced (spdtab.lis, spdusr.lis)&lt;br /&gt;to ensure the package was completely deinstalled.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14. Supplied Scripts Overview&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;Installation&lt;br /&gt;&lt;br /&gt;Must be run as a user with SYSDBA privilege&lt;br /&gt;spcreate.sql -&gt; Creates entire Statspack environment (calls&lt;br /&gt;spcusr.sql, spctab.sql, spcpkg.sql)&lt;br /&gt;spdrop.sql -&gt; Drops entire Statspack environment (calls&lt;br /&gt;spdtab.sql, spdusr.sql)&lt;br /&gt;&lt;br /&gt;Are run as a user with SYSDBA priv by the calling scripts (above)&lt;br /&gt;spdtab.sql -&gt; Drops Statspack tables&lt;br /&gt;spdusr.sql -&gt; Drops the Statspack user (PERFSTAT)&lt;br /&gt;&lt;br /&gt;Are run as PERFSTAT by the calling scripts (above)&lt;br /&gt;spcusr.sql -&gt; Creates the Statspack user (PERFSTAT)&lt;br /&gt;spctab.sql -&gt; Creates Statspack tables&lt;br /&gt;spcpkg.sql -&gt; Creates the Statspack package&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reporting and Automation&lt;br /&gt;&lt;br /&gt;Must be run as PERFSTAT&lt;br /&gt;spreport.sql -&gt; Generates a Statspack Instance report&lt;br /&gt;sprepins.sql -&gt; Generates a Statspack Instance report for the&lt;br /&gt;database and instance specified&lt;br /&gt;sprepsql.sql -&gt; Generates a Statspack SQL report for the&lt;br /&gt;SQL Hash Value specified&lt;br /&gt;sprsqins.sql -&gt; Generates a Statspack SQL report for the&lt;br /&gt;SQL Hash Value specified, for the database and&lt;br /&gt;instance specified&lt;br /&gt;spauto.sql -&gt; Automates Statspack statistics collection&lt;br /&gt;(using dbms_job)&lt;br /&gt;sprepcon.sql -&gt; Script which configures SQL*Plus variables which&lt;br /&gt;affect certain aspects of the Statspack instance&lt;br /&gt;report spreport.sql This script is automatically&lt;br /&gt;called as a part of the Statspack instance&lt;br /&gt;report.&lt;br /&gt;&lt;br /&gt;Upgrading&lt;br /&gt;&lt;br /&gt;Must be run as SYSDBA&lt;br /&gt;spup92.sql -&gt; Converts data from the 9.2 schema to the&lt;br /&gt;newer 10.1 schema. Backup the existing schema&lt;br /&gt;before running the upgrade. If upgrading from&lt;br /&gt;Statspack 8.1.6, spup816.sql must be run, then&lt;br /&gt;spup817.sql, then spup90.sql, then spup92.sql&lt;br /&gt;spup90.sql -&gt; Converts data from the 9.0 schema to the&lt;br /&gt;newer 9.2 schema. Backup the existing schema&lt;br /&gt;before running the upgrade. If upgrading from&lt;br /&gt;Statspack 8.1.6, spup816.sql must be run, then&lt;br /&gt;spup817.sql, then spup90.sql&lt;br /&gt;spup817.sql -&gt; Converts data from the 8.1.7 schema to the&lt;br /&gt;newer 9.0 schema. Backup the existing schema&lt;br /&gt;before running the upgrade. If upgrading from&lt;br /&gt;Statspack 8.1.6, spup816.sql must be run, then&lt;br /&gt;spup817.sql&lt;br /&gt;spup816.sql -&gt; Converts data from the 8.1.6 schema to the&lt;br /&gt;8.1.7 schema. Backup the existing schema&lt;br /&gt;before running the upgrade&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Performance Data Maintenance&lt;br /&gt;&lt;br /&gt;Must be run as PERFSTAT&lt;br /&gt;sppurge.sql -&gt; Purges a limited range of Snapshot Id's for&lt;br /&gt;a given database instance&lt;br /&gt;sptrunc.sql -&gt; Truncates all Performance data in Statspack tables&lt;br /&gt;WARNING - Do not use unless you wish to remove&lt;br /&gt;all data in the schema you are using.&lt;br /&gt;You may choose to export the data&lt;br /&gt;as a backup before using this script&lt;br /&gt;spuexp.par -&gt; An export parameter file supplied for exporting&lt;br /&gt;the whole PERFSTAT user&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Documentation&lt;br /&gt;&lt;br /&gt;Should be read by the DBA running the scripts&lt;br /&gt;spdoc.txt -&gt; This file contains instructions and&lt;br /&gt;documentation on the STATSPACK package&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15. Limitations and Modifications&lt;br /&gt;----------------------------------&lt;br /&gt;&lt;br /&gt;15.1. Limitations&lt;br /&gt;&lt;br /&gt;As the Statspack schema is updated to reflect the features in the&lt;br /&gt;latest Oracle releases, the schema may change; backward compatibility&lt;br /&gt;is not guaranteed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15.2. Modifications&lt;br /&gt;&lt;br /&gt;All Statspack code is Oracle proprietary and must not be modified. Any&lt;br /&gt;modifications made to Statspack software will render the code and&lt;br /&gt;data captured thereafter unsupported; unsupported changes may result in&lt;br /&gt;errors in data capture or reporting. Instead, please request enhancements.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;References&lt;br /&gt;NOTE:276103.1 - PERFORMANCE TUNING USING 10g ADVISORS AND MANAGEABILITY FEATURES&lt;br /&gt;Note 94224.1:FAQ- STATSPACK COMPLETE REFERENCE&lt;br /&gt;---------------------------------------------------------------------------&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-8938594798568451184?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/8938594798568451184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=8938594798568451184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/8938594798568451184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/8938594798568451184'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/04/statistics-package-statspack-guide.html' title='Statistics Package (STATSPACK) Guide'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-818967709982594781</id><published>2010-03-09T16:46:00.000-08:00</published><updated>2010-03-09T16:52:03.331-08:00</updated><title type='text'>INSTALL DATABASE COMPONENTS</title><content type='html'>INSTALL DATABASE COMPONENTS&lt;br /&gt;&lt;br /&gt;To check which components are presently installed run this query.&lt;br /&gt;&lt;br /&gt;SELECT comp_name || '    :    '||version|| '    :    '|| status FROM dba_registry;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT comp_name || '    :    '||version|| '    :    '|| status FROM dba_registry;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;COMP_NAME||':'||VERSION||':'||STATUS&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Oracle Database Catalog Views    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Packages and Types    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;JServer JAVA Virtual Machine    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle XDK    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Java Packages    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Expression Filter    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle XML Database    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;install components missing:&lt;br /&gt;&lt;br /&gt;===========================&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;id=472937.1&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT comp_name || '    :    '||version|| '    :    '|| status FROM dba_registry;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;COMP_NAME||':'||VERSION||':'||STATUS&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Oracle Database Catalog Views    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Packages and Types    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;JServer JAVA Virtual Machine    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle XDK    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Java Packages    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Expression Filter    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle XML Database    :    10.2.0.4.0    :    VALID&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;@?/javavm/install/initjvm.sql;&lt;br /&gt;&lt;br /&gt;http://www.adp-gmbh.ch/ora/xml_db/install.html&lt;br /&gt;&lt;br /&gt;Oracle XML Database (http://www.lorentzcenter.nl/awcourse/oracle/appdev.920/a96620/appaman.htm#637391)&lt;br /&gt;&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catqm.sql change_on_install XDB TEMP&lt;br /&gt;&lt;br /&gt;Reconnect to SYS again and run the following:&lt;br /&gt;&lt;br /&gt;catxdbj.sql          #Load xdb java library &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;@?/xdk/admin/initxml.sql;&lt;br /&gt;&lt;br /&gt;@?/xdk/admin/xmlja.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catjava.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catexf.sql;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;for installing [Oracle XML Database]&lt;br /&gt;&lt;br /&gt;1) create tablespace XDB&lt;br /&gt;&lt;br /&gt;2) @?/rdbms/admin/catqm xml_password xdb temp  &lt;br /&gt;&lt;br /&gt;---&gt;[ eg: catqm &lt;xml_passwd for new user XDB) (XDB - tablespace_name) (temp tablespace)]&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;create tablespace XDB &lt;br /&gt;&lt;br /&gt;datafile '/ora22/u01/oracle/str2/data/xdb.dbf' size 500M;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catqm xml_passwd XDB temp&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; select username , password from dba_users where username='XDB';&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;USERNAME                       PASSWORD&lt;br /&gt;&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;&lt;br /&gt;XDB                            FD6C945857807E3C&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;alter user xdb identified by values 'FD6C945857807E3C':&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;----------------&lt;br /&gt;&lt;br /&gt;hanmant: @?/javavm/install/initjvm.sql;&lt;br /&gt;&lt;br /&gt;@?/xdk/admin/initxml.sql;&lt;br /&gt;&lt;br /&gt;@?/xdk/admin/xmlja.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catjava.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catexf.sql;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;11:06:34 AM: hanmant: @?/rdbms/admin/catalog.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catblock.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catproc.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/catoctk.sql;&lt;br /&gt;&lt;br /&gt;@?/rdbms/admin/owminst.plb;&lt;br /&gt;&lt;br /&gt;@?/sqlplus/admin/pupbld.sql;&lt;br /&gt;&lt;br /&gt;@?/sqlplus/admin/help/hlpbld.sql &lt;br /&gt;&lt;br /&gt;@?/sqlplus/admin/helphelpus.sql;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;$ORACLE_HOME/dm/admin/dmuserld.sql&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;for installing ORACLE TEXT:&lt;br /&gt;&lt;br /&gt;---------------------------&lt;br /&gt;&lt;br /&gt;https://support.oracle.com/CSP/main/article?cmd=show&amp;id=280713.1&amp;type=NOT&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; connect SYS/password@tns_ as SYSDBA&lt;br /&gt;&lt;br /&gt;SQL&gt; spool text_install.txt&lt;br /&gt;&lt;br /&gt;SQL&gt; @?/ctx/admin/catctx.sql CTXSYS SYSAUX TEMP NOLOCK&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;for manually installing ORACLE DATA MINING:&lt;br /&gt;&lt;br /&gt;-------------------------------------------&lt;br /&gt;&lt;br /&gt;https://support.oracle.com/CSP/main/article?cmd=show&amp;id=420791.1&amp;type=NOT&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;For RDBMS 10.2.x&lt;br /&gt;&lt;br /&gt;1. Set ORACLE_HOME and ORACLE_SID.&lt;br /&gt;&lt;br /&gt;2. START SQLPlus and connect with SYS user as SYSDBA.&lt;br /&gt;&lt;br /&gt;3. Execute the following commands:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Unix - Linux&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; run $ORACLE_HOME/rdbms/admin/dminst.sql SYSAUX TEMP&lt;br /&gt;&lt;br /&gt;SQL&gt; run $ORACLE_HOME/rdbms/admin/odmpatch.sql&lt;br /&gt;&lt;br /&gt;SQL&gt; run $ORACLE_HOME/rdbms/admin/utlrp.sql&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Windows &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; start %ORACLE_HOME%\rdbms\admin\dminst.sql SYSAUX TEMP &lt;br /&gt;&lt;br /&gt;SQL&gt; start %ORACLE_HOME%\rdbms\admin\odmpatch.sql &lt;br /&gt;&lt;br /&gt;SQL&gt; start %ORACLE_HOME%\rdbms\admin\utlrp.sql&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;4. Ensure 'Oracle Data Mining' is at Valid status in dba_registry by executing the following query:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; select COMP_NAME,VERSION,STATUS from dba_registry where COMP_NAME='Oracle Data Mining';&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT comp_name || '    :    '||version|| '    :    '|| status FROM dba_registry;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;COMP_NAME||':'||VERSION||':'||STATUS&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Oracle Text    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Workspace Manager    :    10.2.0.1.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Data Mining    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle XML Database    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Expression Filter    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Catalog Views    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Packages and Types    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;JServer JAVA Virtual Machine    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle XDK    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt;Oracle Database Java Packages    :    10.2.0.3.0    :    VALID&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;10 rows selected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-818967709982594781?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/818967709982594781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=818967709982594781' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/818967709982594781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/818967709982594781'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/03/install-database-components.html' title='INSTALL DATABASE COMPONENTS'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-1537954365542710306</id><published>2010-03-09T15:16:00.000-08:00</published><updated>2010-03-09T15:17:41.236-08:00</updated><title type='text'>PATCH TROUBLESHOOTING FOR ORACLE APPLICATIONS RELEASE 11</title><content type='html'>&lt;br /&gt;         PATCH TROUBLESHOOTING FOR ORACLE APPLICATIONS RELEASE 11&lt;br /&gt;&lt;br /&gt;This document is designed to help you troubleshoot problems with the &lt;br /&gt;application of a patch in Oracle Applications Release 11.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.  When applying patches, where should the patch files reside for adpatch to &lt;br /&gt;    find them?&lt;br /&gt;&lt;br /&gt;        The patches can be copied anywhere as long as the environment is set &lt;br /&gt;        correctly when executing adpatch.  You may usually find that these are &lt;br /&gt;        in a directory under $APPL_TOP.&lt;br /&gt;&lt;br /&gt;2.  Which drivers should be run first?  If they are run in the wrong order can &lt;br /&gt;    they be run again? &lt;br /&gt;&lt;br /&gt;        Always read the readme.txt.  In general for Release 11, patches can &lt;br /&gt;        include three different drivers: "c", "d" and "g".  The "C" drivers &lt;br /&gt;        (copy) are file system drivers, these are used to update the file &lt;br /&gt;        system with the new versions of certain files.  The "D" drivers are &lt;br /&gt;        database drivers and they run SQL scripts that update database tables &lt;br /&gt;        and objects.  The "G" (generate) drivers are also file system drivers, &lt;br /&gt;        they generate forms and reports.  These drivers are run in alphabetical&lt;br /&gt;        order c, d, then g.  If they are run out of order, rerun them in the&lt;br /&gt;        correct order.&lt;br /&gt;&lt;br /&gt;3.  Where (on which tier) do you run the three different patch drivers?&lt;br /&gt;&lt;br /&gt;        The "c" and "g" drivers are run on all tiers.  The "d" driver is only &lt;br /&gt;        run on the database tier.  In Applications Release 11, there can be &lt;br /&gt;        five different tiers: concurrent processing server, forms server, &lt;br /&gt;        administration server, web server, and database server.  When adpatch &lt;br /&gt;        is run the answers to the configuration questions will determine the &lt;br /&gt;        actions adpatch takes.  The configuration questions are the same &lt;br /&gt;        questions asked by adadmin and adaimgr.  &lt;br /&gt;&lt;br /&gt;           3a.  Do you currently have files used for installing or upgrading &lt;br /&gt;                the database installed in this APPL_TOP?&lt;br /&gt;           3b.  Do you currently have Java and HTML files for Self-Service &lt;br /&gt;                Applications installed in this APPL_TOP?&lt;br /&gt;           3c.  Do you currently have Oracle Applications forms files installed&lt;br /&gt;                in this APPL_TOP?&lt;br /&gt;           3d.  Do you currently have concurrent program files installed in &lt;br /&gt;                this APPL_TOP?&lt;br /&gt;&lt;br /&gt;4.  What is the basic process that adpatch runs with the c driver?&lt;br /&gt;&lt;br /&gt;        The "c" (copy) driver updates the file system.  Below is a portion of &lt;br /&gt;        a patch and an explanation of the activities within the patch.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;               copy		fnd	admin/sql	fnddold.sql  110.4&lt;br /&gt;               copy		fnd	forms/US	FNDADDTC.fmb 110.4&lt;br /&gt;               libout		fnd	lib		afdict.o&lt;br /&gt;               copy		fnd	lib 		afdict.o110.1&lt;br /&gt;               libin		fnd	lib		afdict.o&lt;br /&gt;               forcecopy	fnd	media		FNDIEROR.gif&lt;br /&gt;               link		fnd	bin		FNDCLOAD&lt;br /&gt;&lt;br /&gt;4a. copy		fnd	forms/US	 FNDADDTC.fmb 110.4&lt;br /&gt;&lt;br /&gt;ADPATCH performs version checks allowing it to not overlay a higher version &lt;br /&gt;object or sql files.  If the version on the file system is the same or higher &lt;br /&gt;it skips the copy.  In the above example, notice the version to the right of &lt;br /&gt;the filename.  It uses this version to do the compare.  The "fnd" next to the &lt;br /&gt;copy tells ADPATCH what applications top to use and "forms" points adpatch to &lt;br /&gt;the proper directory.  &lt;br /&gt;&lt;br /&gt;With the above statement ADPATCH will copy the file FNDADDTC.fmb (from the &lt;br /&gt;patch directory) to $FND_TOP/forms.  The copy actually moves the existing &lt;br /&gt;FNDADDTC.fmb file to FNDADDTC.fmbO and then physically copies the new file &lt;br /&gt;version to FNDADDTC.fmb.  The file FNDADDTC.fmbO will remain on the file &lt;br /&gt;system.&lt;br /&gt;&lt;br /&gt;4b.  libout		fnd	lib 	afdict.o&lt;br /&gt;&lt;br /&gt;Libout is a utility that removes files from the library archive.  The archive &lt;br /&gt;file resides in the lib directory under the TOP directory of the application.  &lt;br /&gt;The name of the file is lib&lt;application&gt;.a.  So the archive file for FND is &lt;br /&gt;located in $FND_TOP/lib and is named libfnd.a.  The actual command that libout &lt;br /&gt;executes is:&lt;br /&gt;&lt;br /&gt;     ar -d libfnd.a afdict.o&lt;br /&gt;&lt;br /&gt;This removes the object file (afdict.o) from the library file (libfnd.a).&lt;br /&gt;&lt;br /&gt;4c. libin   	fnd	lib	afdict.o&lt;br /&gt;&lt;br /&gt;Libin is the utility that adds an object file to the library file.  The actual&lt;br /&gt;command that libin executes is:&lt;br /&gt;&lt;br /&gt;     ar -rv libfnd.a afdict.o&lt;br /&gt;&lt;br /&gt;The object file (afdict.o) is appended to the bottom of the library file.  &lt;br /&gt;Libin is executed even if the copy did NOT take place because the information &lt;br /&gt;was already removed with the libout command.&lt;br /&gt;&lt;br /&gt;4d.  forcecopy	fnd	media		FNDIEROR.gif&lt;br /&gt;&lt;br /&gt;Similar to copy, but no version checking is done. Forcecopy copies the target &lt;br /&gt;file irregardless of the presence or version of the file currently on the &lt;br /&gt;target system.&lt;br /&gt;&lt;br /&gt;4e.  link		fnd	bin	FNDCLOAD&lt;br /&gt;&lt;br /&gt;The link process is similar to a compile.  It links new object files together &lt;br /&gt;with the other objects files to create the executable.  The command that the &lt;br /&gt;above link is using:&lt;br /&gt;&lt;br /&gt;      adrelink force=y "fnd FNDCLOAD"&lt;br /&gt;&lt;br /&gt;The "fnd" is the top that the executable is being relinked in.  The executable &lt;br /&gt;FNDCLOAD has to be in the proper case that it would normally appear in the &lt;br /&gt;$FND_TOP/bin directory.&lt;br /&gt;&lt;br /&gt;5.  What does adpatch actually do with a 'd' driver?&lt;br /&gt;&lt;br /&gt;        The "d" (database) drivers alter the tables in the database. These &lt;br /&gt;        patches can create tables, add indexes and alter the APPS schema.  &lt;br /&gt;        The only way to back-out a 'd' driver is with a database backup.  &lt;br /&gt;        Even if the executables are restored (on the file system), they will &lt;br /&gt;        not work because information in the database has changed.&lt;br /&gt;&lt;br /&gt;6.  What does adpatch actually do with a 'g' driver?&lt;br /&gt;&lt;br /&gt;        The "g" (generate) drivers generate forms, .plls (PL/SQL libraries), &lt;br /&gt;        reports and menus.&lt;br /&gt;&lt;br /&gt;        The following is an excerpt from a "g" driver:&lt;br /&gt;&lt;br /&gt;                 genform	fnd	forms/US	FNDWFNOT.fmb &lt;br /&gt;                 genrep		fnd	reports		FNDCPWKM.rdf&lt;br /&gt;                 genfpll	fnd	resource	JL.pll &lt;br /&gt;                 genmenu	fnd	resource/US	FNDMENU.mmb  &lt;br /&gt;&lt;br /&gt;6a.  genform uses f45gen to generate forms.&lt;br /&gt;&lt;br /&gt;     Syntax is: &lt;br /&gt;                 f45gen userid=APPS/APPS module=&lt;form name&gt;.fmb &lt;br /&gt;                 output_file=&lt;full path of schema top&gt;/forms/US/&lt;form name&gt;.fmx &lt;br /&gt;                 module_type=form batch=no compile_all=special&lt;br /&gt;&lt;br /&gt;6b.  genrep uses  r25convm to generate reports&lt;br /&gt;&lt;br /&gt;     Syntax is:&lt;br /&gt;                  r25convm userid=APPS/APPS &lt;br /&gt;                  source=/&lt;full path of schema top&gt;/reports/&lt;report name&gt;.rdf &lt;br /&gt;                  dest=/&lt;full path of schema top&gt;/reports/&lt;report name&gt;.rdf stype=rdffile &lt;br /&gt;                  dtype=rdffile logfile=&lt;report name&gt;.log overwrite=yes batch=yes dunit=character&lt;br /&gt;&lt;br /&gt;6c.  genfpll uses f45gen to generate .plls (forms libraries)&lt;br /&gt;&lt;br /&gt;     Syntax is: &lt;br /&gt;                f45gen userid= APPS/APPS module=&lt;library name&gt;.pll module_type=library     &lt;br /&gt;                output_file=/&lt;full path of schema top&gt; /resource/&lt;library name&gt;.pll&lt;br /&gt;                compile_all=Yes &lt;br /&gt;&lt;br /&gt;6d.  genmenu uses  FNDMDGEN to generate menus&lt;br /&gt;     Syntax is: &lt;br /&gt;                 FNDMDGEN APPS/APPS 0 Y &lt;language codename&gt;&lt;br /&gt;                 DB_TO_RUNTIME  &lt;application shortname&gt; &lt;message filename&gt;.msb&lt;br /&gt;&lt;br /&gt;7.  What happens when a patch is applied where the version is lower than the &lt;br /&gt;    current version?&lt;br /&gt;&lt;br /&gt;        Higher versions contained within the patch are copied, the lower &lt;br /&gt;        versions are ignored.&lt;br /&gt;&lt;br /&gt;8.  Which patches can be backed out should there be a problem?&lt;br /&gt;&lt;br /&gt;        It is always recommended that you perform a cold backup of a system &lt;br /&gt;        prior to applying any patch.  It is also recommended that you apply &lt;br /&gt;        patches to a test system first.  However, for those cases where&lt;br /&gt;        you have not done these two steps; you should know that database &lt;br /&gt;        drivers 'd' CANNOT be backed out without a system backup.  If the "c" &lt;br /&gt;        or "g" drivers need to be backed out, reverse the steps from the "c" &lt;br /&gt;        driver and relink, then reverse the steps from the "g" driver. This &lt;br /&gt;        will require you to manually review the driver files and create &lt;br /&gt;        commands that will do the opposite of the process.  There is no utility&lt;br /&gt;        that you can use to reverse the patch.&lt;br /&gt;&lt;br /&gt;For the section of the above patch, you need to do the following:&lt;br /&gt;&lt;br /&gt;        libout 	fnd	lib	afdict.o&lt;br /&gt;        copy 	fnd 	lib	afdict.o	110 &lt;br /&gt;        libin	fnd 	lib 	afdict.o&lt;br /&gt;        Dearchive afdict.o from libfnd.a, then copy rename afdict.oO to &lt;br /&gt;        afdict.o  and then archive afdict.o into the library file.&lt;br /&gt;&lt;br /&gt;8a. libout   	 fnd 	lib 	afdict.o&lt;br /&gt;&lt;br /&gt;        ar -dv  libfnd.a  afdict.o&lt;br /&gt;&lt;br /&gt;8b. copy     	 fnd       lib 	afdict.o  110&lt;br /&gt;&lt;br /&gt;To reverse this:&lt;br /&gt;&lt;br /&gt;        cp afdict.o0  afdict.o&lt;br /&gt;&lt;br /&gt;8c. libin   	 fnd       lib 	afdict.o&lt;br /&gt;&lt;br /&gt;        ar -rv libfnd.a afdict.o&lt;br /&gt;&lt;br /&gt;This will place the old object file back into the library file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8d.  link      fnd      bin                       FNDCLOAD&lt;br /&gt;&lt;br /&gt;Now the executable needs to be relinked.&lt;br /&gt;&lt;br /&gt;        adrelink force=y ranlib=y "fnd FNDCLOAD&lt;br /&gt;&lt;br /&gt;8e.  copy fnd  forms/US  FNDADDTC.fmb 110.4&lt;br /&gt;&lt;br /&gt;This was the set that copied the file from the patch directory to &lt;br /&gt;$FND_TOP/forms.  To reverse it:&lt;br /&gt;&lt;br /&gt;        cp  FNDADDTC.fmbO  FNDADDTC.fmb&lt;br /&gt;&lt;br /&gt;Adpatch command to generate the form:&lt;br /&gt;&lt;br /&gt;         genform   fnd       forms   FNDADDTC.fmb&lt;br /&gt;&lt;br /&gt;To reverse it:&lt;br /&gt;&lt;br /&gt;        f45gen userid=APPS/APPS module= FNDADDTC.fmb&lt;br /&gt;        output_file=$FND_TOP/forms/US/ FNDADDTC.fmx &lt;br /&gt;        module_type=form batch=no compile_all=special&lt;br /&gt;&lt;br /&gt;9a.  You notice that while running ADPATCH you encounter an error and you are &lt;br /&gt;     being prompted if you want to proceed.  What are the types of errors and &lt;br /&gt;     what should you do?&lt;br /&gt;&lt;br /&gt;        There are two types of errors: Fatal in which ADPATCH halts and &lt;br /&gt;        Non-Fatal errors where users is prompted if they want to proceed.  &lt;br /&gt;        If the user answer Yes, adpatch skips the operation it was trying to &lt;br /&gt;        complete and notes in the $APPL_TOP/install/log/adpatch.log file that &lt;br /&gt;        it was completed.  This could be the cause of problems later on.&lt;br /&gt;&lt;br /&gt;9b.  Should you proceed?  &lt;br /&gt;&lt;br /&gt;        This is a very hard question.  On some patches the answer is NO on &lt;br /&gt;        others it does not matter.  This has to be determined on a case by case&lt;br /&gt;        basis.&lt;br /&gt;&lt;br /&gt;10.  You answered "Yes" to proceed with the patch when it encountered a &lt;br /&gt;     Non-Fatal error.  How can you get ADPATCH to execute that operation again?&lt;br /&gt;&lt;br /&gt;        The only way to get back to the same point is to restart the patch from&lt;br /&gt;        the beginning.&lt;br /&gt;&lt;br /&gt;11.  What log files are generated by ADPATCH and how are they named?&lt;br /&gt;&lt;br /&gt;        The log file created by ADPATCH is named by the user when they start &lt;br /&gt;        ADPATCH.  So the log filename is user defined.  If the person applying &lt;br /&gt;        patches does not give it a unique name each time, the log information &lt;br /&gt;        is appended to the end of the existing file.  That file is located in &lt;br /&gt;        $APPL_TOP/admin/log and is named adpatch.log.  This means that the &lt;br /&gt;        ADPATCH log file could have references to many patches. &lt;br /&gt;&lt;br /&gt;        Some patches may spawn workers and log file will be generated for each &lt;br /&gt;        worker.  These log files are named in the following way:  adwork01.log,&lt;br /&gt;        adwork02.log, etc... and are located in $APPL_TOP/admin/log.&lt;br /&gt;&lt;br /&gt;12.  How is the environment set and what kind of errors would ADPATCH generate &lt;br /&gt;     if there was an issue with the environment?&lt;br /&gt;&lt;br /&gt;        ADPATCH should be run as APPLMGR, the owner of the APPL_TOP.  The login&lt;br /&gt;        should execute the environment file (sid.env), so ADPATCH should have &lt;br /&gt;        this set.  The errors you might encounter with an environment problem &lt;br /&gt;        would be:  ADPATCH will not know how to copy and will not be able to &lt;br /&gt;        relink.  In that case, you might get messages like:&lt;br /&gt;&lt;br /&gt;               Don't know how to make.&lt;br /&gt;&lt;br /&gt;13.  What happens if adpatch fails on a PL/SQL script?&lt;br /&gt;&lt;br /&gt;        If adpatch fails on a PL/SQL script you can try running it from the &lt;br /&gt;        command line.  If it runs, then you can continue as if successful.&lt;br /&gt;&lt;br /&gt;        You can get the syntax and parameters for the script from the &lt;br /&gt;        ADPATCH.log file.  This will help you know who the user was who ran the&lt;br /&gt;        script and where the script is located.&lt;br /&gt;&lt;br /&gt;14.  What happens if the patch fails?  You are being prompted to restart the &lt;br /&gt;     patch when you start ADPATCH.&lt;br /&gt;&lt;br /&gt;        If the patch fails you can try to restart the patch.  The patch will &lt;br /&gt;        start from where it failed.  The other option will be to start over.  &lt;br /&gt;        There are two questions ADPATCH prompts for when restating a patch.&lt;br /&gt;&lt;br /&gt;           Do you want to continue with the previous session?&lt;br /&gt;           Are you sure you don't want to continue with the previous install?&lt;br /&gt;&lt;br /&gt;        The default is to restart the patch, so if you want to decline this &lt;br /&gt;        option they will have to answer "NO" and then "YES".&lt;br /&gt;&lt;br /&gt;15.  You have decided to start all over and resubmit ADPATCH from the beginning,&lt;br /&gt;     but you get the error that FND_INSTALL_PROCESSES already exits.  &lt;br /&gt;     How is FND_INSTALL_PROCESSES related and why does ADPATCH have a problem &lt;br /&gt;     with it?&lt;br /&gt;&lt;br /&gt;        FND_INSTALL_PROCESSES is a table that is created by AUTOINSTALL, &lt;br /&gt;        ADPATCH and ADADMIN utilities.  Normally the above utilities will &lt;br /&gt;        remove this table after they complete.  This table might exist if you&lt;br /&gt;        are running any of the above processes.  So, if you are also applying &lt;br /&gt;        another application patch at the same time, the table might exist for &lt;br /&gt;        the other patch.  AUTOINSTALL and ADPATCH should NEVER be run at the &lt;br /&gt;        same time.&lt;br /&gt;&lt;br /&gt;        Dropping the FND_INSTALL_PROCESSES table should only be done if you are&lt;br /&gt;        NOT in the middle of running AUTOINSTALL, ADADMIN or applying another &lt;br /&gt;        patch.  In the case of AUTOINSTALL this table along with the restart &lt;br /&gt;        files in the $APPL_TOP contains all of the information needed to &lt;br /&gt;        restart AUTOINSTALL.&lt;br /&gt;&lt;br /&gt;        Consider this scenario:  You are running the install and you get &lt;br /&gt;        instructions to obtain a patch (usually this would be an FND patch) and&lt;br /&gt;        you attempt to use ADPATCH to install the patch.  If you  were to drop &lt;br /&gt;        FND_INSTALL_PROCESSES at this point, you would have to start your &lt;br /&gt;        install over.  However, you could backup FND_INSTALL_PROCESSES and the &lt;br /&gt;        restart files.  Then run adpatch to install the patch.  Then restore &lt;br /&gt;        FND_INSTALL_PROCESSES and the restart files, and continue the &lt;br /&gt;        installation.&lt;br /&gt;&lt;br /&gt;        If you want to drop the table, you will need to login as the owner &lt;br /&gt;        of the FND tables.  Normally this is APPLSYS.  Then type the following:&lt;br /&gt;&lt;br /&gt;                drop table fnd_install_processes;&lt;br /&gt;&lt;br /&gt;16.  ADPATCH has failed and it indicated there was an error with a worker.  &lt;br /&gt;     What steps can be taken to investigate this problem?&lt;br /&gt;&lt;br /&gt;        When ADPATCH is using workers, it (ADPATCH) keeps track of what jobs &lt;br /&gt;        the workers are doing with a table in the database called &lt;br /&gt;        FND_INSTALL_PROCESSES.&lt;br /&gt;&lt;br /&gt;        Look at the bottom of the log file associated with the worker that &lt;br /&gt;        failed (i.e. adwork01.log or adwork02.log or adwork03.log)&lt;br /&gt;&lt;br /&gt;        There is a utility ADCTRL that can be used to update &lt;br /&gt;        FND_INSTALL_PROCESSES.  This utility will allow you to reset a flag in &lt;br /&gt;        FND_INSTALL_PROCESSES.  This will allow ADPATCH to restart the failed &lt;br /&gt;        step.  ADCTRL has a menu with 7 options.&lt;br /&gt;&lt;br /&gt;        Choose option one on the ADCTRL menu to review the worker status.  &lt;br /&gt;        Other workers will wait for the failed worker.&lt;br /&gt;&lt;br /&gt;        Choose option two on the menu to fix the worker.  Place in the worker &lt;br /&gt;        number and hit return.&lt;br /&gt;&lt;br /&gt;        Check the status of worker again using option one.  The status should &lt;br /&gt;        have changed to "fixed restart."&lt;br /&gt;&lt;br /&gt;        Try restarting the patch again.  (This assumes you have fixed the &lt;br /&gt;        problem that caused the worker to fail, increased rollback segments, &lt;br /&gt;        max extents, etc...)&lt;br /&gt;&lt;br /&gt;17.  ADPATCH continues to fail and you have successfully completed the sql &lt;br /&gt;     statement from the command line.  Is there any way to direct the patch to &lt;br /&gt;     skip this sql and continue?&lt;br /&gt;&lt;br /&gt;        Insert the following at the very top of the script that failed:&lt;br /&gt;&lt;br /&gt;             exit ;&lt;br /&gt;&lt;br /&gt;        Go into ADCTRL and set the worker that failed to fixed/restart (as &lt;br /&gt;        above).  Then restart ADPATCH.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;18.  What should you do if a patch has errs while trying to relink ar25desb?&lt;br /&gt;&lt;br /&gt;        The ar25desb is very similar to the reports executable r25convm.  Try &lt;br /&gt;        and remake r25runm.  If r25runm does not remake it is a UNIX problem &lt;br /&gt;        and should be transferred.&lt;br /&gt;&lt;br /&gt;        The syntax is:  $ORACLE_HOME/reports25/lib  (when doing the below you &lt;br /&gt;        need to be ORACLE)&lt;br /&gt;&lt;br /&gt;               make -f ins_reports25w.mk r25runm&lt;br /&gt;&lt;br /&gt;19.  Your patch is erring with an Undefined Symbol.  What does this mean and &lt;br /&gt;     what can you do to resolve this issue?&lt;br /&gt;&lt;br /&gt;        The error generally looks like this:&lt;br /&gt;&lt;br /&gt;            Can't relink APVOID.ABI&lt;br /&gt;&lt;br /&gt;        An undefined symbol means ADPATCH cannot find a reference to a symbol &lt;br /&gt;        in the archive file (ex. $FND_TOP/lib/libfnd.a) which was archived from&lt;br /&gt;        the .o file contained in the patch library directory.  The undefined &lt;br /&gt;        symbols that it cannot fine are listed following the error message.&lt;br /&gt;&lt;br /&gt;        You can try the nm command searching the library for something that &lt;br /&gt;        references that symbol:&lt;br /&gt;&lt;br /&gt;            nm *.o |grep I afmall&lt;br /&gt;&lt;br /&gt;           (afmall in this case is the undefined symbol)&lt;br /&gt;&lt;br /&gt;        The object files are binary.  Use the following command to put the &lt;br /&gt;        libfnd.a file in a text version that you can read:&lt;br /&gt;&lt;br /&gt;            nm libfnd.a &gt; tmp&lt;br /&gt;&lt;br /&gt;        Use VI to edit the .tmp file and search for the undefined symbol.  When&lt;br /&gt;        you view the file you will notice that each .o is listed and there are &lt;br /&gt;        a large number of objects.  A symbol will only be listed once in each &lt;br /&gt;        object file (.o).  &lt;br /&gt;&lt;br /&gt;        The .o file is listed at the top and the columns are listed below.&lt;br /&gt;&lt;br /&gt;        The name column will contain the names of the symbols.  The Shndx &lt;br /&gt;        column will contain the text UNDEF or it will contain a number.  The &lt;br /&gt;        number is referencing what the symbol means.  Use the find command in &lt;br /&gt;        VI to locate the symbol where a number appears in there Shndx column &lt;br /&gt;        next to the symbol that is erring.  You shouldn't find one that is what&lt;br /&gt;        is causing the undefined symbol.  You will need to find the object file &lt;br /&gt;        that defines this symbol.  If this was working and you were applying a &lt;br /&gt;        patch start with the patch.  Also path problems can cause this type of &lt;br /&gt;        error.&lt;br /&gt;&lt;br /&gt;20.  Is there a file that lists all of the patches that have been applied to &lt;br /&gt;     the application?&lt;br /&gt;&lt;br /&gt;        Yes, there are two files that are created in APPL_TOP: applptch.txt and&lt;br /&gt;        applpatch.tmp.&lt;br /&gt;&lt;br /&gt;        This file is created whenever you create a new APPL_TOP.  Without the &lt;br /&gt;        .txt file you cannot apply patches.  Grep this file for the patch number &lt;br /&gt;        in question.&lt;br /&gt;&lt;br /&gt;21.  Is there a command to list all to the patches for one application?&lt;br /&gt;&lt;br /&gt;           grep -i "begin bug ar" applptch.txt&lt;br /&gt;&lt;br /&gt;22.  You want to know if you can reapply a patch.  Will this cause problems?&lt;br /&gt;&lt;br /&gt;        You can almost always reapply patches without a problem.  If a patch &lt;br /&gt;        can not be reapplied, there will be a warning in the README.  However, &lt;br /&gt;        problems may exist if you are trying to reapply a patch where you have &lt;br /&gt;        already applied a later version of the same patch.  One example is &lt;br /&gt;        applying FND Patchset A, then FND Patchset C, then trying to reapply &lt;br /&gt;        FND Patchset A.&lt;br /&gt;&lt;br /&gt;23.  You have unzipped a patch in your patch directory.  Is there a quick way &lt;br /&gt;     to remove it and all the sub-directories?&lt;br /&gt;&lt;br /&gt;          rm -rf patch number&lt;br /&gt;&lt;br /&gt;24.  A patch is failing on a column with one of these error messages:&lt;br /&gt;         ORA-904&lt;br /&gt;         ORA-942&lt;br /&gt;         Make sure you have completed all the manual steps in the readme file.&lt;br /&gt;         "bad magic" error&lt;br /&gt;&lt;br /&gt;        This error is normally caused, by running the wrong platform patch &lt;br /&gt;        (i.e. An HP-UX patch being run on a SUN platform).&lt;br /&gt;&lt;br /&gt;        You will need to back-out what has been applied and reapply the correct &lt;br /&gt;        platform patch.&lt;br /&gt;&lt;br /&gt;25.  How do you apply a patch on Windows NT that replaces adpatch.exe?&lt;br /&gt;&lt;br /&gt;        Run the adpatch.exe that is in the patch, not the %FND_TOP%\bin.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-1537954365542710306?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/1537954365542710306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=1537954365542710306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/1537954365542710306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/1537954365542710306'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/03/patch-troubleshooting-for-oracle.html' title='PATCH TROUBLESHOOTING FOR ORACLE APPLICATIONS RELEASE 11'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-8279186306459868162</id><published>2010-02-18T06:59:00.001-08:00</published><updated>2010-02-18T07:05:25.938-08:00</updated><title type='text'>High archives generation what to do.</title><content type='html'>when ever huge archives generates following are the points to check.&lt;br /&gt;&lt;br /&gt; --&gt; check hot backup is in progress or not.&lt;br /&gt;if hot backup is running then moving archives to different mount that's only one solution&lt;br /&gt;&lt;br /&gt; -&gt; check after hot backup any tablespace was left in begin backup mode and failed to do end backup for any tablespace &lt;br /&gt;&lt;br /&gt;chceck tbs in begin backup mode:&lt;br /&gt;================================&lt;br /&gt;&lt;br /&gt;select a.tablespace_name&lt;br /&gt;from sys.dba_data_files a, sys.v_$backup b&lt;br /&gt;where b.status = 'ACTIVE'&lt;br /&gt;and b.file# = a.file_id&lt;br /&gt;group by a.tablespace_name;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;make that tablespace to end backup &lt;br /&gt;eg: &lt;br /&gt;alter tablespace &lt;table_space_name&gt; end backup;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; -&gt; Check which session is generating more redo.&lt;br /&gt;&lt;br /&gt;rem -----------------------------------------------------------------------&lt;br /&gt;rem Purpose:    Transaction which generating more redo&lt;br /&gt;rem This view contains the column BLOCK_CHANGES which indicates  how much blocks have been changed&lt;br /&gt;rem by the session. High values indicate a   session generating lots of redo.&lt;br /&gt;rem Run the query multiple times and examine the delta between each occurrence&lt;br /&gt;rem of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.&lt;br /&gt;rem -----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;set pages 1000&lt;br /&gt;set lines 140&lt;br /&gt;SELECT s.sid, s.serial#, s.username, s.program,&lt;br /&gt; i.block_changes&lt;br /&gt; FROM v$session s, v$sess_io i&lt;br /&gt;WHERE s.sid = i.sid&lt;br /&gt;ORDER BY 5 desc, 1, 2, 3, 4;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;rem -----------------------------------------------------------------------&lt;br /&gt;rem Purpose:    Transaction which generating more redo&lt;br /&gt;rem Run the query multiple times and examine the delta between each occurrence&lt;br /&gt;rem of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by &lt;br /&gt;rem  the session.&lt;br /&gt;rem -----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;SELECT s.sid, s.serial#, s.username, s.program, &lt;br /&gt;        t.used_ublk, t.used_urec&lt;br /&gt;       FROM v$session s, v$transaction t&lt;br /&gt;       WHERE s.taddr = t.addr&lt;br /&gt;       ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please do find the queries to find the sid ,the related sql and the request which was causing the huge number of archs.&lt;br /&gt;SELECT s.sid, s.serial#, s.username, s.program, t.used_ublk, t.used_urec FROM v$session s, v$transaction t&lt;br /&gt;WHERE s.taddr = t.addr ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;&lt;br /&gt;The o/p of the query gives the sid , Number of undo blocks used and Number of undo records used that were happening during that time. &lt;br /&gt;From the sid we can get the request id and the request name.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select sql_text from v$sqltext where hash_value=( select prev_hash_value from v$session where sid='&amp;sid');&lt;br /&gt;&lt;br /&gt;select sid||' - '||serial#||' - '||osuser||' - '||username||' - '||machine||' - '||status||' - '||logon_time&lt;br /&gt;from v$session where sid=&amp;123;&lt;br /&gt;&lt;br /&gt;with this find the details and contact application team to stop the activity and schedule at non - peak hours of business.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-8279186306459868162?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/8279186306459868162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=8279186306459868162' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/8279186306459868162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/8279186306459868162'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/high-archives-generation-what-to-do.html' title='High archives generation what to do.'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-6530780680389140392</id><published>2010-02-17T06:37:00.000-08:00</published><updated>2010-04-05T03:53:20.173-07:00</updated><title type='text'>what to do when high cpu utilization</title><content type='html'>-------------------------------------------------------------------------&lt;br /&gt;  | High CPU |&lt;br /&gt;  =========================&lt;br /&gt;top &lt;br /&gt;top csc&lt;br /&gt;&lt;br /&gt;Top..&lt;br /&gt;&lt;br /&gt;grep the pid..chech the DB&lt;br /&gt;&lt;br /&gt;ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10 -- shows detailed usage..&lt;br /&gt;&lt;br /&gt;run 1st sql...put pid of the process which is consuming most CPU.&lt;br /&gt;&lt;br /&gt;set pages 100&lt;br /&gt;set lines 400&lt;br /&gt;col MACHINE for a20&lt;br /&gt;select vs.sid,vs.serial#,vs.username,vs.osuser,vs.machine,vs.program from v$session vs, v$process vp where vs.paddr = vp.addr &lt;br /&gt;&lt;br /&gt;and vp.spid = &amp;pid;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Use SID in 2nd sql to check which statement is running..&lt;br /&gt;&lt;br /&gt;select x.sql_text&lt;br /&gt;from v$session s,v$sqltext x&lt;br /&gt;where s.sql_address=x.address and s.sid = &amp;which_sid&lt;br /&gt;order by sid, piece asc;&lt;br /&gt;&lt;br /&gt;ps -aux|sort -n +2 (will sort the highest CPU offenders the bottom of report for identification. Third Column is the CPU  &lt;br /&gt;&lt;br /&gt;     percentage.)&lt;br /&gt;&lt;br /&gt;--&gt; check current running SQL:&lt;br /&gt;set pagesize 100&lt;br /&gt;select a.sql_text,OSUSER, client_info, MACHINE,  disk_reads&lt;br /&gt;      , a.buffer_gets, a.executions , b.sid,c.spid&lt;br /&gt;      from v$sqlarea a, v$session b,v$process c&lt;br /&gt;      where spid =  &amp;spid and&lt;br /&gt;      a.address = b.sql_address&lt;br /&gt;      and c.addr=b.paddr;&lt;br /&gt;&lt;br /&gt;check swap in(si) &amp; swap out (so) in vmstat&lt;br /&gt;&lt;br /&gt;vmstat 3 3&lt;br /&gt;&lt;br /&gt;jk_assoc[oracle]_pck&gt;  vmstat 3 3  __________&lt;br /&gt;procs                      memory     |  swap  |        io     system         cpu&lt;br /&gt; r  b   swpd   free   buff  cache     | si   so|    bi    bo   in    cs us sy id wa&lt;br /&gt; 2  0      0 1009156 106024 16690876  |  0    0|     1     0    1     0  0  1  0  0&lt;br /&gt; 2  0      0 1005972 106024 16690880  |  0    0|   672    35  512   662 29  3 68  0&lt;br /&gt; 5  0      0 1000816 106024 16690896  |  0    0| 23712   428 1569  3859 36  6 58  0&lt;br /&gt;          |________|&lt;br /&gt;&lt;br /&gt;b. Run vmstat command to see if there is an excessive number of page in or page out processes, look for large amounts of &lt;br /&gt;&lt;br /&gt;Swap in (si) and Swap out (so).  (The first set of numbers in the report should be discarded, as it is an average.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---&gt; Check Network Performance&lt;br /&gt;&lt;br /&gt;jk_assoc[oracle]_pck&gt; netstat -i&lt;br /&gt;Kernel Interface table&lt;br /&gt;Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK  TX-ERR TX-DRP TX-OVR Flg&lt;br /&gt;eth0       1500   0 1697373546      0      0      0 2712721015  0      0      0 BMRU&lt;br /&gt;eth0:0     1500   0      - no statistics available -                            BMRU&lt;br /&gt;eth0:5     1500   0      - no statistics available -                            BMRU&lt;br /&gt;eth1       1500   0 38256346      0      0      0   222076      0      0      0 BMRU&lt;br /&gt;eth2       1500   0 180643985      0      0      0     9680     0      0      0 BMRU&lt;br /&gt;eth3       1500   0 18848028      0      0      0  7438587      0      0      0 BMRU&lt;br /&gt;eth4       1500   0 18845772      0      0      0  7458993      0      0      0 BMRU&lt;br /&gt;lo        16436   0 11443615      0      0      0 11443615      0      0      0 LRU&lt;br /&gt;&lt;br /&gt;a. Run netstat to see if there are any errors or drops on the network interface.  Excessive errors should be &lt;br /&gt;&lt;br /&gt;investigated by the Unix team &amp; Network Team.&lt;br /&gt;&lt;br /&gt;b. Run tnsping and ping commands between the servers looking for long latency in the time to respond.  Anything greater &lt;br /&gt;&lt;br /&gt;than 500ms is an issue that the Unix team &amp; Network Team should look into.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-6530780680389140392?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/6530780680389140392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=6530780680389140392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/6530780680389140392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/6530780680389140392'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/what-to-do-when-high-cpu-utilization.html' title='what to do when high cpu utilization'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-3002136660607504309</id><published>2010-02-17T06:33:00.000-08:00</published><updated>2010-02-17T06:37:10.553-08:00</updated><title type='text'>extract user creation script with all grants same as toad generates.</title><content type='html'>extract schema ddl:&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;    set pages 500&lt;br /&gt;    set lines 200&lt;br /&gt;    set long 100000&lt;br /&gt;    select dbms_metadata.get_ddl( 'USER', 'AIRTEL' ) from dual&lt;br /&gt;    UNION ALL&lt;br /&gt;    select dbms_metadata.get_granted_ddl( 'SYSTEM_GRANT', 'AIRTEL' ) from dual&lt;br /&gt;    UNION ALL&lt;br /&gt;    select dbms_metadata.get_granted_ddl( 'OBJECT_GRANT', 'AIRTEL' ) from dual&lt;br /&gt;    UNION ALL&lt;br /&gt;    select dbms_metadata.get_granted_ddl( 'ROLE_GRANT', 'AIRTEL' ) from dual;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-3002136660607504309?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/3002136660607504309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=3002136660607504309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3002136660607504309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3002136660607504309'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/extract-user-creation-script-with-all.html' title='extract user creation script with all grants same as toad generates.'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-7325171836037777469</id><published>2010-02-11T15:01:00.001-08:00</published><updated>2010-02-11T15:01:31.398-08:00</updated><title type='text'>export &amp; import parallely without exp.dmp on same server</title><content type='html'>export &amp; import parallely without exp.dmp on same server:&lt;br /&gt;&lt;br /&gt;=========================================&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;. ~/bin/cubep&lt;br /&gt;&lt;br /&gt;rm -f /p301/backup01/oracle/export/34013293/cubep/sss_pipe&lt;br /&gt;&lt;br /&gt;/usr/sbin/mknod /p301/backup01/oracle/export/34013293/cubep/sss_pipe p&lt;br /&gt;&lt;br /&gt;exp file=/p301/backup01/oracle/export/34013293/cubep/sss_pipe userid=system/`tellme system` parfile=sss.par&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;. ~/bin/scgedwp&lt;br /&gt;&lt;br /&gt;imp userid=system/`tellme system` file=/p301/backup01/oracle/export/34013293/cubep/sss_pipe buffer=50000000&lt;br /&gt;&lt;br /&gt;log=SSSDWDBA01_imp_rows.log fromuser=SSSDWDBA01 touser=SSSDWDBA01 commit=y ignore=y indexes=n rows=y feedback=10000&lt;br /&gt;&lt;br /&gt;RESUMABLE=Y&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-7325171836037777469?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/7325171836037777469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=7325171836037777469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/7325171836037777469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/7325171836037777469'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/export-import-parallely-without-expdmp.html' title='export &amp; import parallely without exp.dmp on same server'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2048354805987603375</id><published>2010-02-08T05:15:00.000-08:00</published><updated>2010-02-08T05:16:27.647-08:00</updated><title type='text'>Cloning Oracle Applications Release 11i  with Rapid Clone</title><content type='html'>--------------------------------------------------------------------------------&lt;br /&gt;Cloning creates an identical copy of an existing Oracle Applications System. There are various reasons for cloning an Oracle Applications System such as: &lt;br /&gt;Creating a copy of the production System for testing updates. &lt;br /&gt;Migrating an existing System to new hardware. &lt;br /&gt;Creating a stage area to reduce patching downtime. &lt;br /&gt;This document describes the process of cloning an Oracle Applications Release 11i System. The most current version of this note is document 230672.1 on OracleMetaLink. A FAQ is also available in document 216664.1 on OracleMetaLink. &lt;br /&gt;&lt;br /&gt;Note: Rapid Clone is currently not supported on Windows Itanium and HP OpenVMS Alpha.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Attention: Windows users. This document typically uses UNIX syntax when specifying directories; Please substitute the appropriate Windows syntax  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Section 1: Prerequisites &lt;br /&gt;Tasks to perform before using Rapid Clone. &lt;br /&gt;Section 2: Clone Oracle Applications 11i &lt;br /&gt;Tasks to prepare, copy, configure, and verify a cloned Applications System. &lt;br /&gt;Section 3: Finishing Tasks &lt;br /&gt;Tasks to complete the cloning process. &lt;br /&gt;Section 4: Advanced Cloning Methods &lt;br /&gt;Tasks for advanced options such as refreshing and Multi-Node cloning. &lt;br /&gt;Conventions&lt;br /&gt; Convention  Meaning  &lt;br /&gt; Source System  Applications System being cloned.  &lt;br /&gt; Target System  Applications System being created as a copy of the Source.  &lt;br /&gt; APPLMGR  User which owns the Applications File System (APPL_TOP and Application Tier technology stack)  &lt;br /&gt; ORACLE  User which owns the Database File System (RDBMS ORACLE_HOME and Database files).  &lt;br /&gt; CONTEXT_NAME  The CONTEXT_NAME variable refers to the name of the Applications Context file. For Systems installed with Rapid Install 11.5.8 or earlier, this value will typically be set to &lt;SID&gt;. For new AutoConfig or Rapid Clone customers, CONTEXT_NAME will be set to &lt;SID&gt;_&lt;HOSTNAME&gt;.  &lt;br /&gt; Monospace Text  Represents command line text. Type this command exactly as shown.  &lt;br /&gt; &lt; &gt;  Text enclosed in angle brackets represents a variable. Substitute a value for the variable text. Do not type the angle brackets.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Section 1: Prerequisites&lt;br /&gt;Before cloning, prepare the Source System by applying patches and running AutoConfig. &lt;br /&gt;&lt;br /&gt;Verify Source and Target Nodes software versions&lt;br /&gt;In addition to the Oracle Applications software requirements (see Installing Oracle Applications Release 11i Part No. B10638-01), the following software component versions must exist on the Source and/or Target Nodes. The location column indicates the Node where the software component must be present. &lt;br /&gt;Software Minimum Version Location Details &lt;br /&gt;&lt;br /&gt;Oracle Universal Installer 2.2.0.19 All Source System Nodes Apply OUI22 patch 5035661 on every iAS and RDBMS ORACLE_HOME to be cloned. Do not apply the patch to your RDBMS ORACLE_HOME, if you have Oracle 10g or higher installed.  &lt;br /&gt;Perl  5.005 Source and Target Database Nodes Use the Perl shipped with iAS1022 and RDBMS 9i if available or download it from Perl.com. Perl must be in the PATH before cloning. Windows users: do not use Perl from MKSToolKit.  &lt;br /&gt;JRE  1.1.8 Source Database Node  If the RDBMS ORACLE_HOME was not installed using Rapid Install, install JRE 1.1.8 into the &lt;RDBMS ORACLE_HOME&gt;/jre/1.1.8 directory.  &lt;br /&gt;JRE  1.3.1 Source Database Node  Windows users only: install JRE 1.3.1 into the &lt;RDBMS ORACLE_HOME&gt;/jre/1.3.1 directory. See Appendix A for installation instructions.  &lt;br /&gt;JDK  1.3.1 Target middle-Tier Applications Nodes  Refer to Upgrading to JDK 1.3 with Oracle Applications 11i on OracleMetaLink for instructions.  &lt;br /&gt;Zip  2.3 All Source Nodes Download from InfoZip.  Zip must be in your PATH for cloning. &lt;br /&gt;OS utilities  N/A All Target Nodes OS utilities (see 11i Install Manual) must be in the the PATH when running adcfgclone.pl (Unix: make,ld,cc,ar - Windows: gnumake,link,cc,cmd)&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Apply the latest AD Minipack&lt;br /&gt;Apply patch 6502082 (11i.AD.I.6) or higher. &lt;br /&gt;Please refer to OracleMetaLink to obtain the latest MiniPack available for AD. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Windows users only:&lt;br /&gt;Apply patch 2237858 to enable long file names support. &lt;br /&gt;&lt;br /&gt;Apply the latest AutoConfig Template patch&lt;br /&gt;Update the Oracle Applications File System with the latest AutoConfig template files by applying the TXK AutoConfig Template rollup patch to all Application Tier Server Nodes. &lt;br /&gt;Please refer to document 165195.1 on OracleMetaLink to obtain the latest Autoconfig Template Rollup Patch available. &lt;br /&gt;&lt;br /&gt;Apply the latest Rapid Clone patches&lt;br /&gt;Update the Oracle Applications File System with the latest Rapid Clone files by applying the following patches to all Application Tier Server Nodes: &lt;br /&gt;&lt;br /&gt;3453499 : 11i.ADX.F&lt;br /&gt;&lt;br /&gt;7164202 : 11i RAPIDCLONE CONSOLIDATED FIXES MAY/2009&lt;br /&gt;&lt;br /&gt;7307102 : Required for Windows Platforms &lt;br /&gt;7425146 : Required for Windows x86-64 (EM64T) &lt;br /&gt;8217144 : Required for Windows Platforms &lt;br /&gt;8251658 : Required for Windows Platforms &lt;br /&gt;&lt;br /&gt;Setup Rapid Clone on the Applications Tier&lt;br /&gt;If the Source Applications System was created with Rapid Install version 11.5.5 or earlier and has not been migrated to AutoConfig, follow the instructions Migrating to AutoConfig on the Applications Tier in document 165195.1 on OracleMetaLink). &lt;br /&gt;All users must run AutoConfig on the Applications Tier (see section 5: Maintaining System Configuration in document 165195.1 on OracleMetaLink). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setup Rapid Clone on the Database Tier&lt;br /&gt;Implement AutoConfig in the RDBMS ORACLE_HOME (Follow the instructions in section Migrating to AutoConfig on the Database Tier in document 165195.1 on OracleMetaLink). &lt;br /&gt;Attention:   Every time that a new Rapid Clone or Autoconfig patch is applied on the APPL_TOP, the RDBMS ORACLE_HOME must be updated with the files included on those patches. &lt;br /&gt;Follow the instructions in section Maintaining System Configuration in document 165195.1 on OracleMetaLink to synchronize the Rapid Clone and Autoconfig files on the RDBMS ORACLE_HOME.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Maintain Snapshot information&lt;br /&gt;Log in to each Application Tier Node as the APPLMGR user and run Maintain Snapshot information in AD Administration.&lt;br /&gt;See Oracle Applications Maintenance Utilities for more information. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Section 2: Clone Oracle Applications 11i&lt;br /&gt;Use Rapid Clone to create template files for cloning on the Source System. After the Source System is copied to the target, Rapid Clone updates these templates to contain the new target System configuration settings. Rapid Clone will not change the Source System configuration.&lt;br /&gt;There are three phases to the cloning process: &lt;br /&gt;&lt;br /&gt;Prepare the Source System&lt;br /&gt;Execute the following commands to prepare the Source System for cloning.&lt;br /&gt;&lt;br /&gt;Prepare the Source System Database Tier for cloning &lt;br /&gt;Log on to the Source System as the ORACLE user and run the following commands:&lt;br /&gt;&lt;br /&gt;         cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/scripts/&lt;CONTEXT_NAME&gt;&lt;br /&gt;         perl adpreclone.pl dbTier &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Prepare the Source System Application Tier for cloning &lt;br /&gt;Log on to the Source System as the APPLMGR user and run the following commands on each Node that contains an APPL_TOP:&lt;br /&gt;&lt;br /&gt;         cd &lt;COMMON_TOP&gt;/admin/scripts/&lt;CONTEXT_NAME&gt;&lt;br /&gt;         perl adpreclone.pl appsTier &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy the Source System to the Target System&lt;br /&gt;Copy the Application Tier File System from the Source Applications System to the Target Node by executing the following steps in the order listed.  Ensure the Application Tier files copied to the Target System are owned by the Target APPLMGR user, and that the Database Tier files are owned by the ORACLE user. &lt;br /&gt;&lt;br /&gt;Copy the Application Tier File System&lt;br /&gt;Log on to the Source System Application Tier Nodes as the APPLMGR user. &lt;br /&gt;&lt;br /&gt;Shut down the Application Tier Server processes &lt;br /&gt;Copy the following Application Tier directories from the Source Node to the Target Application Tier Node: &lt;br /&gt;&lt;APPL_TOP&gt;&lt;br /&gt;&lt;OA_HTML&gt;&lt;br /&gt;&lt;OA_JAVA&gt;&lt;br /&gt;&lt;OA_JRE_TOP&gt;&lt;br /&gt;&lt;COMMON_TOP&gt;/util&lt;br /&gt;&lt;COMMON_TOP&gt;/clone&lt;br /&gt;&lt;COMMON_TOP&gt;/_pages  (when this directory exists)&lt;br /&gt;&lt;806 ORACLE_HOME&gt;&lt;br /&gt;&lt;iAS ORACLE_HOME&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy the Database Tier File System&lt;br /&gt;Log on to the Source System Database Node as the ORACLE user. &lt;br /&gt;&lt;br /&gt;Perform a normal shutdown of the Source System Database &lt;br /&gt;Copy the Database (DBF) files from the Source to the Target System &lt;br /&gt;Copy the Source Database ORACLE_HOME to the Target System &lt;br /&gt;Start up the Source Applications System Database and Application Tier processes &lt;br /&gt;&lt;br /&gt;Note:   Unix/Linux users, make sure that the softlinks are preserved when copying.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configure the Target System&lt;br /&gt;Execute the following commands to configure the Target System. You will be prompted for the Target System specific values (SID, Paths, Ports, etc) &lt;br /&gt;&lt;br /&gt;Configure the Target System Database Server&lt;br /&gt;Log on to the Target System as the ORACLE user and type the following commands to configure and start the Database:&lt;br /&gt;&lt;br /&gt;         cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;         perl adcfgclone.pl dbTier &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configure the Target System Application Tier Server Nodes&lt;br /&gt;Log on to the Target System as the APPLMGR user and type the following commands:&lt;br /&gt;&lt;br /&gt;         cd &lt;COMMON_TOP&gt;/clone/bin&lt;br /&gt;         perl adcfgclone.pl appsTier &lt;br /&gt;&lt;br /&gt;Attention:   Windows users only: &lt;br /&gt;add &lt;806 ORACLE_HOME&gt;\bin to the System Path before running this step.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Section 3: Finishing Tasks&lt;br /&gt;This section lists tasks that may be necessary depending on your implementation and the intended use of the cloned System. &lt;br /&gt;&lt;br /&gt;Update profile options&lt;br /&gt;Rapid Clone updates only site level profile options. If any other profile options are set to instance specific values, you must update them manually. &lt;br /&gt;&lt;br /&gt;Update printer settings&lt;br /&gt;If the new cloned System needs to utilize different printers, update the Target System with the new printer settings now. &lt;br /&gt;&lt;br /&gt;Update workflow configuration settings&lt;br /&gt;Cloning an Oracle Applications instance will not update the host and instance specific information used by Oracle Workflow. Review the following tables and columns to verify there is no instance specific data in the Workflow configuration on the Target System. &lt;br /&gt;Table Name  Column Name  Column Value Details &lt;br /&gt;WF_NOTIFICATION_ATTRIBUTES  TEXT_VALUE  Value starts with http://&lt;old web host&gt; : Update to new web host &lt;br /&gt;WF_ITEM_ATTRIBUTE_VALUES TEXT_VALUE Value starts with "http://&lt;old web host&gt; : Update to new web host &lt;br /&gt;WF_SYSTEMS GUID Create a new System defined as the new global Database name using the Workflow Administrator Web Applications responsibility. &lt;br /&gt;WF_SYSTEMS NAME Value needs to be replaced with the Database global name &lt;br /&gt;WF_AGENTS ADDRESS Update Database link with the new Database global name. &lt;br /&gt;FND_FORM_FUNCTIONS WEB_HOST_NAME Update with the new web host name &lt;br /&gt;FND_FORM_FUNCTIONS WEB_AGENT_NAME Update to point at the new PLSQL listener name &lt;br /&gt;FND_CONCURRENT_REQUESTS LOGFILE_NAME Update with the correct path to the logfile directory &lt;br /&gt;FND_CONCURRENT_REQUESTS OUTFILE_NAME Update with the new directory path on the Target System &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Verify the APPLCSF variable setting&lt;br /&gt;Source the APPS environment and review that the variable APPLCSF (identifying the top-level directory for concurrent manager log and output files) points to an acceptable directory. To modify it, change the value of s_applcsf in the contextfile and run AutoConfig. &lt;br /&gt;&lt;br /&gt;Update the SESSION_COOKIE_DOMAIN value in ICX_PARAMETERS&lt;br /&gt;If the Target System is in a different domain name than the Source System and SESSION_COOKIE_DOMAIN was not null in the Source System, update that value to reflect the new domain name. &lt;br /&gt;&lt;br /&gt;Windows users only reboot the Target machine&lt;br /&gt;Once cloning is completed reboot to enable the services. &lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Section 4: Advanced Cloning Options&lt;br /&gt;This section describes advanced cloning procedures. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Refreshing a Target System&lt;br /&gt;You may need to refresh the Target System periodically to synchronize it with changes from the Source. &lt;br /&gt;Attention:   Backup the Target Context File on the Target System before refreshing the dbTier or appsTier.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To refresh the Target System, perform the following steps as described in previous sections: &lt;br /&gt;&lt;br /&gt;Prepare the Source System &lt;br /&gt;&lt;br /&gt;Copy the Source System to the Target System &lt;br /&gt;Copy the Application Tier File System if the APPL_TOP, 806 ORACLE_HOME, or iAS ORACLE_HOME needs to be refreshed. Copy the portion of the Application Tier File System which has been updated. &lt;br /&gt;Copy the Database Tier File System if the RDBMS ORACLE_HOME or the Database needs to be refreshed. If refreshing the Database, the ORACLE_HOME should be refreshed at the same time. &lt;br /&gt;&lt;br /&gt;Configure the Target System&lt;br /&gt;Specify the existing Target System Context File when running adcfgclone.pl commands: &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTier &lt;Database Target Context File&gt;&lt;br /&gt;&lt;br /&gt;Where Database Context File is:&lt;br /&gt;&lt;RDBMS ORACLE_HOME&gt;/appsutil/&lt;Target CONTEXT_NAME&gt;.xml &lt;br /&gt;cd &lt;COMMON_TOP&gt;/clone/bin&lt;br /&gt;perl adcfgclone.pl appsTier &lt;Appltop Target Context File&gt;&lt;br /&gt;&lt;br /&gt;Where Appltop Context File is:&lt;br /&gt;&lt;APPL_TOP&gt;/admin/&lt;Target CONTEXT_NAME&gt;.xml &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finishing Tasks &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cloning a Single-Node System to a Multi-Node System&lt;br /&gt;This procedure allows the original Single-Node System to be cloned into a Multi-Node System. An Applications System comprises five Server types: &lt;br /&gt;&lt;br /&gt;Database Server (Database Tier) &lt;br /&gt;Forms Server (Application Tier) &lt;br /&gt;Web Server (Application Tier) &lt;br /&gt;Concurrent Processing Server (Application Tier) &lt;br /&gt;Administration Server (Application Tier) &lt;br /&gt;During the Single-Node to Multi-Node cloning process, each of these Servers can be placed on its own Node, resulting in a Multi-Node Target System. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Perform prerequisites&lt;br /&gt;Perform these steps on all Source and Target Nodes.&lt;br /&gt;&lt;br /&gt;Clone Oracle Applications 11i&lt;br /&gt;Prepare, copy and configure the cloned Applications System. When creating more than one Application Tier Server Node from a Single Node System, the copy and configure steps must be performed on each target Node. You can specify the Server type for each Target Node while answering the prompts during the configuration step.&lt;br /&gt;The Database ORACLE_HOME and Database only need to be copied to the Node on which the Database will be run.&lt;br /&gt;&lt;br /&gt;Finishing Tasks &lt;br /&gt;&lt;br /&gt;Note: Another way of changing a Single-Node System to a Multi-Node System is to share the APPL_TOP. See document 233428.1 on OracleMetaLink for details.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cloning a Multi-Node System to a Multi-Node System with same number of Nodes&lt;br /&gt;A Multi-Node System can be cloned provided the number of Nodes and distribution of Servers in the Target System matches that of the Source System. &lt;br /&gt;To clone a Multi-Node System to a Multi-Node System, perform the cloning process on each Node. For example, if the Source System contains three Nodes, perform the cloning process three times. &lt;br /&gt;&lt;br /&gt;Clone Source System Node 1 to Target System Node 1. &lt;br /&gt;Clone Source System Node 2 to Target System Node 2. &lt;br /&gt;Clone Source System Node 3 to Target System Node 3. &lt;br /&gt;Attention: The Database Server Node must be cloned first.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding a new Node to an existing System&lt;br /&gt;You can use Rapid Clone to clone a Node and add it to the existing Application System. The new Node will run the same or a subset of the Server types running on the Source Node. Follow the instructions in the Application Tier part of Clone Oracle Applications 11i: &lt;br /&gt;&lt;br /&gt;Prepare the Source System, copy it to the new Node and configure it. &lt;br /&gt;After adcfgclone.pl completes, Source the Applications environment and run the following commands on the Target System:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cd &lt;COMMON_TOP&gt;/clone/bin&lt;br /&gt;perl adaddNode.pl &lt;br /&gt;Note: If the SQL*Net Access security is enabled in the existing System (enabled by default from 11i10), you first need to authorize the new Node to access the Database through SQL*Net. See Managed SQL*Net Access from Hosts in document 281758.1 on OracleMetalink for instructions on how to achieve this from OAM.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reducing the number of Nodes of a Multi-Node System (merge APPL_TOP)&lt;br /&gt;You can use Rapid Clone to clone a Multi-Node System to a Single-Node System (or a Multi-Node System with fewer Nodes) by merging the APPL_TOPs fileSystem together. Follow the procedure for Merging existing APPL_TOPs in document 233428.1 on OracleMetaLink. &lt;br /&gt;&lt;br /&gt;Cloning a RAC System&lt;br /&gt;You can use Rapid Clone to clone a RAC System. While cloning, you have the possibility to remove or add Nodes to the cluster in the Target RAC System. &lt;br /&gt;Attention: The following steps apply only for 9i RAC Clusters. For 10g or 11g RAC environments, please follow the instructions in Document 760637.1.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: For complete details on the certified RAC scenarios for E-Business Suite Cloning, refer to Document 783188.1 available in OracleMetaLink.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To clone a RAC System, perform the following tasks: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Verify the prerequisites&lt;br /&gt;&lt;br /&gt;Apply TXK patch 3571388 (AutoConfig support for Oracle RAC instances) &lt;br /&gt;Migrate the Source System cluster ORACLE_HOMES to AutoConfig as documented in document 165195.1 on OracleMetaLink &lt;br /&gt;&lt;br /&gt;Prepare the Source System&lt;br /&gt;Choose one of the ORACLE_HOMEs on the Source cluster. This ORACLE_HOME will be used as a master to create all the Target cluster System ORACLE_HOME. Run "perl adpreclone.pl dbTier" on it. Note: You also have the option to clone each ORACLE_HOME from the Source RAC cluster to the Target cluster. In that case, run adpreclone.pl on every ORACLE_HOME.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy the Source System to the Target System &lt;br /&gt;Copy the master ORACLE_HOME from the Source System to each Node that will compose the Target cluster. For example, if your Source RAC System had 2 Nodes, and you want to clone it to a 3 Node Target RAC System, you should copy the Source master ORACLE_HOME to the 3 Nodes on the Target System. &lt;br /&gt;Copy the Database files from the Source to Target System. &lt;br /&gt;&lt;br /&gt;Configure the Target System &lt;br /&gt;Log on to any ORACLE_HOME in the Target cluster and run&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTier &lt;br /&gt;This step configures the first Node of the Target System RAC cluster and recreates the Database control files. The prompts, however, will gather information about every Node in the Target RAC cluster and the data will be re-used when configuring each subsequent Node in the next step. &lt;br /&gt;&lt;br /&gt;For each remaning RDBMS ORACLE_HOME in the Target System, run the following command as the ORACLE File System owner: &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTier &lt;br /&gt;&lt;br /&gt;Clone the Application Tier&lt;br /&gt;Follow the steps in section 2 to prepare, copy and configure the Application Tier. When prompted for the Database SID, specify any one of the RAC service names. &lt;br /&gt;Note: To clone from RAC to non-RAC, follow the same above steps but copy the master ORACLE_HOME to one Target Node only, and answer "No" to the question "Target instance is a Real Application Cluster (RAC) instance (y/n)", when prompted by adcfgclone.pl.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding a Node to an existing RAC Cluster&lt;br /&gt;You can use Rapid Clone to add one or several Nodes to an existing RAC Cluster. &lt;br /&gt;Attention: The following steps apply only for 9i RAC Clusters. For 10g or 11g RAC environments, please follow the instructions in Document 760637.1.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: For complete details on the certified RAC scenarios for E-Business Suite Cloning, refer to Document 783188.1 available in OracleMetaLink.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Perform the following tasks: &lt;br /&gt;&lt;br /&gt;Choose any one of the ORACLE_HOMEs in the existing cluster and run the following command: &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTier &lt;br /&gt;This ORACLE_HOME will be used as a master to create the additional Node(s). &lt;br /&gt;&lt;br /&gt;Copy the master ORACLE_HOME File System to the new Node(s).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On the init.ora, set the variable "cluster_Database_instances" to match the new number of Nodes. &lt;br /&gt;&lt;br /&gt;Note: After the RAC conversion, the context variable %s_dbClusterInst% will need to be set on the Database Context files to reflect the new number of Nodes.&lt;br /&gt;From the OAM Context Editor, set the variable with the new number and run Autoconfig on each ORACLE_HOME.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reconfigure the RAC Cluster to include the new Node(s): &lt;br /&gt;Log on to the new Node, or any one of the new Nodes if adding more than one, and run the following command: &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTier &lt;br /&gt;Note: You will be prompted for information about all the Nodes forming the new cluster and asked to perform the next step before completing adcfgclone.pl on this Node.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When instructed so by the previous step, log on to every Node from the original cluster and run the following command on each of them: &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl addracNode &lt;Context File&gt; &lt;br /&gt;&lt;br /&gt;Go back to the first Node and complete adcfgclone.pl &lt;br /&gt;&lt;br /&gt;If you are adding more than one Node to the original cluster, log on to each of the remaining new Nodes and run &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTier &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cloning a Shared File System&lt;br /&gt;You can use Rapid Clone to clone a shared APPL_TOP System. Since all the Nodes share a unique APPL_TOP you only need to fully clone one of the Source System Nodes to its Target machine and add more Nodes directly sharing the APPL_TOP on the Target System. Choose one of the shared APPL_TOP Nodes on Source System (the rest of this section will refer to it as Node A) and perform the following tasks: &lt;br /&gt;&lt;br /&gt;Perform prerequisites&lt;br /&gt;Perform these steps on Node A and and every Target Nodes. &lt;br /&gt;&lt;br /&gt;Clone Oracle Applications 11i&lt;br /&gt;Perform a full clone (Prepare, copy and configure steps) of the Database Tier and Node A (Application Tier). &lt;br /&gt;&lt;br /&gt;Add the shared File System Nodes to the Target System&lt;br /&gt;On the Target System, follow the instructions for adding a Node to a shared APPL_TOP System in document 233428.1 on OracleMetalink and add more Nodes sharing the Target System APPL_TOP to match the Source System topology. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Appendix A: Install JRE 1.3.1 into RDBMS ORACLE_HOME&lt;br /&gt;Windows customers will need to perform the following steps: &lt;br /&gt;&lt;br /&gt;Download JRE 1.3.1 from Sun MicroSystems. &lt;br /&gt;Run the install executable &lt;br /&gt;When prompted for the location to install jre, click browse and enter the location: &lt;RDBMS ORACLE_HOME&gt;\jre\1.3.1 &lt;br /&gt;Accept the default installation options. &lt;br /&gt;JRE 1.3.1 will be installed into the &lt;RDBMS ORACLE_HOME&gt;\jre\1.3.1 directory. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Appendix B: Recreating Database control files manually in Rapid Clone.&lt;br /&gt;This Appendix documents the steps to allow manual creation of the Target Database control files within the Rapid Clone process. Examples of when to use this method are for Databases on raw partitions or hot backup cloning. Replace section 2.3a (Configure the Target System Database Server) with the following steps: &lt;br /&gt;&lt;br /&gt;Log on to the Target System as the ORACLE user &lt;br /&gt;&lt;br /&gt;Configure the &lt;RDBMS ORACLE_HOME&gt; &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbTechStack &lt;br /&gt;&lt;br /&gt;Create the Target Database control files manually &lt;br /&gt;&lt;br /&gt;Start the Target System Database in open mode &lt;br /&gt;&lt;br /&gt;Run the library update script against the Database&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/install/&lt;CONTEXT NAME&gt;&lt;br /&gt;sqlplus "/ as sysdba" @adupdlib.sql &lt;libext&gt;&lt;br /&gt;&lt;br /&gt;Where &lt;libext&gt; should be set to 'sl' for HP-UX, 'so' for any other UNIX platform, or 'dll' for Windows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configure the Target Database (the Database must be open) &lt;br /&gt;&lt;br /&gt;cd &lt;RDBMS ORACLE_HOME&gt;/appsutil/clone/bin&lt;br /&gt;perl adcfgclone.pl dbconfig &lt;Target Context File&gt;&lt;br /&gt;&lt;br /&gt;Where Target Context File is:&lt;br /&gt;&lt;br /&gt;&lt;RDBMS ORACLE_HOME&gt;/appsutil/&lt;Target CONTEXT_NAME&gt;.xml&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-2048354805987603375?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/2048354805987603375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=2048354805987603375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2048354805987603375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2048354805987603375'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/cloning-oracle-applications-release-11i_08.html' title='Cloning Oracle Applications Release 11i  with Rapid Clone'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2490925771078989056</id><published>2010-02-08T05:10:00.000-08:00</published><updated>2010-02-08T05:13:17.716-08:00</updated><title type='text'>Cloning Oracle Applications Release 11i</title><content type='html'>Frequently Asked Questions Cloning Oracle Applications Release 11i &lt;br /&gt;===================================================================&lt;br /&gt;Questions&lt;br /&gt;&lt;br /&gt;Cloning Concepts&lt;br /&gt;What is cloning? &lt;br /&gt;&lt;br /&gt;How can I clone an Oracle Applications system? &lt;br /&gt;&lt;br /&gt;What are the differences between the two cloning methods? &lt;br /&gt;&lt;br /&gt;What is the AD Cloning utility? &lt;br /&gt;&lt;br /&gt;What is Rapid Clone? &lt;br /&gt;&lt;br /&gt;How do I determine whether my system is Rapid Clone enabled? &lt;br /&gt;&lt;br /&gt;What is AutoConfig? &lt;br /&gt;&lt;br /&gt;How do I determine whether my system is AutoConfig enabled? &lt;br /&gt;&lt;br /&gt;We are running Release 11.5.7 (or any prior release), which cloning method can we use?&lt;br /&gt;&lt;br /&gt;We are running Release 11.5.8 (or any later release), which cloning method can we use?&lt;br /&gt;&lt;br /&gt;Our Oracle Applications system is on Windows, which cloning method can we use? &lt;br /&gt;&lt;br /&gt;We have a Platinum installation of Oracle Applications. Can we clone our system? &lt;br /&gt;&lt;br /&gt;Can I clone from one operating system version to another? &lt;br /&gt;&lt;br /&gt;Can I clone from one platform to a different platform? &lt;br /&gt;&lt;br /&gt;Can I reclone just the database? &lt;br /&gt;&lt;br /&gt;Can I clone a single-node system to a multi-node system? &lt;br /&gt;&lt;br /&gt;Can I clone a multi-node system to a single-node system? &lt;br /&gt;&lt;br /&gt;What cloning options are available for each cloning method? &lt;br /&gt;&lt;br /&gt;Rapid Clone concepts&lt;br /&gt;Does Rapid Clone modify the source system? &lt;br /&gt;&lt;br /&gt;How does adcfgclone.pl know the target system values? &lt;br /&gt;&lt;br /&gt;What is the port pool? What if I want to give a specific value to a Server Port? &lt;br /&gt;&lt;br /&gt;Does Rapid Clone preserve the patch history? &lt;br /&gt;&lt;br /&gt;Can I clone a clone ? &lt;br /&gt;&lt;br /&gt;Can I change the database dbfs layout while cloning? &lt;br /&gt;&lt;br /&gt;Rapid Clone and the oraInventory&lt;br /&gt;What is the oraInventory? &lt;br /&gt;&lt;br /&gt;What is a binary oraInventory? Is my Inventory binary? &lt;br /&gt;&lt;br /&gt;What is a XML oraInventory? Is my Inventory XML? &lt;br /&gt;&lt;br /&gt;What is the Global (or Central) Inventory? &lt;br /&gt;&lt;br /&gt;What is the Local (or Home) Inventory? &lt;br /&gt;&lt;br /&gt;How does Rapid Clone deal with the oraInventory? &lt;br /&gt;&lt;br /&gt;Why don't I need to manually copy the oraInventory when cloning? &lt;br /&gt;&lt;br /&gt;What does OUISetup.pl do? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Questions and Answers&lt;br /&gt;&lt;br /&gt;What is cloning?&lt;br /&gt;Answer:&lt;br /&gt;Cloning is the process of creating an identical copy of an already existing Oracle Applications system. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can I clone an Oracle Applications system?&lt;br /&gt;Answer:&lt;br /&gt;There are two cloning methods documented in the following white papers available off of Oracle MetaLink Note 230672.1 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cloning Oracle Applications Release 11i &lt;br /&gt;Cloning Oracle Applications Release 11i with Rapid Clone &lt;br /&gt;Note: The third Cloning method (Cloning Oracle Applications Release 11i with AutoConfig) has been fully replaced by Cloning with Rapid Clone, and is no longer supported. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What are the differences between the two cloning methods?&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cloning Oracle Applications Release 11i was originally published in conjunction with Release 11.5.5 and is applicable for all 11i releases up to 11.5.5 that are not AutoConfig enabled. &lt;br /&gt;Cloning Oracle Applications Release 11i with Rapid Clone is applicable for all 11i systems that have migrated to AutoConfig and enabled Rapid Clone. This method contains steps to install AutoConfig and Rapid Clone. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the AD Cloning utility?&lt;br /&gt;Answer:&lt;br /&gt;AD Cloning utility (adclone.pl) is the name of the cloning command line utility. This utility is used to preserve and apply configuration information to the cloned target system. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is Rapid Clone? &lt;br /&gt;Answer: &lt;br /&gt;Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install. See OracleMetaLink Note 230672.1 (Cloning Oracle Applications 11i with Rapid Clone) for instructions on installing and enabling Rapid Clone. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do I determine if my system is Rapid Clone enabled? &lt;br /&gt;Answer: &lt;br /&gt;First, verify that your system is AutoConfig enabled. Then, verify that you have applied the latest Rapid Clone patch documented in OracleMetaLink Note 230672.1 (Cloning Oracle Applications 11i with Rapid Clone). See Searching the Patch History Database in the AD Procedures Guide for instructions on searching for patches applied to your system. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;What is AutoConfig?&lt;br /&gt;Answer:&lt;br /&gt;AutoConfig is a configuration tool that supports automated configuration of an Oracle Applications Instance. All of the information required for configuring an Applications instance is collected into a central repository, called the Applications Context. When the AutoConfig tool runs, it uses information from the Applications Context file to generate configuration files and update database profiles. See OracleMetaLink Note 165195.1 for details on installing and migrating to AutoConfig. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do I determine if my system is AutoConfig enabled? &lt;br /&gt;Answer: &lt;br /&gt;There are several identifiers for when the system is AutoConfig enabled. The following are two common indicators:&lt;br /&gt;&lt;br /&gt;Open the environment file APPSORA.env in your APPL_TOP. If the top of the file says that it is maintained by AutoConfig, then your system is probably using AutoConfig. &lt;br /&gt;Check if there is an Applications Context file in the APPL_TOP/admin directory. This file will typically be named &lt;SID&gt;.xml or &lt;SID&gt;_&lt;HOSTNAME&gt;.xml. &lt;br /&gt;Check if there is an Applications Context file in the RDBMS ORACLE_HOME under the appsutil directory. This file will typically be named &lt;SID&gt;.xml or &lt;SID&gt;_&lt;HOSTNAME&gt;.xml. &lt;br /&gt;See OracleMetaLink Note 165195.1 for more details on identifying if your system already uses AutoConfig. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;We are running Release 11.5.7 (or any prior release), which cloning method can we use? &lt;br /&gt;Answer: &lt;br /&gt;Due to the advancements in the cloning solution with Rapid Clone, all customers are now recommended to move to using Rapid Clone. if you are on release 11.5.7 or any release before 11.5.7, you will need to first enable AutoConfig on your system, if not already done, before you can use Rapid Clone as documented in the Cloning Oracle Applications Release 11i with Rapid Clone white paper. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;We are running Release 11.5.8 (or any later release), which cloning method can we use? &lt;br /&gt;Answer: &lt;br /&gt;In 11.5.8 AutoConfig is enabled on the middle tier out of the box. In 11.5.9 and any later release, AutoConfig is enabled by default on both the database tier and the middle tier. Update AutoConfig and Rapid Clone code to the latest code line and use Rapid Clone to clone your system. Full instructions are in Cloning Oracle Applications Release 11i with Rapid Clone document 230672.1 on OracleMetalink.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Our Oracle Applications system is on Windows, which cloning method can we use? &lt;br /&gt;Answer: &lt;br /&gt;If your system is on a release prior to 11.5.7 and is not AutoConfig enabled, use the method documented in the Cloning Oracle Applications Release 11i white paper. If your system is on any AutoConfig-enabled 11i release, use the method documented in the Cloning Oracle Applications Release 11i with Rapid Clone white paper.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;We have a Platinum installation of Oracle Applications. Can we clone our system? &lt;br /&gt;Answer: &lt;br /&gt;Yes, cloning a Platinum system using the Rapid Clone method is no different than cloning a non-Platinum installed system. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Can I clone from one operating system version to another? &lt;br /&gt;Answer: &lt;br /&gt;Yes, if the target system platform is binary compatible with the source system platform. For example, if you have an existing single-node Oracle Applications system on Solaris 2.6, you could clone it to a node running Solaris 8, but not to a node running HP-UX. Note that cloning from a higher version of a platform to a lower version is not supported, for example, from Solaris 8 to Solaris 2.6. Other examples of binary compatibility for Oracle Applications are:&lt;br /&gt;&lt;br /&gt;AIX 4.3.3 to AIX 5.1 (32-bit) &lt;br /&gt;HP-UX 11.0 to HP-UX 11i &lt;br /&gt;Windows NT to Windows 2000&lt;br /&gt;&lt;br /&gt;Within a same platform you can also clone from a 32bit source system to a 64bit target system. Note (AIX only):   when cloning from AIX 32bit to AIX 64bit, apply patch 2896876 (64bit kernel extension for Oracle) on the target system prior to running adcfgclone.pl.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Can I clone from one platform to a different platform? &lt;br /&gt;Answer: &lt;br /&gt;Yes, you can clone or migrate the Applications middle tier from any platform to Linux or any supported Unix platform using the procedure described in document 238276.1 "Migrating to Linux with Oracle Applications Release 11i". &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Can I reclone just the database? &lt;br /&gt;Answer: &lt;br /&gt;Yes, if the source system has changed and you want to update the target system with these changes, you can reclone just the changed database. If Applications patches were applied to the source system, the APPL_TOP and the database must be cloned to keep the file system and database synchronized. See the Recloning section in the white papers for details. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Can I clone a single-node system to a multi-node system?&lt;br /&gt;Answer: &lt;br /&gt;The Rapid Clone cloning method allows for cloning a single-node system to a multi-node system. See the Cloning Oracle Applications Release 11i with Rapid Clone white paper for details. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Can I clone a multi-node system to a single-node system?&lt;br /&gt;Answer: &lt;br /&gt;You can use Rapid Clone to merge multiple APPL_TOP and COMMON_TOP file systems into a single APPL_TOP and COMMON_TOP file system. For more details about this procedure, see "Section 3: Merging existing APPL_TOPs into a shared APPL_TOP" in document 233428.1 on OracleMetaLink. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;What cloning options are available for each cloning method? &lt;br /&gt;Answer: &lt;br /&gt;The table below shows the cloning options that are currently available for each cloning method. &lt;br /&gt;&lt;br /&gt; Single node&lt;br /&gt;to &lt;br /&gt;Single node Recloning Multi-node&lt;br /&gt;to&lt;br /&gt;Multi-node Single node&lt;br /&gt;to &lt;br /&gt;Multi-node Multi-node &lt;br /&gt;to &lt;br /&gt;Single node With Oracle9i Database Windows Platform &lt;br /&gt;Cloning Oracle Applications  Available Available Available Not Available Not Available Not Available Available &lt;br /&gt;Cloning Oracle Applications with Rapid Clone  Available Available Available Available Available Available Available &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Does Rapid Clone modify the source system?&lt;br /&gt;Answer:&lt;br /&gt;No, Rapid Clone does not modify the source system. adpreclone.pl prepares the source system to be cloned by collecting information about the database and creating generic templates of files containing source specific hardcoded values. These templates are stored in the appsutil/template directory leaving the original files untouched. This process usually takes a few minutes to complete the first time.&lt;br /&gt;Migrating to Autoconfig on the database node (pre-req to Rapid Clone), however, will update the RDBMS init.ora and network listener files. See the instructions in the Autoconfig document 165195.1 (Section 4: Migrating to AutoConfig on the Database Tier) on how to preserve customizations to these files. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How does adcfgclone.pl know the target system values?&lt;br /&gt;Answer:&lt;br /&gt;adcfgclone.pl will prompt for the values required to create the new context file used to configure the target system. A few values are calculated from the current target system (hostname, user and group). The rest of the target specific values are prompted for: Prompt Comment &lt;br /&gt;database SID Target database SID &lt;br /&gt;domain name Target system domain name &lt;br /&gt;Prompts specific to the DB Tier  &lt;br /&gt;Target System database name Target System database name &lt;br /&gt;Target instance is a Real Application Cluster (RAC) instance (y/n) Answer yes if the target system is going to be part of a RAC instance. &lt;br /&gt;Current node is the first node in an N Node RAC Cluster (y/n) This prompt only appears when you answered "yes" to the previous question.&lt;br /&gt;Answer Â¨yes" to this question if the current host is the first node being configured in the target system RAC cluster. The tool will then ask for the number of nodes that will exist in the final RAC instance and gather, the following information for every node:&lt;br /&gt;- Hostname&lt;br /&gt;- Database Sid&lt;br /&gt;- Instance number&lt;br /&gt;- Listener port&lt;br /&gt;- Private interconnect name&lt;br /&gt;&lt;br /&gt;Answer "no" to this qstion if at least one node of the target RAC cluster has already been configured by Rapid Clone (i.e if you already replied "yes" to this question for any other node in the cluster). The tool will then prompt for the following information to connect to a life node (the answers must describe a node that has already been configured):&lt;br /&gt;- Hostname&lt;br /&gt;- Database Sid&lt;br /&gt;- Listener port&lt;br /&gt; &lt;br /&gt;RDBMS ORACLE_HOME directory Path to the Target system RDBMS ORACLE_HOME &lt;br /&gt;Number of DATA_TOP's:&lt;br /&gt;DATA_TOP 1:&lt;br /&gt;DATA_TOP 2:&lt;br /&gt;DATA_TOP 3:&lt;br /&gt; Database mount points. Enter the number of distinct directories containing the target database dbfs, then their paths.  &lt;br /&gt;Prompts specific to the Apps Tier  &lt;br /&gt;database server node hostname of the machine hosting the database server &lt;br /&gt;Does the target system have more than one applications tier server node (y/n)?  Answer yes if the target system is part of a multi-nodes configuration. The tool with then prompt for the hostnames of:&lt;br /&gt;- concurrent processing node&lt;br /&gt;- administration node&lt;br /&gt;- forms server node&lt;br /&gt;- web server node&lt;br /&gt; &lt;br /&gt;Is the target system APPL_TOP divided into multiple mount points (y/n)?  Answer yes if the target system APPL_TOP is divided across multiple mount points. The tool will then prompt for each auxiliary mount (4 mounts):&lt;br /&gt;- APPL_TOP mount point&lt;br /&gt;- APPL_TOP aux.1&lt;br /&gt;- APPL_TOP aux.2&lt;br /&gt;- APPL_TOP aux.3&lt;br /&gt;Note: if your APPL_TOP is divided into 2 or 3 mounts only, you can specify identical mounts to the above prompts.   &lt;br /&gt;APPL_TOP mount point APPL_TOP directory &lt;br /&gt;COMMON_TOP directory COMMON_TOP directory &lt;br /&gt;8.0.6 ORACLE_HOME directory 8.0.6 ORACLE_HOME directory &lt;br /&gt;iAS ORACLE_HOME directory iAS ORACLE_HOME directory &lt;br /&gt;Location of JDK 1.3.1 Location of JDK 1.3.1 &lt;br /&gt;Prompt common to DB and Apps Tiers  &lt;br /&gt;Port pool number:[0-99] Enter the port pool that you want to use on the target system. Make sure to specify the same port pool on the DBTier and the AppsTier. If the source and target machines are different, you have the option to preserve the source port values on the target system.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the port pool? What if I want to give a specific value to a Server Port?&lt;br /&gt;Answer:&lt;br /&gt;If you are cloning on the same machine or want to redefine the server ports , you will be prompted for a port pool. The port pool provides a way to use a set of predefined server ports. There are 100 port pools. For example, if you select 3, the default database port number (1521) becomes 1524. &lt;br /&gt;The following table lists all the server ports. To see how the port pool calculation works, &lt;br /&gt;enter a number between 0 and 99(both inclusive) in the form and click "Get Ports". &lt;br /&gt;&lt;br /&gt;Port Name Autoconfig Variable (Default) Port Numbers allocated for Port Pool: 0 (Custom) Port Numbers allocated for Port Pool:  &lt;br /&gt;Web Listener Port s_webport 8000 8001 &lt;br /&gt;Database Port s_dbport 1521 1522 &lt;br /&gt;RPC Port s_rpcport 1626 1627 &lt;br /&gt;Reports Port s_repsport 7000 7001 &lt;br /&gt;OPROC Manager Port s_oprocmgr_port 8100 8101 &lt;br /&gt;Web PLSQL Port s_webport_pls 8200 8201 &lt;br /&gt;Servlet Port s_servletport 8800 8801 &lt;br /&gt;Forms Listener Port s_formsport 9000 9001 &lt;br /&gt;Metrics Server Data Port s_metdataport 9100 9101 &lt;br /&gt;Metrics Server Req. Port s_metreqport 9200 9201 &lt;br /&gt;JTF Fulfillment Server Port s_jtfuf_port 9300 9301 &lt;br /&gt;iMeeting Collaboration Server Port s_imtsrvport 9500 9501 &lt;br /&gt;iMeeting Recording Server Port s_imtrecport 9600 9601 &lt;br /&gt;iMeeting Monitor (iMon) Port s_imtimonport 9700 9701 &lt;br /&gt;Map Viewer Servlet Port s_mapviewer_port 9800 9801 &lt;br /&gt;OEM Web Utility Port s_oemweb_port 10000 10001 &lt;br /&gt;VisiBroker OrbServer Agent Port s_osagent_port 10100 10101 &lt;br /&gt;MSCA Server Port s_mwaPortNo 10200 10201 &lt;br /&gt;MSCA Dispatcher Port s_mwaDispatcherPort 10300 10301 &lt;br /&gt;TCF Port s_tcfport 15000 15001 &lt;br /&gt;OACORE Servle Port Range s_oacore_servlet_portrange 16000-16009 16010-16019 &lt;br /&gt;Discoverer Servlet Port Range s_disco_servlet_portrange 17000-17009 17010-17019 &lt;br /&gt;Forms Servlet Port Range s_forms_servlet_portrange 18000-18009 18010-18019 &lt;br /&gt;XMLSVCS Servlet Port Range s_xmlsvcs_servlet_portrange 19000-19009 19010-19019 &lt;br /&gt;Forms Start Port s_frmStartPort 20000 20001 &lt;br /&gt;Java Object Cache Port s_java_object_cache_port 12345 12346 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to give a specific value to a port on the target system, independently from the port pool, you must first complete the Target System configuration with adcfgclone.pl (temporarily select a value for the port pool). Once adcfgclone.pl completes successfully, edit the new target context file with editcontext or OAM and modify the corresponding Autoconfig variables. Run Autoconfig to refresh the system with the new values (see OracleMetaLink document 165195.1). &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Does Rapid Clone preserve the patch history?&lt;br /&gt;Answer:&lt;br /&gt;Yes, Rapid Clone preserves the patch history of the complete Applications Stack: &lt;br /&gt;&lt;br /&gt;RDBMS ORACLE_HOME: preserve the OUI oraInventory. &lt;br /&gt;iAS ORACLE_HOME: preserve the OUI oraInventory. &lt;br /&gt;806 ORACLE_HOME: preserve the patch level and ORCA inventory. &lt;br /&gt;APPL_TOP and Database: preserve the patch level and history tables. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can I clone a clone?&lt;br /&gt;Answer:&lt;br /&gt;Yes, a cloned system created with Rapid Clone can then be used as the Source System in the next cloning. RapidInstall itself is now a clone of a clone using the Rapid Clone technology. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can I change the database dbf files layout while cloning?&lt;br /&gt;Answer:&lt;br /&gt;Yes, Rapid Clone allows to add or remove database mount points or redidtribute dbf files among mount points in the target system. As long as all the source system dbf files are present in the target system database mount points specified during the adcfgclone prompts (see question "How does adcfgclone.pl know the target system values?"), Rapid Clone will find them and re-create the database control file accordingly. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the oraInventory?&lt;br /&gt;Answer:&lt;br /&gt;The oraInventory is the location for the OUI (Oracle Universal Installer)'s bookkeeping. The inventory stores information about: &lt;br /&gt;&lt;br /&gt;All Oracle software products installed in all ORACLE_HOMES on a machine &lt;br /&gt;Other non-Oracle products, such as the Java Runtime Environment (JRE) &lt;br /&gt;In a 11i Application system the RDBMS and iAS ORACLE_HOMEs are registered in the oraInventory. The 806 ORACLE_HOME, which is not managed through OUI, is not.&lt;br /&gt;&lt;br /&gt;On Unix/Linux, the location of the oraInventory is defined by the content of oraInst.loc, at:&lt;br /&gt;- /var/opt/oracle/oraInst.loc on Solaris, HP-UX and Tru64 &lt;br /&gt;- /etc/oraInst.loc on Linux and AIX &lt;br /&gt;On Windows, the location of the oraInventory is defined by the value of the registry key HKEY_LOCAL_MACHINE|Software\Oracle\INST_LOC or if this value is not defined, at C:\Program Files\Oracle\Inventory &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a binary oraInventory? Is my Inventory binary?&lt;br /&gt;Answer:&lt;br /&gt;Before OUI 2.X, the oraInventory was binary.&lt;br /&gt;A binary oraInventory centralizes, in a binary format, the location of every Oracle products on the machine and the detail of their patch level. The oraInventory location is defined by the content of oraInst.loc. You will have a binary inventory only if ALL of the following conditions are met:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;you are on 11.5.7 or earlier (11.5.8+ install XML inventory out of the box) &lt;br /&gt;you have never installed OUI 2.X or higher (Install converts the inventory to XML) &lt;br /&gt;you have never run Rapid Clone (Rapid Clone converts the inventory to XML) &lt;br /&gt;If the following file exists, the oraInventory is NOT binary:&lt;br /&gt;&lt;oraInventory location as pointed by oraInst.loc&gt;/ContentsXML/inventory.xml &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a XML oraInventory? Is my Inventory XML?&lt;br /&gt;Answer:&lt;br /&gt;Starting with OUI 2.X and 11.5.8, the information in the inventory is stored in Extensible Markup Language (XML) format. The XML format allows for easier diagnosis of problems and faster loading of data Rapid Clone requires the inventory to be in XML format in order to clone it, and will take care of performing the binary to XML convertion if necessary.&lt;br /&gt;Unlike the binary oraInventory, The XML inventory is divided into 2 distinct components:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Global inventory (or Central inventory) &lt;br /&gt;The Local inventory (or Home inventory) &lt;br /&gt;More information about these components is available under other questions in this FAQ&lt;br /&gt;The inventory is XML if the following file exists:&lt;br /&gt;$ORACLE_HOME/inventory/ContentXML/comps.xml &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the Global (or Central) Inventory?&lt;br /&gt;Answer:&lt;br /&gt;The Global Inventory is the part of the XML inventory that contains the high level list of all oracle products installed on a machine. There should therefore be only one per machine. Its location is defined by the content of oraInst.loc.&lt;br /&gt;The Global Inventory records the physical location of Oracle products installed on the machine, such as ORACLE_HOMES (RDBMS and IAS) or JRE. It does not have any information about the detail of patches applied to each ORACLE_HOMEs.&lt;br /&gt;The Global Inventory gets updated every time you install or de-install an ORACLE_HOME on the machine, be it through OUI Installer, Rapid Install, or Rapid Clone.&lt;br /&gt;Note: If you need to delete an ORACLE_HOME, you should always do it through the OUI de-installer in order to keep the Global Inventory synchronized. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the Local (or Home) Inventory?&lt;br /&gt;Answer:&lt;br /&gt;There is one Local Inventory per ORACLE_HOME. It is physically located inside the ORACLE_HOME at $ORACLE_HOME/inventory and contains the detail of the patch level for that ORACLE_HOME.&lt;br /&gt;The Local Inventory gets updated whenever a patch is applied to the ORACLE_HOME, using OUI. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How does Rapid Clone deal with the oraInventory?&lt;br /&gt;Answer:&lt;br /&gt;Rapid Clone requires OUI 2.2 to be installed in the ORACLE_HOME as a prerequisite and will performs all the actions necessary to clone the inventory:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Converts the Global inventory to xml format when it was binary on either the source system or the target system &lt;br /&gt;Registers the cloned ORACLE_HOME in the target system Global Inventory &lt;br /&gt;Updates the Local Inventory of the target ORACLE_HOME to reflect the new machine, paths, users, etc. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why don't I need to manually copy the oraInventory when cloning?&lt;br /&gt;Answer:&lt;br /&gt;The local inventory is automatically copied from the source system to the target system as part of copying the ORACLE_HOME itself.&lt;br /&gt;The Global Inventory is machine specifc and therefore should not be copied. If you are cloning from one machine to a different machine, Rapid Clone will simply register the target ORACLE_HOME in the target machine Global Inventory (This action will automatically create the Global Inventory if it did not exist on that machine). &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What does OUISetup.pl do?&lt;br /&gt;Answer:&lt;br /&gt;OUISetup.pl is shipped with the OUI patch, listed as a prerequisit to Rapid Clone (see Metalink Node 230672.1). It should be run as part of the OUI patch installation and will perform the following tasks:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Register the OUI program in the Global Inventory &lt;br /&gt;Register the JRE in the Global Inventory &lt;br /&gt;Ensure that the ORACLE_HOME in which the patch is install is properly registered in the Global Inventory. In doing so, it will attempt to automatically fix Inventory corruptions that are known to cause problem whilie cloning, such as &lt;br /&gt;- Home indexes out of sync between the Global and Local Inventory&lt;br /&gt;- Duplicate Home Names entries&lt;br /&gt;- Duplicate Home Path entries&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Change Log &lt;br /&gt;Date Description &lt;br /&gt;June 15, 2005 Added RAC prompts to Q20 &lt;br /&gt;Added dbf layout Q24 &lt;br /&gt; &lt;br /&gt;Dec 16, 2004 Removed duplicated Q23, now covered by the inventory section &lt;br /&gt;Sync'ed up patch versions with Rapid Clone doc 230672.1 &lt;br /&gt; &lt;br /&gt;Dec 03, 2004 Added topics and re-ordered questions in them &lt;br /&gt;Modified wording in Q9 and Q10 &lt;br /&gt;Added Q25 to Q32 about Rapid Clone and the inventory &lt;br /&gt;Added Note about 32bit to 64bit cloning in Q13. &lt;br /&gt; &lt;br /&gt;Sept 30, 2004 Added Q13 for Platform migration. &lt;br /&gt;Updated Q18 and Q19 for Merge APPL_TOP. &lt;br /&gt; &lt;br /&gt;May 14, 2004 Added custom Port Pool calculation feature.&lt;br /&gt; &lt;br /&gt;August 26, 2003 Clarified non-support for cloning from a higher version of a platform to a lower version.&lt;br /&gt; &lt;br /&gt;July 18, 2003 Updated binary compatible operating systems list&lt;br /&gt; &lt;br /&gt;June 30, 2003 Added Q19, Q20, Q21, Q22, Q23, Q24&lt;br /&gt; &lt;br /&gt;June 20, 2003 FAQ Re-write&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 216664.1 by Oracle Applications Development&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-2490925771078989056?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/2490925771078989056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=2490925771078989056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2490925771078989056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2490925771078989056'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/cloning-oracle-applications-release-11i.html' title='Cloning Oracle Applications Release 11i'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-3132514042013499208</id><published>2010-02-08T03:26:00.001-08:00</published><updated>2010-02-08T03:26:57.540-08:00</updated><title type='text'>Raw Devices on Linux</title><content type='html'>Raw Devices on Linux [ID 224302.1]&lt;br /&gt;&lt;br /&gt;In this Document&lt;br /&gt;  Purpose&lt;br /&gt;  Questions and Answers&lt;br /&gt;     What is a raw device?&lt;br /&gt;     How can a raw device be recognised?&lt;br /&gt;     What are the benefits of raw devices?&lt;br /&gt;     Are there circumstances when raw devices have to be used?&lt;br /&gt;     Can I use the entire raw partition for Oracle?&lt;br /&gt;     How many raw devices I have in Linux by default and how many raw can I have?&lt;br /&gt;     How can I create new raw devices?&lt;br /&gt;     Who should own the raw device?&lt;br /&gt;     How can I use a raw device for Oracle RDBMS?&lt;br /&gt;     Does the Oracle block size have any relevance on a raw device?&lt;br /&gt;     How can I back up my database files if they are on raw devices?&lt;br /&gt;     Providing I am not using Parallel Server or Real Application Cluster, can I use a mixture of raw?&lt;br /&gt;     Should I store my redo log files on raw partitions?&lt;br /&gt;     Can I use raw partitions for archive logs?&lt;br /&gt;     Can I have more than one data file on a raw partition?&lt;br /&gt;     Should my raw partitions be on the same disk device?&lt;br /&gt;     Do I need to make my raw partitions all the same size?&lt;br /&gt;     Do I need to change any UNIX kernel parameters if I decide to use raw devices?&lt;br /&gt;     What other UNIX-level changes could help to improve I/O performance?&lt;br /&gt;     How can I gain further performance benefits, after considering all of the above?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Applies to: &lt;br /&gt;Linux OS&lt;br /&gt;Linux x86&lt;br /&gt;Linux x86-64&lt;br /&gt;&lt;br /&gt;Purpose&lt;br /&gt;Instructions for the reader: This FAQ document identifies the most frequently reported how-to questions. The articles below do not include bugs/patches or troubleshooting.&lt;br /&gt;&lt;br /&gt;Questions and Answers&lt;br /&gt;***Checked for relevance on 15-Mon-2010&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a raw device?&lt;br /&gt;Raw device, also known as a raw partition is a disk partition that is not mounted and written by Linux filesystem (ext2/ext3, reiserfs) or by Oracle Cluster File System (OCFS, OCFS2), but is accessed by a character device driver. It is the responsibility of the application to organize how the data is written to the disk partition.&lt;br /&gt;&lt;br /&gt;How can a raw device be recognised?&lt;br /&gt;All hardware devices look like regular files; they can be opened, closed, read and written using the same, standard, system calls that are used to manipulate files. Every device in the system is represented by a device special file, for example the first IDE disk in the system is represented by /dev/hda. For block (disk) and character devices, these device special files are created by the mknod command and they describe the device using major and minor device numbers.&lt;br /&gt;All devices controlled by the same device driver have a common major device number.&lt;br /&gt;The minor device numbers are used to distinguish between different devices and their controllers, for example each partition on the primary IDE disk has a different minor device number. So, /dev/hda2, the second partition of the primary IDE disk has a major number of 3 and a minor number of 2. Linux maps the device special file passed in system calls (say to mount a file system on a block device) to the device's device driver using the major device number and a number of system tables, for example the character device table, chrdevs .&lt;br /&gt;&lt;br /&gt;Linux supports three types of hardware device: character, block and network.&lt;br /&gt;&lt;br /&gt;1. Character devices are read and written directly without buffering.&lt;br /&gt;&lt;br /&gt;2. Block devices can only be written to and read from in multiples of the block size, typically 512 or 1024 bytes. Block devices are accessed via the buffer cache and may be randomly accessed, that is to say, any block can be read or written no matter where it is on the device. Block devices can be accessed via their device special file but more commonly they are accessed via the file system. Only a block device can support a mounted file system.&lt;br /&gt;&lt;br /&gt;3. Network devices are accessed via the BSD socket interface and the networking subsytems described in the Networking chapter.&lt;br /&gt;&lt;br /&gt;The Raw devices are character devices (major number 162).&lt;br /&gt;The first minor number (i.e. 0) is reserved as a control interface and is usually found at /dev/rawctl.&lt;br /&gt;A sequence of commands listing the raw devices:&lt;br /&gt;&lt;br /&gt;# ls -lR /dev/rawctl&lt;br /&gt;crw-rw---- 1 root disk 162, 0 Mar 19 2002 /dev/rawctl&lt;br /&gt;&lt;br /&gt;# ls -lR /dev/raw[1-4]&lt;br /&gt;crw-rw---- 1 root disk 162, 1 Mar 19 2002 /dev/raw1&lt;br /&gt;crw-rw---- 1 root disk 162, 2 Mar 19 2002 /dev/raw2&lt;br /&gt;crw-rw---- 1 root disk 162, 3 Mar 19 2002 /dev/raw3&lt;br /&gt;crw-rw---- 1 root disk 162, 4 Mar 19 2002 /dev/raw4 &lt;br /&gt;What are the benefits of raw devices?&lt;br /&gt;A raw device can be bound to an existing block device (e.g. a disk) and be used to perform "raw" IO with that existing block device.&lt;br /&gt;Such "raw" IO bypasses the caching (Linux buffer cache) that is normally associated with block devices and eliminates the file system overheads such as inodes or free lists. Hence a raw device offers a more "direct" route to the physical device and allows an application more control over the timing of IO to that physical device. This makes raw devices suitable for complex applications like Database Management Systems that typically do their own caching.&lt;br /&gt;If there is no I/O bottleneck, raw devices will not help. Note that the overall amount of I/O is not reduced; it is just done more efficiently.&lt;br /&gt;&lt;br /&gt;Are there circumstances when raw devices have to be used?&lt;br /&gt;If you are using the Oracle Parallel Server (OPS) or Oracle Real Application Cluster (RAC) without Oracle Cluster File System (OCFS), all data files, control files, and redo log files must be placed on raw partitions so they can be shared between nodes. Also if you use List I/O or Asynchronous I/O, these facilities allow a program to issue multiple write operations without having to wait for the return of the previous write, to take advantage of this data files will need to be on raw devices.&lt;br /&gt;&lt;br /&gt;Can I use the entire raw partition for Oracle?&lt;br /&gt;No. You should specify a tablespace slightly smaller in size than the raw partition size, specifically at least two Oracle block sizes smaller.&lt;br /&gt;&lt;br /&gt;How many raw devices I have in Linux by default and how many raw can I have?&lt;br /&gt;The number of raw devices that Linux can access is limited to 255.&lt;br /&gt;By default there are 128 raw devices under /dev/raw:&lt;br /&gt;&lt;br /&gt;# ls -l /dev/raw*&lt;br /&gt;crw-rw---- 1 root disk 162, 1 Mar 19 2002 /dev/raw1&lt;br /&gt;(...)&lt;br /&gt;crw-rw---- 1 root disk 162, 3 Mar 19 2002 /dev/raw128&lt;br /&gt;&lt;br /&gt;Linux cannot handle more than a limited number of partitions per drive. So in Linux you have 4 primary partitions (3 of them useable, if you are using logical partitions) and at most 15 partitions altogether on an SCSI disk (63 altogether on an IDE disk).&lt;br /&gt;&lt;br /&gt;How can I create new raw devices?&lt;br /&gt;If it's necessary create others raw devices the following command must be done as root user (see man mknod):&lt;br /&gt;&lt;br /&gt;# mknod -m 660 /dev/raw/rawXXX c 162 XXX&lt;br /&gt;# chown root:disk /dev/raw/rawXXX&lt;br /&gt;(where XXX= 128&lt; integer &lt; 256)&lt;br /&gt;&lt;br /&gt;i.e.:&lt;br /&gt;# mknod -m 660 /dev/raw/raw130 c 162 130&lt;br /&gt;# chown root:disk /dev/raw/raw130&lt;br /&gt;# ls -l /dev/raw/raw130&lt;br /&gt;crw-rw---- 1 root disk 162, 130 Dec 23 18:57 /dev/raw130&lt;br /&gt;&lt;br /&gt;Who should own the raw device?&lt;br /&gt;You will need to create the raw devices as root, but the ownership should be changed to the 'oracle' account afterwards. The group must also be changed to the 'dba' group (usually called dba).&lt;br /&gt;&lt;br /&gt;How can I use a raw device for Oracle RDBMS?&lt;br /&gt;We suppose to have a SCSI disk drivers - 9 Gbytes. The steps are:&lt;br /&gt;&lt;br /&gt;a. Partition the disk driver (/dev/sdb)&lt;br /&gt;b. Binding raw device with partition on new SCSI disk&lt;br /&gt;c. Change the ownership of the raw device&lt;br /&gt;d. Create a new Oracle datafile on raw device&lt;br /&gt;&lt;br /&gt;- Partition the disk driver, fdisk command (see man fdisk):&lt;br /&gt;&lt;br /&gt;1. As user root, type&lt;br /&gt;&lt;br /&gt;# fdisk /dev/sdb&lt;br /&gt;&lt;br /&gt;2. Type 'p' to see the list of existing partitions on your disk drive:&lt;br /&gt;&lt;br /&gt;command (m for help): p&lt;br /&gt;Disk /dev/sdb: 255 heads, 63 sectors, 1174 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 bytes&lt;br /&gt;&lt;br /&gt;Device Boot Start End Block ID System&lt;br /&gt;&lt;br /&gt;3.a. In order to create a partition, choose 'n' command and then choose an extended partition with the 'e' option.&lt;br /&gt;You will need extended partition, because this disk will contains more than 4 partitions.&lt;br /&gt;Create partition number 1 first, so choose number 1.&lt;br /&gt;&lt;br /&gt;command (m for help): n&lt;br /&gt;command action&lt;br /&gt;e extended&lt;br /&gt;p primary partition (1-4)&lt;br /&gt;e&lt;br /&gt;Partition Number (1-4): 1&lt;br /&gt;First cylinder (1-1115, default 1):&lt;br /&gt;Using default value 1&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (1-1115, default 1115):&lt;br /&gt;Using default value 1115&lt;br /&gt;&lt;br /&gt;3.b. Now within the extended partition,&lt;br /&gt;I will have to create 6 logical partition of equal sizes: each should be 257Mb large (256Mb+1Mb for the headers).&lt;br /&gt;Press 'n' and 'l' and &lt;Enter&gt;, and write the size of the partition (begin with a +) +257M.&lt;br /&gt;Repeat these steps 6 times&lt;br /&gt;&lt;br /&gt;command (m for help): n&lt;br /&gt;command action&lt;br /&gt;l logical (5 or over)&lt;br /&gt;p primary partition (1-4)&lt;br /&gt;l&lt;br /&gt;Partition Number (1-4): 1&lt;br /&gt;First cylinder (1-1115, default 1):&lt;br /&gt;Using default value 1&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (1-1115, default 1115): +257M&lt;br /&gt;(...repeat 5 time...)&lt;br /&gt;&lt;br /&gt;command (m for help): p&lt;br /&gt;Disk /dev/sdb: 255 heads, 63 sectors, 1174 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 bytes&lt;br /&gt;&lt;br /&gt;Device Boot Start End Block ID System&lt;br /&gt;/dev/sdb1 1 1115 8956206 5 Extended&lt;br /&gt;/dev/sdb5 1 33 265009+ 83 Linux&lt;br /&gt;/dev/sdb6 34 66 265041 83 Linux&lt;br /&gt;(...)&lt;br /&gt;/dev/sdb10 166 198 265041 83 Linux&lt;br /&gt;&lt;br /&gt;3.c. Now press 'w' this will write the partition table to the disk and quit the fdisk programm&lt;br /&gt;&lt;br /&gt;- Binding raw device with partition on new SCSI disk&lt;br /&gt;&lt;br /&gt;A utility called raw (see man raw) can be used to bind a raw device to an existing block device:&lt;br /&gt;&lt;br /&gt;# raw /dev/raw/raw1 /dev/sdb5&lt;br /&gt;/dev/raw/raw1: bound to major 8, minor 3&lt;br /&gt;(...)&lt;br /&gt;# raw /dev/raw/raw6 /dev/sdb10&lt;br /&gt;/dev/raw/raw6: bound to major 8, minor 3&lt;br /&gt;&lt;br /&gt;The last details regarding this is that the assignement of raw device drivers to partitions should be done after each startup.&lt;br /&gt;For this reason, as user root, edit the /etc/sysconfig/rawdevices and put the following raw command into it:&lt;br /&gt;&lt;br /&gt;raw /dev/raw/raw1 /dev/sdb5&lt;br /&gt;raw /dev/raw/raw2 /dev/sdb6&lt;br /&gt;raw /dev/raw/raw3 /dev/sdb7&lt;br /&gt;raw /dev/raw/raw4 /dev/sdb8&lt;br /&gt;raw /dev/raw/raw5 /dev/sdb9&lt;br /&gt;raw /dev/raw/raw6 /dev/sdb10&lt;br /&gt;&lt;br /&gt;- Change the ownership of the raw device&lt;br /&gt;&lt;br /&gt;As root user type:&lt;br /&gt;&lt;br /&gt;# cd /dev/raw&lt;br /&gt;# chown oracle:dba raw[1-4]&lt;br /&gt;&lt;br /&gt;- Create a new Oracle datafile on raw device&lt;br /&gt;&lt;br /&gt;When using a raw device you need to specify the full pathname in single quotes, and use the REUSE parameter.&lt;br /&gt;When creating the oracle tablespace on the raw partition a slightly smaller size than the actual partition size needs to be specified.&lt;br /&gt;This size can be calculated as follows:&lt;br /&gt;&lt;br /&gt;Size of Redo Log = Raw Partition Size - 1*512 byte block&lt;br /&gt;Size of Data File = Raw Partition Size - 2* Oracle Block Size&lt;br /&gt;&lt;br /&gt;e.g. (db_block_size=8192):&lt;br /&gt;create tablespace tablespace_on_raw datafile '/dev/raw/raw1' size 246784K REUSE,&lt;br /&gt;datafile '/dev/raw/raw2' size 246784K REUSE,&lt;br /&gt;datafile '/dev/raw/raw3' size 246784K REUSE,&lt;br /&gt;datafile '/dev/raw/raw4' size 246784K REUSE,&lt;br /&gt;datafile '/dev/raw/raw5' size 246784K REUSE,&lt;br /&gt;datafile '/dev/raw/raw6' size 246784K REUSE;&lt;br /&gt;&lt;br /&gt;Does the Oracle block size have any relevance on a raw device?&lt;br /&gt;It is of less importance than for a UNIX file; the size of the Oracle block can be changed, but it must be a multiple of the physical block&lt;br /&gt;size as it is only possible to seek to physical block boundaries and hence write only in multiples of the physical block size.&lt;br /&gt;&lt;br /&gt;How can I back up my database files if they are on raw devices?&lt;br /&gt;You cannot use utilities such as 'tar' or 'cpio', which expect a filesystem to be present.&lt;br /&gt;Usually people move Oracle datafiles from filesystem to raw devices using the 'dd' command. Using dd is the fastest method to accomplish it. However, it is necessary to know how many blocks to skip in the raw device (e.g. on Tru64 Unix you have to skip 64K), so that you do not overwrite information necessary for the Operating System. The information on how many blocks to skip is different on the different platforms. On linux you do not need to specify a skip displacement. Using RMAN there's no necessity to know such platform specific information. With the RMAN copy command datafiles can be copied from filesystem files to raw devices.&lt;br /&gt;&lt;br /&gt;An example using 'dd' command:&lt;br /&gt;&lt;br /&gt;# dd if=/dev/raw/raw1 of=/u01/oradata/test_ts.dbf' bs=16K&lt;br /&gt;(Keep the Block size to multiple of the Oracle Block Size)&lt;br /&gt;&lt;br /&gt;See the UNIX man page on dd for further details.&lt;br /&gt;&lt;br /&gt;You can use RMAN.&lt;br /&gt;From filesystem to raw device:&lt;br /&gt;&lt;br /&gt;RMAN&gt; run {&lt;br /&gt;2&gt; allocate channel c1 type disk;&lt;br /&gt;3&gt; copy datafile '/u01/oradata/test_ts.dbf' to '/dev/raw/raw1';&lt;br /&gt;4&gt; }&lt;br /&gt;&lt;br /&gt;From raw device to filesystem:&lt;br /&gt;&lt;br /&gt;RMAN&gt; run {&lt;br /&gt;2&gt; allocate channel c1 type disk;&lt;br /&gt;3&gt; copy datafile '/dev/raw/raw1' to '/u01/oradata/test_ts.dbf';&lt;br /&gt;4&gt; }&lt;br /&gt;&lt;br /&gt;Providing I am not using Parallel Server or Real Application Cluster, can I use a mixture of raw?&lt;br /&gt;Yes. The drawback is that this makes your backup strategy more complicated.&lt;br /&gt;&lt;br /&gt;Should I store my redo log files on raw partitions?&lt;br /&gt;Redo logs are particularly suitable candidates for being located on raw partitions, as they are write-intensive and in addition are written to&lt;br /&gt;sequentially.&lt;br /&gt;&lt;br /&gt;Can I use raw partitions for archive logs?&lt;br /&gt;No. Archive logs must be stored on a partition with a UNIX filesystem.&lt;br /&gt;&lt;br /&gt;Can I have more than one data file on a raw partition?&lt;br /&gt;No. This means you should be careful when setting up the raw partition. Too small a size will necessitate reorganisation when you&lt;br /&gt;run out of space, whereas too large a size will waste any space the file does not use.&lt;br /&gt;&lt;br /&gt;Should my raw partitions be on the same disk device?&lt;br /&gt;This is inadvisable, as there is likely to be contention. You should place raw devices on different disks, which should also be on different&lt;br /&gt;controllers.&lt;br /&gt;&lt;br /&gt;Do I need to make my raw partitions all the same size?&lt;br /&gt;This is not essential, but it provides flexibility in the event of having to change the database configuration.&lt;br /&gt;&lt;br /&gt;Do I need to change any UNIX kernel parameters if I decide to use raw devices?&lt;br /&gt;No&lt;br /&gt;&lt;br /&gt;What other UNIX-level changes could help to improve I/O performance?&lt;br /&gt;RAID and disk mirroring can be beneficial, depending on the application characteristics, especially whether it is read or write-intensive, or a&lt;br /&gt;mixture.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can I gain further performance benefits, after considering all of the above?&lt;br /&gt;You will need to buy more disk drives and controllers for your system, to spread the I/O load between devices.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-3132514042013499208?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/3132514042013499208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=3132514042013499208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3132514042013499208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/3132514042013499208'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/raw-devices-on-linux.html' title='Raw Devices on Linux'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2170143029699480416</id><published>2010-02-08T02:16:00.000-08:00</published><updated>2010-02-08T02:36:25.868-08:00</updated><title type='text'>LINUX: Quick Start Guide - 9.2.0 RDBMS Installation</title><content type='html'>LINUX: Quick Start Guide - 9.2.0 RDBMS Installation [ID 201370.1]&lt;br /&gt;&lt;br /&gt;Quick Start Guide&lt;br /&gt;Oracle9i Release 2 (9.2.0) RDBMS Installation&lt;br /&gt;Linux Operating System&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PURPOSE&lt;br /&gt;=======&lt;br /&gt;&lt;br /&gt;This document is designed to be a quick reference that can be used when &lt;br /&gt;installing Oracle 9.2.0 on the Linux platform.  &lt;br /&gt;It is NOT designed to take the place of the Installation Guide.  &lt;br /&gt;It is recommended that users READ the installation guide.  &lt;br /&gt;Instructions to locate that document are contained in Appendix A. &lt;br /&gt;A familiarity with the Linux Operating System is assumed. &lt;br /&gt;If Installation guide information is needed, please see the &lt;br /&gt;Appendix A at the bottom of this document for additional resources.&lt;br /&gt;&lt;br /&gt;Each step should be done in the order that it is listed.  &lt;br /&gt;These steps are the bare minimum that is necessary for a typical install &lt;br /&gt;of the Oracle9i RDBMS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Verification of Version Certification:&lt;br /&gt;======================================&lt;br /&gt;&lt;br /&gt;Currently, Oracle 9.2.0 is certified ONLY on the following&lt;br /&gt;Intel Based Server Linux distributions:&lt;br /&gt;&lt;br /&gt;   - RHEL3 (See Note:252217.1 Requirements for Installing Oracle 9iR2 on RHEL3)&lt;br /&gt;   - Red Hat Advanced Server 2.1&lt;br /&gt;   - Suse SLES7, SLES8&lt;br /&gt;   - United Linux 1.0&lt;br /&gt;&lt;br /&gt;For the latest certification and other related information, use the "Certify &amp; Availability" &lt;br /&gt;link in Metalink.  Once the Certification is displayed, click "Additional Information".  &lt;br /&gt;&lt;br /&gt;Installations on distributions and versions not listed in the Certify link is not supported.&lt;br /&gt;&lt;br /&gt;Pre-requisite Requirements for System Administrator:&lt;br /&gt;====================================================&lt;br /&gt;&lt;br /&gt;The following steps are required to verify your operating system meets minimum &lt;br /&gt;requirements for installation, and should be performed by the root user. &lt;br /&gt;For assistance with system administration issues, &lt;br /&gt;please contact your system administrator or operating system vendor.&lt;br /&gt;&lt;br /&gt;Use these steps to manually check the operating system requirements before &lt;br /&gt;attempting to install Oracle RDBMS software, or you may choose to use the &lt;br /&gt;convenient "Unix InstallPrep script" which automates these checks for you. &lt;br /&gt;For more information about the script, including download information, &lt;br /&gt;please review the following article:&lt;br /&gt;&lt;br /&gt;   Note:189256.1   UNIX: Script to Verify Installation Requirements for&lt;br /&gt;                   Oracle 9.x version of RDBMS&lt;br /&gt;&lt;br /&gt;Users must have /bin/utils installed for the operating system.  &lt;br /&gt;This is part of the developers option on RedHat Advanced Server 2.1.&lt;br /&gt;&lt;br /&gt;The Following Steps Need to be Performed by the Root User:&lt;br /&gt;&lt;br /&gt;1. Configure System Resources:&lt;br /&gt;&lt;br /&gt;      Ensure that the system has at least the following resources:&lt;br /&gt;&lt;br /&gt;         ? 400 MB in /tmp *&lt;br /&gt;         ? 512 MB of Physical Memory (RAM)&lt;br /&gt;         ? Three times the amount of Physical Memory for Swap space &lt;br /&gt;         (unless the system exceeds 1 GB of Physical Memory, where two times &lt;br /&gt;         the amount of Physical Memory for Swap space is sufficient)&lt;br /&gt;&lt;br /&gt;         * You may also redirect /tmp by setting the TEMP environment variable.&lt;br /&gt; &lt;br /&gt;   This is only recommended in rare circumstances where /tmp cannot be expanded &lt;br /&gt;   to meet free space requirements.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Create a Software Owner and Group:&lt;br /&gt;&lt;br /&gt;     Create a Unix user and group that will own the Oracle software. &lt;br /&gt;     (Typically user = oracle, group = dba)&lt;br /&gt;&lt;br /&gt;     You may use a GUI tool for this if your distirbution provides&lt;br /&gt;     one, or the 'useradd' and 'groupadd' command line utilities.&lt;br /&gt;&lt;br /&gt;     Please make sure the user and group you use are defined in the local&lt;br /&gt;     /etc/passwd and /etc/group files rather than resolved via a network&lt;br /&gt;     service such as NIS.&lt;br /&gt;&lt;br /&gt;3. Create a Software Mount Point and DataFile Mount Points:&lt;br /&gt;&lt;br /&gt;      Create a mount point for the Oracle software installation &lt;br /&gt;      (at least 2.5 GB, typically /u01)&lt;br /&gt;&lt;br /&gt;      Create a second, third and fourth mount point for the database files, &lt;br /&gt;      control files, and log files to be created (typically /u02, /u03, /u04).&lt;br /&gt;&lt;br /&gt;         ? The oracle user should own these mount points and all of the&lt;br /&gt;           directories below the mount point.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Test the Permissions:&lt;br /&gt;  &lt;br /&gt;      Ensure that the oracle user can write to the new mount points&lt;br /&gt;&lt;br /&gt;        ? As a test, change directories to each of the new mount point&lt;br /&gt;          directories as the oracle user and create a file or directory.&lt;br /&gt;          Example:        &lt;br /&gt;             % touch /u01/test&lt;br /&gt;&lt;br /&gt;5. Configure Kernel Resources:&lt;br /&gt;The following kernel parameters related to shared memory and semaphores will &lt;br /&gt;require tuning: &lt;br /&gt; SHMMAX = 2147483648&lt;br /&gt; SHMMIN = 1&lt;br /&gt; SHMMNI = 100&lt;br /&gt; SEMMNS = 1000&lt;br /&gt; SEMMSL = 250&lt;br /&gt; SEMMNI = 100&lt;br /&gt; SEMOPM = 100&lt;br /&gt;&lt;br /&gt;6.On Linux kernel parameters can be set dynamically or can be written in a shell &lt;br /&gt;script to be set at boot time. &lt;br /&gt;&lt;br /&gt;Kernel parameters should be set as the root user.&lt;br /&gt;&lt;br /&gt;They are set as follows&lt;br /&gt;1. cd /proc/sys/kernel&lt;br /&gt;2. Modify the parameter values by using the following command syntax:&lt;br /&gt;a. # echo 100 32000 100 100 &gt; sem&lt;br /&gt;  This sets SEMMSL, SEMMNS, SEMOPM, SEMMNI&lt;br /&gt;b. # echo 2147483648 &gt; shmmax&lt;br /&gt;c. # echo 1 &gt; shmmin&lt;br /&gt;d. # echo 100 &gt; shmmni&lt;br /&gt;================================================================================&lt;br /&gt;&lt;br /&gt;These changes are NOT persistent and must be re-set after each re-boot.&lt;br /&gt;&lt;br /&gt;On RedHat Advanced Server 2.1, these parameters can be entered into the file &lt;br /&gt;/etc/sysctl.conf.  This parameters in this file are set each time the system is booted.&lt;br /&gt;Example:&lt;br /&gt; $ more /etc/sysctl.conf&lt;br /&gt; # Disables packet forwarding&lt;br /&gt; net.ipv4.ip_forward = 0&lt;br /&gt; # Enables source route verification&lt;br /&gt; net.ipv4.conf.default.rp_filter = 1&lt;br /&gt; # Disables the magic-sysrq key&lt;br /&gt; kernel.sysrq = 0&lt;br /&gt; kernel.shmmax=256000000&lt;br /&gt; kernel.shmmin=1&lt;br /&gt; kernel.shmmni=100&lt;br /&gt; kernel.sem= 250 32000   32      128&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Mount CD-ROM:&lt;br /&gt;Depending on your Linux distribution the cdrom device is typically either &lt;br /&gt;"/cdrom" or "/mnt/cdrom".  &lt;br /&gt;&lt;br /&gt;Please substitute the appropriate value when "&lt;cdrom&gt;" appears in the examples.&lt;br /&gt;        #  mount  &lt;cdrom&gt;&lt;br /&gt;Installs can be done from either the CD or by copying the contents of each CD?s &lt;br /&gt;to a stage area on the local disk (/stage/Disk1, /stage/Disk2, /stage/DiskN)&lt;br /&gt;&lt;br /&gt;8.This is required to run as root: /tmp/orainstRoot.sh &lt;br /&gt;&lt;br /&gt;First question of oracle installation. If no other versions of Oracle 8i or 9i &lt;br /&gt;have been installed before. &lt;br /&gt;&lt;br /&gt;You will be ask to run /tmp/orainstRoot.sh to create the oraInventory location &lt;br /&gt;pointer. Usually found in /etc  on Linux Files that are located in /etc are &lt;br /&gt;/etc/oratab and /etc/oraInst.loc &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Installation Steps for the Oracle User&lt;br /&gt;=======================================&lt;br /&gt;The Following Steps need to be performed by the Oracle User:&lt;br /&gt;This can be done from either a Telnet or an SSH connection.  &lt;br /&gt;It is NOT recommended to perform installations from a su ? oracle connection.&lt;br /&gt;&lt;br /&gt;  1. Set Environment Variables&lt;br /&gt;     Environment variables should be set in the login script for the oracle user.  &lt;br /&gt;     &lt;br /&gt;     If the oracle user's default shell is the C-shell (/usr/bin/csh),&lt;br /&gt;     then the login script will be named ".login".  &lt;br /&gt;     &lt;br /&gt;     If the oracle user's default shell is the Bourne-shell (/usr/bin/bsh) &lt;br /&gt;     or the Korn-shell (/usr/bin/sh or /usr/bin/ksh), &lt;br /&gt;     then the login script will be named ".profile".  &lt;br /&gt;     &lt;br /&gt;     In either case, the login script will be located in the oracle user's home &lt;br /&gt;     directory ($HOME).&lt;br /&gt;&lt;br /&gt;     The examples below assume that your software mount point is /u01.&lt;br /&gt;&lt;br /&gt;            Parameter                           Value&lt;br /&gt;            -----------                         ------ &lt;br /&gt;            ORACLE_HOME           /u01/app/oracle/product/9.2.0&lt;br /&gt;            ORACLE_BASE           /u01/app/oracle&lt;br /&gt;            PATH                  /u01/app/oracle/product/9.2.0/bin:&lt;br /&gt;                                  /usr/bin/X11/:/usr/local/bin&lt;br /&gt;                                  and any other items you require in &lt;br /&gt;        your PATH&lt;br /&gt;&lt;br /&gt;     ORA_NLS33    $ORACLE_HOME/ocommon/nls/admin/data&lt;br /&gt;            ORACLE_SID            Set this to what you will call your &lt;br /&gt;                                  database instance. &lt;br /&gt;                                  (4 - 8 characters in length)&lt;br /&gt; &lt;br /&gt;If you are not on the console, you may need to set the following&lt;br /&gt;&lt;br /&gt;            DISPLAY               &lt;ip-address&gt;:0.0&lt;br /&gt;&lt;br /&gt;            (review Note:153960.1 for detailed information)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            ENSURE THAT CLASS_PATH IS NOT SET IN THE ENVIRONMENT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Set the umask:&lt;br /&gt;&lt;br /&gt;     Set the oracle user's umask to "022" in you ".profile" or ".login" file.&lt;br /&gt;&lt;br /&gt;     Example:&lt;br /&gt;       umask 022&lt;br /&gt;&lt;br /&gt;3. Verify the Environment&lt;br /&gt;Log off and log on as the oracle user to ensure all environment variables &lt;br /&gt;are set correctly.  Use the following command to view them:&lt;br /&gt;&lt;br /&gt;       % env | more&lt;br /&gt;&lt;br /&gt;Before attempting to run the Oracle Universal Installer, &lt;br /&gt;verify that you can successfully run the following command:&lt;br /&gt;&lt;br /&gt;        % /usr/bin/X11/xclock&lt;br /&gt;&lt;br /&gt;If this does not display a clock on your display screen, &lt;br /&gt;please review the following article:&lt;br /&gt;&lt;br /&gt;       Note:153960.1  FAQ: X Server testing and troubleshooting&lt;br /&gt;&lt;br /&gt;4. Start the Oracle Universal Installer and install the RDBMS software:&lt;br /&gt;&lt;br /&gt;     Use the following commands to start the installer:&lt;br /&gt;&lt;br /&gt;       % cd /tmp&lt;br /&gt;       % /cdrom/runInstaller&lt;br /&gt;&lt;br /&gt;       Or cd to /stage/Disk1 and run ./runInstaller&lt;br /&gt;&lt;br /&gt;     Respond to the installer prompts as shown below:&lt;br /&gt;&lt;br /&gt;     ? When prompted for whether orainstRoot.sh has been run by root, enter "y".&lt;br /&gt;       This should have been done in Pre-Installation step 8 above.&lt;br /&gt;&lt;br /&gt;     ? At the "Welcome Screen", click Next.&lt;br /&gt;&lt;br /&gt;     ? If prompted, enter the directory to use for the "Inventory Location".&lt;br /&gt;       This can be any directory, but is usually not under ORACLE_HOME because&lt;br /&gt;       the oraInventory is shared with all Oracle products on the system.&lt;br /&gt;&lt;br /&gt;     ? If prompted, enter the "UNIX Group Name" for the oracle user (dba).&lt;br /&gt;&lt;br /&gt;     ? At the "File Locations Screen", verify the Destination listed is your&lt;br /&gt;       ORACLE_HOME directory.  Also enter a NAME to identify this ORACLE_HOME.&lt;br /&gt;       The NAME can be anything, but is typically "DataServer" and the first&lt;br /&gt;       three digits of the version.  For example: "DataServer920"&lt;br /&gt;&lt;br /&gt;     ? At the "Available Products Screen", choose Oracle9i Database, then click&lt;br /&gt;       Next.&lt;br /&gt;&lt;br /&gt;     ? At the "Installation Types Screen", choose Enterprise Edition, then&lt;br /&gt;       click Next.&lt;br /&gt;&lt;br /&gt;     ? If prompted, click Next at the "Component Locations Screen" to accept&lt;br /&gt;       the default directories.&lt;br /&gt;&lt;br /&gt;     ? At the "Database Configuration Screen", choose the the configuration&lt;br /&gt;       based on how you plan to use the database, then click Next.&lt;br /&gt;&lt;br /&gt;     ? If prompted, click Next at the "Privileged Operating System Groups&lt;br /&gt;       Screen" to accept the default values (your current OS primary group).&lt;br /&gt;&lt;br /&gt;     ? If prompted, enter the Global Database Name in the format&lt;br /&gt;       "ORACLE_SID.hostname" at the "Database Identification Screen".&lt;br /&gt;       For example: "TEST.LNXhost".  The SID entry should be filled in with&lt;br /&gt;       the value of ORACLE_SID.  Click Next.&lt;br /&gt;&lt;br /&gt;     ? If prompted, enter the directory where you would like to put datafiles&lt;br /&gt;       at the "Database File Location Screen".  Click Next.&lt;br /&gt;&lt;br /&gt;     ? If prompted, select "Use the default character set" (WE8ISO8859P1) at&lt;br /&gt;       the "Database Character Set Screen".  Click Next.&lt;br /&gt;&lt;br /&gt;     ? At the "Summary Screen", review your choices, then click Install.&lt;br /&gt;&lt;br /&gt;     The install will begin.  Follow instructions regarding running "root.sh"&lt;br /&gt;     and any other prompts.  When completed, the install will have created a&lt;br /&gt;     default database, configured a Listener, and started both for you.&lt;br /&gt;&lt;br /&gt;     Note: If you are having problems changing CD-ROMs when prompted to do so,&lt;br /&gt;           please review the following article:&lt;br /&gt;&lt;br /&gt;           Note:146566.1  How to Unmount / Eject First Cdrom&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Your Oracle9i Release 2 (9.2.0) RDBMS installation is now complete and ready&lt;br /&gt;for use.&lt;br /&gt;&lt;br /&gt;Appendix A&lt;br /&gt;==========&lt;br /&gt;&lt;br /&gt;Documentation is available from the following resources:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle9i Release 2 (9.2.0) CD-ROM Disk1&lt;br /&gt;----------------------------------------&lt;br /&gt;&lt;br /&gt;Mount the CD-ROM, then use a web browser to open the file "index.htm" located&lt;br /&gt;at the top level directory of the CD-ROM. &lt;br /&gt;Then proceed to Documentation menu Item on this CD-ROM you will find the&lt;br /&gt;Installation Guide, Administrator's Reference, and other useful documentation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle Documentation Center&lt;br /&gt;---------------------------&lt;br /&gt;&lt;br /&gt;Point your web browser to the following URL:&lt;br /&gt;&lt;br /&gt;    http://otn.oracle.com/documentation/content.html&lt;br /&gt;&lt;br /&gt;Select the highest version CD-pack displayed to ensure you get the most&lt;br /&gt;up-to-date information.&lt;br /&gt;&lt;br /&gt;Reference&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;Note:225710.1 Red Hat AS 2.1: How to verify you have a supported kernel&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-2170143029699480416?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/2170143029699480416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=2170143029699480416' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2170143029699480416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2170143029699480416'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/linux-quick-start-guide-920-rdbms.html' title='LINUX: Quick Start Guide - 9.2.0 RDBMS Installation'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-7240298645112243779</id><published>2010-02-08T01:58:00.000-08:00</published><updated>2010-02-08T02:16:21.995-08:00</updated><title type='text'>Linux Tips and Techniques Documentation</title><content type='html'>E1: OS: Linux Tips and Techniques Documentation [ID 639311.1]&lt;br /&gt;&lt;br /&gt;In this Document&lt;br /&gt;  Symptoms&lt;br /&gt;  Cause&lt;br /&gt;  Solution&lt;br /&gt;     Title: Tips and Techniques for Linux Setup and Tuning&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Applies to: &lt;br /&gt;JD Edwards EnterpriseOne Tools - Version: 8.93 - Release: 8.93&lt;br /&gt;Information in this document applies to any platform.&lt;br /&gt;&lt;br /&gt;Symptoms&lt;br /&gt;Please see below.&lt;br /&gt;&lt;br /&gt;Cause&lt;br /&gt;Not Applicable &lt;br /&gt;Solution&lt;br /&gt;Title: Tips and Techniques for Linux Setup and Tuning&lt;br /&gt;&lt;br /&gt;This document is currently a loose collection of things we have found during the EnterpriseOne Linux port. In the /halve, we would expect this information to he more formally documented in appropriate places. These tips apply to RedHat AS 2.1 using the 2.4.9 Linux kernel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Installation:&lt;br /&gt;&lt;br /&gt;Please note that this document is not a requirement or recommendation. It is just a short guide for people who never installed Linux before. If you need more information you can find it in the official RedHat installation guide: &lt;br /&gt;&lt;br /&gt;https://www.redhat.com/docs/manuals/enterprise/RHEL-AS-2.1-Manual/install-guide/&lt;br /&gt;Navigate to Red Hat Enterprise Linux AS 2.1 PDF.&lt;br /&gt;Please note that steps 1.4 and 1.5 are optional. &lt;br /&gt;&lt;br /&gt;I.  OS Installation&lt;br /&gt;&lt;br /&gt;1.1. Partition.&lt;br /&gt;1 swap partition : equals to the size of RAM available on the machine&lt;br /&gt;/ : at least 3 Gybtes &lt;br /&gt;/u01 : at least 10 GBytes&lt;br /&gt;/boot : at least 512 Mbytes&lt;br /&gt;(optional /u02, /u03)&lt;br /&gt;&lt;br /&gt;1.2 Load OS through the Server Install:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select KDE &amp; Software Development.&lt;br /&gt;Select the following individual packages: Applications -&lt;br /&gt;&lt;br /&gt;Editors: vim-enhanced&lt;br /&gt;System Environment-&gt;&lt;br /&gt;Deamons: wu-ftpd&lt;br /&gt;Kernel: kernel-summit for IBM hardware Kernel-enterprise for non-IBM hardware&lt;br /&gt;Shells: pdksh&lt;br /&gt;&lt;br /&gt;1.3. Configure network (some useful commands: netcfg, netconf, setup, ifconfig, route, netstat r, linuxconf). Make sure telnet rexec and ftp is running.&lt;br /&gt;&lt;br /&gt;1.4. Install Eterm (the Exceed Command is: /usr/bin/Eterm -d @D --geometry I00X40 --font1 12 &amp;; Start Method: Rexec). This step is required if you need the backspace to work correctly.&lt;br /&gt;&lt;br /&gt;1.5. In order to telnet to Linux box as a root comment the 1st line from the file /etc/pam.d/login&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;General Setup:&lt;br /&gt;&lt;br /&gt;On our network, we found that some NIC drivers do not auto-negotiate correctly, and thus must be manually configured to use 100 Mb/full-duplex. Use the command "mii-tool" to determine if the network card is functioning properly. This tool can also be used to change the media settings, but it will not carry over a reboot. To force the card to come up using 1 00 Mb/full-duplex, either 1) add the mii-tool command to force the correct media speed to your /etc/rc.d/rc.local file, or 2) add the correct driver options to the modules.conf file (RedHat only?). Options are specific to the driver, but below is an example for the problem we had with the e1000 driver:&lt;br /&gt;&lt;br /&gt;options e1000 Duplex=2 Speed=100 &lt;br /&gt;alias eth0 e1000&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Kernel Parameters:&lt;br /&gt;&lt;br /&gt;Use the command "ipcs -1" to show the current IPC limits.&lt;br /&gt;&lt;br /&gt;IPC parameters are defined and maintained in the /proc/sys/kernel file system. This can be modified dynamically by editing the appropriate file, or the defaults can be overridden at boot time by adding entries to the /etc/sysctl.conf file (RedHat - see example below). On a non-RedHat system, you should use the sysctl command and make entries in /etc/rc.d/rc.local to change these parameters at boot time. The limits that affect Enterprise0ne are in the following files:&lt;br /&gt;&lt;br /&gt;shmmax - Maximum size of a shared memory segment. Databases like Oracle and UDB recommend that this be set to 256 Mb or 90% of memory, whichever is higher. The 2.2 Linux kernel had a limit of 1 Gb for this value, and I don't know if this has been changed. Enterprise0ne requirements are lower than this, and the default value is normally sufficient.&lt;br /&gt;&lt;br /&gt;sem - This file contains four values that correspond to 1) maximum number of semaphores per array (semmsl on Solaris), 2) maximum number of semaphores in the system (semmns), 3) maximum operations per semop call (semopm), and 4) maximum number of semaphore arrays (semmni). For Enterprise0ne, you may need to increase the first value - semaphores per array - if you increase the value of maxNumberOfSemaphores in the INI file. UDB also recommends modifying the fourth value - max number of identifiers.&lt;br /&gt;&lt;br /&gt;msgmax - Maximum size of a message. For Enterprise0ne, as well as for UDB, the recommended setting is 65535.&lt;br /&gt;&lt;br /&gt;msgmnb - Maximum number of bytes on a message queue. For Enterprise0ne, as well as for UDB, the recommended setting is 65535.&lt;br /&gt; &lt;br /&gt;msgmni - Maximum number of message queues in the system. The value of this setting depends on the number of EnterpriseOne processes that are running, in addition to what other processes are running. As a rule of thumb, you can count two message queues for each Enterprise0ne process, and then add these to other requirements for a database or other application.&lt;br /&gt;Another parameter that may be very important to some applications is the maximum number of open files in the system. To see your current values, look at the file /pros/sys/fs/file-nr. This read-only file contains three values: total allocated file handles, currently used file handles, and maximum file handles. The first value represents a peak, so when this starts getting close to the maximum, you may want to consider raising the limit. Certain applications like databases, EnterpriseOne JAS, and WebSphere can require large numbers of files, and often it is recommended that this value be set to 32768 or 65536 from the start. Change the limit dynamically by modifying /proc/sys/fs/file-max, and change it on reboot by modifying sysctl.conf.&lt;br /&gt;&lt;br /&gt;Below is a typical sysctl.conf file based on the settings discussed above:&lt;br /&gt;fs.file-max = 32768 &lt;br /&gt;kernel.shmmax = 268435456 &lt;br /&gt;kernel.sem = 500 32000 32 1024&lt;br /&gt;kernel.msgmax = 65535 kernel.msgmnb = 65535 kernel.msgmni = 1024&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;KEYWORDS:&lt;br /&gt;semaphores&lt;br /&gt;IPC resources&lt;br /&gt;IPC limits&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;System Code: H93&lt;br /&gt;Program ID: OS&lt;br /&gt;Application Release: ALL&lt;br /&gt;Service Pack/Tools Release: ALL&lt;br /&gt;Platform: Linux, RedHat, Red Hat&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-7240298645112243779?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/7240298645112243779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=7240298645112243779' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/7240298645112243779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/7240298645112243779'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/linux-tips-and-techniques-documentation.html' title='Linux Tips and Techniques Documentation'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2563490763925807812</id><published>2010-02-08T01:57:00.001-08:00</published><updated>2010-02-08T01:58:27.806-08:00</updated><title type='text'>Complete Checklist for Manual Upgrades to 11gR2</title><content type='html'>Complete Checklist for Manual Upgrades to 11gR2 [ID 837570.1]&lt;br /&gt;&lt;br /&gt;Applies to: &lt;br /&gt;Oracle Server - Enterprise Edition - Version: 9.2.0.8 to 11.2.0.1.0&lt;br /&gt;Oracle Server - Standard Edition - Version: 9.2.0.8 to 11.2.0.1&lt;br /&gt;Information in this document applies to any platform.&lt;br /&gt;&lt;br /&gt;Purpose&lt;br /&gt;This document is created for use as a guideline and checklist when manually upgrading from Oracle 9iR2, Oracle 10gR1, Oracle 10gR2 to Oracle 11gR2 (11.2). &lt;br /&gt;&lt;br /&gt;Scope and Application&lt;br /&gt;Database Administrators, Support &lt;br /&gt;Complete Checklist for Manual Upgrades to 11gR2&lt;br /&gt;Recommendations for Source database &lt;br /&gt;&lt;br /&gt;1) Ensure that all database components / objects provided by Oracle are VALID  in the source database  prior to starting the upgrade&lt;br /&gt;&lt;br /&gt;You can execute the following query to check the invalid database components /objects in the source database &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;       set pagesize500&lt;br /&gt;       set linesize 100&lt;br /&gt;       &lt;br /&gt;       select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from &lt;br /&gt;       dba_registry order by comp_name;&lt;br /&gt;       &lt;br /&gt;       select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from &lt;br /&gt;       dba_objects where status='INVALID' order by owner,object_type;&lt;br /&gt;       &lt;br /&gt;       select owner,object_type,count(*) from dba_objects where status='INVALID' group by&lt;br /&gt;       owner,object_type order by owner,object_type ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; if you find Oracle provided objects are invalid  then run the utlrp.sql script to validate the invalid objects .Please refer step 3 &lt;br /&gt;&lt;br /&gt;2) Ensure that you do not have the duplicate objects in the SYS and SYSTEM schema &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;You can execute the following query to check the duplicate objects in SYS and SYSTEM schema .&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;select object_name, object_type &lt;br /&gt;from dba_objects &lt;br /&gt;where object_name||object_type in &lt;br /&gt;   (select object_name||object_type  &lt;br /&gt;    from dba_objects &lt;br /&gt;    where owner = 'SYS') &lt;br /&gt;and owner = 'SYSTEM'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Above query is to find out duplicate objects in data dictionary, exception to this rule the following objects are permissible duplicates objects &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;OBJECT_NAME OBJECT_TYPE&lt;br /&gt;------------------------------ -------------------&lt;br /&gt;AQ$_SCHEDULES TABLE&lt;br /&gt;AQ$_SCHEDULES_PRIMARY INDEX&lt;br /&gt;DBMS_REPCAT_AUTH PACKAGE&lt;br /&gt;DBMS_REPCAT_AUTH PACKAGE BODY&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Please refer the following article for complete instructions to remove any other duplicates.&lt;br /&gt;NOTE.1030426.6 HOW TO CLEAN UP DUPLICATE OBJECTS OWNED BY SYS AND SYSTEM &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Requirements and recommendations for target database &lt;br /&gt;&lt;br /&gt;Check the certification of the Oracle 11g R2 with your Platform /Operating system before downloading and installing the Oracle 11g R2 .Please check the certification information  on the My Oracle Support.&lt;br /&gt;&lt;br /&gt;Download and Install Oracle 11g Release 2 in a new Oracle Home and make sure there are no relinking errors. &lt;br /&gt;&lt;br /&gt; Install the latest available Patchset from Metalink. (If available). &lt;br /&gt; Install the latest opatch available for your platform and database version  ( If available)&lt;br /&gt;&lt;br /&gt; Install the latest available Critical Patch Update. (If available). &lt;br /&gt; Either take a Cold or Hot backup of your source database (advisable to have cold backup). &lt;br /&gt;Compatibility Matrix&lt;br /&gt; Minimum Version of the database that can be directly upgraded to Oracle 11g Release 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Source Database &lt;br /&gt; Target Database &lt;br /&gt; &lt;br /&gt;9.2.0.8 or higher&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;10.1.0.5 or higher&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;10.2.0.2 or higher&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;11.1.0.6 or higher&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The following database version will require an indirect upgrade path.  &lt;br /&gt;&lt;br /&gt;Source Database&lt;br /&gt; &lt;br /&gt; Upgrade Path for Target Database&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Target Database&lt;br /&gt; &lt;br /&gt;7.3.3 (or lower)&lt;br /&gt; ----&gt;&lt;br /&gt; 7.3.4 -&gt; 9.2.0.8&lt;br /&gt;   ----&gt;&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;8.0.5 (or lower)&lt;br /&gt; ----&gt;&lt;br /&gt; 8.0.6 -&gt; 9.2.0.8&lt;br /&gt; ----&gt;&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;8.1.7 (or lower)&lt;br /&gt; ----&gt;&lt;br /&gt; 8.1.7.4 -&gt; 10.2.0.4&lt;br /&gt; ----&gt;&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;9.0.1.3 (or lower)&lt;br /&gt; ----&gt;&lt;br /&gt; 9.0.1.4 -&gt; 10.2.0.4&lt;br /&gt; ----&gt;&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;9.2.0.7(or lower)&lt;br /&gt; ----&gt;&lt;br /&gt; 9.2.0.8 &lt;br /&gt; ----&gt;&lt;br /&gt; 11.2.x&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;For example:-&lt;br /&gt;&lt;br /&gt;If source database is 8.1.7.0.0, the upgrade path to be followed is as below&lt;br /&gt;8.1.7.0.0 --&gt; 8.1.7.4 --&gt; 10.2.0.4--&gt; 11.2.x. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pre-Upgrade Steps&lt;br /&gt;&lt;br /&gt;In this section all the steps need to be performed after having set the environment of the previous version of the Oracle Database. Note that the database must be running in normal mode in the old release.&lt;br /&gt;&lt;br /&gt;Run the Pre-Upgrade Information Tool for Collecting Pre-Upgrade Information&lt;br /&gt;&lt;br /&gt;Step1 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Log in to the system as the owner of the Oracle Database 11g Release 2 (11.2)Oracle home directory. &lt;br /&gt;Copy the Pre-Upgrade Information Tool (utlu112i.sql) from the Oracle Database 11g Release 2 (11.2) ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle home, such as the temporary directory on your system. &lt;br /&gt;&lt;br /&gt;  $ORACLE_HOME/rdbms/admin/utlu112i.sql&lt;br /&gt;Step 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Change to the directory where utlu112i.sql and utltzuv2.sql had been copied in the previous step. &lt;br /&gt;Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. Then run and spool the utlu112i.sql file. Please note that the database should be started using the Source Oracle Home (9.2.0.x or 10.1.0.x or 10.2.0.x) &lt;br /&gt;$ sqlplus '/ as sysdba' &lt;br /&gt;SQL&gt; spool upgrade_info.log&lt;br /&gt;SQL&gt; @utlu112i.sql&lt;br /&gt;SQL&gt; spool off&lt;br /&gt;Check the spool file and examine the output of the upgrade information tool.&lt;br /&gt;The sections which follow, describe the output of the Upgrade Information Tool.&lt;br /&gt;For Sample output, Click here&lt;br /&gt;&lt;br /&gt;Database&lt;br /&gt;This section displays global database information about the current database, such as the database name, release number, and compatibility level. A warning is displayed if you must adjust the COMPATIBLE initialization parameter before the database is upgraded.&lt;br /&gt;&lt;br /&gt;Logfiles&lt;br /&gt;This section displays a list of redo log files in the current database whose size is less than 4 MB. For each log file, the file name, group number, and recommended size is displayed.&lt;br /&gt;In a manual upgrade using SQL scripts and utilities, new files of at least 4 MB (preferably 10 MB) must be created in the current database, and any redo log files less than 4 MB must be dropped before the database is upgraded. These tasks are performed automatically by the Database Upgrade Assistant.&lt;br /&gt;&lt;br /&gt;Tablespaces&lt;br /&gt;This section displays a list of tablespaces in the current database. For each tablespace, the tablespace name and minimum required size is displayed. In addition, a message is displayed if the tablespace is adequate for the upgrade.In a manual upgrade using SQL scripts and utilities, space must be added to tablespaces that do not have enough free space in the current database. These tablespace adjustments must be made before the database is upgraded. This task is performed automatically by the Database Upgrade Assistant.&lt;br /&gt;&lt;br /&gt;Update Parameters&lt;br /&gt;This section displays a list of initialization parameters in the parameter file of the current database that must be adjusted before the database is upgraded. The adjustments must be made to the parameter file after it is copied to the new Oracle Database 11g release.&lt;br /&gt;&lt;br /&gt;Deprecated Parameters&lt;br /&gt;This section displays a list of initialization parameters in the parameter file of the current database that are deprecated in the new Oracle Database 11g release.Obsolete Parameters This section displays a list of initialization parameters in the parameter file of the current database that are obsolete in the new Oracle Database 11g release. Obsolete initialization parameters must be removed from the parameter file before the database is upgraded.&lt;br /&gt;&lt;br /&gt;Appendix A: "Deprecated Initialization Parameters" for a list of initialization parameters that are deprecated in Oracle Database 11g release 2 (11.2).&lt;br /&gt;&lt;br /&gt;Obsolete Parameters:&lt;br /&gt;This section displays a list of initialization parameters in the parameter file of the current database that are obsolete in the new Oracle Database 11g release 2 (11.2). Obsolete Parameters need to be removed from the parameter file before the database is upgraded. Obsolete Parameters means, which are no longer valid (or) in use.&lt;br /&gt;Appendix B: "Obsolete Initialization Parameters" for a list of initialization parameters that are obsolete in Oracle Database 11g release 2 (11.2)&lt;br /&gt;&lt;br /&gt;Components&lt;br /&gt;This section displays a list of database components in the new Oracle Database 11g release that are upgraded or installed when the current database is upgraded.&lt;br /&gt;&lt;br /&gt;Miscellaneous Warnings&lt;br /&gt;This section provides warnings about specific situations that might require attention before or after the upgrade.&lt;br /&gt;&lt;br /&gt;SYSAUX Tablespace&lt;br /&gt;This section displays the minimum required size for the SYSAUX tablespace, which is required in the new Oracle Database 11g release. The SYSAUX tablespace must be created if does not exist ( in Oracle 9i )after the new release is started and before the upgrade scripts are invoked.&lt;br /&gt;&lt;br /&gt;Note : If sysaux was created in 9i then it must be dropped and re-created after starting in the new release. If created in 10G or later then it can be left there and used.&lt;br /&gt;&lt;br /&gt;Preparing Database for Upgrade&lt;br /&gt;&lt;br /&gt;Step3&lt;br /&gt;Check for the integrity of the source database&lt;br /&gt;&lt;br /&gt;Check for the integrity of the source database prior to starting the upgrade by downloading and running dbupgdiag.sql script from below Metalink article&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 556610.1  Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the dbupgdiag.sql script reports any invalid objects, run $ORACLE_HOME/rdbms/admin/utlrp.sql (multiple times) to validate the invalid objects in the database, until there is no change in the number of invalid objects.&lt;br /&gt;&lt;br /&gt;$ cd $ORACLE_HOME/rdbms/admin&lt;br /&gt;$ sqlplus "/ as sysdba"&lt;br /&gt;SQL&gt; @utlrp.sql&lt;br /&gt;After validating the invalid objects, re-run dbupgdiag.sql in the database once again and make sure that everything is fine.&lt;br /&gt;&lt;br /&gt;Step 4&lt;br /&gt;&lt;br /&gt;Deprecated CONNECT Role&lt;br /&gt;&lt;br /&gt;After upgrading to Oracle Database 11g Release 1 (11.1) from Oracle Database9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), the CONNECT role has only the CREATE SESSION privilege; the other privileges granted to the CONNECT role in earlier releases are revoked during the upgrade. To identify which users and roles in your database are granted the CONNECT role, use the following query:&lt;br /&gt;&lt;br /&gt;SELECT grantee FROM dba_role_privs&lt;br /&gt;WHERE granted_role = 'CONNECT' and&lt;br /&gt;grantee NOT IN (&lt;br /&gt;'SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP',&lt;br /&gt;'LOGSTDBY_ADMINISTRATOR', 'ORDSYS',&lt;br /&gt;'ORDPLUGINS', 'OEM_MONITOR', 'WKSYS', 'WKPROXY',&lt;br /&gt;'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS',&lt;br /&gt;'WMSYS', 'EXFSYS', 'SYSMAN', 'MDDATA',&lt;br /&gt;'SI_INFORMTN_SCHEMA', 'XDB', 'ODM');&lt;br /&gt;If users or roles require privileges other than CREATE SESSION, then grant the specific required privileges prior to upgrade.&lt;br /&gt;The upgrade scripts adjust the privileges for the Oracle-supplied users.&lt;br /&gt;&lt;br /&gt;In Oracle 9.2.x and 10.1.x CONNECT role includes the following privileges: SELECT GRANTEE,PRIVILEGE&lt;br /&gt;FROM DBA_SYS_PRIVS&lt;br /&gt;WHERE GRANTEE ='CONNECT'&lt;br /&gt;&lt;br /&gt;GRANTEE PRIVILEGE&lt;br /&gt;------- ----------------------&lt;br /&gt;CONNECT CREATE VIEW&lt;br /&gt;CONNECT CREATE TABLE&lt;br /&gt;CONNECT ALTER SESSION&lt;br /&gt;CONNECT CREATE CLUSTER&lt;br /&gt;CONNECT CREATE SESSION&lt;br /&gt;CONNECT CREATE SYNONYM&lt;br /&gt;CONNECT CREATE SEQUENCE&lt;br /&gt;CONNECT CREATE DATABASE LINK&lt;br /&gt;From Oracle 10.2, 'CONNECT' role only includes 'CREATE SESSION' privilege.&lt;br /&gt;&lt;br /&gt;Step 5&lt;br /&gt;&lt;br /&gt;Create Script for DBLINK (In case the database has to be downgraded again)&lt;br /&gt;&lt;br /&gt;During the upgrade to Oracle Database 11g Release 1 (11.2) from Oracle Database 9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), any passwords in database links are encrypted. To downgrade to the original release, all of the database links with encrypted passwords must be dropped prior to the downgrade. Consequently, the database links do not exist in the downgraded database. If you anticipate a requirement to be able to downgrade to your original release, then save the information about affected database links from the SYS.LINK$ table, so that you can re-create the database links after the downgrade.&lt;br /&gt;&lt;br /&gt;SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)&lt;br /&gt;||DECODE(U.NAME,'PUBLIC',Null, 'SYS','',U.NAME||'.')|| L.NAME||chr(10)&lt;br /&gt;||'CONNECT TO ' || L.USERID || ' IDENTIFIED BY "'||L.PASSWORD||'" USING &lt;br /&gt;'''||L.HOST||''''&lt;br /&gt;||chr(10)||';' TEXT&lt;br /&gt;FROM SYS.LINK$ L, SYS.USER$ U&lt;br /&gt;WHERE L.OWNER# = U.USER#;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 6&lt;br /&gt;Check for TIMESTAMP WITH TIMEZONE Datatype&lt;br /&gt;&lt;br /&gt;The time zone files that are supplied with Oracle Database 11g Release 2 (11.2) have been updated to version 11  to reflect changes in transition rules for some time-zone regions. The changes might affect existing data of the TIMESTAMP WITH  TIME ZONE data type.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Case1 &lt;br /&gt;=====&lt;br /&gt;&lt;br /&gt;If  the source database is using a timezone file older than version 11 then the utlu112i.sql (Pre-Upgrade Information Tool) will generate the following warning &lt;br /&gt;Example :&lt;br /&gt;WARNING: --&gt;Database is using a timezone file older than version 11.            &lt;br /&gt;.... After the release migration, it is suggested that DBMS_DST package         &lt;br /&gt;.... be used to upgrade the 11.1.0.6.0 database timezone version                &lt;br /&gt;.... to the latest version which comes with the new release.&lt;br /&gt;&lt;br /&gt;Please execute the following sql query in the source database to  find the Version of existing timezone files:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Oracle 11gR1 ,10gR2 and 10gR1&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$timezone_file;&lt;br /&gt;&lt;br /&gt;FILENAME VERSION&lt;br /&gt;------------ ----------&lt;br /&gt; timezlrg.dat 4&lt;br /&gt;&lt;br /&gt;In Oracle 9iR2&lt;br /&gt;&lt;br /&gt;For 9i you can use the utltzver.sql script .Please refer the Note 412160.1 to download the utltzver.sql. The location of utltzver.sql is not critical, we suggest however to save it in $ORACLE_HOME/rdbms/admin .&lt;br /&gt;&lt;br /&gt;SQL&gt; conn / as sysdba&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; @c:\utltzver.sql&lt;br /&gt;Your current timezone version is 4!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To Fix the time zone files , After completing the database upgrade.&lt;br /&gt;Use the DBMS_DST PL/SQL package and follow the instructions in "Steps to Upgrade Time Zone File and Timestamp with Time Zone Data" in Oracle Database Globalization Support Guide.&lt;br /&gt;&lt;br /&gt;OR &lt;br /&gt;&lt;br /&gt;Please refer the Step 32 for the complete steps to upgrade the timezone file older than version 11 &lt;br /&gt;using DBMS_DST Package&lt;br /&gt;&lt;br /&gt;Case 2&lt;br /&gt;======&lt;br /&gt;If the source database  is using a timezone file greater than version 11 then utlu112i.sql (Pre-Upgrade Information Tool) will generate the following warning .&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;WARNING: --&gt; Database is using a timezone file greater than version 11.&lt;br /&gt;.... BEFORE upgrading the database, patch the 11gR2&lt;br /&gt;.... $ORACLE_HOME/oracore/zoneinfo/ with a timezone data file of the&lt;br /&gt;.... same version as the one used in the 11.1.0.6.0 release database.&lt;br /&gt;Please execute the following sql query in the source database to find the Version of existing timezone files:&lt;br /&gt;&lt;br /&gt;In Oracle 11gR1 ,10gR2 and 10gR1&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$timezone_file;&lt;br /&gt;&lt;br /&gt;FILENAME        VERSION&lt;br /&gt;------------ ----------&lt;br /&gt;timezlrg.dat         11&lt;br /&gt;&lt;br /&gt;In Oracle 9iR2&lt;br /&gt;&lt;br /&gt;For 9i you can use the utltzver.sql script.Please refer the &lt;br /&gt;Note 412160.1 to download the utltzver.sql. &lt;br /&gt;The location of utltzver.sql is not critical, we suggest however to save it in $ORACLE_HOME/rdbms/admin .&lt;br /&gt;&lt;br /&gt;SQL&gt; conn / as sysdba&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; @c:\utltzver.sql&lt;br /&gt;Your current timezone version is 4!&lt;br /&gt;&lt;br /&gt;         &lt;br /&gt;Note: with DSTv11 applied in 9i you see&lt;br /&gt;SQL&gt; @d:\utltzver.sql&lt;br /&gt;Your current Server timezone version is 11 (or higher) !&lt;br /&gt;check note 412160.1 to see if there is a DST version higher then&lt;br /&gt;DSTv11 for 9i&lt;br /&gt;&lt;br /&gt;Seen in 9i it's impossible to detect versions higher then those existing at&lt;br /&gt;the time the script was made, this additional info is reported.&lt;br /&gt;&lt;br /&gt;BEFORE upgrading the database, you MUST patch the 11gR2 $ORACLE_HOME/oracore/zoneinfo/ with a timezone data file of the same version as the one used in the source release database. Apply the patch for each database you will be upgrading. Otherwise, the upgrade script will terminate without upgrading the database.&lt;br /&gt;&lt;br /&gt;if the source database is using timezone files higher than version 11 and the Oracle 11gR2 Oracle home  is NOT patched with the same version timezone  before upgrade   then  you will get the following error while trying to upgrade the database .&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01722: invalid number&lt;br /&gt;Case 1 and Case 2 in Tabular format &lt;br /&gt;&lt;br /&gt;IF the version on the database being upgraded is...&lt;br /&gt; THEN fix the time zone files ...&lt;br /&gt; &lt;br /&gt;Pre-Upgrade Information Tool displays "Database is using a timezone file older than version n."&lt;br /&gt; After completing the database upgrade.&lt;br /&gt;Use the DBMS_DST PL/SQL package and follow the instructions in "Steps to Upgrade Time Zone File and Timestamp with Time Zone Data" in Oracle Database Globalization Support Guide.&lt;br /&gt;&lt;br /&gt;OR &lt;br /&gt;&lt;br /&gt;Please refer the following article after completeing the database upgrade ( as post upgrade step 32) &lt;br /&gt;Note 944122.1  How To Upgrade The Timezone File Older Than Version 11 Using DBMS_DST Package&lt;br /&gt; &lt;br /&gt;Later than version 11 and the Pre-Upgrade Information Tool displays "Database is using a&lt;br /&gt;timezone file greater than version n."&lt;br /&gt; Before beginning the database upgrade.&lt;br /&gt;You must patch the Oracle home with the appropriate patch for the time zone file version in use. Apply the patch for each database you will be upgrading. Otherwise, the upgrade script will terminate without upgrading the database.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;For a detailed description of time zone upgrade, Please refer the following My Oracle Support (formerly OracleMetalink) notes:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 359145.1 "Impact of 2007 USA daylight saving changes on the Oracle database"&lt;br /&gt;Note 414590.1  "Time Zone IDs for 7 Time Zones Changed in Time &lt;br /&gt;Zone Files &gt;=V3"&lt;br /&gt;Note 412160.1 "Updated DST transitions and new Time Zones in Oracle Time Zone File patches"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note : The TIMESTAMP WITH TIME ZONE data stored in the database can become corrupted during the upgrade if there is a time zone file version mismatch.&lt;br /&gt;&lt;br /&gt;Step 7&lt;br /&gt;&lt;br /&gt;Starting in Oracle 9i the National Characterset (NLS_NCHAR_CHARACTERSET) will be limited to UTF8 and AL16UTF16.&lt;br /&gt;For more details refer to the below Note &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 276914.1 The National Character Set in Oracle 9i and 10g.&lt;br /&gt;&lt;br /&gt;Since the upgrade is from Oracle 9iR2 and above, the National CharacterSet will be 'UTF8' and 'AL16UTF16'. Hence, there is no action required.&lt;br /&gt;&lt;br /&gt;Step 8&lt;br /&gt;Optimizer Statistics&lt;br /&gt;&lt;br /&gt;When upgrading to Oracle Database 11g Release 2 (11.2), optimizer statistics are collected for dictionary tables that lack statistics. This statistics collection can be time consuming for databases with a large number of dictionary tables, but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade.&lt;br /&gt;&lt;br /&gt;To determine the schemas which lacks statistics,, either review the output of the utlu112i.sql script or download and run the script from below Metalink article&lt;br /&gt;&lt;br /&gt;Note 560336.1 Script to Check Schemas with Stale Statistics&lt;br /&gt;&lt;br /&gt;To decrease the amount of downtime incurred when collecting statistics, you can collect statistics prior to performing the actual database upgrade. As of Oracle Database 10g Release 1 (10.1), Oracle recommends that you use the DBMS_STATS.GATHER_DICTIONARY_STATS procedure to gather these statistics. For example, you can enter the following:&lt;br /&gt;&lt;br /&gt;$ sqlplus "/as sysdba"&lt;br /&gt;&lt;br /&gt;SQL&gt; EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;&lt;br /&gt;&lt;br /&gt;If you are using Oracle Database 9i Release 2 (9.2), then you should use the DBMS_STATS.GATHER_SCHEMA_STATS procedure to gather statistics. To do this, you can run the scripts provided in Appendix D.&lt;br /&gt;&lt;br /&gt;Appendix D has sample script, which creates the table, dictstattab, and exports the statistics for the RDBMS component schema into it. The statistics collection might give errors if a particular component schema does not exist in the database, or if a component is not installed or invalid.&lt;br /&gt;&lt;br /&gt;Backup the existing statistics to revert / import back the statistics, once the upgrade is successful.&lt;br /&gt;&lt;br /&gt;For example, the following PL/SQL subprograms import the statistics for the SYS schema after deleting the existing statistics:&lt;br /&gt;SQL&gt; EXEC DBMS_STATS.DELETE_SCHEMA_STATS('SYS');&lt;br /&gt;SQL&gt; EXEC DBMS_STATS.IMPORT_SCHEMA_STATS('SYS','dictstattab');&lt;br /&gt;Step 9&lt;br /&gt;Disable Oracle Database Vault&lt;br /&gt;If you have enabled Oracle Database Vault, then you must disable it before upgrading the database, and enable it again when the upgrade is finished.&lt;br /&gt;Refer to the following Metalink Documents for Disabling Oracle Database Vault before the upgrade and enabling it after the upgrade.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 453903.1  - Enabling and Disabling Oracle Database Vault in UNIX&lt;br /&gt;Note 453902.1  - Enabling and Disabling Oracle Database Vault in WINDOWS&lt;br /&gt;&lt;br /&gt;Step 10&lt;br /&gt;Backing up Enterprise Manager Database Control Data&lt;br /&gt;&lt;br /&gt;After upgrading to Oracle Database 11g release 2(11.2), if you want to downgrade Oracle Enterprise Manager Database Control you must save your Database Control files and data before upgrading your database. The emdwgrd utility can be used to keep a copy of your database control files and data before upgrading your database. The emdwgrd utility resides in the ORACLE_HOME/bin directory in the Oracle Database 11g release 2 (11.2) home.&lt;br /&gt;&lt;br /&gt;1. Set ORACLE_HOME to your old Oracle home&lt;br /&gt;2. Set ORACLE_SID to the SID of the database being upgraded.&lt;br /&gt;3. Set PATH, LD_LIBRARY_PATH and SHLIB_PATH to point to the Oracle home from which the database is being upgraded.&lt;br /&gt;4. Change directory to Oracle Database 11g release 2 (11.2) home.&lt;br /&gt;5.&lt;br /&gt;   a- Run the following command for single instance database&lt;br /&gt;$ emdwgrd -save -sid old_SID -path save_directory&lt;br /&gt;where old_SID is the SID of the database being upgraded and save_directory is the path to the storage place you have chosen for your Database Control files and data:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@Note 870877.1  How To Save Oracle Enterprise Manager Database Control Data Before Upgrading The Single Instance Database To Other Release ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;b- For RAC database, remote copy is required across the cluster nodes. Define an environment variable to indicate which remote copy is configured. For example: setenv EM_REMCP /usr/bin/scp&lt;br /&gt;&lt;br /&gt;$ emdwgrd -save -cluster -sid old_SID -path save_directory&lt;br /&gt;Note: If 10g Oracle home is on a shared device, add -shared to the previous command line.&lt;br /&gt;&lt;br /&gt;The above command(s) may core dump in HP-UX Itanium platform, which is a known issue. For more information, refer to following Metalink article&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 562980.1 - emdwgrd core dumps : emdwgrd[228]: 10366 Memory fault(coredump)&lt;br /&gt;&lt;br /&gt;6. Enter the SYS password for the database to be upgraded.&lt;br /&gt;Note : On RAC databases you will be prompted to run '/tmp/racdwgrd_dbctl.sh' on each of the nodes.&lt;br /&gt;&lt;br /&gt;Step 11&lt;br /&gt;&lt;br /&gt;Configuring Network ACL's&lt;br /&gt;&lt;br /&gt;Oracle Database 11g Release 2 (11.2) includes fine-grained access control to the UTL_TCP, UTL_SMTP, UTL_MAIL, UTL_HTTP, or UTL_INADDR packages using Oracle XMLDB. If you have applications that use one of these packages, you must install OracleXML DB if it is not already installed. You must also configure network access control lists (ACLs) in the database before these packages can work as they did in prior releases. Actions are discussed in Post Upgrade tasks (Step 36), as the DBMS_NETWORK_ACL_ADMIN package is introduced after upgrading the database and not available in prior releases.&lt;br /&gt;&lt;br /&gt;Step 12&lt;br /&gt;Check for corruption in the dictionary, use the following commands in SQL*Plus (connected as sys):&lt;br /&gt;Set verify off&lt;br /&gt;Set space 0&lt;br /&gt;Set line 120&lt;br /&gt;Set heading off&lt;br /&gt;Set feedback off&lt;br /&gt;Set pages 1000&lt;br /&gt;Spool analyze.sql&lt;br /&gt;&lt;br /&gt;SELECT 'Analyze cluster "'||cluster_name||'" validate structure cascade;'&lt;br /&gt;FROM dba_clusters&lt;br /&gt;WHERE owner='SYS'&lt;br /&gt;UNION&lt;br /&gt;SELECT 'Analyze table "'||table_name||'" validate structure cascade;'&lt;br /&gt;FROM dba_tables&lt;br /&gt;WHERE owner='SYS'&lt;br /&gt;AND partitioned='NO'&lt;br /&gt;AND (iot_type='IOT' OR iot_type is NULL)&lt;br /&gt;UNION&lt;br /&gt;SELECT 'Analyze table "'||table_name||'" validate structure cascade into invalid_rows;'&lt;br /&gt;FROM dba_tables&lt;br /&gt;WHERE owner='SYS'&lt;br /&gt;AND partitioned='YES';&lt;br /&gt;&lt;br /&gt;spool off&lt;br /&gt;This creates a script called analyze.sql.&lt;br /&gt;Now execute the following steps.&lt;br /&gt;&lt;br /&gt;$ sqlplus "/ as sysdba"&lt;br /&gt;SQL&gt; @$ORACLE_HOME/rdbms/admin/utlvalid.sql&lt;br /&gt;SQL&gt; @analyze.sql&lt;br /&gt;&lt;br /&gt;This script (analyze.sql) should not return any errors.&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;1. ORA-30657 might occur, if there is any external table is validated, which can be safely ignored as per Note 209355.1 ORA-30657: Using ANALYZE TABLE for an External Table&lt;br /&gt;2. Errors shown below when executing analyze.sql can be ignored:&lt;br /&gt;SP2-0734: unknown command beginning "SQL&gt; SELEC..." - rest of line ignored.&lt;br /&gt;SP2-0042: unknown command "SQL&gt;" - rest of line ignored.&lt;br /&gt;SP2-0734: unknown command beginning "SQL&gt; spool..." - rest of line ignored.&lt;br /&gt;&lt;br /&gt;Step 13&lt;br /&gt;Ensure that all snapshot refreshes are successfully completed, and that replication is stopped.&lt;br /&gt;SELECT DISTINCT(TRUNC(last_refresh))&lt;br /&gt;FROM dba_snapshot_refresh_times;&lt;br /&gt;&lt;br /&gt;Step 14 &lt;br /&gt;Ensure that no files need media recovery&lt;br /&gt;SELECT * FROM v$recover_file;This should return no rows. &lt;br /&gt;&lt;br /&gt;Step 15&lt;br /&gt;Ensure that no files are  in backup mode&lt;br /&gt;SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';This should return no rows. &lt;br /&gt;&lt;br /&gt;Step 16&lt;br /&gt;Resolve outstanding distributed transactions prior to the upgrade.&lt;br /&gt;SQL&gt; select * from dba_2pc_pending; If this returns rows you should do the following: &lt;br /&gt;SQL&gt; SELECT local_tran_id&lt;br /&gt;     FROM dba_2pc_pending;&lt;br /&gt;SQL&gt; EXECUTE dbms_transaction.purge_lost_db_entry('');&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;Step 17&lt;br /&gt;To check if a standby database exists, issue the following query:&lt;br /&gt;SELECT SUBSTR(value,INSTR(value,'=',INSTR(UPPER(value),'SERVICE'))+1)&lt;br /&gt;FROM v$parameter&lt;br /&gt;WHERE name LIKE 'log_archive_dest%' AND UPPER(value) LIKE 'SERVICE%';&lt;br /&gt;If this query returns a row, then sync the standby database with the Primary database.&lt;br /&gt;1. Make sure all the logs are transported to the standby server after a final log switch&lt;br /&gt;in the primary.&lt;br /&gt;2. Start the recovery of the standby database with the NODELAY option.&lt;br /&gt;&lt;br /&gt;Step 18 &lt;br /&gt;Disable all batch and cron jobs. &lt;br /&gt;&lt;br /&gt;Step 19&lt;br /&gt;Ensure the users sys and system have 'system' as their default tablespace. &lt;br /&gt;You must have sufficient space in the tablespace or be set to extents unlimited.&lt;br /&gt;SQL&gt; SELECT username, default_tablespace&lt;br /&gt;     FROM dba_users&lt;br /&gt;     WHERE username in ('SYS','SYSTEM'); &lt;br /&gt;If DEFAULT_TABLESPACE is anything other than SYSTEM tablespace, modify the default tablespace to SYSTEM by using the below command.&lt;br /&gt;SQL&gt; ALTER user SYS default tablespace SYSTEM;&lt;br /&gt;SQL&gt; ALTER user SYSTEM default tablespace SYSTEM;&lt;br /&gt;Step 20 &lt;br /&gt;Ensure that if the aud$ table exists that it is in the sys schema and in the system tablespace.&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT owner,tablespace_name&lt;br /&gt;     FROM dba_tables&lt;br /&gt;     WHERE table_name='AUD$';&lt;br /&gt;Step 21&lt;br /&gt;Check whether database has any externally authenticated SSL users.&lt;br /&gt;SQL&gt; SELECT name FROM sys.user$&lt;br /&gt;     WHERE ext_username IS NOT NULL&lt;br /&gt;     AND password = 'GLOBAL';&lt;br /&gt;If any SSL users are found then Step 31 has to be followed after the upgrade&lt;br /&gt;&lt;br /&gt;Step 22&lt;br /&gt;Note down the location of datafiles, redo logs, control files. Also take a backup of all configuration files like listener.ora,tnsnames.ora,etc., from $ORACLE_HOME&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT name FROM v$controlfile;&lt;br /&gt;SQL&gt; SELECT file_name FROM dba_data_files;&lt;br /&gt;SQL&gt; SELECT group#, member FROM v$logfile;.&lt;br /&gt;Step 23 &lt;br /&gt;a) Stop the listener for the database:&lt;br /&gt;$ lsnrctl stopPrevious versions of the listener are not supported for use with an Oracle Database 11g Release 2 (11.2) database. However, it is possible to use the new version of the listener with previous versions of Oracle Database.&lt;br /&gt;If you are upgrading from 9i or upgrading manually without using DBUA, run Oracle Net Configuration Assistant before upgrading the Oracle RAC database.&lt;br /&gt;&lt;br /&gt;This is a two-step option. You must first run Oracle Net Configuration Assistant from the old Oracle home to remove the old listener. Then you must run Oracle Net Configuration Assistant again from the new Oracle Database 11g Release 2 (11.2) home to create a new listener.&lt;br /&gt;&lt;br /&gt;You must remove the old listener before creating a new one. If you attempt to create a new listener from the new Oracle home first, and use the same name and port as the old listener, then Oracle Net Configuration Assistant returns an error.&lt;br /&gt;&lt;br /&gt;Note:This is your only option if you want to upgrade your Oracle RAC database manually.&lt;br /&gt;&lt;br /&gt;b) Stop other executable such as dbconsole, isqlplus&lt;br /&gt;$ emctl stop dbconsole&lt;br /&gt;$ isqlplusctl stop&lt;br /&gt;Step 24 &lt;br /&gt;Shutdown the database.&lt;br /&gt;$ sqlplus "/as sysdba"&lt;br /&gt;SQL&gt; shutdown immediate;Back Up the Database&lt;br /&gt;&lt;br /&gt;1- Perform Cold Backup&lt;br /&gt;(or)&lt;br /&gt;2- Take a backup using RMAN&lt;br /&gt;Connect to RMAN:&lt;br /&gt;&lt;br /&gt;rman "target / nocatalog"&lt;br /&gt;&lt;br /&gt;RUN&lt;br /&gt;{&lt;br /&gt;ALLOCATE CHANNEL chan_name TYPE DISK;&lt;br /&gt;BACKUP DATABASE FORMAT '&lt;db_backup_directory&gt;%U' TAG before_upgrade;&lt;br /&gt;BACKUP CURRENT CONTROLFILE TO '&lt;controlfile_backup_directory&gt;';&lt;br /&gt;}&lt;br /&gt;--&gt; backup_directory &gt;&gt; Location of the Database backup.&lt;br /&gt;--&gt; controlfile_backup_directory &gt;&gt; Location of the Controlfile backup.&lt;br /&gt;&lt;br /&gt;Step 25 &lt;br /&gt;Make a backup of the init&lt;SID&gt;.ora file.&lt;br /&gt;Comment out obsoleted parameters( Appendix A ) and change all deprecated parameters( Appendix B ).&lt;br /&gt;&lt;br /&gt;* The DIAGNOSTIC_DEST initialization parameter replaces the USER_DUMP_DEST, BACKGROUND_DUMP_DEST, and CORE_DUMP_DEST parameters.&lt;br /&gt;&lt;br /&gt;Refer the below article for understanding directory structure in 11g and DIAGNOSTIC_DEST.&lt;br /&gt;&lt;br /&gt;Note 454442.1 11g Install : Understanding about Oracle Base, Oracle Home and Oracle Inventory locations&lt;br /&gt;&lt;br /&gt;* Set the COMPATIBLE initialization parameter to an appropriate value. If you are upgrading from 9.2.0.x then set the COMPATIBLE parameter to 10.1.0 until after the upgrade has been completed successfully.(Please note, once you set the COMPATIBLE to 10.1 there is no way to downgrade to 9iR2 because of symptoms described in Note 388604.1 : ORA-00201 while downgrading from 10gR2 to 10gR1 or 9iR2 ).&lt;br /&gt;If you are upgrading from 10.1.0.x or 10.2.0.x then you can leave the COMPATIBLE parameter set to it's current value until the upgrade has been completed successfully. This will avoid any unnecessary ORA-942 errors from being reported in SMON trace files during the upgrade (because the upgrade is looking for 10.2 objects that have not yet been created)&lt;br /&gt;* Adjust the values of the initialization parameters to at least the minimum value indicated by the Pre-Upgrade Information Tool. Make sure all path names in the parameter file are fully specified. You should not have relative path names in the parameter file.&lt;br /&gt;* If you are using a cluster database, set the parameter CLUSTER_DATABASE=FALSE during the upgrade and set it back to true after the upgrade. If you are upgrading a cluster database, then modify the init&lt;SID&gt;.ora file in the same way that you modified the parameter file.&lt;br /&gt;&lt;br /&gt;Note: Once the Parameter file is modified as per your requirement, copy the file to $ORACLE_HOME/dbs (database directory on Windows) of 11gR2 Oracle Home.&lt;br /&gt;&lt;br /&gt;Step 26&lt;br /&gt;Check for adequate freespace on archive log destination file systems. Note that if your database is in archivelog mode, then it is always desirable and advisable to upgrade the database in noarchivelog mode as that will reduce the time taken to upgrade the database. After the upgrade you can again put the database in the archivelog mode.&lt;br /&gt;&lt;br /&gt;Step 27&lt;br /&gt;If your operating system is Windows then complete the actions in this Step, else skip to next Step.&lt;br /&gt;&lt;br /&gt;Stop the OracleServiceSID Oracle service of the database you are upgrading, where SID is the instance name. For example, if your SID is ORCL, then enter the following at a command prompt:&lt;br /&gt;&lt;br /&gt;Set the environment to Source / Previous version (9.2 / 10.1 / 10.2 /11.1)&lt;br /&gt;&lt;br /&gt;1- Stop the Oracle database service C:\&gt; NET STOP OracleServiceORCL2- Delete Oracle service using ORADIM binary from which the database is upgraded to 11.2. C:\&gt; ORADIM -DELETE -SID ORCL3- Create the Oracle Database 11g Release 2 (112) service at a command prompt using the ORADIM command of the new Oracle Database release:&lt;br /&gt;C:\&gt; ORADIM -NEW -SID SID -INTPWD PASSWORD  -STARTMODE AUTO -PFILE %ORACLE_HOME%\DATABASE\INIT&lt;SID&gt;.ORA&lt;br /&gt;&lt;br /&gt;For Instance,&lt;br /&gt;&lt;br /&gt;C:\&gt; ORADIM -NEW -SID ORCL -INTPWD &lt;PASSWORD&gt; -STARTMODE AUTO -PFILE %ORACLE_HOME%\DATABASE\INIT&lt;SID&gt;.ORA&lt;br /&gt;Step 28&lt;br /&gt;If your operating system is UNIX then complete this step, else skip to next Step.&lt;br /&gt;&lt;br /&gt;1. Make sure the following environment variables point to the Oracle 11g Release directories:&lt;br /&gt;&lt;br /&gt;- ORACLE_BASE&lt;br /&gt;- ORACLE_HOME&lt;br /&gt;- PATH &lt;br /&gt;$ export ORACLE_HOME=&lt;location of Oracle 11.2&gt;&lt;br /&gt;$ export PATH=$ORACLE_HOME/bin:$PATH&lt;br /&gt;$ export ORACLE_BASE=&lt;Oracle_Base set during installation&gt;Note : If ORACLE_BASE is not known, after setting Path towards 11g Oracle Home, execute 'orabase', which will point the location of base.&lt;br /&gt;$ orabase&lt;br /&gt;/uo1/app/oracle2. Update the oratab entry, to set the new ORACLE_HOME pointing towards ORCL and disable automatic startup&lt;br /&gt;Sample /etc/oratab&lt;br /&gt;&lt;br /&gt;#orcl:/opt/oracle/product/10.2/db_1:N&lt;br /&gt;orcl:/opt/oracle/product/11.2/db_1:N&lt;br /&gt;Note : After /etc/oratab is updated to have sid and Oracle Home (11.2), you can execute oraenv (/usr/local/bin/oraenv) and set the environment. The input has to be the sid which is entered in /etc/oratab against 11g home.&lt;br /&gt;&lt;br /&gt;for Instance,&lt;br /&gt;&lt;br /&gt;[oracle@localhost ~]$ . oraenv&lt;br /&gt;ORACLE_SID = [orcl] ? orcl&lt;br /&gt;The Oracle base for ORACLE_HOME=/opt/oracle/product/11.2/db_1 is /u01/app/oracle&lt;br /&gt;[oracle@localhost ~]$&lt;br /&gt;Upgrading Database to 11gR2&lt;br /&gt;&lt;br /&gt; Step 29&lt;br /&gt;At the operating system prompt, change to the $ORACLE_HOME/rdbms/admin directory of 11gR2 Oracle Home.&lt;br /&gt;$ cd $ORACLE_HOME/rdbms/admin&lt;br /&gt;$ sqlplus "/ as sysdba"&lt;br /&gt;SQL&gt; startup UPGRADE&lt;br /&gt;Note :If you are upgrading from 9.2 and the sysaux table already exists then drop the existing sysaux tablespace. &lt;br /&gt;Create the SYSAUX tablespace only if you are upgrading from Oracle Database9i Release 2 (9.2) with the following mandatory attributes:&lt;br /&gt;&lt;br /&gt;ONLINE&lt;br /&gt;PERMANENT&lt;br /&gt;READ WRITE&lt;br /&gt;EXTENT MANAGEMENT LOCAL&lt;br /&gt;SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;&lt;br /&gt;The Pre-Upgrade Information Tool provides an estimate of the minimum required size for the SYSAUX tablespace in the SYSAUX Tablespace section. Refer the output generated by utlu112i.sql script in Step 1. The following SQL statement would create a 500 MB SYSAUX tablespace for the database: SQL&gt; CREATE TABLESPACE SYSAUX&lt;br /&gt;     DATAFILE '&lt;location&gt;/sysaux01.dbf'&lt;br /&gt;     SIZE 500M REUSE&lt;br /&gt;     EXTENT MANAGEMENT LOCAL&lt;br /&gt;     SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;     ONLINE;&lt;br /&gt;Set the system to spool results to a log file for later verification after the upgrade is completed and start the upgrade script.&lt;br /&gt;SQL&gt; set echo on&lt;br /&gt;SQL&gt; SPOOL upgrade.log&lt;br /&gt;SQL&gt; @catupgrd.sql&lt;br /&gt;SQL&gt; spool off&lt;br /&gt;These measures are an important final step to ensure the integrity and consistency of the newly upgraded Oracle Database software.Also, if you encountered a message listing obsolete initialization parameters when you started the database for upgrade, then remove the obsolete initialization parameters from the parameter file before restarting. If necessary, convert the SPFILE to a PFILE so you can edit the file to delete parameters.&lt;br /&gt;&lt;br /&gt;Run the Post-Upgrade Status Tool $ORACLE_HOME/rdbms/admin/utlu111s.sql which provides a summary of the upgrade at the end of the spool log. It displays the status of the database components in the upgraded database and the time required to complete each component upgrade. Any errors that occur during the upgrade are listed with each component and must be addressed&lt;br /&gt;&lt;br /&gt;$ sqlplus "/as sysdba"&lt;br /&gt;SQL&gt; STARTUP&lt;br /&gt;SQL&gt; @utlu111s.sql&lt;br /&gt;Run catuppst.sql, located in the $ORACLE_HOME/rdbms/admin directory, to perform upgrade actions that do not require the database to be in UPGRADE mode: SQL&gt; @catuppst.sql&lt;br /&gt;&lt;br /&gt;This script can be run concurrently with utlrp.sql. Run utlrp.sql to recompile any remaining stored PL/SQL and Java code in another session.&lt;br /&gt;SQL&gt; @utlrp.sqlCheck for the integrity of the upgraded database&lt;br /&gt;&lt;br /&gt;Check for the integrity of the upgraded database by running dbupgdiag.sql script from below Metalink article&lt;br /&gt;&lt;br /&gt;Note 556610.1  Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql)&lt;br /&gt;If the dbupgdiag.sql script reports any invalid objects, run $ORACLE_HOME/rdbms/admin/utlrp.sql (multiple times) to validate the invalid objects in the database, until there is no change in the number of invalid objects.&lt;br /&gt;&lt;br /&gt;After validating the invalid objects, re-run dbupgdiag.sql in the upgraded database once again and make sure that everything is fine.&lt;br /&gt;&lt;br /&gt;Post Upgrade Steps&lt;br /&gt;&lt;br /&gt;Step 30&lt;br /&gt;&lt;br /&gt;Modify the listener.ora file:&lt;br /&gt;&lt;br /&gt;For the upgraded instance(s) modify the ORACLE_HOME parameter to point to the new ORACLE_HOME. Start the listener :&lt;br /&gt;lsnrctl start&lt;br /&gt;&lt;br /&gt;Step 31&lt;br /&gt;Environment Variables&lt;br /&gt;&lt;br /&gt;1. Make sure the following environment variables point to the Oracle 11g Release directories:&lt;br /&gt;&lt;br /&gt;- ORACLE_BASE&lt;br /&gt;- ORACLE_HOME&lt;br /&gt;- PATH&lt;br /&gt;&lt;br /&gt;Also check that your oratab file and any client scripts that set the value of ORACLE_HOME point to the Oracle Database 11g Release 2 (11.2) home.&lt;br /&gt;&lt;br /&gt;Note : If you are upgrading a cluster database, then perform these checks on all nodes in which this cluster database has instances configured.&lt;br /&gt;&lt;br /&gt;2. Modify /etc/oratab entry to use automatic startup&lt;br /&gt;SID:ORACLE_HOME:Y&lt;br /&gt;&lt;br /&gt;For Instance,&lt;br /&gt;orcl:/opt/oracle/product/11.2/db_1:Y&lt;br /&gt;Step 32&lt;br /&gt;&lt;br /&gt;Please refer the following article for complete steps to upgrade the TimeZone file to 11 after upgrading the database ( Post upgrade steps ) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 944122.1 How To Upgrade The Timezone File Older Than Version 11 Using DBMS_DST Package&lt;br /&gt;&lt;br /&gt;NOTE : If you have run DBMS_DST package to upgrade the timezone version to a newer one, e.g., version 11 during post-upgrade of Oracle Database Release 11.2 , before you downgrade to your previous Oracle database release, you must install version 11 timezone files into the directory&lt;br /&gt;of  $ORACLE_HOME/ORACORE/ZONEINFO on your old Oracle database release.&lt;br /&gt;&lt;br /&gt;For patches of new timezone version files on Oracle Database Release 11.1 or older, please refer to metalink Note 412160.1  Updated DST transitions and new Time Zones in Oracle Time Zone File patches.&lt;br /&gt;&lt;br /&gt;Step 33&lt;br /&gt;Upgrade Statistics Tables Created by the DBMS_STATS Package&lt;br /&gt;&lt;br /&gt;If you created statistics tables using the DBMS_STATS.CREATE_STAT_TABLE procedure, then upgrade these tables by executing the following procedure:&lt;br /&gt;&lt;br /&gt;EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('SYS','dictstattab');&lt;br /&gt;In the example, 'SYS' is the owner of the statistics table and 'dictstattab' is the name of the statistics table. Execute this procedure for each statistics table.&lt;br /&gt;&lt;br /&gt;Step 34&lt;br /&gt;Upgrade Externally Authenticated SSL Users&lt;br /&gt;&lt;br /&gt;If you have upgraded from Oracle 9.2.0.x or 10.1.0.x, and you are using externally authenticated SSL users, then you must run the following command to upgrade those users:&lt;br /&gt;&lt;br /&gt;ORACLE_HOME/rdbms/bin/extusrupgrade --dbconnectstring&lt;br /&gt;&lt;hostname:port_no:sid&gt; --dbuser &lt;db admin&gt; --dbuserpassword&lt;br /&gt;&lt;password&gt; -aIf you are upgrading from 10.2.0.x (or higher), then you are not required to run this command.&lt;br /&gt;&lt;br /&gt;Step 35&lt;br /&gt;Enable Database Vault&lt;br /&gt;&lt;br /&gt;Refer to the following Metalink Documents for enabling Oracle Database Vault&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 453903.1 - Enabling and Disabling Oracle Database Vault in UNIX&lt;br /&gt;Note 453902.1 - Enabling and Disabling Oracle Database Vault in WINDOWS&lt;br /&gt;&lt;br /&gt;Step 36&lt;br /&gt;&lt;br /&gt;Configure Fine-Grained Access to External Network Services&lt;br /&gt;&lt;br /&gt;To avoid "ORA-24247: network access denied by access control list (ACL)" when executing UTL packages (Network related Packages), access has to be granted to user using these packages.&lt;br /&gt;&lt;br /&gt;The following example first looks for any ACL currently assigned to host_name. If one is found, then the example grants user_name the CONNECT privilege in the ACL only if that user does not already have it. If no ACL exists for host_name, then the example creates a new ACL called ACL_name, grants the CONNECT privilege to user_name, and assigns the ACL to host_name.&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;acl_path VARCHAR2(4000);&lt;br /&gt;BEGIN&lt;br /&gt;SELECT acl INTO acl_path FROM dba_network_acls&lt;br /&gt;WHERE host = 'host_name' AND lower_port IS NULL AND upper_port IS NULL;&lt;br /&gt;IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(acl_path,'principal','privilege') IS NULL THEN&lt;br /&gt;DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl_path,'principal', is_grant, 'privilege');&lt;br /&gt;END IF;&lt;br /&gt;EXCEPTION&lt;br /&gt;WHEN no_data_found THEN&lt;br /&gt;DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('ACL_name.xml','ACL description', 'principal', is_grant, 'privilege');&lt;br /&gt;DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('ACL_name.xml','host_name');&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;COMMIT;&lt;br /&gt;&lt;br /&gt;acl_name.xml =&gt; Enter a name for the access control list XML file.&lt;br /&gt;ACL description =&gt; ’file description’,&lt;br /&gt;principal =&gt; ’user_or_role’,&lt;br /&gt;is_grant =&gt; TRUE|FALSE,&lt;br /&gt;privilege =&gt; ’connect|resolve’,&lt;br /&gt;host_name =&gt; host name&lt;br /&gt;&lt;br /&gt;Refer the below note on how to use DBMS_NETWORK_ACL_ADMIN Package and also to avoid ORA-24247 : network access denied by access control list (ACL)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 453786.1 ORA-24247 When Executing UTL_HTTP UTL_INADDR Packages&lt;br /&gt;&lt;br /&gt;Step 37 &lt;br /&gt;Edit init.ora:&lt;br /&gt;&lt;br /&gt;- If you changed the CLUSTER_DATABASE parameter prior the upgrade set it back to TRUE&lt;br /&gt;- Migrate your initialization parameter file to a server parameter file.&lt;br /&gt;&lt;br /&gt;Create a server parameter file with a initialization parameter file&lt;br /&gt;&lt;br /&gt;SQL&gt; create spfile from pfile;&lt;br /&gt;&lt;br /&gt;This will create a spfile as a copy of the init.ora file located in $ORACLE_HOME/dbs (UNIX) &amp; %ORACLE_HOME%\database (Windows).&lt;br /&gt;&lt;br /&gt;Step 38&lt;br /&gt;Change Passwords for Oracle-Supplied Accounts&lt;br /&gt;&lt;br /&gt;Depending on the release from which you upgraded, there might be new Oracle supplied accounts. Oracle recommends that you lock all Oracle supplied accounts except for SYS and SYSTEM, and expire their passwords, thus requiring new passwords to be specified when the accounts are unlocked.&lt;br /&gt;&lt;br /&gt;You can view the status of all accounts by issuing the following SQL statement:&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT username, account_status FROM dba_users ORDER BY username;&lt;br /&gt;To lock and expire passwords, issue the following SQL statement:&lt;br /&gt;&lt;br /&gt;SQL&gt; ALTER USER username PASSWORD EXPIRE ACCOUNT LOCK;&lt;br /&gt;Step 39 &lt;br /&gt;&lt;br /&gt;Upgrading Oracle Text&lt;br /&gt;&lt;br /&gt;Copy the following files from the previous Oracle home to the new Oracle home:&lt;br /&gt;&lt;br /&gt;* Stemming user-dictionary files&lt;br /&gt;* User-modified KOREAN_MORPH_LEXER dictionary files&lt;br /&gt;* USER_FILTER executables&lt;br /&gt;&lt;br /&gt;To obtain a list of the above files, use:&lt;br /&gt;&lt;br /&gt;$ORACLE_HOME/ctx/admin/ctxf&lt;version&gt;.txt&lt;br /&gt;$ORACLE_HOME/ctx/admin/ctxf&lt;version&gt;.sql&lt;br /&gt;&lt;br /&gt;where version is 920,101,102&lt;br /&gt;&lt;br /&gt;For instance, if upgrading from 10.2.0&lt;br /&gt;&lt;br /&gt;1. For dictionary files check&lt;br /&gt;$ORACLE_HOME/ctx/admin/ctxf102.txt&lt;br /&gt;2. Execute the script as database user SYS,SYSTEM, or CTXSYS&lt;br /&gt;$ORACLE_HOME/ctx/admin/ctxf102.sql&lt;br /&gt;&lt;br /&gt;If your Oracle Text index uses KOREAN_LEXER which was deprecated in Oracle 9i and desupported in Oracle 10g Release 2, see below Note for further information on manual migration from KOREAN_LEXER to KOREAN_MORPH_LEXER.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note 300172.1  Obsolescence of KOREAN_LEXER Lexer Type&lt;br /&gt;&lt;br /&gt;Step 40 &lt;br /&gt;Upgrade the Oracle Cluster Registry (OCR) Configuration&lt;br /&gt;&lt;br /&gt;If you are using Oracle Cluster Services, then you must upgrade the Oracle Cluster Registry (OCR) keys for the database.&lt;br /&gt;&lt;br /&gt;Use one of the following options to upgrade the OCR configuration to 11g:&lt;br /&gt;&lt;br /&gt;1. Use srvconfig from the Oracle Database 11g Release 1 (11.1) Oracle home.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;srvconfig -upgrade -dbname db_name -orahome pre-11g_Oracle_home&lt;br /&gt;2. Run srvctl.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;From old Oracle_Home:&lt;br /&gt;&lt;br /&gt;% $ORACLE_HOME/bin/srvctl remove database -d db_name&lt;br /&gt;&lt;br /&gt;From 11g Oracle_Home:&lt;br /&gt;&lt;br /&gt;% $ORACLE_HOME/bin/srvctl add database -d db_name -o &lt;location of 11g home&gt;&lt;br /&gt;% $ORACLE_HOME/bin/srvctl add instance -d db_name -i instance -n node&lt;br /&gt;Step 41&lt;br /&gt;&lt;br /&gt;Configure Enterprise Manager&lt;br /&gt;&lt;br /&gt;If your database is being managed by Oracle Enterprise Manager Database Control or Oracle Enterprise Manager Grid Control, then use the following command to update the configuration:&lt;br /&gt;emca -upgrade (db | asm | db_asm) [-cluster] [-silent] [parameters]&lt;br /&gt;You need to run this from the new Oracle Database 11g Oracle Home. When prompted, provide the Oracle home from which the configuration is being upgraded.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Appendix A: Initialization parameters deprecated in Oracle Database 11g release 2 (11.2)&lt;br /&gt;&lt;br /&gt;PARALLEL_IO_CAP_ENABLED&lt;br /&gt;To get a list of all deprecated initialization parameters, issue the following SQL statement:&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT name FROM v$parameter WHERE isdeprecated = 'TRUE';&lt;br /&gt;A warning message is displayed at instance startup if a deprecated parameter is specified in the parameter file. In addition, all deprecated parameters are logged to the alert log at instance startup.&lt;br /&gt;&lt;br /&gt;Appendix B :Initialization Parameters Obsolete in Oracle Database 11g Release 2 (11.2)&lt;br /&gt;&lt;br /&gt;DRS_START&lt;br /&gt;SQL_VERSION&lt;br /&gt;&lt;br /&gt;Known Issues&lt;br /&gt;&lt;br /&gt;Revision History&lt;br /&gt;03-Sep-2009    Article Created&lt;br /&gt;&lt;br /&gt;27-Oct-2009  Changed Indirect upgrade table value  from 9.2.0.3(or lower) to 9.2.0.7(or lower)&lt;br /&gt;&lt;br /&gt;27-Oct-2009  Check the certification of the 11g R2 with you platform before installing the software &lt;br /&gt;&lt;br /&gt;29-OCt-2009  Note in step 32&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;References&lt;br /&gt;NOTE:276914.1 - The National Character Set ( NLS_NCHAR_CHARACTERSET ) in Oracle 9i, 10g and 11g&lt;br /&gt;NOTE:300172.1 - Obsolescence of KOREAN_LEXER Lexer Type&lt;br /&gt;NOTE:359145.1 - Impact of 2007 USA daylight saving changes on the Oracle database&lt;br /&gt;NOTE:412160.1 - Updated DST transitions and new Time Zones in Oracle Time Zone File patches&lt;br /&gt;NOTE:414590.1 - Time Zone IDs for 7 Time Zones Changed in Time Zone Files Version 3 and Higher, Possible ORA-1882 After Upgrade&lt;br /&gt;NOTE:453786.1 - ORA-24247 When Executing UTL_HTTP UTL_INADDR Packages&lt;br /&gt;NOTE:453902.1 - Enabling and Disabling Oracle Database Vault in WINDOWS&lt;br /&gt;NOTE:453903.1 - Enabling and Disabling Oracle Database Vault in UNIX&lt;br /&gt;NOTE:454442.1 - 11g Install : Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations&lt;br /&gt;NOTE:556610.1 - Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql)&lt;br /&gt;NOTE:560336.1 - Script to Check Schemas with Stale Statistics&lt;br /&gt;NOTE:560980.1 - Unable to display Ultra Search Administration Page on 11gR1&lt;br /&gt;NOTE:870877.1 - How To Save Oracle Enterprise Manager Database Control Data Before Upgrading The Single Instance Database To Other Release ?&lt;br /&gt;NOTE:944122.1 - How To Upgrade The Timezone File Older Than Version 11 Using DBMS_DST Package&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-2563490763925807812?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/2563490763925807812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=2563490763925807812' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2563490763925807812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2563490763925807812'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/02/complete-checklist-for-manual-upgrades.html' title='Complete Checklist for Manual Upgrades to 11gR2'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-152770962167883091</id><published>2010-01-31T23:17:00.000-08:00</published><updated>2010-01-31T23:21:31.709-08:00</updated><title type='text'>RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G</title><content type='html'>Applies to: &lt;br /&gt;Oracle Server - Enterprise Edition - Version: 9.0.1.4 to 11.2.0.0&lt;br /&gt;Information in this document applies to any platform.&lt;br /&gt;"Checked for relevance on 05-August-2009" &lt;br /&gt;Purpose&lt;br /&gt;The purpose of this document is to introduce the RMAN 'duplicate database' feature of Oracle9i, Oracle10g and Oracle 11G.&lt;br /&gt;&lt;br /&gt;Scope and Application&lt;br /&gt;This note is intended for DBAs and Support Personnel.&lt;br /&gt;&lt;br /&gt;RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G&lt;br /&gt;Note : In Oracle 10G and 11G are new features available, but the Oracle9i procedure is still valid for 10G and 11G aswell.&lt;br /&gt;&lt;br /&gt;See Note 259694.1 Oracle10G RMAN Database Duplication&lt;br /&gt;See Note 452868.1 RMAN 'Duplicate Database' Feature in 11G&lt;br /&gt;&lt;br /&gt;You can use the RMAN DUPLICATE command to create a duplicate database from target database backups while still retaining the original target database.  The duplicate database can be either identical to the original database or contain only a subset of the original tablespaces.&lt;br /&gt;&lt;br /&gt;A RAC TARGET database can be duplicated as well. The procedure is the same as below.If the auxiliary instance needs to be a RAC-database aswell, than start the duplicate procedure for to a single instance and convert the auxiliary to RAC after the duplicate has &lt;br /&gt;succeeded.&lt;br /&gt;&lt;br /&gt;To prepare for database duplication, you must first create an auxiliary instance.  For the duplication to work, you must connect RMAN to both the target (primary) database  and an auxiliary instance started in NOMOUNT mode.&lt;br /&gt;&lt;br /&gt;You must have at least one auxiliary channel allocated on the auxiliary instance.  The principal work of the duplication is performed by the auxiliary channel,  which starts a server session on the auxiliary host.  This channel then restores the necessary backups of the primary database, uses them to create the duplicate database, and initiates recovery.&lt;br /&gt;&lt;br /&gt;As part of the duplicating operation, RMAN manages the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Restores the target datafiles to the duplicate database and performs incomplete recovery by using all available incremental backups and archived logs. &lt;br /&gt;Shuts down and starts the auxiliary database. &lt;br /&gt;Opens the duplicate database with the RESETLOGS option after incomplete recovery to create the online redo logs. &lt;br /&gt;Generates a new, unique DBID for the auxiliary database. &lt;br /&gt;&lt;br /&gt;During duplication, RMAN must perform incomplete recovery because the online  redo logs in the target are not backed up and cannot be applied to the auxiliary database. The farest that RMAN can go in recovery of the duplicate database isthe most recent redo log archived by the target database.&lt;br /&gt;&lt;br /&gt;When duplicating a database, you can do the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Run the DUPLICATE command with or without a recovery catalog &lt;br /&gt;Skip read-only tablespaces with the SKIP READONLY clause. Read-only tablespaces are included by default.  If you omit them, then you can add them later. &lt;br /&gt;Exclude tablespaces from the auxiliary database with the SKIP TABLESPACE clause. You cannot skip the SYSTEM tablespace or tablespaces containing rollback or undo segments. &lt;br /&gt;Create the auxiliary database in a new host. If the directory structure is the same on the new host, then you can specify the NOFILENAMECHECK option and reuse the target datafile filenames for the auxiliary datafiles. &lt;br /&gt;Use the SET UNTIL command or DUPLICATE command with the UNTIL clause when creating the auxiliary database to recover it to a noncurrent time. By default, the DUPLICATE command creates the database by using the most recent backups of the target database and then performs recovery to the most recent consistent point contained in the incremental backups and archived logs. &lt;br /&gt;&lt;br /&gt;Register the auxiliary database in the same recovery catalog as the target database. This option is possible because RMAN gives the duplicate database a new DBID during duplication. &lt;br /&gt;&lt;br /&gt;Preparing the Auxiliary Instance for Duplication:&lt;br /&gt;The used instance name for the AUXILIARY instance, in this example, is AUX but can be any other valid instancename.&lt;br /&gt;&lt;br /&gt;Basic Steps&lt;br /&gt;Perform these tasks before performing RMAN duplication:&lt;br /&gt;&lt;br /&gt;Task 1: setenv ORACLE_SID AUX&lt;br /&gt;Create an Oracle Password File for the Auxiliary Instance &lt;br /&gt;&lt;br /&gt;Task 2: Ensure SQL*Net Connectivity to the Auxiliary Instance.&lt;br /&gt;A SQL*Net connection to the Auxilary instance is not required, but recommended. As the setup of the SQL*Net connection is easier done for the auxiliary instance than for the TARGET.RMAN is connecting to the target and auxiliary instance with SYSDBA privileges. A SQL*Net connection using SYSDBA privileges requires a password file.&lt;br /&gt;&lt;br /&gt;Task 3: Create an Initialization Parameter File for the Auxiliary Instance &lt;br /&gt;Mandatory initialization parameter settings for the auxiliary database:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;db_block_size = &lt;same size as the target&gt;&lt;br /&gt;DB_NAME=AUX&lt;br /&gt;compatible = 9.2.0.0 /* should be the same as the target&lt;br /&gt;CONTROL_FILES=(/dup/oracle/oradata/trgt/control01.ctl,&lt;br /&gt;/dup/oracle/oradata/trgt/control02.ctl)&lt;br /&gt;#DB_FILE_NAME_CONVERT=('/oracle/oradata/trgt/','/dup/oracle/oradata/trgt/')&lt;br /&gt;#LOG_FILE_NAME_CONVERT=('/oracle/oradata/trgt/redo','/dup/oracle/oradata/trgt/redo')&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Task 4: Start the Auxiliary Instance NOMOUNT&lt;br /&gt;SQL&gt; CONNECT SYS/oracle@aux AS SYSDBA     STARTUP FORCE NOMOUNT&lt;br /&gt;Task 5: Mount or Open the Target Database &lt;br /&gt;Task 6: Make Sure You Have the Necessary Backups and Archived Redo Logs &lt;br /&gt;Task 7: Allocate Auxiliary Channels if Automatic Channels Are Not Configured &lt;br /&gt;&lt;br /&gt;Start RMAN with a connection to the target database, the auxiliary database, and (if you use one) the recovery catalog database. You can start the RMAN executable on any host so long as it can connect to all the instances. &lt;br /&gt;&lt;br /&gt;Note: If the auxiliary instance requires a client-side initialization parameter file, then this file must exist on the same host that runs the RMAN executable.&lt;br /&gt;&lt;br /&gt;If automatic channels are not configured, then before issuing the DUPLICATE command, manually allocate at least one auxiliary channel within the same RUN block.  If the backups reside on disk, then the more channels you allocate, the faster the duplication will be.  For tape backups, limit the number of channels to the number of devices available for the operation.&lt;br /&gt;&lt;br /&gt;This example assumes the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using a recovery catalog. &lt;br /&gt;The target database is on host1 and contains eight datafiles. &lt;br /&gt;Duplicate the target to database aux on the same host. &lt;br /&gt;Store the datafiles for AUX under /export/home/oracle/AUX/ subdirectory. &lt;br /&gt;Exclude tablespace INDX from the duplicate database, but keep all of the other tablespaces. &lt;br /&gt;Restore the duplicate db at a noncurrent time. &lt;br /&gt;Two online redo logs groups, each with two members of size 10 Mb. &lt;br /&gt;Configured the default device to disk. &lt;br /&gt;The auxiliary instance AUX has initialization parameter file in the default location (so the PFILE parameter is not necessary on the DUPLICATE command). &lt;br /&gt;Start RMAN from the AUX site.&lt;br /&gt;&lt;br /&gt;RMAN&gt; CONNECT TARGET system/system@R920.ca.oracle.com;      CONNECT CATALOG rman/rman@T920.ca.oracle.com;      CONNECT AUXILIARY SYS/oracle;      CONFIGURE CHANNEL DEVICE TYPE disk CLEAR;      CONFIGURE DEFAULT DEVICE TYPE TO disk;      CONFIGURE DEVICE TYPE disk PARALLELISM 3;# note that a RUN command is necessary because you can only execute SET NEWNAME# within a RUN commandRUN {# the DUPLICATE command uses an automatic disk channel  set until time "to_date('Jan 29 2003 10:50:00','Mon DD YYYY HH24:MI:SS')";  SET NEWNAME FOR DATAFILE 1 TO '/export/home/oracle/AUX/system01.dbf';  SET NEWNAME FOR DATAFILE 2 TO '/export/home/oracle/AUX/undotbs01.dbf';  SET NEWNAME FOR DATAFILE 3 TO '/export/home/oracle/AUX/example01.dbf';  SET NEWNAME FOR DATAFILE 5 TO '/export/home/oracle/AUX/tools01.dbf';  SET NEWNAME FOR DATAFILE 6 TO '/export/home/oracle/AUX/users01.dbf';  SET NEWNAME FOR DATAFILE 7 TO '/export/home/oracle/AUX/logmnrts.dbf';  SET NEWNAME FOR DATAFILE 8 TO '/export/home/oracle/AUX/marius01.dbf';  DUPLICATE TARGET DATABASE TO AUX  SKIP TABLESPACE indx  LOGFILE  GROUP 1 ('/export/home/oracle/AUX/redo01a.log',           '/export/home/oracle/AUX/redo01b.log') SIZE 10M REUSE,  GROUP 2 ('/export/home/oracle/AUX/redo02a.log',           '/export/home/oracle/AUX/redo02b.log') SIZE 10M REUSE;}&lt;br /&gt;&lt;br /&gt;And this is what is going on:&lt;br /&gt;&lt;br /&gt;executing command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting Duplicate Db at 31-JAN-03using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3Datafile 4 skipped by requestprinting stored script: Memory Script{set until scn 5968565;set newname for datafile 1 to"/export/home/oracle/AUX/system01.dbf";set newname for datafile 2 to"/export/home/oracle/AUX/undotbs01.dbf";set newname for datafile 3 to"/export/home/oracle/AUX/example01.dbf";set newname for datafile 5 to"/export/home/oracle/AUX/tools01.dbf";set newname for datafile 6 to"/export/home/oracle/AUX/users01.dbf";set newname for datafile 7 to"/export/home/oracle/AUX/logmnrts.dbf";set newname for datafile 8 to"/export/home/oracle/AUX/marius01.dbf";restorecheck readonlyclone databaseskip tablespace INDX ;}executing script: Memory Scriptexecuting command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting restore at 31-JAN-03using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3channel ORA_AUX_DISK_1: starting datafile backupset restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setrestoring datafile 00001 to /export/home/oracle/AUX/system01.dbfrestoring datafile 00003 to /export/home/oracle/AUX/example01.dbfrestoring datafile 00007 to /export/home/oracle/AUX/logmnrts.dbfchannel ORA_AUX_DISK_2: starting datafile backupset restorechannel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup setrestoring datafile 00002 to /export/home/oracle/AUX/undotbs01.dbfrestoring datafile 00005 to /export/home/oracle/AUX/tools01.dbfrestoring datafile 00006 to /export/home/oracle/AUX/users01.dbfrestoring datafile 00008 to /export/home/oracle/AUX/marius01.dbfchannel ORA_AUX_DISK_1: restored backup piece 1piece handle=/u01/app/oracle/admin/R920/backup/DB_R920_01ee3suk_1_1 tag=TAG2003129T104747 params=NULLchannel ORA_AUX_DISK_1: restore completechannel ORA_AUX_DISK_2: restored backup piece 1piece handle=/u01/app/oracle/admin/R920/backup/DB_R920_02ee3suk_1_1 tag=TAG2003129T104747 params=NULLchannel ORA_AUX_DISK_2: restore completeFinished restore at 31-JAN-03sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOGMAXLOGFILES 5MAXLOGMEMBERS 3MAXDATAFILES 100MAXINSTANCES 1MAXLOGHISTORY 226LOGFILEGROUP 1 ( '/export/home/oracle/AUX/redo01a.log', '/export/home/oracle/AUX/reo01b.log' ) SIZE 10m REUSE,GROUP 2 ( '/export/home/oracle/AUX/redo02a.log', '/export/home/oracle/AUX/reo02b.log' ) SIZE 10m REUSEDATAFILE'/export/home/oracle/AUX/system01.dbf'CHARACTER SET WE8ISO8859P1printing stored script: Memory Script{switch clone datafile all;}executing script: Memory Scriptdatafile 2 switched to datafile copyinput datafilecopy recid=1 stamp=484764999 filename=/export/home/oracle/AUX/undotbs01.dbfdatafile 3 switched to datafile copyinput datafilecopy recid=2 stamp=484764999 filename=/export/home/oracle/AUX/example01.dbfdatafile 5 switched to datafile copyinput datafilecopy recid=3 stamp=484764999 filename=/export/home/oracle/AUX/toors01.dbfdatafile 6 switched to datafile copyinput datafilecopy recid=4 stamp=484764999 filename=/export/home/oracle/AUX/users01.dbfdatafile 7 switched to datafile copyinput datafilecopy recid=5 stamp=484764999 filename=/export/home/oracle/AUX/logmnrts.dbfdatafile 8 switched to datafile copyinput datafilecopy recid=6 stamp=484764999 filename=/export/home/oracle/AUX/marius01.dbfprinting stored script: Memory Script{set until time "to_date('Jan 29 2003 10:50:00','Mon DD YYYY HH24:MI:SS')";recoverclone databasedelete archivelog;}executing script: Memory Scriptexecuting command: SET until clauseStarting recover at 31-JAN-03using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3datafile 4 not processed because file is offlinestarting media recoverychannel ORA_AUX_DISK_1: starting archive log restore to default destinationchannel ORA_AUX_DISK_1: restoring archive logarchive log thread=1 sequence=43channel ORA_AUX_DISK_1: restored backup piece 1piece handle=/u01/app/oracle/admin/R920/backup/AL_R920_03ee4185_1_1 tag=TAG2003129T120109 params=NULLchannel ORA_AUX_DISK_1: restore completearchive log filename=/u01/app/oracle/product/9.2.0/dbs/arch1_43.dbf thread=1 seuence=43channel clone_default: deleting archive log(s)archive log filename=/u01/app/oracle/product/9.2.0/dbs/arch1_43.dbf recid=1 stap=484765017media recovery completeFinished recover at 31-JAN-03printing stored script: Memory Script{shutdown clone;startup clone nomount ;}executing script: Memory Scriptdatabase dismountedOracle instance shut downconnected to auxiliary database (not started)Oracle instance startedTotal System Global Area 52167600 bytesFixed Size 730032 bytesVariable Size 50331648 bytesDatabase Buffers 819200 bytesRedo Buffers 286720 bytessql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOGMAXLOGFILES 5MAXLOGMEMBERS 3MAXDATAFILES 100MAXINSTANCES 1MAXLOGHISTORY 226LOGFILEGROUP 1 ( '/export/home/oracle/AUX/redo01a.log', '/export/home/oracle/AUX/reo01b.log' ) SIZE 10m REUSE,GROUP 2 ( '/export/home/oracle/AUX/redo02a.log', '/export/home/oracle/AUX/reo02b.log' ) SIZE 10m REUSEDATAFILE'/export/home/oracle/AUX/system01.dbf'CHARACTER SET WE8ISO8859P1printing stored script: Memory Script{catalog clone datafilecopy "/export/home/oracle/AUX/undotbs01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/example01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/tools01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/users01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/logmnrts.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/marius01.dbf";switch clone datafile all;}executing script: Memory Scriptcataloged datafile copydatafile copy filename=/export/home/oracle/AUX/undotbs01.dbf recid=1 stamp=48475037cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/example01.dbf recid=2 stamp=48475038cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/tools01.dbf recid=3 stamp=48476539cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/users01.dbf recid=4 stamp=48476539cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/logmnrts.dbf recid=5 stamp=48476039cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/marius01.dbf recid=6 stamp=48476039datafile 2 switched to datafile copyinput datafilecopy recid=1 stamp=484765037 filename=/export/home/oracle/AUX/undotbs01.dbfdatafile 3 switched to datafile copyinput datafilecopy recid=2 stamp=484765038 filename=/export/home/oracle/AUX/example01.dbfdatafile 5 switched to datafile copyinput datafilecopy recid=3 stamp=484765039 filename=/export/home/oracle/AUX/tools01.dbfdatafile 6 switched to datafile copyinput datafilecopy recid=4 stamp=484765039 filename=/export/home/oracle/AUX/users01.dbfdatafile 7 switched to datafile copyinput datafilecopy recid=5 stamp=484765039 filename=/export/home/oracle/AUX/logmnrts.dbfdatafile 8 switched to datafile copyinput datafilecopy recid=6 stamp=484765039 filename=/export/home/oracle/AUX/marius01.dbfprinting stored script: Memory Script{Alter clone database open resetlogs;}executing script: Memory Scriptdatabase openedprinting stored script: Memory Script{# drop offline and skipped tablespacessql clone "drop tablespace INDX including contents";}executing script: Memory Scriptsql statement: drop tablespace INDX including contentsFinished Duplicate Db at 31-JAN-03RMAN&gt;&lt;br /&gt;&lt;br /&gt;References&lt;br /&gt;NOTE:259694.1 - Oracle10G RMAN Database Duplication&lt;br /&gt;Oracle9i Recovery Manager User's Guide Release 2 (9.2) Part Number A96566-01&lt;br /&gt;Chap 12 Duplicating a Database with Recovery Manager&lt;br /&gt;NOTE:452868.1 - RMAN 'Duplicate Database' Feature in 11G&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NOTE:228257.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-152770962167883091?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/152770962167883091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=152770962167883091' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/152770962167883091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/152770962167883091'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/01/rman-duplicate-database-feature-in.html' title='RMAN &apos;Duplicate Database&apos; Feature in Oracle9i / 10G and 11G'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-7874012631530938643</id><published>2010-01-31T23:16:00.000-08:00</published><updated>2010-02-18T05:01:02.007-08:00</updated><title type='text'>RMAN Backup Status</title><content type='html'>To check the backups are good or not there are two options : &lt;br /&gt;&lt;br /&gt;Option 1:  Restore the database on a server and recover it using the backups. This you accomplish using RMAN duplicate command. &lt;br /&gt;&lt;br /&gt;View the below note for more information on RMAN duplicate : &lt;br /&gt;Note.228257.1  RMAN 'Duplicate Database' Feature in Oracle9i / Oracle 10G &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Option 2 : Run RMAN validate command. The validate command will not restore any file it just reads and gives confirmation that the backups are good. &lt;br /&gt;&lt;br /&gt;Example: &lt;br /&gt;&lt;br /&gt;Want to restore and recover the database till time '10:23, 05-November-2007 then you have to use the below command to accomplish this : &lt;br /&gt;&lt;br /&gt;Step 1: The below command just gives the report of backups that are used to do the restore and recover : &lt;br /&gt;&lt;br /&gt;run &lt;br /&gt;{ &lt;br /&gt;set until time "to_date('2007-05-10:23:00:00','yyyy-dd-mm:hh24:mi:ss')"; &lt;br /&gt;restore database preview; &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;The Restore ... Preview identifies the backups (backup sets or image copies, on disk or sequential media like tapes) required to carry out a given restore operation, based on the information in the RMAN repository. Use RESTORE... PREVIEW when planning your restore and recovery operation, to ensure that all required backups are available or to identify situations. &lt;br /&gt;&lt;br /&gt;The restore database preview gives a report of all the backup pieces and archivelogs that are required to restore/recover the database. Make a note of the start sequence and end sequence of archivelogs and the same will be used in the next step &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 2: Then run the below command to check the backup pieces are good : &lt;br /&gt;&lt;br /&gt;run &lt;br /&gt;{ &lt;br /&gt;allocate channel c1 type disk; &lt;br /&gt;set until time "to_date('2007-05-10:23:00:00','yyyy-dd-mm:hh24:mi:ss')"; &lt;br /&gt;restore database validate; &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;The above command will read the backup pieces/Copies which has datafiles and if finds any error it will report at the RMAN prompt. &lt;br /&gt;&lt;br /&gt;RMAN&gt; run &lt;br /&gt;{ &lt;br /&gt;allocate channel c1 type disk; &lt;br /&gt;restore archivelog from sequence xxx until sequence yyy validate; &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;Replace the xxx, yyy with the start and end archivelog sequence reported by restore database preview command ran in the step 1. &lt;br /&gt;&lt;br /&gt;The RESTORE ... VALIDATE command test whether you can restore from your backups. You can test the availability of usable backups for any desired RESTORE operation, or test the contents of a specific backup for use in RESTORE operations. The contents of the backups are actually read and validated for corruption to ensure that the objects to be restored can be restored from them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-7874012631530938643?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/7874012631530938643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=7874012631530938643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/7874012631530938643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/7874012631530938643'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/01/how-to-checkvalidate-that-rman-backups.html' title='RMAN Backup Status'/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2899156935019450923</id><published>2010-01-31T22:55:00.000-08:00</published><updated>2010-01-31T23:06:39.616-08:00</updated><title type='text'></title><content type='html'>Applies to: &lt;br /&gt;Oracle Server - Enterprise Edition - Version: 9.0.1.4 to 11.2.0.0&lt;br /&gt;Information in this document applies to any platform.&lt;br /&gt;"Checked for relevance on 05-August-2009" &lt;br /&gt;Purpose&lt;br /&gt;The purpose of this document is to introduce the RMAN 'duplicate database' feature of Oracle9i, Oracle10g and Oracle 11G.&lt;br /&gt;&lt;br /&gt;Scope and Application&lt;br /&gt;This note is intended for DBAs and Support Personnel.&lt;br /&gt;&lt;br /&gt;RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G&lt;br /&gt;Note : In Oracle 10G and 11G are new features available, but the Oracle9i procedure is still valid for 10G and 11G aswell.&lt;br /&gt;&lt;br /&gt;See Note 259694.1 Oracle10G RMAN Database Duplication&lt;br /&gt;See Note 452868.1 RMAN 'Duplicate Database' Feature in 11G&lt;br /&gt;&lt;br /&gt;You can use the RMAN DUPLICATE command to create a duplicate database from target database backups while still retaining the original target database.  The duplicate database can be either identical to the original database or contain only a subset of the original tablespaces.&lt;br /&gt;&lt;br /&gt;A RAC TARGET database can be duplicated as well. The procedure is the same as below.If the auxiliary instance needs to be a RAC-database aswell, than start the duplicate procedure for to a single instance and convert the auxiliary to RAC after the duplicate has &lt;br /&gt;succeeded.&lt;br /&gt;&lt;br /&gt;To prepare for database duplication, you must first create an auxiliary instance.  For the duplication to work, you must connect RMAN to both the target (primary) database  and an auxiliary instance started in NOMOUNT mode.&lt;br /&gt;&lt;br /&gt;You must have at least one auxiliary channel allocated on the auxiliary instance.  The principal work of the duplication is performed by the auxiliary channel,  which starts a server session on the auxiliary host.  This channel then restores the necessary backups of the primary database, uses them to create the duplicate database, and initiates recovery.&lt;br /&gt;&lt;br /&gt;As part of the duplicating operation, RMAN manages the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Restores the target datafiles to the duplicate database and performs incomplete recovery by using all available incremental backups and archived logs. &lt;br /&gt;Shuts down and starts the auxiliary database. &lt;br /&gt;Opens the duplicate database with the RESETLOGS option after incomplete recovery to create the online redo logs. &lt;br /&gt;Generates a new, unique DBID for the auxiliary database. &lt;br /&gt;&lt;br /&gt;During duplication, RMAN must perform incomplete recovery because the online  redo logs in the target are not backed up and cannot be applied to the auxiliary database. The farest that RMAN can go in recovery of the duplicate database isthe most recent redo log archived by the target database.&lt;br /&gt;&lt;br /&gt;When duplicating a database, you can do the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Run the DUPLICATE command with or without a recovery catalog &lt;br /&gt;Skip read-only tablespaces with the SKIP READONLY clause. Read-only tablespaces are included by default.  If you omit them, then you can add them later. &lt;br /&gt;Exclude tablespaces from the auxiliary database with the SKIP TABLESPACE clause. You cannot skip the SYSTEM tablespace or tablespaces containing rollback or undo segments. &lt;br /&gt;Create the auxiliary database in a new host. If the directory structure is the same on the new host, then you can specify the NOFILENAMECHECK option and reuse the target datafile filenames for the auxiliary datafiles. &lt;br /&gt;Use the SET UNTIL command or DUPLICATE command with the UNTIL clause when creating the auxiliary database to recover it to a noncurrent time. By default, the DUPLICATE command creates the database by using the most recent backups of the target database and then performs recovery to the most recent consistent point contained in the incremental backups and archived logs. &lt;br /&gt;&lt;br /&gt;Register the auxiliary database in the same recovery catalog as the target database. This option is possible because RMAN gives the duplicate database a new DBID during duplication. &lt;br /&gt;&lt;br /&gt;Preparing the Auxiliary Instance for Duplication:&lt;br /&gt;The used instance name for the AUXILIARY instance, in this example, is AUX but can be any other valid instancename.&lt;br /&gt;&lt;br /&gt;Basic Steps&lt;br /&gt;Perform these tasks before performing RMAN duplication:&lt;br /&gt;&lt;br /&gt;Task 1: setenv ORACLE_SID AUX&lt;br /&gt;Create an Oracle Password File for the Auxiliary Instance &lt;br /&gt;&lt;br /&gt;Task 2: Ensure SQL*Net Connectivity to the Auxiliary Instance.&lt;br /&gt;A SQL*Net connection to the Auxilary instance is not required, but recommended. As the setup of the SQL*Net connection is easier done for the auxiliary instance than for the TARGET.RMAN is connecting to the target and auxiliary instance with SYSDBA privileges. A SQL*Net connection using SYSDBA privileges requires a password file.&lt;br /&gt;&lt;br /&gt;Task 3: Create an Initialization Parameter File for the Auxiliary Instance &lt;br /&gt;Mandatory initialization parameter settings for the auxiliary database:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;db_block_size = &lt;same size as the target&gt;&lt;br /&gt;DB_NAME=AUX&lt;br /&gt;compatible = 9.2.0.0 /* should be the same as the target&lt;br /&gt;CONTROL_FILES=(/dup/oracle/oradata/trgt/control01.ctl,&lt;br /&gt;/dup/oracle/oradata/trgt/control02.ctl)&lt;br /&gt;#DB_FILE_NAME_CONVERT=('/oracle/oradata/trgt/','/dup/oracle/oradata/trgt/')&lt;br /&gt;#LOG_FILE_NAME_CONVERT=('/oracle/oradata/trgt/redo','/dup/oracle/oradata/trgt/redo')&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Task 4: Start the Auxiliary Instance NOMOUNT&lt;br /&gt;SQL&gt; CONNECT SYS/oracle@aux AS SYSDBA     STARTUP FORCE NOMOUNT&lt;br /&gt;Task 5: Mount or Open the Target Database &lt;br /&gt;Task 6: Make Sure You Have the Necessary Backups and Archived Redo Logs &lt;br /&gt;Task 7: Allocate Auxiliary Channels if Automatic Channels Are Not Configured &lt;br /&gt;&lt;br /&gt;Start RMAN with a connection to the target database, the auxiliary database, and (if you use one) the recovery catalog database. You can start the RMAN executable on any host so long as it can connect to all the instances. &lt;br /&gt;&lt;br /&gt;Note: If the auxiliary instance requires a client-side initialization parameter file, then this file must exist on the same host that runs the RMAN executable.&lt;br /&gt;&lt;br /&gt;If automatic channels are not configured, then before issuing the DUPLICATE command, manually allocate at least one auxiliary channel within the same RUN block.  If the backups reside on disk, then the more channels you allocate, the faster the duplication will be.  For tape backups, limit the number of channels to the number of devices available for the operation.&lt;br /&gt;&lt;br /&gt;This example assumes the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using a recovery catalog. &lt;br /&gt;The target database is on host1 and contains eight datafiles. &lt;br /&gt;Duplicate the target to database aux on the same host. &lt;br /&gt;Store the datafiles for AUX under /export/home/oracle/AUX/ subdirectory. &lt;br /&gt;Exclude tablespace INDX from the duplicate database, but keep all of the other tablespaces. &lt;br /&gt;Restore the duplicate db at a noncurrent time. &lt;br /&gt;Two online redo logs groups, each with two members of size 10 Mb. &lt;br /&gt;Configured the default device to disk. &lt;br /&gt;The auxiliary instance AUX has initialization parameter file in the default location (so the PFILE parameter is not necessary on the DUPLICATE command). &lt;br /&gt;Start RMAN from the AUX site.&lt;br /&gt;&lt;br /&gt;RMAN&gt; CONNECT TARGET system/system@R920.ca.oracle.com;      CONNECT CATALOG rman/rman@T920.ca.oracle.com;      CONNECT AUXILIARY SYS/oracle;      CONFIGURE CHANNEL DEVICE TYPE disk CLEAR;      CONFIGURE DEFAULT DEVICE TYPE TO disk;      CONFIGURE DEVICE TYPE disk PARALLELISM 3;# note that a RUN command is necessary because you can only execute SET NEWNAME# within a RUN commandRUN {# the DUPLICATE command uses an automatic disk channel  set until time "to_date('Jan 29 2003 10:50:00','Mon DD YYYY HH24:MI:SS')";  SET NEWNAME FOR DATAFILE 1 TO '/export/home/oracle/AUX/system01.dbf';  SET NEWNAME FOR DATAFILE 2 TO '/export/home/oracle/AUX/undotbs01.dbf';  SET NEWNAME FOR DATAFILE 3 TO '/export/home/oracle/AUX/example01.dbf';  SET NEWNAME FOR DATAFILE 5 TO '/export/home/oracle/AUX/tools01.dbf';  SET NEWNAME FOR DATAFILE 6 TO '/export/home/oracle/AUX/users01.dbf';  SET NEWNAME FOR DATAFILE 7 TO '/export/home/oracle/AUX/logmnrts.dbf';  SET NEWNAME FOR DATAFILE 8 TO '/export/home/oracle/AUX/marius01.dbf';  DUPLICATE TARGET DATABASE TO AUX  SKIP TABLESPACE indx  LOGFILE  GROUP 1 ('/export/home/oracle/AUX/redo01a.log',           '/export/home/oracle/AUX/redo01b.log') SIZE 10M REUSE,  GROUP 2 ('/export/home/oracle/AUX/redo02a.log',           '/export/home/oracle/AUX/redo02b.log') SIZE 10M REUSE;}&lt;br /&gt;&lt;br /&gt;And this is what is going on:&lt;br /&gt;&lt;br /&gt;executing command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting Duplicate Db at 31-JAN-03using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3Datafile 4 skipped by requestprinting stored script: Memory Script{set until scn 5968565;set newname for datafile 1 to"/export/home/oracle/AUX/system01.dbf";set newname for datafile 2 to"/export/home/oracle/AUX/undotbs01.dbf";set newname for datafile 3 to"/export/home/oracle/AUX/example01.dbf";set newname for datafile 5 to"/export/home/oracle/AUX/tools01.dbf";set newname for datafile 6 to"/export/home/oracle/AUX/users01.dbf";set newname for datafile 7 to"/export/home/oracle/AUX/logmnrts.dbf";set newname for datafile 8 to"/export/home/oracle/AUX/marius01.dbf";restorecheck readonlyclone databaseskip tablespace INDX ;}executing script: Memory Scriptexecuting command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting restore at 31-JAN-03using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3channel ORA_AUX_DISK_1: starting datafile backupset restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setrestoring datafile 00001 to /export/home/oracle/AUX/system01.dbfrestoring datafile 00003 to /export/home/oracle/AUX/example01.dbfrestoring datafile 00007 to /export/home/oracle/AUX/logmnrts.dbfchannel ORA_AUX_DISK_2: starting datafile backupset restorechannel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup setrestoring datafile 00002 to /export/home/oracle/AUX/undotbs01.dbfrestoring datafile 00005 to /export/home/oracle/AUX/tools01.dbfrestoring datafile 00006 to /export/home/oracle/AUX/users01.dbfrestoring datafile 00008 to /export/home/oracle/AUX/marius01.dbfchannel ORA_AUX_DISK_1: restored backup piece 1piece handle=/u01/app/oracle/admin/R920/backup/DB_R920_01ee3suk_1_1 tag=TAG2003129T104747 params=NULLchannel ORA_AUX_DISK_1: restore completechannel ORA_AUX_DISK_2: restored backup piece 1piece handle=/u01/app/oracle/admin/R920/backup/DB_R920_02ee3suk_1_1 tag=TAG2003129T104747 params=NULLchannel ORA_AUX_DISK_2: restore completeFinished restore at 31-JAN-03sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOGMAXLOGFILES 5MAXLOGMEMBERS 3MAXDATAFILES 100MAXINSTANCES 1MAXLOGHISTORY 226LOGFILEGROUP 1 ( '/export/home/oracle/AUX/redo01a.log', '/export/home/oracle/AUX/reo01b.log' ) SIZE 10m REUSE,GROUP 2 ( '/export/home/oracle/AUX/redo02a.log', '/export/home/oracle/AUX/reo02b.log' ) SIZE 10m REUSEDATAFILE'/export/home/oracle/AUX/system01.dbf'CHARACTER SET WE8ISO8859P1printing stored script: Memory Script{switch clone datafile all;}executing script: Memory Scriptdatafile 2 switched to datafile copyinput datafilecopy recid=1 stamp=484764999 filename=/export/home/oracle/AUX/undotbs01.dbfdatafile 3 switched to datafile copyinput datafilecopy recid=2 stamp=484764999 filename=/export/home/oracle/AUX/example01.dbfdatafile 5 switched to datafile copyinput datafilecopy recid=3 stamp=484764999 filename=/export/home/oracle/AUX/toors01.dbfdatafile 6 switched to datafile copyinput datafilecopy recid=4 stamp=484764999 filename=/export/home/oracle/AUX/users01.dbfdatafile 7 switched to datafile copyinput datafilecopy recid=5 stamp=484764999 filename=/export/home/oracle/AUX/logmnrts.dbfdatafile 8 switched to datafile copyinput datafilecopy recid=6 stamp=484764999 filename=/export/home/oracle/AUX/marius01.dbfprinting stored script: Memory Script{set until time "to_date('Jan 29 2003 10:50:00','Mon DD YYYY HH24:MI:SS')";recoverclone databasedelete archivelog;}executing script: Memory Scriptexecuting command: SET until clauseStarting recover at 31-JAN-03using channel ORA_AUX_DISK_1using channel ORA_AUX_DISK_2using channel ORA_AUX_DISK_3datafile 4 not processed because file is offlinestarting media recoverychannel ORA_AUX_DISK_1: starting archive log restore to default destinationchannel ORA_AUX_DISK_1: restoring archive logarchive log thread=1 sequence=43channel ORA_AUX_DISK_1: restored backup piece 1piece handle=/u01/app/oracle/admin/R920/backup/AL_R920_03ee4185_1_1 tag=TAG2003129T120109 params=NULLchannel ORA_AUX_DISK_1: restore completearchive log filename=/u01/app/oracle/product/9.2.0/dbs/arch1_43.dbf thread=1 seuence=43channel clone_default: deleting archive log(s)archive log filename=/u01/app/oracle/product/9.2.0/dbs/arch1_43.dbf recid=1 stap=484765017media recovery completeFinished recover at 31-JAN-03printing stored script: Memory Script{shutdown clone;startup clone nomount ;}executing script: Memory Scriptdatabase dismountedOracle instance shut downconnected to auxiliary database (not started)Oracle instance startedTotal System Global Area 52167600 bytesFixed Size 730032 bytesVariable Size 50331648 bytesDatabase Buffers 819200 bytesRedo Buffers 286720 bytessql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOGMAXLOGFILES 5MAXLOGMEMBERS 3MAXDATAFILES 100MAXINSTANCES 1MAXLOGHISTORY 226LOGFILEGROUP 1 ( '/export/home/oracle/AUX/redo01a.log', '/export/home/oracle/AUX/reo01b.log' ) SIZE 10m REUSE,GROUP 2 ( '/export/home/oracle/AUX/redo02a.log', '/export/home/oracle/AUX/reo02b.log' ) SIZE 10m REUSEDATAFILE'/export/home/oracle/AUX/system01.dbf'CHARACTER SET WE8ISO8859P1printing stored script: Memory Script{catalog clone datafilecopy "/export/home/oracle/AUX/undotbs01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/example01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/tools01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/users01.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/logmnrts.dbf";catalog clone datafilecopy "/export/home/oracle/AUX/marius01.dbf";switch clone datafile all;}executing script: Memory Scriptcataloged datafile copydatafile copy filename=/export/home/oracle/AUX/undotbs01.dbf recid=1 stamp=48475037cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/example01.dbf recid=2 stamp=48475038cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/tools01.dbf recid=3 stamp=48476539cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/users01.dbf recid=4 stamp=48476539cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/logmnrts.dbf recid=5 stamp=48476039cataloged datafile copydatafile copy filename=/export/home/oracle/AUX/marius01.dbf recid=6 stamp=48476039datafile 2 switched to datafile copyinput datafilecopy recid=1 stamp=484765037 filename=/export/home/oracle/AUX/undotbs01.dbfdatafile 3 switched to datafile copyinput datafilecopy recid=2 stamp=484765038 filename=/export/home/oracle/AUX/example01.dbfdatafile 5 switched to datafile copyinput datafilecopy recid=3 stamp=484765039 filename=/export/home/oracle/AUX/tools01.dbfdatafile 6 switched to datafile copyinput datafilecopy recid=4 stamp=484765039 filename=/export/home/oracle/AUX/users01.dbfdatafile 7 switched to datafile copyinput datafilecopy recid=5 stamp=484765039 filename=/export/home/oracle/AUX/logmnrts.dbfdatafile 8 switched to datafile copyinput datafilecopy recid=6 stamp=484765039 filename=/export/home/oracle/AUX/marius01.dbfprinting stored script: Memory Script{Alter clone database open resetlogs;}executing script: Memory Scriptdatabase openedprinting stored script: Memory Script{# drop offline and skipped tablespacessql clone "drop tablespace INDX including contents";}executing script: Memory Scriptsql statement: drop tablespace INDX including contentsFinished Duplicate Db at 31-JAN-03RMAN&gt;&lt;br /&gt;&lt;br /&gt;References&lt;br /&gt;NOTE:259694.1 - Oracle10G RMAN Database Duplication&lt;br /&gt;Oracle9i Recovery Manager User's Guide Release 2 (9.2) Part Number A96566-01&lt;br /&gt;Chap 12 Duplicating a Database with Recovery Manager&lt;br /&gt;NOTE:452868.1 - RMAN 'Duplicate Database' Feature in 11G&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2621027477756791149-2899156935019450923?l=javeedkaleem.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javeedkaleem.blogspot.com/feeds/2899156935019450923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2621027477756791149&amp;postID=2899156935019450923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2899156935019450923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2621027477756791149/posts/default/2899156935019450923'/><link rel='alternate' type='text/html' href='http://javeedkaleem.blogspot.com/2010/01/applies-to-oracle-server-enterprise.html' title=''/><author><name>javeedkaleem</name><uri>http://www.blogger.com/profile/11217855190043587883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/-l4ncrZXwzro/TbHX1LZ5cCI/AAAAAAAAAGM/pZUgwn9wVBs/s220/DSC00385.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2621027477756791149.post-2500517765480913039</id><published>2010-01-31T22:47:00.000-08:00</published><updated>2010-01-31T23:43:43.777-08:00</updated><title type='text'>Use RMAN to copy/clone a database(How To Restore Rman Backups On A Different Node When The Directory Structures Are Different)</title><content type='html'>The goal is restoring a database using RMAN on a different node with different backup directory structures and different database directory structures:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- You have a database backed up on NODE 1.&lt;br /&gt;- You need to restore the database on NODE 2. &lt;br /&gt;- The directory structure is different on NODE 2.&lt;br /&gt;- You need to put the backups in a new directory structure in NODE 2, unlike as they were in NODE 1.&lt;br /&gt;- You need to restore the database files into a new directory structure in NODE 2, unlike as they were in NODE 1.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Solution&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Below is the procedure with an example of using RMAN to copy a database to another directory:&lt;br /&gt;&lt;br /&gt;1) Connect to the target database using rman and backup the database ---&gt; ON NODE 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$ rman target / &lt;br /&gt;&lt;br /&gt;Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:29:33 2007 &lt;br /&gt;Copyright (c) 1982, 2005, Oracle. All rights reserved. &lt;br /&gt;connected to target database: ORA10G (DBID=3932056136) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN&gt; backup database plus archivelog; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Starting backup at 13-FEB-07 &lt;br /&gt;current log archived &lt;br /&gt;using channel ORA_DISK_1 &lt;br /&gt;channel ORA_DISK_1: starting archive log backupset &lt;br /&gt;channel ORA_DISK_1: specifying archive log(s) in backup set &lt;br /&gt;input archive log thread=1 sequence=143 recid=109 stamp=614392105 &lt;br /&gt;channel ORA_DISK_1: starting piece 1 at 13-FEB-07 &lt;br /&gt;channel ORA_DISK_1: finished piece 1 at 13-FEB-07 &lt;br /&gt;piece handle=/node1/database/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds &lt;br /&gt;_.bkp tag=TAG20070213T002825 comment=NONE &lt;br /&gt;channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02 &lt;br /&gt;Finished backup at 13-FEB-07 &lt;br /&gt;&lt;br /&gt;Starting backup at 13-FEB-07 &lt;br /&gt;using channel ORA_DISK_1 &lt;br /&gt;channel ORA_DISK_1: starting full datafile backupset &lt;br /&gt;channel ORA_DISK_1: specifying datafile(s) in backupset &lt;br /&gt;input datafile fno=00003 name=/node1/database/prod/sysaux01.dbf &lt;br /&gt;input datafile fno=00001 name=/node1/database/prod/system01.dbf &lt;br /&gt;input datafile fno=00002 name=/node1/database/prod/undotbs01.dbf &lt;br /&gt;input datafile fno=00004 name=/node1/database/prod/users01.dbf &lt;br /&gt;input datafile fno=00005 name=/node1/database/prod/1.dbf &lt;br /&gt;input datafile fno=00006 name=/node1/database/prod/sysaux02.dbf &lt;br /&gt;input datafile fno=00007 name=/node1/database/prod/undotbs02.dbf &lt;br /&gt;channel ORA_DISK_1: starting piece 1 at 13-FEB-07 &lt;br /&gt;channel ORA_DISK_1: finished piece 1 at 13-FEB-07 &lt;br /&gt;piece handle=/node1/database/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12 &lt;br /&gt;_.bkp tag=TAG20070213T002827 comment=NONE &lt;br /&gt;channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55 &lt;br /&gt;Finished backup at 13-FEB-07 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Starting backup at 13-FEB-07 &lt;br /&gt;current log archived &lt;br /&gt;using channel ORA_DISK_1 &lt;br /&gt;channel ORA_DISK_1: starting archive log backupset &lt;br /&gt;channel ORA_DISK_1: specifying archive log(s) in backup set &lt;br /&gt;input archive log thread=1 sequence=144 recid=110 stamp=614392165 &lt;br /&gt;channel ORA_DISK_1: starting piece 1 at 13-FEB-07 &lt;br /&gt;channel ORA_DISK_1: finished piece 1 at 13-FEB-07 &lt;br /&gt;piece handle=/node1/database/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty &lt;br /&gt;_.bkp tag=TAG20070213T002925 comment=NONE &lt;br /&gt;channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02 &lt;br /&gt;Finished backup at 13-FEB-07 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Starting Control File and SPFILE Autobackup at 13-FEB-07 &lt;br /&gt;piece handle=/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02 comment=NONE &lt;br /&gt;Finished Control File and SPFILE Autobackup at 13-FEB-07 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN&gt; exit&lt;br /&gt;  2) Move the following files to the NODE 2:+ The database backup pieces to location '/node2/database/backup' &lt;br /&gt;+ Controlfile backup piece to the location '/node2/database/backup' &lt;br /&gt;+ The parameter file i.e init.ora file to the default location i.e $ORACLE_HOME/dbs&lt;br /&gt;&lt;br /&gt;3) Edit the PFILE on NODE 2 to change the environment specific parameters like . &lt;br /&gt;&lt;br /&gt;user_dump_dest =  &lt;br /&gt;background_dump_dest = &lt;br /&gt;control_files =&lt;br /&gt;&lt;br /&gt;4) Once the PFILE is suitably modified invoke Rman on the NODE 2 after setting the Oracle environment variables and start the database in nomount mode:   [oracle@test-br test]$ export ORACLE_HOME=/u01/oracle/product/ora10g &lt;br /&gt;[oracle@test-br test]$ export ORACLE_SID=ora10g &lt;br /&gt;[oracle@test-br test]$ export PATH=$ORACLE_HOME/bin:$PATH &lt;br /&gt;[oracle@test-br test]$ rman target / &lt;br /&gt;Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:36:55 2007 &lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved. &lt;br /&gt;connected to target database (not started) &lt;br /&gt;RMAN&gt; startup nomount &lt;br /&gt;Oracle instance started &lt;br /&gt;Total System Global Area     205520896 bytes &lt;br /&gt;Fixed Size                     1218508 bytes &lt;br /&gt;Variable Size                 75499572 bytes &lt;br /&gt;Database Buffers             121634816 bytes &lt;br /&gt;Redo Buffers                   7168000 bytes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5) Restore the controlfile from the backup piece. &lt;br /&gt;&lt;br /&gt;RMAN&gt; restore controlfile from  '/node2/database/backup/c-3932056136-20070213-02';  &lt;br /&gt;Starting restore at 13-FEB-07  &lt;br /&gt;using target database control file instead of recovery catalog  &lt;br /&gt;allocated channel: ORA_DISK_1  &lt;br /&gt;channel ORA_DISK_1: sid=155 devtype=DISK  &lt;br /&gt;channel ORA_DISK_1: restoring control file  &lt;br /&gt;channel ORA_DISK_1: restore complete,  &lt;br /&gt;elapsed time: 00:00:02  &lt;br /&gt;output filename=/node2/database/prod/control01.ctl  &lt;br /&gt;Finished restore at 13-FEB-07  &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;6) Mount the database&lt;br /&gt;&lt;br /&gt;RMAN &gt; alter database mount      &lt;br /&gt;      &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;7) Now catalog the backup pieces that were shipped from NODE 1&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN&gt; catalog backuppiece '/node2/database/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty_.bkp'; &lt;br /&gt;&lt;br /&gt;RMAN&gt; catalog backuppiece '/node2/database/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp'; &lt;br /&gt;&lt;br /&gt;RMAN&gt; catalog backuppiece '/node2/database/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp'; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;This feature of cataloging backup pieces is available from ORACLE 10g versions. Prior to Oracle 10g we were not able to catalog the backup pieces. For more information on cataloging options refer the metalink note 470463.1                 &lt;br /&gt;&lt;br /&gt;8) Get to know the last sequence available in the archivelog backup using the following command.This will help us in recovering the database till that archivelog.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN &gt; list backup of archivelog all;&lt;br /&gt;Let us assume the last sequence of last archivelog in the backup is 50.  &lt;br /&gt;          &lt;br /&gt;9) Rename the Redologfiles,so that they can be created in new locations when opened the database is opened in resetlogs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; 
