<?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-3628226979394017176</id><updated>2012-02-16T09:54:17.193Z</updated><category term='metalink'/><category term='list patches'/><category term='DGMGRL'/><category term='statspack'/><category term='Oracle technical workshop'/><category term='V$SQL'/><category term='documentation'/><category term='filesystemio_options'/><category term='ORA-07445'/><category term='Fire'/><category term='SESSION_CACHED_CURSORS'/><category term='shared pool'/><category term='undo_retention'/><category term='sqlplus'/><category term='additional uses'/><category term='upgrade'/><category term='run the same command many times'/><category term='10g'/><category term='SCN'/><category term='SIGSEGV'/><category term='ORA-1000'/><category term='CLOB'/><category term='Real Application Testing'/><category term='Locking schema statistics'/><category term='Idle wait events'/><category term='Effective Oracle by Design'/><category term='v$dataguard_stats'/><category term='RAC'/><category term='profiles'/><category term='V$event_name'/><category term='11g'/><category term='ORA-01555'/><category term='manage 9i with Grid Control'/><category term='logons per minute'/><category term='performance'/><category term='system hang'/><category term='pfile'/><category term='list CPU'/><category term='V$undostat'/><category term='Data guard wait events'/><category term='Enterprise Manager'/><category term='Data guard Broker'/><category term='sub pool'/><category term='release date'/><category term='display interconnect'/><category term='undo'/><category term='x$kghlu'/><category term='STATS$IDLE_EVENT'/><category term='init.cssd'/><category term='go faster'/><category term='parameters'/><category term='Flashback'/><category term='move'/><category term='Archive log mode'/><category term='Oracle 10g RAC'/><category term='Oracle Virtualization'/><category term='VMware'/><category term='software'/><category term='segment'/><category term='OUI'/><category term='9i Enterprise Manager'/><category term='hang analysis'/><category term='logins per minute'/><category term='v$MYSTAT'/><category term='snapshot too old'/><category term='End-of-file on Communication Channel'/><category term='11g RAT'/><category term='ORA-01031'/><category term='transaction rollbacks'/><category term='GATHER_STATS_JOB'/><category term='11g Real Application Testing'/><category term='password verify function'/><category term='import'/><category term='ORA-04031'/><category term='_kghdsidx_count'/><category term='DBMS_REDEFINITION'/><category term='ORA-03113'/><category term='9i'/><category term='speed up'/><category term='London'/><category term='export'/><category term='Oracle'/><category term='oralce'/><category term='automatic backup'/><category term='redefine online'/><category term='OPEN_CURSORS'/><category term='System Change Number'/><category term='control file'/><category term='logins per second'/><category term='download'/><category term='CPU'/><category term='Oracle technical workshops'/><category term='technet'/><category term='shell'/><category term='init.ora'/><category term='V$STATNAME'/><category term='automate'/><category term='background'/><category term='DBMS_STATS'/><category term='10.2.0.4.0'/><category term='dataguard'/><category term='oracle 11g'/><category term='find out interconnect'/><category term='NETWORK_LINK'/><category term='DBA_REGISTRY_HISTORY'/><category term='Archivelog'/><category term='user rollbacks'/><category term='spfile'/><category term='ORA-02095'/><category term='brain trick'/><category term='ORA-38754'/><category term='Flashback database'/><category term='high availability'/><category term='Enterprise Linux'/><category term='list patches applied'/><category term='ORA-16072'/><category term='RMAN'/><category term='Datapump'/><category term='10i'/><category term='faster'/><category term='ROWS_PROCESSED'/><category term='Moorgate'/><category term='Christmas fun'/><category term='Oracle wait events'/><category term='standby_file_management'/><category term='Install'/><category term='direct io'/><category term='Linux'/><category term='standby database'/><category term='real time apply'/><category term='index'/><category term='10g to 11g'/><category term='locking issues'/><category term='Oracle VM'/><category term='database black box approach'/><category term='10g Real Application Testing'/><category term='11g cost'/><category term='data guard'/><category term='logons per second'/><category term='database profile'/><title type='text'>Oracle Snapshot</title><subtitle type='html'>Hints and tips for DBA's around the world</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://orasnap.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-8183897003286375479</id><published>2008-08-28T00:14:00.019+01:00</published><updated>2008-08-28T00:59:34.165+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ROWS_PROCESSED'/><category scheme='http://www.blogger.com/atom/ns#' term='V$SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>V$SQL</title><content type='html'>We are told that all of the V$ database views are dynamic, so this one is fairly obvious but very handy. Lets say we have a situation where, for example, somebody has kicked off a monster SELECT statement and you need to know how far the query has got. One way of checking is via the V$SQL view where it turns out that the ROWS_PROCESSED column is updated real time.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_XkQ10xmV9PA/SLXpmsHTzbI/AAAAAAAAAPs/knh041dyW88/s1600-h/V%24SQL.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5239350592401558962" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_XkQ10xmV9PA/SLXpmsHTzbI/AAAAAAAAAPs/knh041dyW88/s400/V%24SQL.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So here, we can see that by running this query several times we can track the number of rows processes (returned) by the SQL in question. If you have up to date optimizer stats, you can compare this against NUM_ROWS column from DBA_TABLES to see how far the query has to run before completion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-8183897003286375479?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8183897003286375479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8183897003286375479'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/08/vsql.html' title='V$SQL'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_XkQ10xmV9PA/SLXpmsHTzbI/AAAAAAAAAPs/knh041dyW88/s72-c/V%24SQL.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-8469495834623454047</id><published>2008-08-10T22:16:00.018+01:00</published><updated>2008-08-18T23:23:20.083+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DGMGRL'/><category scheme='http://www.blogger.com/atom/ns#' term='Data guard Broker'/><category scheme='http://www.blogger.com/atom/ns#' term='data guard'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Controlling Data Guard with DGMGRL.</title><content type='html'>The obvious benefit of Dataguard Broker is the ease of which switchover and failover operations can be performed. The other benefits include managing Data Guard operations via Grid Control plus the general reporting features. Having said that, a lot of DBA's (including myself) still like to use the command line interface to manage our databases. With that in mind, here is a quick guide to the most common commands used to manage Standby and Primary databases via the Data Guard Broker DGMGRL command line tool.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Manage the database state.&lt;/span&gt;&lt;br /&gt;Your Dataguard configuration will consist of a Primary database and of course one or more Standby databases. For my setup, I have the following databases in place. Obviously your going to have to substitute your own database names in here:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;1 x Primary Oracle database:&lt;/span&gt; "ORCL_DG1"&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;1 x Standby Oracle database:&lt;/span&gt; "ORCL_DG2"&lt;br /&gt;&lt;br /&gt;Once up and running, DG Broker Primary databases can be in one of the following known states:&lt;br /&gt;&lt;br /&gt;"ONLINE", "OFFLINE" or "LOG-TRANSPORT-OFF".&lt;br /&gt;&lt;br /&gt;The Standby can also be deemed either:&lt;br /&gt;&lt;br /&gt;"READ-ONLY", "OFFLINE", "ONLINE" or "LOG-APPLY-OFF ".&lt;br /&gt;&lt;br /&gt;At some point, you will need to switch either the Primary or Standby states or settings:&lt;br /&gt;&lt;br /&gt;To shut down the Standby, and alter the Primary's transportation settings to reflect:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; edit database 'ORCL_DG2' set state='OFFLINE'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To Shut down the Primary database:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; edit database 'ORCL_DG1' set state='OFFLINE';&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To open the Standby database in READ ONLY mode:&lt;span style="FONT-WEIGHT: bold"&gt;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; edit database 'ORCL_DG1' set state='READ-ONLY'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To switch the Standby database back to online recovery mode:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; edit database 'ORCL_DG2' set state='ONLINE'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To switch off Redo Transportation from the Primary to the Standby:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; edit database 'ORCL_DG1' set state='LOG-TRANSPORT-OFF'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To switch redo transportation back on:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; edit database 'ORCL_DG1' set state='ONLINE'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To edit specific database properties, for example, set the database archive lag target:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; edit database 'ORCL_DG1' set property 'ArchiveLagTarget'=1200&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To disable the entire broker configuration:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; disable configuration&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;To enable the entire configuration:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; enable &lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt;configuration&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Dataguard reporting.&lt;/span&gt;&lt;br /&gt;One thing I do like about Dataguard broker is its reporting capabilities. By default, Grid Control provides some great graphs for visualising performance and configuration. In addition, DGMGRL provides some pretty helpful detail too:&lt;br /&gt;&lt;br /&gt;To view the basic broker configuration:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show configuration;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;To view basic detail about a specific database in the configuration:&lt;span style="FONT-WEIGHT: bold"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database ORCL_DG1&lt;/span&gt;;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database ORCL_DG2;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;/span&gt;To view in depth detail about a specific database and its current state:&lt;span style="FONT-WEIGHT: bold"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database verbose ORCL_DG1&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database verbose ORCL_DG2;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;To display the current status and any configuration errors:&lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show database 'ORCL_DG1' StatusReport;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database 'ORCL_DG2' StatusReport;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To provide detail of transportation and apply operations, state and any delays:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database 'ORCL_DG1' SendQEntries&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database 'ORCL_DG2' RecvQEntries;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To view the current database Top Wait Events:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database 'ORCL_DG1' TopWaitEvents;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; show database 'ORCL_DG2' TopWaitEvents;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Role reversal / failover.&lt;/strong&gt;&lt;br /&gt;Hopefully, you will not need to perform too many of these, but if you do, then the commands are pretty straight forward (which is what we need!):&lt;br /&gt;&lt;br /&gt;To perform a Role Reversal:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; switchover to 'ORCL_DG2';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To perform a Failover:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;DGMGRL&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;failover&lt;/span&gt; to '&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ORCL&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;DG&lt;/span&gt;2';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Getting help.&lt;/strong&gt;&lt;br /&gt;Aside from the manuals, help can be provided by the aptly named &lt;span style="FONT-WEIGHT: bold"&gt;HELP&lt;/span&gt; command. Apart from using it to look up all of that lengthy syntax, I find a combination of the help command plus cut and paste is a good way to avoid any &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;DGMGRL&lt;/span&gt; related RSI problems....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-8469495834623454047?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8469495834623454047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8469495834623454047'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/08/controlling-data-guard-with-dgmgrl.html' title='Controlling Data Guard with DGMGRL.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-5985451214908630313</id><published>2008-07-23T22:44:00.010+01:00</published><updated>2008-07-23T23:32:49.110+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBMS_STATS'/><category scheme='http://www.blogger.com/atom/ns#' term='Locking schema statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='GATHER_STATS_JOB'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Locking schema statistics.</title><content type='html'>One nice Oracle 10g feature is automatic optimizer statistics gathering.&lt;br /&gt;&lt;br /&gt;Out of the box, by calling the GATHER_STATS_JOB during maintenance windows Oracle gathers fresh optimizer statistics for tables where it deems that the current statistics are "stale" (statistics are labelled stale once 10% or more of underlying table rows have been modified in some way). Overall, this is pretty neat. You can even modify the maintenance window start / stop times via Grid Control to suit your specific needs.&lt;br /&gt;&lt;br /&gt;However, what about if you want Oracle to perform this automatic statistics gathering for all but a few of your database tables? You may have a few special cases that get loaded / truncated at certain times and therefore &lt;em&gt;you&lt;/em&gt; wish to control statistics gathering at certain times, based on your application requirements.&lt;br /&gt;&lt;br /&gt;Luckily, the DBMS_STATS package allows us to lock statistics for specific tables or even an entire schema. If you are interested in this, then take a look at the following procedures:&lt;br /&gt;&lt;br /&gt;DBMS_STATS.LOCK_SCHEMA_STATS&lt;br /&gt;DBMS_STATS.LOCK_TABLE_STATS&lt;br /&gt;DBMS_STATS.UNLOCK_SCHEMA_STATS&lt;br /&gt;DBMS_STATS.UNLOCK_TABLE_STATS&lt;br /&gt;&lt;br /&gt;DBMS_STATS allows you (the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DBA&lt;/span&gt; or Developer) to unlock a table(s) statistics, gather fresh statistics and then finally lock them up again.&lt;br /&gt;&lt;br /&gt;With this kind of approach, the GATHER_STATS_JOB job will automatically gather statistics for most of your database tables, but skip the ones with the locked statistics. This can help protect against any unwanted statistic related performance surprises, &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;something&lt;/span&gt; I am always keen to avoid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-5985451214908630313?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5985451214908630313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5985451214908630313'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/07/locking-schema-statistics.html' title='Locking schema statistics.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-930641416890825369</id><published>2008-07-14T21:15:00.013+01:00</published><updated>2008-07-14T23:03:53.032+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data guard wait events'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle wait events'/><category scheme='http://www.blogger.com/atom/ns#' term='V$event_name'/><category scheme='http://www.blogger.com/atom/ns#' term='STATS$IDLE_EVENT'/><category scheme='http://www.blogger.com/atom/ns#' term='Idle wait events'/><title type='text'>Wait event classifications.</title><content type='html'>This mini investigation stemmed from a discussion I was having the other day with one of my DBA colleagues:&lt;br /&gt;&lt;br /&gt;"Can any of the Data Guard wait events be classified as Idle ?"&lt;br /&gt;&lt;br /&gt;Oracle 10g has a total of 878 wait events. Further more, each wait event has been assigned to one of the following classification groups:&lt;br /&gt;&lt;br /&gt;Concurrency&lt;br /&gt;System I/O&lt;br /&gt;User I/O&lt;br /&gt;Administrative&lt;br /&gt;Other&lt;br /&gt;Configuration&lt;br /&gt;Scheduler&lt;br /&gt;Cluster&lt;br /&gt;Application&lt;br /&gt;Idle&lt;br /&gt;Network&lt;br /&gt;&lt;br /&gt;The data dictionary view, V$EVENT_NAME provides us with all of the wait event names and their related group information. So, to list all of the "Idle" events, we can issue the following SQL:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SELECT name FROM v$event_name&lt;br /&gt;WHERE wait_class='Idle';&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As it turns out, there are 62 Idle events, three of which are related to Data Guard:&lt;br /&gt;&lt;br /&gt;LNS ASYNC archive log,&lt;br /&gt;LNS ASYNC dest activation,&lt;br /&gt;LNS ASYNC end of log.&lt;br /&gt;&lt;br /&gt;Of the 810 remaining "non-Idle" events, just one is classified as "Commit" (log file sync), 590 are classified as "Other" and finally, the most painful sounding is the RAC related "Wait for split-brain resolution" - ouch!&lt;br /&gt;&lt;br /&gt;As a side note, Oracle 9i does not have wait event classifications defined by the database itself. However, the Statspack utility does provide similar detail via its STATS$IDLE_EVENT lookup table (which is typically owned by the Perfstat user).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-930641416890825369?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/930641416890825369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/930641416890825369'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/07/wait-events.html' title='Wait event classifications.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-2521630061891815789</id><published>2008-07-01T22:38:00.027+01:00</published><updated>2008-07-02T18:41:31.613+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='locking issues'/><category scheme='http://www.blogger.com/atom/ns#' term='hang analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='system hang'/><title type='text'>Enterprise Manager Hang analysis.</title><content type='html'>In the past, I have seen database locking cause very serious problems. In several cases, databases have become unusable as hundreds of sessions hang, waiting on one or more culprits who are holding a lock on an application "master" table. As a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DBA&lt;/span&gt;, you need to delve in quickly and work out what is going on as soon as possible. I normally have a bunch of hand written "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;DBA&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;SQL&lt;/span&gt;" scripts ready to use for such occasions. However, there is another (in my opinion, better) approach, the Grid Control "Hang Analysis" page.&lt;br /&gt;&lt;br /&gt;Firstly, things have improved over the last few years with this issue in mind. Grid Control can alert us when locking/blocking thresholds are hit. However with the Hang Analysis page, we can quickly see which user session is holding the lock and take action.&lt;br /&gt;&lt;br /&gt;To access the Hang Analysis page, connect up to Grid Control, select the database in question, and then select the Performance tab. Scroll to the bottom of the screen and you will find the link &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;labeled&lt;/span&gt; "Hang Analysis". When all is good with your system, the page will look fairly plain and boring:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_XkQ10xmV9PA/SGqlfSZrLGI/AAAAAAAAANs/IIPpyKEk5gE/s1600-h/HA_1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5218165075196193890" style="CURSOR: hand" height="190" alt="" src="http://1.bp.blogspot.com/_XkQ10xmV9PA/SGqlfSZrLGI/AAAAAAAAANs/IIPpyKEk5gE/s400/HA_1.JPG" width="400" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, if you have a locking issue on your hands, then you will begin to see the page (which is automatically refreshed) provide details of the session holding the lock, plus all of those waiting:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_XkQ10xmV9PA/SGqmcUts-dI/AAAAAAAAAN0/JjeDNgroU0c/s1600-h/HA_2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5218166123789089234" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_XkQ10xmV9PA/SGqmcUts-dI/AAAAAAAAAN0/JjeDNgroU0c/s400/HA_2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here, we can see that SID 132 is causing all of our problems and the victims are 149,131,136 and 134 - they are just waiting for 132 to release his/her/its lock(s) before they can continue processing.&lt;br /&gt;&lt;br /&gt;At this stage, the Hang Analysis page will highlight the sessions in green, yellow or red. Red being the most serious situation (meaning the sessions are actually hung). At this point, we can click on the red blocker icon for SID 132 and gain the detail we really need and take some action:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_XkQ10xmV9PA/SGqn-WjIKDI/AAAAAAAAAN8/-XKC7wrBslQ/s1600-h/HA_3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5218167807908784178" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 186px" height="140" alt="" src="http://2.bp.blogspot.com/_XkQ10xmV9PA/SGqn-WjIKDI/AAAAAAAAAN8/-XKC7wrBslQ/s400/HA_3.JPG" width="400" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We can click on "View Session Details" to find out a extra myriad of detail such as DB User Name, OS Process &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;ID's&lt;/span&gt;, Wait States etc:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_XkQ10xmV9PA/SGqo8FMN3vI/AAAAAAAAAOE/Fk_cH3uepHk/s1600-h/HA_4.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5218168868401176306" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_XkQ10xmV9PA/SGqo8FMN3vI/AAAAAAAAAOE/Fk_cH3uepHk/s400/HA_4.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally, by clicking on "Previous &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;SQL&lt;/span&gt;" link we can see what on earth our blocker is running:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_XkQ10xmV9PA/SGqpiHwiM2I/AAAAAAAAAOM/IvbZZKPgElk/s1600-h/HA_5.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5218169521925403490" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_XkQ10xmV9PA/SGqpiHwiM2I/AAAAAAAAAOM/IvbZZKPgElk/s400/HA_5.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Having looked at all of that useful information, we can now either call up our user and politely ask them to commit or rollback. More than likely though, if your database has ground to a halt, then return to the previous screen and hit the big nice "Kill Session" button. Most useful!&lt;br /&gt;&lt;br /&gt;Now whoever said that us &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;DBA's&lt;/span&gt; aren't a ruthless bunch!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-2521630061891815789?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2521630061891815789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2521630061891815789'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/07/enterprise-manager-hang-analysis.html' title='Enterprise Manager Hang analysis.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_XkQ10xmV9PA/SGqlfSZrLGI/AAAAAAAAANs/IIPpyKEk5gE/s72-c/HA_1.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-3078813644589699515</id><published>2008-06-16T00:36:00.017+01:00</published><updated>2008-06-20T15:31:11.331+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database black box approach'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Effective Oracle by Design'/><title type='text'>The database black box.</title><content type='html'>This has to be one of the craziest setups I have heard of in a while...&lt;br /&gt;&lt;br /&gt;One of my developer mates was telling me about a new company he is working for and predictably, I had to ask him which database system they are using. As it turns out, his new shop develops under Microsoft SQL Server, but release into Oracle for production. Wow! Now to me, that's just plain madness! It's also pushing what's known as the "Database Black Box" concept to the limit!&lt;br /&gt;&lt;br /&gt;Now, I could rant on for a few pages here about why you should have some idea of what is actually going on in your databases engine room, but I would rather point you to a great book on the subject, "Effective Oracle by Design", by Tom Kyte.&lt;br /&gt;&lt;br /&gt;As we all know, Tom is a legend in terms Oracle and always provides us with great information and advice. Ultimately, you can take Tom's word for it. Alternatively, you can spend thousands and thousands of Pounds, Euros and Dollars on us DBA's, asking us to come in and solve all of your production performance problems...... Hang on a minute, actually, forget what I said about the book, its erm, just gone out of print.... :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-3078813644589699515?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3078813644589699515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3078813644589699515'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/06/database-black-box.html' title='The database black box.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1329323312123072240</id><published>2008-06-13T00:45:00.015+01:00</published><updated>2008-07-01T22:37:38.424+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORA-1000'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='OPEN_CURSORS'/><title type='text'>ORA-1000 maximum open cursors exceeded.</title><content type='html'>This is a fairly common Oracle error with one easy fix - up the open_cursors parameter limit in your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;init&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ora&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;spfile&lt;/span&gt; and then go get on with something a bit more interesting. By doing this though, you may be masking over possible greater issues which may come back to bite, normally on a Friday afternoon at around 4:30pm.....&lt;br /&gt;&lt;br /&gt;Its always worth delving a little deeper and investigate why the session in question has hit this limit. In the case I was dealing with today, the session in question was running a mass of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;un&lt;/span&gt;-sharable &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;SQL&lt;/span&gt;. In fact it had around 7000 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;SQL&lt;/span&gt; statements stored up in the Shared Pool, all syntactically the same except for the final AND clause.&lt;br /&gt;&lt;br /&gt;Something along the lines of:&lt;br /&gt;&lt;br /&gt;SELECT * FROM &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;apptab&lt;/span&gt; WHERE dept=:B1 and ID=543543&lt;br /&gt;SELECT * FROM &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;apptab&lt;/span&gt; WHERE dept=:B1 and ID=543544&lt;br /&gt;SELECT * FROM &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;apptab&lt;/span&gt; WHERE dept=:B1 and ID=543545&lt;br /&gt;&lt;br /&gt;and so on.&lt;br /&gt;&lt;br /&gt;The fix was easy, implement another bind variable into the code and pass in the literal values on each execution, such as:&lt;br /&gt;&lt;br /&gt;SELECT * FROM &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;apptab&lt;/span&gt; WHERE dept=:B1 and ID=:B2&lt;br /&gt;&lt;br /&gt;However, the main point is that if I had bumped the open_cursors parameter up and beyond 7000, my problem would appear to go away. However the real issue would be left undiscovered,  chewing up and fragmenting my Shared Pool, eventually leading on to those dreaded ORA-04031's.&lt;br /&gt;&lt;br /&gt;Ultimately, that's why I like being a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;DBA&lt;/span&gt; - investigating and digging around is the name of the game - One could almost say its a job where you have to be like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Columbo&lt;/span&gt; (well, almost, perhaps without the dodgy rain coat and cigars).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1329323312123072240?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1329323312123072240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1329323312123072240'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/06/ora-1000-maximum-open-cursors-exceeded.html' title='ORA-1000 maximum open cursors exceeded.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-5720286747672304222</id><published>2008-06-12T01:15:00.010+01:00</published><updated>2008-06-13T00:32:28.425+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-01031'/><title type='text'>Being a DBA = fun!</title><content type='html'>Now and again, something crops up in the life of a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DBA&lt;/span&gt; that makes you grin. This little gem popped up today, and I though it was more than worthy of a quick post.&lt;br /&gt;&lt;br /&gt;I had a developer send a chat message claiming that he was having problems adding a new constraint to a table. "OK" I said, "send me the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;SQL&lt;/span&gt; and the error, and I'll take a look".&lt;br /&gt;&lt;br /&gt;Here's what I got in return:&lt;br /&gt;&lt;br /&gt;INSERT INTO user_constraints VALUES&lt;br /&gt;('&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;GL&lt;/span&gt;_ARCH',&lt;br /&gt;'&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;GL&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;VH&lt;/span&gt;_PK',&lt;br /&gt;'PRIMARY KEY',&lt;br /&gt;'&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;GL&lt;/span&gt;_VERSION_HISTORY',&lt;br /&gt;null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)&lt;br /&gt;&lt;br /&gt;ORA-01031: insufficient privileges&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Erm&lt;/span&gt;, right.... wasn't &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;entirely&lt;/span&gt; sure where to start to answer this one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-5720286747672304222?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5720286747672304222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5720286747672304222'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/06/dba-fun.html' title='Being a DBA = fun!'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-991287312882788773</id><published>2008-06-12T00:50:00.004+01:00</published><updated>2008-06-12T01:13:02.240+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data guard'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-16072'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Dataguard ORA-16072</title><content type='html'>Here's a nice Data Guard gotcha I ran into last week, one worth keeping in mind if you ever have to decommission a Standy database:&lt;br /&gt;&lt;br /&gt;In this situation, the aim was to remove a Standy database as a part of a server decommission. Easy enough I thought to myself, remove the Archive log destination from the Primary, shut down the Standby and delete - job done. Well not quite....&lt;br /&gt;&lt;br /&gt;The following day, the Primary database failed to come back after a cold backup. With the following message in the alert log:&lt;br /&gt;&lt;br /&gt;ORA-16072: a minimum of one standby database destination is required Instance terminated by LGWR&lt;br /&gt;&lt;br /&gt;What a nice surprise!&lt;br /&gt;&lt;br /&gt;Apparently, according to Metalink note 245731.1 this was caused by that fact that there was still some kind of reference in my Primary databases data dictionary, best described by the note itself:&lt;br /&gt;&lt;br /&gt;"The Primary Database has still the Protection Mode stored in the Data Dictionary. The Protection Mode requires a running connection to a Standby Database with LGWR SYNC as Log-Transportation Mode. Since the standby is not available anymore,LGWR of the primary terminates the instance."&lt;br /&gt;&lt;br /&gt;As luck would have it, the fix is pretty straight forward:&lt;br /&gt;&lt;br /&gt;Startup Mount your database,&lt;br /&gt;&lt;br /&gt;Issue the following:&lt;br /&gt;&lt;br /&gt;ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;&lt;br /&gt;&lt;br /&gt;Shutdown your database,&lt;br /&gt;&lt;br /&gt;Start up again.&lt;br /&gt;&lt;br /&gt;There you have it, mystery solved....&lt;br /&gt;&lt;br /&gt;Luckily for me this was in development, so not too much damage done - well accept for a few angry developers who in the end were easily bribed down our local pub....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-991287312882788773?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/991287312882788773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/991287312882788773'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/06/dataguard-ora-16072.html' title='Dataguard ORA-16072'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1131403733677471910</id><published>2008-05-02T17:40:00.006+01:00</published><updated>2008-05-16T23:11:06.092+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORA-02095'/><category scheme='http://www.blogger.com/atom/ns#' term='spfile'/><category scheme='http://www.blogger.com/atom/ns#' term='pfile'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>SPFile vs PFiles</title><content type='html'>Now then, am I one of the few DBA's out there who actually does not like using spfiles ? I was having a discussion about this the other day with one of my DBA chums....&lt;br /&gt;&lt;br /&gt;Obviously, spfiles are the future, we &lt;em&gt;have&lt;/em&gt; to use them now for fancy Oracle options such as Dataguard Broker, but for some reason, I just like being able to view, edit, change and add comments in a text file.&lt;br /&gt;&lt;br /&gt;Further more, this &lt;em&gt;proves&lt;/em&gt; that you cannot live without a good old fashion pfile just yet:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ALTER SYSTEM SET control_files=('/u01/oradata/ORCL/control01.ctl','/u02/oradata/ORCL/control02.ctl') scope = spfile;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;SQL&gt;ORA-02095: specified initialization parameter cannot be modified&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;What's that all about then?&lt;br /&gt;&lt;br /&gt;To my surprise,  values of the control_files parameter cannot be changed directly when you are using an spfile.  Here is a work around:&lt;br /&gt;&lt;br /&gt;1) Create a good old pfile from spfile,&lt;br /&gt;2) Edit the pfile and change / add / delete my Control file locations,&lt;br /&gt;3) Shutdown database,&lt;br /&gt;4) Move / add / delete the physical control files to reflect the required change,&lt;br /&gt;5) Backup the current spfile,&lt;br /&gt;6) Create a new spfile from the pfile,&lt;br /&gt;7) Startup the database.&lt;br /&gt;&lt;br /&gt;Now that's what I call automation :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1131403733677471910?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1131403733677471910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1131403733677471910'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/05/spfile-vs-pfiles.html' title='SPFile vs PFiles'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1574089632814940498</id><published>2008-03-04T22:43:00.007Z</published><updated>2008-03-05T21:49:20.308Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='VMware'/><category scheme='http://www.blogger.com/atom/ns#' term='speed up'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>VMWare speed</title><content type='html'>I am a great fan of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;VMware&lt;/span&gt;, its a excellent product for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;DBA's&lt;/span&gt;. It allows us to create one or more virtual machines for testing and learning current or new Oracle features without any risk. I use it to play about with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Dataguard&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;RAC&lt;/span&gt;, new Oracle versions, Grid Control, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;RMAN&lt;/span&gt;, Partitioning - just about anything is possible. Running it indoors on your home PC (typically with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;XP&lt;/span&gt; as the host O/S) can lead to some challenging &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;performance&lt;/span&gt; issues, so here are my top tips for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;VMWare&lt;/span&gt; speed:&lt;br /&gt;&lt;br /&gt;1) Memory (yes obvious!) the more you have, the faster its gonna run. I have 4GB installed and tend to set each of my Virtual Machines up with 1GB RAM. With this kind of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;config&lt;/span&gt;, you can happily run 3 virtual database servers at the same time. I have found that if you try to run any more than 3 virtual servers, things start to really slow down.&lt;br /&gt;&lt;br /&gt;2) CPU (again, obvious) but with Dual Core and Quad core now coming into play, the more power the better. As a minimum, you really need a top end Pentium 4 to get things going.&lt;br /&gt;&lt;br /&gt;3) Tune your host O/S. Now &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;I'm&lt;/span&gt; no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;XP&lt;/span&gt; expert, but I have found that switching off features such as visual desktop effects can boost performance. At the end of the day, your machine will be spending CPU cycles on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;VMWare&lt;/span&gt; rather than making your mouse pointer arrow look great.&lt;br /&gt;&lt;br /&gt;4) If you do not need your guest O/S to be running X Windows, then switch it off. After installing Oracle and creating my database, I find that setting the default run level to run level 3 really speeds things up. Can't &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;remember&lt;/span&gt; how this is done ? Edit the /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;inittab&lt;/span&gt; file as root, and change the following line:&lt;br /&gt;&lt;br /&gt;from:&lt;br /&gt;&lt;br /&gt;id:5:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;initdefault&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;to:&lt;br /&gt;&lt;br /&gt;id:3:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;initdefault&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;5) If you do need to run X Windows, then run it in full screen mode. Running your virtual machine in a Window seems to slow things down quite a bit.&lt;br /&gt;&lt;br /&gt;6) Strip out *all* unused services from your guest server - be harsh! As root, run system-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;config&lt;/span&gt;-services and strip out everything you do not need. Services such as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;sendmail&lt;/span&gt; (which is installed by default) can really slow your virtual server down, especially on start up. The less services you have running, the more CPU you will have left to play with. Other services to look at include cups, isdn, kudzu, anything nfs related and the rhnsd service to name but a few.&lt;br /&gt;&lt;br /&gt;7) Install &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;VMWare&lt;/span&gt; tools on the guest server. This is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;particularly&lt;/span&gt; good for speeding up X Windows if you just can't live without it.&lt;br /&gt;&lt;br /&gt;8) Finally, once you are happy with your new virtual machine, shut it down and back it up. You can the use this backup "Golden Image" to create brand new virtual machines in the future without having to go through the pain of reinstalling Linux and the Oracle binaries onto your new target server - this can be a real time saver!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1574089632814940498?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1574089632814940498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1574089632814940498'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/03/vmware-speed.html' title='VMWare speed'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1524479698041024358</id><published>2008-02-13T19:28:00.008Z</published><updated>2008-02-23T16:30:54.749Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='user rollbacks'/><category scheme='http://www.blogger.com/atom/ns#' term='statspack'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='transaction rollbacks'/><title type='text'>What type of rollback?</title><content type='html'>&lt;div&gt;Several days back I was investigating a database with a slightly unusual performance issue. It was switching redo log files every minute, sometimes twice a minute, which in Oracle terms, is pretty heavy going. Having run a Statspack report for an hour on this database, something else stood out that I had not seen before.  &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;The database statistic "User Rollbacks" were very low, something like 4 an hour (nothing unusual here), however "Transaction Rollbacks" seemed to be very high, around the 250,000 mark. Finally, user commits running at around 500,000 per hour.  &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;My immediate thoughts on this were that although redo generation was high, a large amount of the database transactions were being rolled back too.  These rollbacks on their own would be generating a whole load of redo.  So, what on earth is the difference between a "User Rollback" and a "Transaction Rollback" ? Surley a rollback is a rollback is a rollback ? Not quite....&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Having taken a look at the database redo log files using Log miner, it became apparent that a large amount of insert were failing due to Primary Key checks.  Basically, this particular database forms a component of a "message bus" system. and, due to application requirements and message flow, the same messages (or inserts in our Oracle terms) can arrive from several different application sources.&lt;br /&gt;&lt;br /&gt;Rather than check to see if the row in question already exists in database with a select statement, the developers of the system had opted to attempt to insert all rows (including the duplicates) and handle the exception of the primary key violations within their PL/SQL code.&lt;br /&gt;&lt;br /&gt;Although the main redo log switch issue is still outstanding here (code being reviewed, redo logs getting resized etc etc) I have learned the meaning of  a  new database statistic:&lt;br /&gt;&lt;br /&gt;a "User Rollback" is recorded when a user issues an explicit  "ROLLBACK" statement. An "Application Rollback" is recorded when Oracle implicitly performs a rollback, either on behalf of internal operations, or due to an INSERT failures due to constraints or other issues such as tables unable to extend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1524479698041024358?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1524479698041024358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1524479698041024358'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2008/02/what-type-of-rollback.html' title='What type of rollback?'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1353852186679801991</id><published>2008-01-04T20:42:00.000Z</published><updated>2008-01-05T12:59:25.108Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='additional uses'/><category scheme='http://www.blogger.com/atom/ns#' term='9i'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='dataguard'/><title type='text'>Dataguard alternatives.</title><content type='html'>Dataguard has to be my favorite Oracle option.  The idea that I have a standby database being kept in sync with my production database gives me an extra level of confidence. Today, Dataguard is becoming very popular, however many small companies avoid it due to cost.&lt;br /&gt;&lt;br /&gt;Dataguard is a feature of Oracle Enterprise Edition. Without going into the depths of Oracle licensing, you are required to license your Standby database by the same method used to license your Primary.  For example, if you are using the per CPU model on your Primary then you must license your Standby using the per CPU model too. Effectively by using Dataguard, you  are doubling your licensing costs  for the sake of an insurance that you will hopefully never need to use.&lt;br /&gt;&lt;br /&gt;The other cost aspect associated with Datagaurd is the fact that your Standby database server has to be good enough to take on the primary role  should the time come.   If you have a large Primary database server with many CPU's your costs could be even higher.&lt;br /&gt;&lt;br /&gt;However, its not all doom and gloom.  There are several other ways that you can put Dataguard to use.  Maybe some of these ideas you can help persuade your head of finance that Dataguard is worth the extra spend and really should be implemented as soon as possible at your site!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reporting&lt;/span&gt;&lt;br /&gt;9i and 10g databases can be opened in Read Only mode.  Whilst open, changes from production are still received by your standby - they are just not being applied.  You can open you Standby in the morning and run all of your business reports against it without effecting the performance of production.  At the end of the day, the Standby can then be put back into managed recovery mode. At this point, all of your production transactions will be applied.  Effectively this provides an up to date version of your live database for reporting with out having to worry about large import / exports or ETL routines. It also allows you to make use  of that extra hardware that you have purchased to run your Dataguard database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Datapump exports&lt;/span&gt;&lt;br /&gt;This is great.  With Oracle 10g, you can use your Dataguard database as a data source for imports.  For example if you need to refresh a development database with up to date copy of live you could schedule exports to run out of hours, copy them over night to your development server and then finally import the data in question into your development database.&lt;br /&gt;&lt;br /&gt;Alternatively, using Oracle 10g, we can open our Standby at any point during the day and use it as a data source, importing data directly into our target database across the network using the NETWORK_LINK Datapump feature. This save a &lt;span style="font-style: italic;"&gt;lot&lt;/span&gt; of time, especially when combined with the Datapump parallel capabilities.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Backups&lt;/span&gt;&lt;br /&gt;Backups (using RMAN) can be shifted from your Primary database to your standby. Although this method (by default) requires the use of an RMAN catalog, it allows you to shift the burden of a large ongoing backup routine away from production, freeing up CPU for your production services.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11g Active Dataguard&lt;/span&gt;&lt;br /&gt;11g brings new Dataguard capabilities.  In a nutshell a Physical Standby can be opened in read only mode &lt;span&gt;whilst&lt;/span&gt; changes are being received  from the Primary  &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; applied.  This feature allows your reporting to be bang up to date without disrupting production performance. Please note though, this feature does not come free out of the box. It is another licensable option.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Database reallocation&lt;/span&gt;&lt;br /&gt;Now and then, every DBA needs to relocate a mission critical production database to another server.  Dataguard can help you achieve this and minimize your downtime.  The idea here is that you create a standby database on you new target production database server. When the time comes to switch servers just shut down your original Production database  and perform a fail over on your Standby (not role reversal).   This can avoid hours of downtime as standby databases can be created from hot database backups.  Finally, although the standby has been failed over to become your new primary, the original primary is still available as a back out option if you run into any unforeseen issues with your new server.&lt;br /&gt;&lt;br /&gt;Hopefully this note has given you a few ideas of alternative uses of Dataguard which can help justify the extra cost.  Dataguard could save your business in the event of total disaster at your primary site. It could also save you a lot of time in several other areas as well.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&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/3628226979394017176-1353852186679801991?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1353852186679801991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1353852186679801991'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/12/dataguard-alternatives.html' title='Dataguard alternatives.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-577616826476670899</id><published>2007-12-09T19:14:00.000Z</published><updated>2007-12-09T19:35:11.823Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='brain trick'/><category scheme='http://www.blogger.com/atom/ns#' term='Christmas fun'/><title type='text'>One for the Christmas party.</title><content type='html'>I like this!!!!&lt;br /&gt;&lt;br /&gt;Obviously this is totally unrelated to Oracle but hey, its the festive season -time for fun!&lt;br /&gt;&lt;ol&gt;&lt;li&gt;While sitting at your desk, lift your right foot off the floor and make clockwise circles. &lt;/li&gt;&lt;li&gt;Now, while doing this, draw the number "6" in the air with your right hand. &lt;/li&gt;&lt;li&gt;Your foot will change direction and there's nothing you can do about it.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Weird!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-577616826476670899?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/577616826476670899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/577616826476670899'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/12/one-for-christmas-party.html' title='One for the Christmas party.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-8701009691659063232</id><published>2007-12-09T18:25:00.000Z</published><updated>2007-12-09T19:13:13.955Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='VMware'/><category scheme='http://www.blogger.com/atom/ns#' term='init.cssd'/><category scheme='http://www.blogger.com/atom/ns#' term='CPU'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle 10g RAC'/><title type='text'>VMWare RAC goes nuts.</title><content type='html'>Here is a quick hint.&lt;br /&gt;&lt;br /&gt;Today, I have been &lt;em&gt;attempting&lt;/em&gt; to make some use of 10g RAC running under VMWare on my Windows XP host PC. I had set all of this up some time back, but this has been the first chance that I have had to play with it.&lt;br /&gt;&lt;br /&gt;After a few minutes, I hit big issue. Shortly after starting everything up my VMware servers have ground to a halt.&lt;br /&gt;&lt;br /&gt;The exact symptoms are:&lt;br /&gt;&lt;br /&gt;1) 100% maxed out host CPU, shortly after startup.&lt;br /&gt;2) Virtual Nodes become "virtually" unusable.&lt;br /&gt;3) One of the virtual Linux nodes bails out from the cluster&lt;br /&gt;(the node panic's).&lt;br /&gt;&lt;br /&gt;If you are attempting to use VMWare + RAC for learning purposes and you are hitting this problem, here is a work around - with the usual caveat that you should never apply this kind of fix to a production node.&lt;br /&gt;&lt;br /&gt;Edit the following file on each node:&lt;br /&gt;&lt;strong&gt;/etc/init.d/init.cssd&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;There will be a &lt;strong&gt;SLEEP&lt;/strong&gt; entry below the following comment in the file:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;# Poll every second to see which of our children has gone away.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Change the value of SLEEP from 1 to 60, thus reading:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;# Poll every second to see which of our children has gone away.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;$SLEEP 60&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Having set this on both nodes, restart the cluster and performance will greatly improve - well, it will become usable at least!&lt;br /&gt;&lt;br /&gt;If you &lt;em&gt;are&lt;/em&gt; going to be using VMWare and Oracle RAC for learning, ideally, you should install on dual core machine with a &lt;em&gt;minimum&lt;/em&gt; of 2GB RAM. I have also found that for the extra speed boost, installing Linux as the host machine rather than XP improves the situation too. Obviously, if all else fails, its a good time to ask Santa for that Sun E25K you were always after :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-8701009691659063232?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8701009691659063232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8701009691659063232'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/12/rac-crs-goes-nuts.html' title='VMWare RAC goes nuts.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-4513052013771607837</id><published>2007-11-26T15:33:00.000Z</published><updated>2007-11-26T15:46:23.694Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Real Application Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='10g to 11g'/><title type='text'>10.2.0.4.0</title><content type='html'>I came across this note under the Certification section of Metalink today, suggesting that 10.2.0.4.0 will be out by the end of the year.&lt;br /&gt;&lt;br /&gt;I guess this release will contain all of the usual bug fixes etc. Word on the street is that it will also include the Real Application Testing recording feature, back ported from 11g.&lt;br /&gt;&lt;br /&gt;This has the implication that we will be able to record workload from our production 10g databases, and play it back in our 11g testing environments.  Interesting!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_XkQ10xmV9PA/R0roRkyUPaI/AAAAAAAAAJA/yeR50E-F_LA/s1600-h/10204.jpg"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_XkQ10xmV9PA/R0roRkyUPaI/AAAAAAAAAJA/yeR50E-F_LA/s400/10204.jpg" alt="" id="BLOGGER_PHOTO_ID_5137173713599610274" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-4513052013771607837?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4513052013771607837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4513052013771607837'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/11/102040.html' title='10.2.0.4.0'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_XkQ10xmV9PA/R0roRkyUPaI/AAAAAAAAAJA/yeR50E-F_LA/s72-c/10204.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-6987473765346113623</id><published>2007-11-23T21:20:00.000Z</published><updated>2007-11-23T22:52:15.747Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle technical workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle technical workshops'/><title type='text'>Oracle technology workshops.</title><content type='html'>Well everybody, today I took a day out from the world of DBA'ing and ventured out to a free Oracle technical workshop.  The idea behind these technology workshops are that they provide customers with a chance to get a hands on introduction to various technology areas such as High Availability, Security, Partitioning, Business Intelligence and todays title, Oracle 10g Data Warehousing.&lt;br /&gt;&lt;br /&gt;The workshops all seem to follow the same general format:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Introductions.&lt;/li&gt;&lt;li&gt;Half an hour of PowerPoint  preview of the technology in question. &lt;/li&gt;&lt;li&gt;The rest of the day working through a hands on workshop using the technology in question.&lt;/li&gt;&lt;/ul&gt;The workshops are introduced and run by Oracle instructors who are normally members of the Oracle pre-sales team. Once the opening presentation has been delivered, the instructors remain available throughout the rest of the day to help out and answer all of your Oracle technical conundrums!&lt;br /&gt;&lt;br /&gt;Aside from the subject matter, I have to say that these workshop were responsible for my current interest in Visualization - the idea that we can create and run several virtual server machines on our desktops to play with and break without causing any harm.  The most impressive configuration I have seen to date consisted of a two node RAC cluster, Database control and Swing Bench all running along happily on a single laptop. Impressive!&lt;br /&gt;&lt;br /&gt;As far as todays workshop went, we took a good look at Oracle Warehouse Builder, a brief overview of OLAP, a look at Oracle BI tools and finally an introduction to a really interesting area (which is new to myself) Data Mining - something I really want to investigate further over the next few weeks.&lt;br /&gt;&lt;br /&gt;The only dampener for the entire day was the journey home on the London's orbital motorway, the dreaded M25 - the worlds largest car park.....  Still, I'll be able to get over that with some counseling! In the mean time, 10 out of 10 to Oracle for a great day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-6987473765346113623?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6987473765346113623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6987473765346113623'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/11/oracle-technology-workshops.html' title='Oracle technology workshops.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-2710913427449875916</id><published>2007-11-13T10:30:00.000Z</published><updated>2007-11-13T10:46:21.963Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle VM'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Virtualization'/><title type='text'>Oracle VM</title><content type='html'>This is exciting - I have been a fan of visualization for a while now, specifically, I think it is a great tool to use when learning new Oracle features (particularly the ones that require several servers, such as Dataguard, RAC and Grid Control etc).&lt;br /&gt;&lt;br /&gt;Oracle has just announced that it is launching its own virtualization software "Oracle VM". You will be able to download it for review from tomorrow. Check this &lt;a href="http://www.oracle.com/technologies/virtualization/index.html"&gt;link&lt;/a&gt; for further details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-2710913427449875916?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2710913427449875916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2710913427449875916'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/11/oracle-vm.html' title='Oracle VM'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-4487257009625594283</id><published>2007-11-11T00:52:00.000Z</published><updated>2007-11-12T11:47:48.936Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='10g Real Application Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='11g Real Application Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='11g RAT'/><category scheme='http://www.blogger.com/atom/ns#' term='11g cost'/><title type='text'>Real App Testing.</title><content type='html'>Most people who are keeping up with the new 11g features will be aware of Real Application Testing. For those of you who have not had a chance to see this yet, this feature allows DBA's to record production database workload into binary files, copy the files over to a development database server and then replay the transactions in exactly the same way as they were applied in live.  Obviously this feature is going to be great, especially for platform migrations, hardware change testing , security patch set and database patch set version testing etc.&lt;br /&gt;&lt;br /&gt;A few weeks ago, I was attending an Oracle 11g technical overview in Reading and made a couple of interesting notes about RAT which may be of use:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note 1.&lt;/span&gt;&lt;br /&gt;Apparently, the load recording facility of RAT is going to be back ported to Oracle database 10.2.0.4.0.  This has two implications:&lt;br /&gt;&lt;br /&gt;1) Workloads can be recorded from a 10g production system and then replayed in your 11g test environment. This means that this facility will be available to DBA's who are going to be working on new 10g to 11g upgrade projects.&lt;br /&gt;&lt;br /&gt;2) The keen eyed DBA will notice that the latest version of 10g is 10.2.0.3.0. Apparently 10.2.0.4.0 will be out "sometime soon". I guess the back port of RAT functionality would explain why its taken a while for 10.2.0.4.0 to hit the streets.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note 2.&lt;/span&gt;&lt;br /&gt;Real Application Testing is going to be a cost option. Other new features which are also at extra cost include: Active Dataguard, Advanced Compression and Total Recall. I guess this was to be expected, but I will be interested in seeing what the best "free" new feature of 11g is going to be (when I say free, I mean included within the cost of the initial Database license).&lt;br /&gt;&lt;br /&gt;Finally, DBA's &lt;span style="font-style: italic;"&gt;must &lt;/span&gt;be&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;looking forward to bamboozling Project Managers with the new 11g terminology.&lt;br /&gt;&lt;br /&gt;A prize goes out to the first DBA to mention "&lt;span style="font-style: italic;"&gt;&lt;/span&gt;RAT RAC" in a project update meeting.... :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-4487257009625594283?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4487257009625594283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4487257009625594283'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/11/real-app-testing.html' title='Real App Testing.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-5542732179294446031</id><published>2007-11-09T15:38:00.000Z</published><updated>2007-11-11T00:52:49.648Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='manage 9i with Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='9i Enterprise Manager'/><title type='text'>Manage 9i with Grid Control.</title><content type='html'>Obviously, there are quite a few shops out there still running 9i. I guess there are several reasons for this, the main one (from my experience) is the cost of testing a new database version and the cost of the upgrade downtime, although 11g is going to rescue us from all of that tedious load testing with the fantastically named RAT! (Real Applications Testing for those who are not in the know yet).&lt;br /&gt;&lt;br /&gt;If you are still running 9i, one of the things that you may or may not know is that you can still manage your 9i Oracle database with 10g Grid Control. Once you finally get around to upgrading, Grid Control can easily be modified to take care of your new 10g database.&lt;br /&gt;&lt;br /&gt;Here is a quick overview of how all of this works:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to manage a 9i database with 10g Grid Control.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;Step 1.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Start a 10g listener process on your 9i database server.  The only feasible way of doing this (that I know of) is to install the 10g database software in a separate ORACLE_HOME, and then use the 10g binaries to start the 10g listener.  Initially, this may seem a bit of an overkill, but you will eventually be using the 10g binaries for the database upgrade process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2.&lt;/span&gt;&lt;br /&gt;Install the Oracle 10g Grid Control agent on your 9i server. Once the agent is up and running, your 9i database can be  viewed and managed by your 10g Grid Control configuration.  Obviously, not all the same features are available as a 10g managed target, but for alerting and general maintenance, this kind of setup is still ideal.  Lets face it, you really don't want to be using the old 9i Java based &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;OEM&lt;/span&gt;&lt;/span&gt; do you?!!!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;After you have upgraded your 9i database to 10g&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Once you have upgraded your managed target database from 9i to 10g, the following steps can be taken to inform Grid Control of your change:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;1. Stop the Grid Control Agent which is running on you managed server.&lt;br /&gt;&lt;br /&gt;2. Edit the following file, which is stored under your agents ORACLE_HOME on your managed server:&lt;br /&gt;&lt;br /&gt;&lt;oracle_home&gt;ORACLE_HOME/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;sysman&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;emd&lt;/span&gt;&lt;/span&gt;/targets.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;xml&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/oracle_home&gt;&lt;br /&gt;For the database in question, edit the following following line to reflect your new 10g ORACLE_HOME :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_XkQ10xmV9PA/RzZOM4BCjsI/AAAAAAAAAH8/K97HREhfh80/s1600-h/EMwhite.jpg"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_XkQ10xmV9PA/RzZOM4BCjsI/AAAAAAAAAH8/K97HREhfh80/s400/EMwhite.jpg" alt="" id="BLOGGER_PHOTO_ID_5131374808537403074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(Obviously substituting the value of your own 10g ORACLE_HOME)&lt;br /&gt;&lt;br /&gt;3. Start up your Grid Control Agent.&lt;br /&gt;&lt;br /&gt;4. Go get a cup of coffee at this point - the new changes take a few minutes to filter through.&lt;br /&gt;&lt;br /&gt;5. Log into Grid Control, and check that your old 9i database is now being recognized as a 10g database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-5542732179294446031?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5542732179294446031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5542732179294446031'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/11/manage-9i-with-grid-control.html' title='Manage 9i with Grid Control.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_XkQ10xmV9PA/RzZOM4BCjsI/AAAAAAAAAH8/K97HREhfh80/s72-c/EMwhite.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-607566785414950492</id><published>2007-11-08T11:13:00.000Z</published><updated>2007-11-09T15:37:59.075Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystemio_options'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='direct io'/><title type='text'>Direct I/O and Redo writes.</title><content type='html'>Here is a subject that has bothered me for some time. When you make a  database change and then issue a subsequent COMMIT, how can you  guarantee that the change has been recorded and written to disk?  I guess the real question is: Are you &lt;span style="font-style: italic;"&gt;really &lt;/span&gt;sure your transactions are safe?&lt;br /&gt;&lt;br /&gt;If we take a look at the Oracle database architecture, we are told that when we issue a commit, the change which has already been recorded in the Redo Log buffer is flushed to disk.&lt;br /&gt;&lt;br /&gt;Linux likes to utilize  all available memory, so for example if the O/S reports having free, then a good chunk of this will be used for O/S I/O caching.  We can verify this with the free command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:lucida grande;" &gt;free -m&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;                   total       used       free     shared    buffers     &lt;span style="color: rgb(255, 0, 0);"&gt;cached&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Mem&lt;/span&gt;&lt;/span&gt;:          6022       5983         38          0         26        &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-family:times new roman;"&gt;3736&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Notice here that my Linux machine is using over 3GB of the physical 6GB for I/O caching.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Caching at the O/S level is generally a good idea, however when we specifically look at Oracle, this mechanism has the affect of double caching our database data blocks and skewing our disk write time performance statistics. Database block writes (via &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;DBWR&lt;/span&gt;&lt;/span&gt;) are no longer disk writes, they become &lt;span style="font-style: italic;"&gt;cached&lt;/span&gt; disk writes.&lt;br /&gt;&lt;br /&gt;The follow up question that springs into mind may also be: What about &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;LGWR&lt;/span&gt;&lt;/span&gt; ?  Does this also imply  that when a user commits, the redo log entry is written to the Linux I/O cache before being written to disk?  If so, surly I &lt;span style="font-style: italic;"&gt;can&lt;/span&gt; then loose changes, even after they have been posted to disk&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;/span&gt;&lt;/span&gt;.....    This is something I needed to pursue  with Oracle for peace of mind.&lt;br /&gt;&lt;br /&gt;According to Oracle, the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;LGWR&lt;/span&gt;&lt;/span&gt; process uses an O/S option called "Direct IO".  Direct IO instructs Linux to write &lt;span style="font-style: italic;"&gt;directly &lt;/span&gt;to the disk I/O subsystem. Basically, bypassing the O/S I/O buffering mechanism.  As a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;DBA&lt;/span&gt;&lt;/span&gt;, this makes me feel better.  But we are not there yet.&lt;br /&gt;&lt;br /&gt;Further investigations in this area (this time via &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Redhat&lt;/span&gt;&lt;/span&gt;) provides the final piece of the jigsaw.  Although Direct IO &lt;span style="font-style: italic;"&gt;does &lt;/span&gt;bypass the O/S cache, it cannot instruct your storage devices to bypass any physical caching that is taking place.  In my case, I have direct attached storage with a controller which is caching reads &lt;span style="font-style: italic;"&gt;and &lt;/span&gt;writes. By default, I also have physical disk read/write caching too!  - All of these options are configurable.  But, out of the box, in my environment, I have 2 levels of caching for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;LGWR&lt;/span&gt;&lt;/span&gt;, and 3 levels for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;DBWR&lt;/span&gt;&lt;/span&gt; ( &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;DBWR&lt;/span&gt;&lt;/span&gt; does not implement DIRECT I/O by default&lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Ultimately, this investigation demonstrates that we &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;DBA's&lt;/span&gt;&lt;/span&gt;  do need to  understand  the O/S &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; Hardware that we are using.  Secondly, we should not take everything we hear  at face value.&lt;br /&gt;&lt;br /&gt;I have heard several times (even on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;DBA&lt;/span&gt;&lt;/span&gt; training courses) that once a commit is issued, the change is guaranteed to be written to disk.  However, if you have not thought about the extra possible levels of software and hardware caching there will be a split second when Oracle &lt;span style="font-style: italic;"&gt;thinks&lt;/span&gt; it has written your valuable change to disk, but in fact it will be hanging around in a hardware cache - some place between your database server and the physical disk platter , just waiting for that inevitable power cut!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt; Incidentally, DIRECT I/O can be enabled for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;DBWR&lt;/span&gt;&lt;/span&gt; by using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;filesystemio&lt;/span&gt;&lt;/span&gt;_options database parameter. This, I will save for another entry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-607566785414950492?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/607566785414950492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/607566785414950492'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/11/direct-io-and-redo-writes.html' title='Direct I/O and Redo writes.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-4240949360384616736</id><published>2007-10-26T22:44:00.000+01:00</published><updated>2007-10-26T23:33:32.729+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='standby database'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-03113'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-16072'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='End-of-file on Communication Channel'/><category scheme='http://www.blogger.com/atom/ns#' term='dataguard'/><title type='text'>Primary startup trouble after removal of Dataguard.</title><content type='html'>Here's a bit of a unique problem that I ran into the other day. One of those moments that can raise your heart rate until you realise what is going on!&lt;br /&gt;&lt;br /&gt;I had a Primary production database and a Standby, which was running in Maximum Availability mode. The Standby database configuration was no longer required, and so it was totally shutdown and deleted. The Primary LOG_ARCHIVE_DEST_n parameters were reset. As far as I was concerned, the Standby was deleted for good. End of story.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Then&lt;/em&gt;, some time later, the Primary database was shut down for maintenance. When it was started up again, I received a nasty surprise:&lt;br /&gt;&lt;br /&gt;ORA-03113: End-of-file on Communication Channel - What!!!???&lt;br /&gt;&lt;br /&gt;Having looked at the alert log, there are further error messages:&lt;br /&gt;&lt;br /&gt;ORA-16072: a minimum of one standby database destination is required Instance terminated by LGWR&lt;br /&gt;&lt;br /&gt;ORA-03113: End-of-file on Communication Channel&lt;br /&gt;&lt;br /&gt;Hmmm, this is interesting. Despite the Standby database being decommissioned, my Primary is still expecting it to be there. After some scouting around on Metalink, it turns out that the protection mode of my primary database is still stored in my data dictionary.&lt;br /&gt;&lt;br /&gt;The protection mode that I was using still expects my Primary to be talking to a Standby using LGWR SYNC log writer modes.&lt;br /&gt;&lt;br /&gt;If I issue the following SQL, I can then start up my Primary Production without any issue:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SQL&gt; STARTUP MOUNT;&lt;br /&gt;SQL&gt; ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;&lt;br /&gt;SQL&gt; SHUTDOWN IMMEDIATE;&lt;br /&gt;SQL&gt; STARTUP;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;I have to say that you would be unlucky to run into this problem as it does require a certain set of circumstances, but its the kind of thing you can do without early on a Saturday morning database restart!&lt;br /&gt;&lt;br /&gt;For further details, here is the Metalink note ID: 245731.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-4240949360384616736?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4240949360384616736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4240949360384616736'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/10/primary-startup-trouble-after-removal.html' title='Primary startup trouble after removal of Dataguard.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-6959170021347557862</id><published>2007-10-24T12:00:00.000+01:00</published><updated>2007-10-24T13:07:27.157+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='standby_file_management'/><category scheme='http://www.blogger.com/atom/ns#' term='dataguard'/><title type='text'>I'm back!! (plus Dataguard tip).</title><content type='html'>Yes Web fans, after a few hectic months I am back updating my blog...!&lt;br /&gt;&lt;br /&gt;Since the last update, I have been seriously busy, although have enjoyed sneaking out to a few Oracle  UK events such as the 11g launch day and 11g tech days in Reading.&lt;br /&gt;&lt;br /&gt;I have to say that  11g looks  great,  but I am not as amazed by it as I was when 10g arrived on the scene. I guess 10g really made a change to how DBA's work.  Some of the 10g feature's such as Datapump, AWR and Grid Control generally have made our jobs a lot more interesting and improved the DBA role for the good.&lt;br /&gt;&lt;br /&gt;Some DBA's I have spoken to even hold the view that 11g should have just been 10gR3.  I'm still in two minds about that, although I have to say I really like the new 11g Dataguard features. I guess we will only be able to make that claim either way after we see what is on offer in 11gR2.&lt;br /&gt;&lt;br /&gt;Anyway, if you get a moment, Check the new Dataguard features out here: &lt;a href="http://www.oracle.com/technology/deploy/availability/index.html"&gt;http://www.oracle.com/technology/deploy/availability/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On with the tip......&lt;br /&gt;&lt;br /&gt;Previously with Dataguard, I had always assumed that the file system layout of your Standby database had to match your Primary.  For example, if your database datafiles on your Primary server reside under /u01, /u02, u03, /u04 and u05, then I though that the Standby disk layout should be exactly the same. Turns out, this is not the case.&lt;br /&gt;&lt;br /&gt;After the first stage of a recent disk migration project, my Primary database datafiles were merged together onto a new RAID 1+0 volume known as "/u01".  My Standby database datafiles were stored under their original file system layout on the Standby server,  u01 .. u05.  This has no effect on Dataguard whatsoever, which I have found really useful.&lt;br /&gt;&lt;br /&gt;First of all, this allows me to run the disk migration over several days, rather than having a "big bang" approach.  Secondly, I also have a quick back out plan  if I run into any serious issues with my new storage or disk layout  - I still have the option of failing over to my up-to-date Standby database with the added bonus that it is  still residing under the original disk configuration.&lt;br /&gt;&lt;br /&gt;There is one area you need to be aware of if you are going to be running with this mixed disk environment and that is the value set for your standby_file_management parameter.  If this is set to "auto" and you add a datafile on your Primary database to a directory that does not exist on your Standby, then you are going to run into problems.&lt;br /&gt;&lt;br /&gt;As long as you keep this in mind, you should not run into any issues whilst running your Primary and Standby databases under different file system layouts for an interim period. Very Handy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-6959170021347557862?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6959170021347557862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6959170021347557862'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/10/im-back-plus-dataguard-tip.html' title='I&apos;m back!! (plus Dataguard tip).'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-8533347013313737689</id><published>2007-08-17T12:55:00.000+01:00</published><updated>2007-08-17T15:36:49.951+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='V$STATNAME'/><category scheme='http://www.blogger.com/atom/ns#' term='9i'/><category scheme='http://www.blogger.com/atom/ns#' term='v$MYSTAT'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Session Stats.</title><content type='html'>A V$ dictionary table that I find very useful is V$MYSTAT.  When joined onto V$STATNAME, it can be used to capture over 300 statistics about your current session. Using these two tables, I like to:&lt;br /&gt;&lt;br /&gt;1. Capture baseline session statistics,&lt;br /&gt;2. Run a piece of SQL that I am investigating,&lt;br /&gt;3. Re-capture the V$MYSTAT statistics,&lt;br /&gt;4. View the difference between these two "snapshots".&lt;br /&gt;&lt;br /&gt;Here is an example of how this works.  For the sake of keeping this simple, I suspect that my test SQL has a problem:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SELECT * FROM big_tab WHERE id=243213;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;(The name "big_tab" could be a bit of a give away)&lt;br /&gt;&lt;br /&gt;First of all, I am going to create a temporary table to store my session statistics.  The reason I am using a temporary table is because writing to this table type causes very little over head. In other words, capturing my session statistics should not taint my result sets. The other thing to say is that the rows held in my temporary table will be cleared out once I quit my session.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CREATE GLOBAL TEMPORARY TABLE MY_STATS   &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;(RUN_ID NUMBER,&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;NAME VARCHAR2(64),&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;VALUE NUMBER) &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;ON COMMIT PRESERVE ROWS;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Each time I gather my session statistics, I am going to give that set of statistics a "Run ID".  This will allow me to compare the difference between the values gathered by Run ID 1 and Run ID 5 for example.&lt;br /&gt;&lt;br /&gt;Now, I am going to capture the set of statistics from my session to form a baseline.  This will be Run ID 1.  As mentioned above, there are over 300 statistics available from V$MYSTAT, so you can modify this capture script to suit your own investigations:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;INSERT INTO my_stats(&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;SELECT &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;Run_id,       &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;sn.name,       &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;ms.value&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;FROM   v$mystat ms,v$statname sn&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;WHERE  ms.statistic# = sn.statistic#&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;AND    sn.name in('session logical reads',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'recursive cpu usage',                   &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'CPU used by this session',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'DB time',                   &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'user I/O wait time',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical read total IO requests',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical read IO requests',                   &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical read total multi block requests',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical read total bytes',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'db block gets',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'db block gets from cache'                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'redo synch writes',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'redo synch time',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'redo log space requests',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'redo log space wait time',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical reads',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'enqueue timeouts',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'enqueue waits',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical writes',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical writes direct',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical writes from cache',                 &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; 'physical write bytes',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'physical write total IO requests',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'DBWR undo block writes',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'DBWR make free requests',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'DBWR checkpoints',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'commit cleanouts',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'commit cleanouts successfully completed',                  &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;'redo buffer allocation retries')&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;);&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;My "Populate Stats" script above will prompt me for a Run_ID, for the baseline, I will give it "1" as a value.  I can now run my poorly tuned SQL that is under investigation:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SELECT * FROM big_tab WHERE id=243213;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;I then re-run my "Populate Stats" script, and provide a Run_ID of 2.  Finally, I run another simple SQL. This one is going to look at the statistics gathered by my first and second Run_ID's and display the difference between the two sets of statistics:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Set linesize 132&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Set pagesize 100&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;col START for 999,999,999,999&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;col END   for 999,999,999,999&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;col DIFF  for 999,999,999,999&lt;br /&gt;SELECT a.name,       &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;                a.value "START"       &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;                b.value "END",       &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;                b.value - a.value "DIFF"&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;FROM   my_stats a,my_stats b&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;WHERE  a.run_id=&amp;start_run_id&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;AND    b.run_id=&amp;amp;end_run_id&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;AND    a.name=b.name;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Here is an example output from this run:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;NAME                            START     END          DIFF&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;recursive cpu usage             12       12           0&lt;br /&gt;session logical reads           1,468    62,472       61,004&lt;br /&gt;CPU used by this session        14       158          144&lt;br /&gt;DB time                         20       757          737&lt;br /&gt;user I/O wait time              7        657          650&lt;br /&gt;enqueue timeouts                0        0            0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;enqueue waits                   0        0            0&lt;br /&gt;physical read total IO requests 29       7,652        7,623&lt;br /&gt;physical read total mbrs        0        7,623        7,623&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;physical read total bytes       237,568  499,785,728  499,548,160&lt;/span&gt;&lt;br /&gt;physical write total IO requsts 0        0            0&lt;br /&gt;db block gets                   4        11           7&lt;br /&gt;db block gets from cache        4        11           7&lt;br /&gt;physical reads                  29       61,009       60,980&lt;br /&gt;physical read IO requests       29       7,652        7,623&lt;br /&gt;physical writes                 0        0            0&lt;br /&gt;physical writes direct          0        0            0&lt;br /&gt;physical writes from cache      0        0            0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;physical write bytes            0        0            0&lt;br /&gt;DBWR undo block writes          0        0            0&lt;br /&gt;DBWR make free requests         0        0            0&lt;br /&gt;DBWR checkpoints                0        0            0&lt;br /&gt;redo synch writes               3        3            0&lt;br /&gt;redo synch time                 0        0            0&lt;br /&gt;commit cleanouts                1        1            0&lt;br /&gt;commit cleanouts suc completed  1        1            0&lt;br /&gt;redo buffer allocation retries  0        0            0&lt;br /&gt;redo log space requests         0        0            0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;redo log space wait time        0        0            0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-family:verdana;"&gt;In this case, the number that stands out is the value for "Physical Reads  Total Bytes".  A further investigation would show that "BIG_TAB" is missing an index from its ID column.  Using this kind of approach helps me investigate bad SQL.&lt;br /&gt;&lt;br /&gt;The more interesting aspect is that with multiple runs, you can compare a bad piece SQL with a re-written piece of SQL, and demonstrate how much better the code is after the re-write.&lt;br /&gt;&lt;br /&gt;Here I am going to add an index to "BIG_TAB" and reproduce the statistics for comparison. Lets take a look at the statistic results:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;NAME                            START        END          DIFF&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;recursive cpu usage             40            40            0&lt;br /&gt;session logical reads           82,540        82,551        11&lt;br /&gt;CPU used by this session        924           925           1&lt;br /&gt;DB time                         1,870         1,873         3&lt;br /&gt;user I/O wait time              361           363           2&lt;br /&gt;enqueue timeouts                0             0             0&lt;br /&gt;enqueue waits                   0             0             0&lt;br /&gt;physical read total IO requests 24,049        24,051        2&lt;br /&gt;physical read total mbrs        7,624         7,624         0&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;physical read total bytes       634,159,104   634,175,488   16,384&lt;/span&gt;&lt;br /&gt;physical write totalIO requests 2,438         2,438         0&lt;br /&gt;db block gets                   13,071        13,078        7&lt;br /&gt;db block gets from cache        1,202         1,209         7&lt;br /&gt;physical reads                  77,412        77,414        2&lt;br /&gt;physical read IO requests       24,049        24,051        2&lt;br /&gt;physical writes                 26,619        26,619        0&lt;br /&gt;physical writes direct          26,619        26,619        0&lt;br /&gt;physical writes from cache      0             0             0&lt;br /&gt;physical write bytes            218,062,848   218,062,848   0&lt;br /&gt;DBWR undo block writes          0             0             0&lt;br /&gt;DBWR make free requests         0             0             0&lt;br /&gt;DBWR checkpoints                0             0             0&lt;br /&gt;redo synch writes               1             1             0&lt;br /&gt;redo synch time                 1             1             0&lt;br /&gt;commit cleanouts                96            96            0&lt;br /&gt;commit cleanouts succ completed 96            96            0&lt;br /&gt;redo buffer allocation retries  35            35            0&lt;br /&gt;redo log space requests         6             6             0&lt;br /&gt;redo log space wait time        35            35            0&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=";font-family:Verdana;font-size:100%;"  &gt;Now I can see what a difference the index has made and prove that the number of physical reads has been greatly improved by my fix.  The "Difference" (DIFF) column show that the new SQL only reads 16,384 bytes to satisfy the query rather than the previous full table scan, which read close to 500MB.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-8533347013313737689?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8533347013313737689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8533347013313737689'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/08/session-stats.html' title='Session Stats.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-2110338199147304430</id><published>2007-08-10T08:21:00.000+01:00</published><updated>2007-08-10T08:24:07.092+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='download'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle 11g'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Download 11g</title><content type='html'>At last Oracle database 11g is available for download.  At this point in time, it is available for Linux users at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/products/database/index.html?rssid=rss_otn_soft"&gt;http://www.oracle.com/technology/software/products/database/index.html?rssid=rss_otn_soft&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also download the documentation here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/documentation/database11gR1.html"&gt;http://www.oracle.com/technology/documentation/database11gR1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thats going to keep us busy for a while !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-2110338199147304430?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2110338199147304430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2110338199147304430'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/08/download-11g.html' title='Download 11g'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-84827005336883760</id><published>2007-07-31T15:03:00.000+01:00</published><updated>2007-08-01T14:42:56.109+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='automatic backup'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><category scheme='http://www.blogger.com/atom/ns#' term='control file'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Trouble with Control file auto backups.</title><content type='html'>Here is a trap to avoid when using a Flash Recovery Area and Control File Automatic backups.&lt;br /&gt;&lt;br /&gt;I had a scenario in development where one of my databases was performing a Control File Automatic backup, but always writing it out to my $ORACLE_HOME/dbs directory rather that my Flash Recovery Area:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;backup piece  handle=/opt/app/oracle/product/10.2.0.3.0/dbs/c-923992598-20070731-00&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;I decided to review my RMAN settings. I could not see anything obviously wrong, although I suspected the problem was being caused by my &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;CONTROLFILE AUTOBACKUP FORMAT &lt;/span&gt;&lt;/span&gt;setting:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;&lt;span style="font-weight: bold;"&gt;CONFIGURE  CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;I compared this to a working auto backup and could not see any differences. What was going on here?&lt;br /&gt;&lt;br /&gt;I understood that if my&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt; CONTROLFILE AUTOBACKUP FORMAT &lt;/span&gt;&lt;/span&gt;has been set to the default value, and I have a Flash Recovery Area, then my Control File automatic backups should be written to my Flash Recovery disk location.&lt;br /&gt;&lt;br /&gt;My next move was to reset &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;CONTROLFILE AUTOBACKUP FORMAT &lt;/span&gt;&lt;/span&gt;as I suspected that something had gone wrong here. Maybe some kind of corruption (yes a bit of a long shot) :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;RMAN&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK  CLEAR&lt;span class="379391211-31072007"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Immediately, this solved my problem  - my automatic control file backups are now correctly. They are now being written to the correct disk area (my Flash Recovery Area).&lt;br /&gt;&lt;br /&gt;See if you spot the difference between the broken and working versions of my &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;CONTROLFILE AUTOBACKUP FORMAT &lt;/span&gt;&lt;/span&gt;settings:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Broken:      &lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;CONFIGURE  CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Working:   &lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;CONFIGURE  CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="379391211-31072007"&gt; #  default&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;There is not too much difference!&lt;br /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="379391211-31072007"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&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/3628226979394017176-84827005336883760?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/84827005336883760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/84827005336883760'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/out-of-control-file-backup.html' title='Trouble with Control file auto backups.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-7545534847627440271</id><published>2007-07-27T11:27:00.000+01:00</published><updated>2007-07-27T11:38:02.856+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='x$kghlu'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='sub pool'/><category scheme='http://www.blogger.com/atom/ns#' term='shared pool'/><category scheme='http://www.blogger.com/atom/ns#' term='_kghdsidx_count'/><title type='text'>Shared pool, did you know......</title><content type='html'>In Oracle 9i and 10g, the Shared Pool can be divided into subpools. Each subpool can be seen as a "mini" Shared Pool, having its own set of free lists, memory structure entries and LRU list. This allows Oracle to scale much better on larger machines. Under the previous model, you would have one entire Shared Pool created for your instance no matter how much memory and CPU was available.&lt;br /&gt;&lt;br /&gt;In 9i and 10g, Oracle calculates how many subpools your instance will have as follows:&lt;br /&gt;&lt;br /&gt;First, a subpool must be at least 128MB in 9i and at least 256MB in 10g.&lt;br /&gt;&lt;br /&gt;Second, there can be one subpool for every four CPUs on your server with a maximum of up to 7 subpools.&lt;br /&gt;&lt;br /&gt;You can view the current number of subpools on your system by issuing the following SQL:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;span style="font-weight: bold;"&gt;SELECT MAX(KGHLUSHRPOOL) FROM x$kghlu;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The number of subpools can be changed on your system by using the hidden parameter &lt;span style="font-weight: bold;"&gt;_kghdsidx_count&lt;/span&gt;. I would not recommend changing this value unless explicitly told to do so by Oracle support.&lt;style&gt;@page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;&lt;/style&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-7545534847627440271?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/7545534847627440271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/7545534847627440271'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/shared-pool-did-you-know.html' title='Shared pool, did you know......'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-4752847092488708681</id><published>2007-07-25T13:43:00.000+01:00</published><updated>2007-07-25T13:58:39.911+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBA_REGISTRY_HISTORY'/><category scheme='http://www.blogger.com/atom/ns#' term='list patches applied'/><category scheme='http://www.blogger.com/atom/ns#' term='list CPU'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='list patches'/><title type='text'>List patches and CPU's from SQL.</title><content type='html'>To quickly find out which database patches and Critical Patch Updates have been applied to your system, run the following SQL:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SELECT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;          action_time,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;          action,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;          namespace,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;          version,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;          comments&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;          FROM dba_registry_history;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Here is a sample output:&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ACTION_TIME               ACTION     NAMESPACE    VERSION        COMMENTS&lt;/span&gt;&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;08-JUN-07 08.43.54.614748    UPGRADE    SERVER        10.2.0.3.0       &lt;br /&gt;                          Upgraded from 9.2.0.6.0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;06-MAR-07 13.20.39.149920    CPU            SERVER        10.2.0.3.0        CPUJan2007&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;25-JUL-07 12.46.49.261502    CPU            SERVER        10.2.0.3.0        CPUJul2007&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&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/3628226979394017176-4752847092488708681?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4752847092488708681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4752847092488708681'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/list-patches-and-cpus-from-sql.html' title='List patches and CPU&apos;s from SQL.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-926254860741232048</id><published>2007-07-23T23:20:00.000+01:00</published><updated>2007-07-24T09:38:09.429+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Archivelog'/><category scheme='http://www.blogger.com/atom/ns#' term='Archive log mode'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Flashback database'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-38754'/><title type='text'>Flashback database and archive logs.</title><content type='html'>&lt;div align="left"&gt;I hit an interesting problem last week (on a Friday, just before going on leave for a week - typical). A developer asked me to Flashback a development database to two weeks in the past. The database DB_FLASHBACK_RETENTION_TARGET was set to equate to 31 days.&lt;/div&gt;&lt;p&gt;&lt;br /&gt;As usual, I shutdown and mounted the database and issued the Flashback command:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;FLASHBACK DATABASE TO SCN 954635;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Normally, Flashback database runs without any issues, but this time I was hit with:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;strong&gt;ORA-38754&lt;/strong&gt;: FLASHBACK DATABASE not started; required redo log is not available. &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;strong&gt;Cause:&lt;/strong&gt; A FLASHBACK DATABASE command did not start. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;A redo log needed for the recovery part of FLASHBACK DATABASE could not be found &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;or accessed.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;strong&gt;Action&lt;/strong&gt;: See trace files for details of the problem.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;At this point I was worried! I had never hit this problem before. Upon investigation, it appeared that the database was looking for an Archive log file to compliment the Flashback operation.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;I knew that to use the Flashback database feature I needed to enable ARCHIVELOG mode, but I had never made the connection that Flashback Database required &lt;em&gt;both&lt;/em&gt; the Flashback database logs &lt;em&gt;and&lt;/em&gt;&lt;/span&gt; Archive Log files to perform a Flashback operation.&lt;br /&gt;&lt;br /&gt;As this was a development database, my RMAN backup scripts delete Archive log files once they are backed up. Luckily, my Archive Log file backups are stored on disk in my database Flash Recover Area. Using RMAN, I manually restored the missing Archive Log files, then successfully ran my Flashback Database command.&lt;br /&gt;&lt;br /&gt;Having got out of this mess I decided to investigate further. Here are my findings so far:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;10g Backup and recover reference.&lt;/strong&gt;&lt;br /&gt;The Oracle Backup and recover reference guide states that:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;"RMAN uses flashback logs to undo changes to a point before the target time or SCN, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;and then uses archived redo logs to recover the database forward to make it consistent. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;u&gt;RMAN automatically restores from backup any archived logs that are needed&lt;/u&gt;."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I found this &lt;em&gt;&lt;strong&gt;&lt;u&gt;not&lt;/u&gt; &lt;/strong&gt;&lt;/em&gt;to be the case - I had to manually restore my Archive Log files before my Flashback operation would work.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;"The earliest SCN that can be used for a Flashback Database operation depends on the setting of the DB_FLASHBACK_RETENTION_TARGET initialization parameter, and upon the actual retention of flashback logs permitted by available disk space"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;True, but the document fails to mention "and the retention of your Archive Log files".&lt;br /&gt;&lt;br /&gt;I still have some questions around all of this, which I am going to research and post as soon as possible:&lt;br /&gt;&lt;br /&gt;- As far as Flashback Database is concerned, How far back should I keep my Archive Log files? I now believe this should at least equal my DB_FLASHBACK_RETENTION_TARGET.&lt;br /&gt;&lt;br /&gt;- Why did Oracle not automatically restore my Archive Log files? I am going to have to revisit my trace file and possibly open an SR.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Ultimately, I think Flashback database is excellent. It saves a lot of time. Our developers run test upgrade scripts and then I Flashback the database. They can then re-run their scripts after they have fixed any bugs. This is &lt;em&gt;much&lt;/em&gt; faster than my previous 9i restore and recover operations. However, I will be needing the answers to my questions to feel 100% happy with Flashback database!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-926254860741232048?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/926254860741232048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/926254860741232048'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/flashback-database-and-archive-logs.html' title='Flashback database and archive logs.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-5156278422615133980</id><published>2007-07-15T01:31:00.000+01:00</published><updated>2007-07-15T09:01:53.313+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='display interconnect'/><category scheme='http://www.blogger.com/atom/ns#' term='find out interconnect'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC'/><title type='text'>10g RAC interface check.</title><content type='html'>If you need details regarding your RAC server network card configuration, you may be interested in the "Oracle Interface Configuration tool" ("oifcfg" for short).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To detail your servers interfaces, run:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;oifcfg iflist&lt;/strong&gt;&lt;br /&gt;eth0 192.168.2.0&lt;br /&gt;eth1 10.10.10.0&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To view further information&lt;/strong&gt;&lt;strong&gt;, run:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;oifcfg getif&lt;/strong&gt;&lt;br /&gt;eth0 192.168.2.0 global public&lt;br /&gt;eth1 10.10.10.0 global cluster_interconnect&lt;br /&gt;&lt;br /&gt;As you can see, the "getif" switch can be useful, as it details which NIC is being used as a public facing interface and which NIC is being used for the Cluster Interconnect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-5156278422615133980?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5156278422615133980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5156278422615133980'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/10g-rac-interface-check.html' title='10g RAC interface check.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-3884171310300416443</id><published>2007-07-12T17:07:00.000+01:00</published><updated>2007-07-12T23:37:10.943+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logins per second'/><category scheme='http://www.blogger.com/atom/ns#' term='oralce'/><category scheme='http://www.blogger.com/atom/ns#' term='logons per second'/><category scheme='http://www.blogger.com/atom/ns#' term='logons per minute'/><category scheme='http://www.blogger.com/atom/ns#' term='logins per minute'/><title type='text'>10g Logins per second.</title><content type='html'>How many logins per second does your database service? How can you work this out? Well, you could do something funky with Unix/Linux shell commands and your listener log file, or you could run the following SQL:&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;SELECT&lt;br /&gt;to_char(begin_time,'DD-MON-YYYY HH24:MI:SS') START_TIME,&lt;br /&gt;to_char(end_time,'DD-MON-YYYY HH24:MI:SS') END_TIME,&lt;br /&gt;metric_name,&lt;br /&gt;value&lt;br /&gt;FROM&lt;br /&gt;v$sysmetric&lt;br /&gt;WHERE metric_name='Logons Per Sec'&lt;br /&gt;ORDER BY begin_time;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;10g now keeps this information in the V$SYSMETRIC view. You will receive two rows back. One row details how many logins per second your database has endured over the last 15 seconds, the other gives details from a 60 second period. This information is also available in Enterprise Manager, but real DBA's don't go near the GUI stuff, right??!*&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;*Actually, I have to say that 10g Grid control is great. Until 10g, I would not use a GUI to manage any aspect of an Oracle database, but I now find Enterprise Manager and SQL Developer really usefull.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-3884171310300416443?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3884171310300416443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3884171310300416443'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/10g-logins-per-second.html' title='10g Logins per second.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1203344134468057346</id><published>2007-07-09T23:06:00.000+01:00</published><updated>2007-07-10T10:05:28.607+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlplus'/><category scheme='http://www.blogger.com/atom/ns#' term='run the same command many times'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Write once, run many.</title><content type='html'>Here is a quick way of running the same SQL query or command for each database running on a particular database server. I find this useful in development, where I have about 10 separate databases running on the same machine. This can save quite a lot of typing!&lt;br /&gt;&lt;br /&gt;At your Unix / Linux shell prompt, run:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;cut -d : -f1 /etc/oratab&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;while read db &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;do &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;export ORACLE_SID=$db&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;echo $db&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;sqlplus -s / as sysdba &amp;lt;&amp;lt;EOF &lt;/strong&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;strong&gt;SELECT created FROM v\$database;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;exit&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;EOF&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;done&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The command:&lt;br /&gt;&lt;br /&gt;- Grabs each database name from your /etc/oratab file&lt;br /&gt;- Loops through each database, setting the ORACLE_SID&lt;br /&gt;- Starts up SQL*PLUS without the banner, and connects into each database in turn&lt;br /&gt;- Runs the SQL (highlighted in blue).&lt;br /&gt;&lt;br /&gt;Note that if you need to use a dollar sign in your SQL, then you need to proceed it with a "\". This prevents it from being interpreted by your Unix / Linux shell, and messing up your script.&lt;br /&gt;&lt;br /&gt;I also find this useful if I need to quickly run an RMAN command on each database, such as:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;RMAN&gt; &lt;/strong&gt;report need backup;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1203344134468057346?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1203344134468057346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1203344134468057346'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/07/write-once-run-many.html' title='Write once, run many.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1250836567827906467</id><published>2007-06-26T21:48:00.001+01:00</published><updated>2007-06-27T09:45:30.567+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='password verify function'/><category scheme='http://www.blogger.com/atom/ns#' term='profiles'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='database profile'/><title type='text'>Improve your passwords.</title><content type='html'>One of the things you may know about Oracle is that by default, users are allowed to have a one-character password, for example:&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;strong&gt;ALTER USER scott IDENTIFIED BY a;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is obviously a security risk (although great for your users if they do no like typing...).&lt;br /&gt;&lt;br /&gt;How can this be fixed?&lt;br /&gt;&lt;br /&gt;The answer is to create a password function and combine the function with user profiles. Oracle provide an example script for creating a password verify function, stored under your $ORACLE_HOME/rdbms/admin directory called utlpwdmg.sql&lt;br /&gt;&lt;br /&gt;This script creates a function which ensures that when your users change their password:&lt;br /&gt;&lt;br /&gt;Their username and password are not the same,&lt;br /&gt;their password is &gt;4 characters in length,&lt;br /&gt;simple passwords (like oracle and password) are not allowed,&lt;br /&gt;their password contains at least one letter, one digit and one punctuation mark,&lt;br /&gt;their password differs from the previous password by at least 3 letters.&lt;br /&gt;&lt;br /&gt;I am not going to go through the script here in fine detail, but the idea is that utlpwdmg.sql provides you with a starting point. It is easy to edit, enter your own password rules or strip out the rules that you do not need.&lt;br /&gt;&lt;br /&gt;The script should be run by the SYS user account. By default, it will create a password verify function called "verify_function". Again, the function can be renamed if you like.&lt;br /&gt;&lt;br /&gt;Once the function has been created, it can be called by a Oracle user profile. Every database user is assigned a database profile at creation. If the DBA does not assign a profile, then Oracle will assign the user the default profile (called DEFAULT).&lt;br /&gt;&lt;br /&gt;Here is an example of the creation of a new profile called "dev_profile":&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;strong&gt;CREATE PROFILE dev_profile&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;LIMIT &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;failed_login_attempts 3&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;password_life_time 60&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;password_reuse_max 3&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;password_grace_time 5&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;password_reuse_time 30&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;password_verify_function verify_function;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The new profile is then assigned to a database user, SCOTT:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;ALTER USER scott PROFILE dev_profile;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Now, the user SCOTT is governed by my new database profile "dev_profile". Whenever SCOTT tries to change his database password, the "verify_function" function will ensuring that the new password remains within the rules specified. If not, SCOTT will receive an error message, for example:&lt;br /&gt;&lt;br /&gt;ERROR:&lt;br /&gt;ORA-28003: password verification for the specified password failed&lt;br /&gt;ORA-20002: Password length less than 8 chars&lt;br /&gt;&lt;br /&gt;As you can see, a combination of database profiles and password functions can be very useful. You can assign different profiles to different groups of users depending on their business function (for example one profile for developers, one for report writers etc).&lt;br /&gt;&lt;br /&gt;Finally, there are several limits that you can assign to the profiles, such as the "failed_login_attempts" listed above.&lt;br /&gt;&lt;br /&gt;I will run through these limits in my next post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1250836567827906467?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1250836567827906467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1250836567827906467'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/06/improve-your-passwords.html' title='Improve your passwords.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-5955546681337917210</id><published>2007-06-23T01:09:00.000+01:00</published><updated>2007-06-27T06:04:05.538+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CLOB'/><category scheme='http://www.blogger.com/atom/ns#' term='index'/><category scheme='http://www.blogger.com/atom/ns#' term='segment'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='move'/><category scheme='http://www.blogger.com/atom/ns#' term='DBMS_REDEFINITION'/><title type='text'>Move CLOB index segment (Redefine online part 2).</title><content type='html'>Here is another use for DBMS_REDEFINITION:&lt;br /&gt;&lt;br /&gt;Suppose I have a table called "X".&lt;br /&gt;A column called DETAILS, which is a CLOB.&lt;br /&gt;Both the table and CLOB index segments are stored in a tablespace called "USERS"&lt;br /&gt;And I want to move my CLOB index storage to a tablespace called "USERS2":&lt;br /&gt;&lt;br /&gt;I create my table X, and a temporary table called X_TEMP.&lt;br /&gt;X_TEMP has a storage clause for my CLOB index:&lt;br /&gt;&lt;br /&gt;--This ends up in my default tablespace users.&lt;br /&gt;SQL&gt; &lt;strong&gt;CREATE TABLE x&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;( id NUMBER PRIMARY KEY,&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;details CLOB);&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;CREATE TABLE &lt;/strong&gt;x_temp&lt;br /&gt;&lt;strong&gt;( id NUMBER PRIMARY KEY,&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;details CLOB) &lt;/strong&gt;&lt;strong&gt;STORE AS (tablespace users2) &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;TABLESPACE users;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I check that my X table is currently storing the index LOB in the USERS tablespace with:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;SELECT tablespace_name &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;FROM user_segments &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;WHERE segment_name=&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;( SELECT index_name &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;FROM user_indexes &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;WHERE table_name='X' &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;AND index_type='LOB' ); &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;TABLESPACE_NAME&lt;br /&gt;------------------------------&lt;br /&gt;USERS&lt;br /&gt;&lt;br /&gt;I then use DBMS_REDEFINITION to swap the two tables&lt;br /&gt;(you can do all of this with the tables online and in use).&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;exec dbms_redefinition.START_REDEF_TABLE('SCOTT','X','X_TEMP');&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;exec dbms_redefinition.FINISH_REDEF_TABLE('SCOTT','X','X_TEMP'); &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;At this point, my original table X becomes X_TEMP. X_TEMP becomes X.&lt;br /&gt;&lt;br /&gt;I now re-check my index CLOB storage for my table X:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;SELECT tablespace_name&lt;br /&gt;FROM user_segments&lt;br /&gt;WHERE segment_name=&lt;br /&gt;( SELECT index_name&lt;br /&gt;FROM user_indexes&lt;br /&gt;WHERE table_name='X'&lt;br /&gt;AND index_type='LOB' );&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;TABLESPACE_NAME&lt;br /&gt;------------------------------&lt;br /&gt;USERS 2&lt;br /&gt;&lt;br /&gt;All done!&lt;br /&gt;&lt;br /&gt;Interestingly, this is the &lt;em&gt;only&lt;/em&gt; way it seems that you can move a CLOB index segment once the table has been created and it is in use. There are no fancy ALTER TABLE MOVE.... options available here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-5955546681337917210?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5955546681337917210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5955546681337917210'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/06/move-clob-index-segment-redef-part-2.html' title='Move CLOB index segment (Redefine online part 2).'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-9119125358190226154</id><published>2007-06-20T12:07:00.001+01:00</published><updated>2007-06-27T06:04:05.539+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='release date'/><title type='text'>11g is on its way.</title><content type='html'>Its does not seem that long ago since the arrival of Oracle 10gR1 - although it was released &lt;em&gt;four&lt;/em&gt; years ago back in 2003!&lt;br /&gt;&lt;br /&gt;Now it is time for us DBA's to get back onto the learning curve as the release date for Oracle database 11g has been set for July 11th 2007 - Exciting!&lt;br /&gt;&lt;br /&gt;Unfortunately I have not had time to join the 11g beta program - I have been heavily involved with 10g upgrades. Now that they are out of the way, I am looking forward to getting my hands on a copy of 11g as soon as it becomes available next month.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-9119125358190226154?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/9119125358190226154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/9119125358190226154'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/06/11g-on-its-way.html' title='11g is on its way.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-8244356813148536588</id><published>2007-06-08T08:28:00.000+01:00</published><updated>2007-06-27T06:04:05.541+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10i'/><category scheme='http://www.blogger.com/atom/ns#' term='upgrade'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Last minute Larry.</title><content type='html'>Sometime back, somebody told me that Oracle 10g was to be originally called Oracle 10i, until a last minute name change by Larry.  I'm not sure how true this story really was, but whilst upgrading a 9i database to 10g this morning, I noticed this message in my alert log:&lt;br /&gt;&lt;br /&gt;ALERT: Compatibility of the database is changed from &lt;span style="color: rgb(204, 0, 0);"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;pre&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;-10i&lt;/span&gt; to 10.2.0.3.0.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Hmmm&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, maybe there is some truth in this story after all.... I bet the marketing guys were pleased!&lt;br /&gt;&lt;br /&gt;Right, that's it for now, myself and my family are off to Atlanta, in the US of A for a well deserved holiday. Don't worry, I will be back updating in a couple of weeks! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-8244356813148536588?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8244356813148536588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/8244356813148536588'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/06/last-minute-larry.html' title='Last minute Larry.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1231553003428621555</id><published>2007-06-05T16:59:00.000+01:00</published><updated>2007-06-27T06:04:05.542+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Change Number'/><category scheme='http://www.blogger.com/atom/ns#' term='Flashback'/><category scheme='http://www.blogger.com/atom/ns#' term='9i'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SCN'/><title type='text'>Get SCN.</title><content type='html'>Here is a quick one for you. If you ever need to find out your current System Change Number (SCN), you can run the following query:&lt;br /&gt;&lt;br /&gt;10g:&lt;br /&gt;SQL&gt; &lt;span style="font-weight: bold;"&gt;SELECT current_scn FROM V$database;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;9i:&lt;br /&gt;SQL&gt; &lt;span style="font-weight: bold;"&gt;SELECT dbms_flashback.get_system_change_number FROM dual;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most people will know about the 10g query, but the 9i one is quite useful. This raises another point - Did you know that Flashback Query was actually available in Oracle database 9i. The rest of the Flashback features arrived in 10g.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1231553003428621555?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1231553003428621555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1231553003428621555'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/06/get-scn.html' title='Get SCN.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-3290362974908483109</id><published>2007-06-03T22:43:00.001+01:00</published><updated>2007-06-27T06:04:05.543+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='9i'/><category scheme='http://www.blogger.com/atom/ns#' term='redefine online'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='DBMS_REDEFINITION'/><title type='text'>Redefine online.</title><content type='html'>&lt;div align="justify"&gt;Several days back I had a developer ask me how he could change a column datatype from a NUMBER to a VARCHAR2 in production without any downtime. As far as I can see, there are several ways of doing this:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;We could use: ALTER TABLE xyz MODIFY mycolumn VARCHAR2 (30); But the problem with this is that the column in question would have to be empty - zero rows.....&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;We could add a new column, migrate the data then drop the old column - but that's messy. The column position would change in the table and I would end up locking the table for a long time whilst each row is updated.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;Enter one of my favourite Oracle supplied packages, DBMS_REDEFINITION . &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;DBMS_REDEFINITION allows you make changes to online tables beyond the scope of the ALTER TABLE .... MOVE syntax. For example, I can change a column's attributes, change a Heap (standard table type) table into an Index Organised Table, transform table data or modify storage. &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;In this tip, and my next, I am going to give two examples of how DBMS_REDEFINITION has helped me avoid application downtime during the day.&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;The general procedure is to create a new replacement table (with the new definition), begin the redefinition process (at which point Oracle copies data from my target table into the new table), and finally perform the actual table switch (at which point Oracle switches the two physical tables online).&lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;There are a few questions to ask yourself at this time such as:&lt;br /&gt;&lt;br /&gt;What about all my dependencies (constraints, synonyms etc)?&lt;br /&gt;How can this happen online?&lt;br /&gt;What about locking when the switch is made?&lt;br /&gt;&lt;br /&gt;Do not fear, DBMS_REDEFINITION is going to take care of all these issues.&lt;br /&gt;&lt;br /&gt;Here, I have a (simple for the sake of example) table, which is loaded with data, and in use:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;DESC CUSTOMER&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;Name Null? Type&lt;br /&gt;-----------------------------------------------------&lt;br /&gt;ID NOT NULL NUMBER&lt;br /&gt;CUSTOMER_NO NUMBER&lt;br /&gt;COMPANY_NAME VARCHAR2(30)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt;&lt;br /&gt;I wish to change my CUSTOMER_NO column from a NUMBER datatype to a VARCHAR2.&lt;br /&gt;&lt;br /&gt;First of all, I create my "interim" table called INTERIM_CUSTOMER. This has my new column definition. This table is going to have my CUSTOMER_NO column defined as a VARCHAR2.&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;CREATE TABLE interim_customer(&lt;br /&gt;id NUMBER PRIMARY KEY,&lt;br /&gt;customer_no VARCHAR2(30),&lt;br /&gt;company_name VARCHAR2(30)&lt;br /&gt;);&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;table created.&lt;br /&gt;&lt;br /&gt;Note that this table has a Primary Key. In 9i, if you wanted to use DBMS_REDEFINITION on a table, it &lt;em&gt;had&lt;/em&gt; to have a Primary Key. However, 10g does offer a way around this.&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;Next, I use DBMS_REDEFINITION to check that it can work with my CUSTOMER target table. &lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;begin&lt;br /&gt;dbms_redefinition.can_redef_table('scott','customer');&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;If this procedure returns no errors, then we are in business.&lt;br /&gt;&lt;br /&gt;Next, I am going to begin the redefinition process. At this point, Oracle will copy (not move) all of my rows from CUSTOMER to INTERIM_CUSTOMER. The "col_mapping" parameter allows me to specify how columns are to be mapped between my old and newly defined table. I can also convert data on the move (in this case, the blue text demonstrates that I have converted my NUMBER data using the TO_CHAR function).&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;begin&lt;br /&gt;dbms_redefinition.start_redef_table(&lt;br /&gt;uname=&gt;'scott',&lt;br /&gt;orig_table=&gt;'customer',&lt;br /&gt;int_table=&gt;'interim_customer',&lt;br /&gt;col_mapping=&gt;'id id, &lt;span style="color: rgb(51, 51, 153);"&gt;to_char(customer_no) customer_no&lt;/span&gt;,&lt;br /&gt;company_name company_name');&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;The next step is to ask Oracle to sync over any table dependencies (such as constraints, indexes etc). I could do this manually after I have created my interim table, but instead, I am going to let Oracle do all of the hard work:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;DECLARE&lt;br /&gt;num_errors PLS_INTEGER;&lt;br /&gt;BEGIN&lt;br /&gt;dbms_redefinition.copy_table_dependents(&lt;br /&gt;UNAME=&gt;'scott',&lt;br /&gt;ORIG_TABLE=&gt;'customer',&lt;br /&gt;INT_TABLE=&gt;'interim_customer',&lt;br /&gt;IGNORE_ERRORS=&gt;true,&lt;br /&gt;NUM_ERRORS=&gt;num_errors);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Oracle has now copied my data and built my table dependencies. I can either perform another data sync or make the switch. When the table is switched, there is a brief point at which the target and interim tables are locked. The idea of the data sync is to update my interim table with any new rows from my target. When the switch is made, Oracle will also run a final sync. The less data there is to sync, the less time the tables are locked. You could choose to create the interim table over night, and manually run the syncs during the day, right up to the point of the swap. Here is the data sync syntax:&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;begin&lt;br /&gt;dbms_redefinition.sync_interim_table ('scott','customer','interim_customer');&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;OK, now I am ready to go. I am going to ask Oracle to switch the tables (online). Once this is complete, CUSTOMER will become INTERIM_CUSTOMER and INTERIM_CUSTOMER will become CUSTOMER. &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;CUSTOMER will have my new VARCHAR2 column, replacing my old NUMBER column. Finally, all of my Synonyms will point to CUSTOMER, Indexes will exist, and constraints will still be in place - I can confirm this really does work, after lots of testing and several production runs!&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;begin&lt;br /&gt;dbms_redefinition.finish_redef_table('scott','customer','interim_customer');&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;SQL&gt; &lt;strong&gt;DESC CUSTOMER&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;Name Null? Type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;---------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;ID NOT NULL NUMBER&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-size:85%;" &gt;CUSTOMER_NO VARCHAR2 (30)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;COMPANY_NAME VARCHAR2(30)&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;Next time, I will run through how a LOB INDEX segment can be moved to another tablespace with DBMS_REDEFINITION, again, all online. This is something that you cannot do with any standard SQL.&lt;br /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-3290362974908483109?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3290362974908483109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3290362974908483109'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/06/redefine-online.html' title='Redefine online.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-1028880658146543932</id><published>2007-05-31T15:54:00.001+01:00</published><updated>2007-06-27T06:04:05.545+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='high availability'/><category scheme='http://www.blogger.com/atom/ns#' term='technet'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>High Availability LOL.</title><content type='html'>As much as I love Oracle, I had to laugh at this..... whilst roaming around Technet today, I tried to enter the "High Availability" section:&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/deploy/availability/index.html"&gt;http://www.oracle.com/technology/deploy/availability/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and I got:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_XkQ10xmV9PA/Rl7inD0FqFI/AAAAAAAAABY/tBqWCuy-FdE/s1600-h/error.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5070739391132313682" style="FLOAT: left; MARGIN: 0pt 10px 10px 0pt; WIDTH: 361px; CURSOR: pointer; HEIGHT: 115px" alt="" src="http://2.bp.blogspot.com/_XkQ10xmV9PA/Rl7inD0FqFI/AAAAAAAAABY/tBqWCuy-FdE/s400/error.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="TEXT-DECORATION: underline"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I guess even the best have a bad day.......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-1028880658146543932?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1028880658146543932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/1028880658146543932'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/05/high-availability-lol.html' title='High Availability LOL.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_XkQ10xmV9PA/Rl7inD0FqFI/AAAAAAAAABY/tBqWCuy-FdE/s72-c/error.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-2237535521018181677</id><published>2007-05-30T09:54:00.000+01:00</published><updated>2007-06-27T06:04:05.546+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='standby database'/><category scheme='http://www.blogger.com/atom/ns#' term='v$dataguard_stats'/><category scheme='http://www.blogger.com/atom/ns#' term='real time apply'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='dataguard'/><title type='text'>10g Dataguard status view.</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Here's a quick tip of the day if you are using Oracle 10g and have a Standby Dataguard database.  The V$DATAGUARD_STATS view (not to be confused with V$DATAGUARD_STATUS!) lists up to date details on how quickly your Standby database could be opened, and how much redo would need to be applied to bring it up to date:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;col NAME for a30&lt;/span&gt;&lt;br /&gt;SQL&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;col VALUE for a30&lt;br /&gt;&lt;/span&gt;SQL&gt;&lt;span style="font-weight: bold;"&gt; set linesize 132&lt;br /&gt;&lt;/span&gt;SQL&gt;&lt;span style="font-weight: bold;"&gt; SELECT * FROM v$dataguard_stats;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;NAME                               VALUE                                 UNIT                               TIME_COMPUTED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;---------------------------------------------------------------------------- &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;apply finish time                                             day(2) to second(1) interval   30-MAY-2007 09:54:31&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;apply lag                      +00 00:17:48                   day(2) to second(0) interval   30-MAY-2007 09:54:31&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;estimated startup time         12                             second                         30-MAY-2007 09:54:31&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;standby has been open          Y                                                             30-MAY-2007 09:54:31&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;transport lag                  +00 00:00:00                   day(2) to second(0) interval   30-MAY-2007 09:54:31&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="font-family:georgia;"&gt;Here, Dataguard is telling me that I am almost 18 minutes behind my production database and it will take approximately 12 seconds to apply the extra redo required to bring my Standby up to date. Finally, the view informs me that I have not specified any transport lag between my Primary and Standby, and that my standby has been previously opened.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The missing redo is sitting in my Standby Database Standby Redo Logs and will be applied when I open the standby for read only, role reversal, or fail over.  If I was using the new 10g Real Time Apply Dataguard feature, Oracle would be applying redo to my Standby Database as soon as it hits my Standby Redo Log files. This feature further reduces my recovery time on my Standby by keeping the redo apply gap between my Stanbdy and Primary commits to a minimum. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;Very useful!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-2237535521018181677?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2237535521018181677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2237535521018181677'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/05/10g-dataguard-status-view.html' title='10g Dataguard status view.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-7606843151156254178</id><published>2007-05-15T09:12:00.000+01:00</published><updated>2007-05-21T13:20:23.607+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Install'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='background'/><category scheme='http://www.blogger.com/atom/ns#' term='OUI'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='automate'/><title type='text'>Oracle speed installs.</title><content type='html'>If, like myself, you need to install Oracle software on several target servers, then you may be interested in  the Oracle installers recording functionality.  In this case, I have around 20 target machines to install the Oracle client software. Once I have downloaded the software, I install it onto my first machine using the Oracle Universal Installer (OUI) in "record" mode:&lt;br /&gt;&lt;br /&gt;./runInstaller -record -destinationFile /public/dist/contrib/Oracle/Oracle-10.2.0-client/client&lt;br /&gt;/response/10gR2Client.rsp&lt;br /&gt;&lt;br /&gt;Using this command, I am telling Oracle to create a "response file" which contains all of the actions that I have taken for this particular installation (this will include the Oracle Home that I choose, the software options I select, etc).&lt;br /&gt;&lt;br /&gt;Once the installation is complete, my 10gR2Client.rsp file can be used to automate (skip the Java GUI) the next installation.  At my site, I have a software repository which is shared out via NFS to all target servers.  Therefore, I include my 10gR2Client.rsp file in that area. I can then log onto the server as the Oracle user, run my script and leave the install to do its work, so for example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mkdir -p /opt/app/oracle&lt;/span&gt;  (create my new Oracle Home)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/public/dist/contrib/Oracle/Oracle-10.2.0-client/client/runInstaller -silent&lt;br /&gt;-responseFile /public/dist/contrib/Oracle/Oracle-10.2.0-client/client/&lt;br /&gt;response/10gR2Client.rsp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The key parameters here are:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;silent&lt;/span&gt;:              Meaning do not start the GUI installer&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;responseFile&lt;/span&gt;:    Gives the name of my previously create response file.&lt;br /&gt;&lt;br /&gt;Finally, once the install is complete, Oracle will prompt me to run the root.sh file as the Root user (as it always does).&lt;br /&gt;&lt;br /&gt;The good news about all this method, is that you can use it to install patch sets, and the Oracle database software itself.  I find this has helped me avoid hours of time messing about with the GUI Oracle Universal Installer, and allows me to get on with something more interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-7606843151156254178?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/7606843151156254178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/7606843151156254178'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/05/oracle-speed-installs.html' title='Oracle speed installs.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-3239895236271459220</id><published>2007-05-11T12:16:00.000+01:00</published><updated>2007-06-27T06:04:05.547+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='metalink'/><category scheme='http://www.blogger.com/atom/ns#' term='go faster'/><category scheme='http://www.blogger.com/atom/ns#' term='export'/><category scheme='http://www.blogger.com/atom/ns#' term='Datapump'/><category scheme='http://www.blogger.com/atom/ns#' term='import'/><category scheme='http://www.blogger.com/atom/ns#' term='faster'/><category scheme='http://www.blogger.com/atom/ns#' term='SESSION_CACHED_CURSORS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='init.ora'/><title type='text'>Datapump go faster.</title><content type='html'>In addition to the database parameter changes made in my Datapump article, Metalink note 376969.1 suggests that to improve performance, you should set the following parameters in your target database before running the import job:&lt;br /&gt;&lt;br /&gt;_spin_count = 4000&lt;br /&gt;session_cached_cursors = 800&lt;br /&gt;cursor_space_for_time = true&lt;br /&gt;db_cache_advice = OFF&lt;br /&gt;&lt;br /&gt;Therefore, when you are performing a Datapump import, review and give appropriate values to all of the following parameters in your target database.&lt;br /&gt;&lt;br /&gt;# The following are set larger for datapump import&lt;br /&gt;pga_aggregate_target=&lt;span style="font-style: italic;"&gt;specifictoyoursite&lt;/span&gt;&lt;br /&gt;db_cache_size=&lt;span style="font-style: italic;"&gt;specifictoyoursite&lt;/span&gt;&lt;br /&gt;large_pool_size=&lt;span style="font-style: italic;"&gt;specifictoyoursite&lt;/span&gt;&lt;br /&gt;shared_pool_size=&lt;span style="font-style: italic;"&gt;specifictoyoursite&lt;/span&gt;&lt;br /&gt;_spin_count = 4000&lt;br /&gt;session_cached_cursors = 800&lt;br /&gt;cursor_space_for_time = true&lt;br /&gt;db_cache_advice = OFF&lt;br /&gt;statistics_level=basic&lt;br /&gt;cursor_sharing=EXACT&lt;br /&gt;# Comment out when import is complete&lt;br /&gt;&lt;br /&gt;Obviously set them back to their original values before restarting the database for normal use.&lt;br /&gt;&lt;br /&gt;I found that the parameters suggested by note 376969.1 brought my 4 hour export/import job down by 15 minutes - every little helps!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-3239895236271459220?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3239895236271459220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3239895236271459220'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/05/datapump-go-faster.html' title='Datapump go faster.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-2155215751425110996</id><published>2007-05-08T16:41:00.000+01:00</published><updated>2007-06-27T06:04:05.549+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='standby database'/><category scheme='http://www.blogger.com/atom/ns#' term='NETWORK_LINK'/><category scheme='http://www.blogger.com/atom/ns#' term='metalink'/><category scheme='http://www.blogger.com/atom/ns#' term='export'/><category scheme='http://www.blogger.com/atom/ns#' term='Datapump'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='import'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='dataguard'/><title type='text'>Datapump from standby.</title><content type='html'>If (like myself) you spend a large slice of your DBA time transferring schemas and table data from production to development, then the new features of 10g Datapump are here to save your day (well, hours of work anyway).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scenario&lt;/span&gt;&lt;br /&gt;We have a 50GB production database with around 25 live schema's. They cross reference each other with Foreign Keys, triggers, procedures and packages. Not massive, but quite complex. On a regular basis, one particular project requires around 15 of the schemas to be transferred to a development database. This note will show you how things used to get done (pre 10g), and what benefits can be gained by using the new Oracle data transfer utility, Datapump. In particular, I will be looking at the new network link capabilities, and the possibility of exporting data from an Oracle standby database.&lt;br /&gt;&lt;br /&gt;For this example, some schemas in my production database consist of data and audit tables. I will be taking the data, the structure of the audit tables, but not the audit data itself. For reference, I will be calling this type of export a "partial" export. With the remaining schemas, I will be taking all of the schema structures and table data. Again, for the purpose of this note, I will be calling this a "full" export.&lt;br /&gt;&lt;br /&gt;Here is the general procedure I would have used, when running under Oracle 9i.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1)&lt;/strong&gt; Clear out the old data from my target development database.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2)&lt;/strong&gt; Run the exports from Production one evening (not during the day for performance reasons):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;One export for all of the schema's with full data sets.&lt;/li&gt;&lt;li&gt;An export of data for each partial schema. &lt;/li&gt;&lt;li&gt;An export of the schema metadata (schema object definitions) for each partial schema.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; The following day, import the "full" export into my target development database. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; Load in the metadata definitions into my partial schemas. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;5)&lt;/strong&gt; Manually disable all of the constraints and triggers for my partial schemas. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;6)&lt;/strong&gt; Load the partial table data into the partial schemas. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;7)&lt;/strong&gt; Manually re-enable all of the constraints and triggers. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;8)&lt;/strong&gt; Check each schema against live to make sure the imports are looking good.&lt;br /&gt;&lt;br /&gt;Finally, after running a backup, gathering optimizer statistics gathering, running some data cleanup scripts (for security) and resizing my SGA, the entire task can take up to a day to complete. I will call this the "Manual Labour Refresh" method.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Enter Datapump&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;The first thing to say about Datapump is that it is fast, very fast. The second is that when using it in combination with the Network Link feature, you can export data &lt;span style="font-style: italic;"&gt;directly&lt;/span&gt; out of your Standby (Dataguard) database, &lt;span style="font-style: italic;"&gt;directly&lt;/span&gt; into your target database - no dump files required!&lt;/p&gt;&lt;p&gt;Here's how it works....&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Prepare the standby database&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;The first thing to do is open my Standby database in read only mode. In addition, I will be adding a temporary tablespace. This can be achieved via the usual syntax:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;&lt;br /&gt;SQL&gt;ALTER DATABASE OPEN;&lt;br /&gt;SQL&gt;ALTER TABLESPACE temp ADD TEMPORARY TEMPFILE '/u01/oradata/PROD/temp01.dbf' size 1G;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I will also be making a modification to the parallel_max_servers database parameter, to avoid an Oracle bug (see Metalink note number: 392689.1):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt; ALTER DATABASE SET parallel_max_servers=0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point, my Standby database is ready to go. One thing to note is that if my redo changes are being transferred from my Primary database to my Standby using Log Writer, the transfer will still continue. &lt;/p&gt;&lt;p&gt;My standby will continue to create archive log files, they will just not be applied whilst the database is in read only mode. This is good news. It does mean that my Standby would take longer to open as a Primary in an emergency, but I still have all of my redo sent over from Production ready to be applied. &lt;/p&gt;&lt;p&gt;In a nutshell, read only mode does not compromise my recoverability.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Prepare the target&lt;/span&gt; &lt;strong&gt;development database&lt;/strong&gt;&lt;br /&gt;Next, I need to prepare my target development database and server. First of all, I need to set up an entry in my TNSNAMES.ora file to enable connection to my Standby database. &lt;/p&gt;&lt;p&gt;Once completed, I then need to create a Database Link in my target development database to point to my Standby. This is going to be the link which allows Datapump to drag the data out from the standby, and import it into my target:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;CREATE DATABASE LINK standby CONNECT TO SYSTEM IDENTIFIED BY xyz USING 'STANDBY_LIVE';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In my case, I have run this as the System user. Of course if you are worried about security, you can create a special Datapump user, and grant the appropriate EXP_FULL_DATABASE / IMP_FULL_DATABASE roles. &lt;/p&gt;&lt;p&gt;The connect string 'STANDBY_LIVE' should be the same connect string name as the one found in my TNSNAMES.ora file.&lt;br /&gt;&lt;br /&gt;Next, I need to create a Datapump database directory. Even though I will not be using dump files for the import, I still need a directory for Datapump to be able to write its log files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ mkdir -p /opt/backup/exports/datapump &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;SQL&gt; CREATE DIRECTORY data_pump_files AS '/opt/backup/exports/datapump';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The next step is optional, but I like to resize my SGA as large as possible to speed up the import. Another trick is to add larger redo log files to my target database. The larger my redo log files, the less log switches, the faster things will run.&lt;br /&gt;&lt;br /&gt;Next, for my development database, I will be setting my CURSOR_SHARING parameter equal to 'EXACT'. Again, this is to avoid a Datapump related bug (see Metalink note number: 416238.1).&lt;br /&gt;&lt;br /&gt;Finally, I take my target database out of Archive Log mode. Again this will help speed things up once the import is underway.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Run the Datapump import.&lt;/span&gt;&lt;br /&gt;This is where the fun begins. I like to create a parameter file (parfile) for Datapump. This will save me time if I ever need to re-run all of these tasks again. Here is a sample parameter file for this particular job:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;NETWORK_LINK=STANDBY_LIVE.mydomain.com&lt;br /&gt;DIRECTORY=DATA_PUMP_FILES&lt;br /&gt;PARALLEL=8&lt;br /&gt;SCHEMAS=HR,GL,WIKI,CMS,FINANCE,FINAPP,SCOTT&lt;br /&gt;JOB_NAME=imp_full&lt;br /&gt;LOGFILE=imp_full.log&lt;br /&gt;QUERY=finance.AUDIT_LOG:"WHERE ID &lt;0"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;NETWORK_LINK&lt;/strong&gt; allows me to specify the Standby database as my data source. Here, I am giving the name specified by my database link created earlier on.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;PARALLEL&lt;/strong&gt; is a new feature which, divides the import task between x number of worker processes. This is a great new feature of Datapump which really does give me a speed boost. Pre-10g, I only ever had one process working on an import job, no matter how large the task, even if I had an 8 CPU machine.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SCHEMAS&lt;/strong&gt; is fairly self explanatory. A list of schema's to export and import.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JOB_NAME&lt;/strong&gt; specifies a name for my Datapump job. This allows me to disconnect from the job, and reconnect later on and check the job status.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;QUERY&lt;/strong&gt; is the other really useful feature. Here I am telling Oracle that I want my finance.AUDIT_LOG table, but without any rows with an ID greater than 0 (in other words, I want the table structure without any data). &lt;/p&gt;&lt;p&gt;You can specify multiple QUERY entries in your Datapump parfile, enabling you to pick and choose the data you want.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Let's go!&lt;br /&gt;&lt;/strong&gt;All that is left to do now is to run the import. For this, I use the impdp command, and specify my parfile name:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$&gt; impdp parfile=full_imp.par&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle will prompt me for a username and password, and then spring into life. The Datapump utility build its own internal "Action list" table based on my parameter file, and then start dragging the data out of my standby, across the network and into my target! &lt;/p&gt;&lt;p&gt;Sit back and relax.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Final tasks&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Once my Datapump job is complete, I will need to put my Standby Database back into managed recover mode. Dataguard will apply any newly created archive log files, and recover my standby database. Then, Dataguard with continue to apply any new redo as it arrives from my primary site - just as it ever did.&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I then need to downsize the SGA on my development database, reset the CURSOR_SHARING parameter, re-enable Archive Log mode, and drop my database link. Once all of this is complete, my new development database is ready for use (I will also be running my security scripts and performing a database backup after all that hard work).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Final word&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;So to summarise, at my site, 10g Datapump reduces a day of manual labour down to 4 hours of automated work. The NETWORK_LINK capability allows me to run my Datapump job during normal working hours, without disrupting the performance of my Production database. The Query feature helps me avoid the multiple imports and exports I used before. Finally, the PARALLEL feature gives Datapump that well needed power boost over the old import / export utilities. &lt;/p&gt;&lt;p&gt;I hope this gives you some new idea's of how 10g Datapump can improve your daytime DBA duties!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-2155215751425110996?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2155215751425110996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/2155215751425110996'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/05/datapump-from-standby.html' title='Datapump from standby.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-7086699190512931948</id><published>2007-05-02T16:39:00.000+01:00</published><updated>2007-06-27T06:04:05.550+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='V$undostat'/><category scheme='http://www.blogger.com/atom/ns#' term='snapshot too old'/><category scheme='http://www.blogger.com/atom/ns#' term='undo'/><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-01555'/><category scheme='http://www.blogger.com/atom/ns#' term='undo_retention'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Don't get undone by 10g Undo.</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Here's and interesting thing I discovered after upgrading our 9i production databases to 10g....&lt;br /&gt;&lt;br /&gt;I was using a 2GB Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; for my 9i production database. My undo_retention parameter was set to 3600 (1hr) and this was sufficient during daytime and evening processing.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;Less than a day after upgrading to 10g, my Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; became full. I added another &lt;/span&gt;datafile&lt;span style="font-family:georgia;"&gt; &lt;/span&gt;bringing&lt;span style="font-family:georgia;"&gt; it up to 2.5GB; Again, it was full again within about 1 hour.  This required investigation. Why such an increase of Undo usage for 10g?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;It seemed I had become a 'victim' of the new 10g automatic undo management feature.  Here are the details of what I discovered.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Under 9i, the database would try and honour the undo_retention parameter.  Obviously if the Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; free space became under pressure, Oracle would start reusing Undo segments that had been retained retained for consistency, but not in use by active transaction. Things are different with 10g, and the main contributing factor to how things work is the status of&lt;/span&gt;&lt;span style="font-family:georgia;"&gt; &lt;/span&gt;autoextend&lt;span style="font-family:georgia;"&gt; mode setting for your Undo tablespace datafiles.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:georgia;" &gt;No autoextend.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;If you are using no-autoextend (the setting I still prefer), Oracle will &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-weight: bold;"&gt;ignore&lt;/span&gt; your undo_retention parameter &lt;/span&gt;&lt;span style="font-style: italic;font-family:georgia;" &gt;unless&lt;/span&gt;&lt;span style="font-family:georgia;"&gt; you have your Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; set up for retention &lt;/span&gt;guarantee&lt;span style="font-family:georgia;"&gt;. &lt;br /&gt;&lt;br /&gt;Without retention guarantee, Oracle will just use as much space as possible for Undo retention. &lt;br /&gt;I experienced my Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; hit 97% full (with all of the EM alerts that come with this territory). After a while, usage dropped back down and become stable at 95%.  With no &lt;/span&gt;autoextend&lt;span style="font-family:georgia;"&gt; set for your Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt;, the more space you give Oracle, the more it takes.  This makes sense really, but was not the case in 9i.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:georgia;" &gt;With autoextend.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;Oracle will use the undo_retention parameter as its "lowest threshold" point.  It still calculates its own value for undo retention and applies this value to your Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt;. What this means is that once the database has made up its mind about how much Undo it thinks it will need to satisfy all of your long running queries and flashback features, your Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; &lt;/span&gt;datafile&lt;span style="font-family:georgia;"&gt; will begin to grow (and grow, and grow)!&lt;br /&gt;In this situation, you need to monitor, and make sure you have lots of free disk space ready.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;You can view Oracle's &lt;/span&gt;self calculated retention value&lt;span style="font-family:georgia;"&gt; by examining at the value held in the &lt;/span&gt;&lt;span  lang="en-gb" style="font-family:georgia;"&gt;&lt;span style="font-size:85%;"&gt; TUNED_UNDORETENTION Column of the V$UNDOSTAT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt; view. Another &lt;/span&gt;useful&lt;span style="font-family:georgia;"&gt; tool is the "undo Management" page in Grid Control.  Here we can view a graph that shows how much free space in your Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt;. How much space is taken up by active transactions, and finally, how much is taken up by "Retained for Use by Queries or Flashback".  In my situation, 99% of my free space from my Undo &lt;/span&gt;tablespace&lt;span style="font-family:georgia;"&gt; was taken up by "Retained for Use by Queries or Flashback".  In other words, Oracle was retaining as much undo data as possible to satisfy my possible need for flashback features, or data point in time consistency.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;To summarise, here is my advice in this area.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul  style="font-family:georgia;"&gt;&lt;li&gt;Use the autoextend feature for your Undo tablespace datafiles with caution. Make sure you have lots of free disk space, as this will grow until Oracle thinks it has hit the correct size to satisfy your current transactions, &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; undo retention. If you are unsure, do not enable autoextend for this tablespace.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you are going to switch off autoextend, then monitor your Undo tablespace with Grid Control and / or the V$UNDOSTAT view.&lt;/li&gt;&lt;li&gt;Keep an eye open for ORA-01555's "snapshot too old" errors. This could be a sign that your database cannot read enough "retained" undo to satisfy a long running query.&lt;/li&gt;&lt;li&gt;If you are leaving autoextend switched off, then it is usual under 10g for Oracle to use up as much space as possible from your Undo tablespace.  Monitor that you have enough space for "Active transactions" and you are not encountering ORA-01555's.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span lang="en-gb"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-7086699190512931948?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/7086699190512931948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/7086699190512931948'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/05/10g-undo-gotcha.html' title='Don&apos;t get undone by 10g Undo.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-3190032045677411504</id><published>2007-04-25T17:13:00.000+01:00</published><updated>2007-06-27T06:04:05.551+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Moorgate'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><category scheme='http://www.blogger.com/atom/ns#' term='London'/><title type='text'>Fire on Moorgate!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_XkQ10xmV9PA/Ri-AKD9qyBI/AAAAAAAAABA/NuafTd-la8k/s1600-h/fire2.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_XkQ10xmV9PA/Ri-AKD9qyBI/AAAAAAAAABA/NuafTd-la8k/s200/fire2.jpg" alt="" id="BLOGGER_PHOTO_ID_5057401816911366162" border="0" /&gt;&lt;/a&gt;A slightly worrying event occurred this morning - I was in the middle of logging an SR with Oracle when I was rudely interrupted by next doors office  catching fire....  Not the kind of thing that happens every day....&lt;br /&gt;&lt;br /&gt;We were evacuated for several hours from our office whilst the Fire brigade arrived to sort things out.  Luckily, everyone was OK, but I think the insurance bill is going to be pretty damn big.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_XkQ10xmV9PA/Ri-ATj9qyCI/AAAAAAAAABI/MG7PlxVv8_4/s1600-h/fire6.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-3190032045677411504?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3190032045677411504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/3190032045677411504'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/04/burn-it-up.html' title='Fire on Moorgate!'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_XkQ10xmV9PA/Ri-AKD9qyBI/AAAAAAAAABA/NuafTd-la8k/s72-c/fire2.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-4866022818511272697</id><published>2007-04-25T09:35:00.000+01:00</published><updated>2007-06-27T06:04:05.552+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10g'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-04031'/><category scheme='http://www.blogger.com/atom/ns#' term='SESSION_CACHED_CURSORS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='OPEN_CURSORS'/><title type='text'>Too many session_cached_cursors are bad for your health.</title><content type='html'>In Oracle 9.2.0.5.0, a new database parameter became available called SESSION_CACHED_CURSORS.  At the time, the other important cursor related parameter was OPEN_CURSORS.&lt;br /&gt;&lt;br /&gt;In Oracle versions 9.2.0.4.0 and lower, OPEN_CURSORS controlled the maximum amount of cursors any one particular session could open.   If the value for this parameter has been set too low, your applications could run into trouble. Because of this, many DBA's were cautious, and over sized  the value of OPEN_CURSORS  in their init.ora's . The side effect of the OPEN_CURSORS parameter was that it also set the size of each sessions PL/SQL cursor cache (which was allocated from the Shared Pool).&lt;br /&gt;&lt;br /&gt;Since 9.2.0.4.0, the  SESSION_CACHED_CURSORS parameter arrived as a part of the 9.2.0.5.0 patch set. Oracle describes this parameter as "Specifies the number of session cursors to cache. Repeated parse calls of the same SQL statement cause the session cursor for that statement to be moved into the session cursor cache". Basically, this parameter allows DBA's to have better control over the size of each sessions PL/SQL cursor cache.&lt;br /&gt;&lt;br /&gt;A simple mistake to make with SESSION_CACHED_CURSORS is to set the value &lt;span style="font-style: italic;"&gt;too&lt;/span&gt; high. &lt;span&gt;Most &lt;/span&gt; applications should be fine with a starting point value of 50 (the default is 0 in 10g).&lt;br /&gt;&lt;br /&gt;If the value for SESSION_CACHED_CURSORS is set too high, for example, equal to the value of OPEN_CURSORS, you will be over estimating the number of cached cursors required, and creating a larger cursor cache for each database session.&lt;br /&gt;&lt;br /&gt;So, why does all this matter?  - Well, as each session allocates its cursor cache from the  Shared Pool, you can run into a situation where the Shared Pool becomes fragmented and / or the free memory can become exhausted.&lt;br /&gt;&lt;br /&gt;With 10g, this problem becomes even more apparent, as there is an increase in the amount SQL battling for space in the Shared Pool. I have found that this is caused by the new performance monitoring features brought by the AWR and ADDM features.&lt;br /&gt;&lt;br /&gt;A combination of a poorly set SESSION_CACHED_CURSORS parameter and the extra space pressure on the Shared Pool brought by the new monitoring functionality can push the Shared Pool over the edge. This in turn leads to the dreaded "ORA-04031, unable to allocate X amount of bytes of shared memory" error messages.&lt;br /&gt;&lt;br /&gt;In most cases, ORA-04031's cause your applications to fail, and can eventually  lead to database downtime - the last thing us DBA's need!&lt;br /&gt;&lt;br /&gt;So, to summarize: be careful with the SESSION_CACHED_CURSORS parameter - it can lead to trouble if set incorrectly. If you wish to use it, start with a value of 50, and monitor. This will keep you and your database out of trouble.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-4866022818511272697?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4866022818511272697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4866022818511272697'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/04/too-many-sessioncachedcursors-are-bad.html' title='Too many session_cached_cursors are bad for your health.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-5174007698969403062</id><published>2007-04-21T11:09:00.000+01:00</published><updated>2007-06-27T06:04:05.553+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Read! Read! Read!</title><content type='html'>Unless (unlike mine) your company has a mega Oracle training budget, I find the only way I can really keep on top of Oracle is by reading as much about the subject as possible. That's why I have added a book list on my Blog. These books are the ones that I really &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;recommend&lt;/span&gt; reading. Most of them contain information that you &lt;span style="FONT-STYLE: italic"&gt;must&lt;/span&gt; know to do your job. I guess the 10g certification ones are not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;essential&lt;/span&gt;, but if your thinking about getting certified, then stick to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Sybex&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; books. They are &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;defiantly&lt;/span&gt; the best.&lt;br /&gt;&lt;br /&gt;In reality, I think it would be almost impossible to know everything about Oracle. Even if you specialise. So my main &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;moto&lt;/span&gt; is to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;remember&lt;/span&gt; that the learning never ends!&lt;br /&gt;&lt;br /&gt;Aside from reading, here are my other tips on how to learn about Oracle and Oracle products:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/software/index.html"&gt;Download Oracle&lt;/a&gt; software and play.&lt;/li&gt;&lt;li&gt;Get &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;certified&lt;/span&gt; (Oracle, not mentally).&lt;/li&gt;&lt;li&gt;Work on as many different Oracle projects as possible.&lt;/li&gt;&lt;li&gt;Read websites such as &lt;a href="http://www.oracle.com/technology/index.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;technet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://www.oracle.com/index.html"&gt;oracle.com&lt;/a&gt; and &lt;a href="http://asktom.oracle.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;asktom&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Participate in Oracle forums (helping people).&lt;/li&gt;&lt;li&gt;Attend Oracle &lt;a href="http://www.oracle.com/education/index.html"&gt;University&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Read the &lt;a href="http://www.oracle.com/technology/documentation/database10gr2.html"&gt;Oracle documentation&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-5174007698969403062?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5174007698969403062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/5174007698969403062'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/04/read-read-read.html' title='Read! Read! Read!'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-6754514337520528246</id><published>2007-04-19T23:35:00.000+01:00</published><updated>2007-04-25T17:27:32.469+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORA-07445'/><category scheme='http://www.blogger.com/atom/ns#' term='SIGSEGV'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Orable ORA-07445's</title><content type='html'>Yes, I got some of these in my 10g production db today. I think over the years this error has to be one of the top ten common Oracle Alert log errors that I have seen.&lt;span style="font-style: italic;"&gt; Generally,  &lt;/span&gt;these turn out to be caused an Oracle bug or some crazy application coding.&lt;br /&gt;&lt;br /&gt;An ORA-07445 is a pretty serious internal database error, and is enough to send shivers down the spine of even the most hardened Oracle DBA. Your users will most probably suffer when you encounter one of these beauties, and in extream cases, your instance may crash or freeze up. But keep a level head, its time to be cool and investigate as soon as possible.&lt;br /&gt;&lt;br /&gt;Here's a few tips:&lt;br /&gt;&lt;br /&gt;1) Log onto &lt;a href="https://metalink.oracle.com/"&gt;metalink&lt;/a&gt; , click on the knowledge tab, "database" in the product category nav, then "ORA-600 / ORA7445 Error Lookup by Argument". This will give you a lookup tool which can give you some idea as to what's going on.&lt;br /&gt;&lt;br /&gt;2) Do an search for the failing function in the "advanced search" feature on &lt;a href="https://metalink.oracle.com/"&gt;metalink&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;.&lt;/span&gt; For example if your getting:&lt;br /&gt;&lt;br /&gt;ORA-07445: exception encountered: core dump [xsiofmgrMTSOpen()+35] [SIGSEGV]&lt;br /&gt;[Address not mapped to object] [0x18] [] []&lt;br /&gt;&lt;br /&gt;in your alert log, then "xsiofmgrMTSOpen" is know as the "failing function"&lt;br /&gt;&lt;br /&gt;3) Open up an SR with Oracle - its likely your going to need some help with this one.&lt;br /&gt;&lt;br /&gt;4) Upload your alert log and trace files to Oracle.&lt;br /&gt;&lt;br /&gt;5) Upload the output from RDA. I'm gonna do another post about RDA for beginners as this is a very usful tool...&lt;br /&gt;&lt;br /&gt;6) Check your application log files, there may be further information that is not being presented in your alert.log&lt;br /&gt;&lt;br /&gt;7) Have a look through the trace file created by the core dump. You will find them stored under your $ORACLE_HOME/udump directory.&lt;br /&gt;&lt;br /&gt;8) Think about a work around. For example, today's error on our database was breaking Shared server connections, so I have the option to temporarily switch those users to dedicated connections until the problem is resolved. Not great, but it keeps my database alive.&lt;br /&gt;&lt;br /&gt;9) Think about what else is going on at the time of the error. Any unusual batch runs? New application modules, patches, more users that usual?&lt;br /&gt;&lt;br /&gt;10) Grab a statspack snapshot or AWR snapshot and investigate. It may be that your database is under unusual load, and that is what is bringing the database bug to life.&lt;br /&gt;&lt;br /&gt;11) Employee a human firewall. Your helpdesk or boss - someone, anyone to take the flack from your userbase whilst you get down to fixing the problem.&lt;br /&gt;&lt;br /&gt;12) Keep everyone informed, and prepare them for possible down time. You may need to apply a patch to get around this problem.&lt;br /&gt;&lt;br /&gt;Good luck with your investigations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-6754514337520528246?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6754514337520528246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6754514337520528246'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/04/orable-ora-07445s.html' title='Orable ORA-07445&apos;s'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-4727326679791857144</id><published>2007-04-18T23:24:00.000+01:00</published><updated>2007-04-25T17:28:29.639+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VMware'/><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC'/><title type='text'>Running RAC at home.</title><content type='html'>OK, so like me, you probably haven't got yourself a spare pair of servers a storage array and a bunch of switches just hanging around in your garage, so how are you ever going to get to mess around with 10g RAC ? Well, the answer to all of your problems is a combination of VMware, Oracle Enterprise Linux and Oracle 10g database.&lt;br /&gt;&lt;br /&gt;Check out this link on Oracle Technet to find out the fine details of how you can get RAC installed and up and running on your bog standard Windows XP PC:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/pub/articles/chan-ubl-vmware.html"&gt;http://www.oracle.com/technology/pub/articles/chan-ubl-vmware.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is a (very) brief overview to give you an idea of how it all works:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VMware.&lt;/span&gt;&lt;br /&gt;VMware allows your PC (or server) to host one or more additional operating systems (posing as physical servers). In this case, I can use VMware to host two or more Oracle databases servers. Pretty cool. You basically have to download, register and then install VMware on your XP machine. The next step is to specify the physical attributes (spec) of your first virtual server. How many disks? Network cards? How much memory? etc.&lt;br /&gt;&lt;br /&gt;Note that the disks you specify map to actual physical files on your PC's hard drive, and the memory is allocated from your host OS. So, at this point you may be getting the picture - performance is &lt;span style="font-size:0;"&gt;not&lt;/span&gt; &lt;span style="font-style: italic;"&gt;too &lt;/span&gt;hot (in fact at some points of this install its painfully slow).... but hey, were not running our 10,000 tps OLTP system here, this is just a bit of fun and learning!&lt;br /&gt;&lt;br /&gt;OK, once your guest server has been defined, and you have started it up - the real fun begins!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Oracle Enterprise Linux.&lt;/span&gt;&lt;br /&gt;Next, download Oracle Enterprise Linux and install. Why Oracle Enterprise Linux? Well, its basically a complete clone of RedHat Linux with new badges on the front. Why is it better than Redhat? Well in my opinion, its not (yet), but it is free to download and use, so its great for this setup.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Install Enterprise Linux on VM server number 1 &amp; 2.&lt;/span&gt;&lt;br /&gt;Once you have completed the install on VM server number 1, you can then shut it down, and copy the physical VMware files to "clone". Your clone copy of VM server 1 is used to quickly create a second virtual server. Yes you guessed it, were going to be creating a two node Oracle RAC cluster here.&lt;br /&gt;&lt;br /&gt;Once both virtual Linux servers up and running, you can move onto the next stage, installing Oracle 10g. Obviously I have brushed over the details of how you create a clustered file system, set up the multiple network interfaces to be used for your public and private networks etc etc - all of this is very well documented by the link above.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Install Oracle.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;OK, the final steps involve configuring the ASM disks, OCFS disks, installing Oracle Clusterware, installing Oracle 10g and finally creating a clustered database. Once completed, you will find you have the following to play with (all running under Window XP, which I still find crazy!):&lt;br /&gt;&lt;br /&gt;Oracle Enterprise Linux,&lt;br /&gt;Oracle 10g,&lt;br /&gt;Oracle Real Application Clusters,&lt;br /&gt;ASM,&lt;br /&gt;Enterprise Manager Database Control.&lt;br /&gt;&lt;br /&gt;OK, so I can confirm that the procedure from the Oracle website works a treat, but here are my additional tips:&lt;br /&gt;&lt;br /&gt;1) Set aside a few days to do this, because &lt;span style="font-style: italic;"&gt;it is damn slow&lt;/span&gt;! Yes, XP is hardly the most performant O/S, but when it is running all the other stuff, you need patience...&lt;br /&gt;&lt;br /&gt;2) Ram in the RAM. I had 2.5GB of RAM installed on my PC. I gave each Virtual server 1GB and left 500MB for the host. I would say 2GB is the &lt;span style="font-style: italic;"&gt;minimum&lt;/span&gt;. Honestly.&lt;br /&gt;&lt;br /&gt;3) Set up your PC to manually start the VMware services when you need them rather than automatically. If your just going to use your day to day XP stuff, the VMware background services can slow things down, so don't leave them running.&lt;br /&gt;&lt;br /&gt;4) Back it up. Yes, I know your not at work now, but it does take hours to set this stuff up, so do yourself a favour!&lt;br /&gt;&lt;br /&gt;5) Once up and running, shut down X on both of the virtual VM servers. This generally speeds things up a bit.&lt;br /&gt;&lt;br /&gt;6) Don't make the mistake of setting up your ASM disks in a 3 way mirror (High Redundancy). Remember that this is all mapping back to one physical disk on your PC.&lt;br /&gt;&lt;br /&gt;7) If you can, install another hard drive in your PC (I did). That way you can have your virtual servers running off of one disk, and leave XP to do its stuff on the other.&lt;br /&gt;&lt;br /&gt;And that's it! Finally, I really do think VMware is a great tool. Think what else you can use this for. Dataguard, RMAN testing, impressing your other DBA mates, the list is endless.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&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/3628226979394017176-4727326679791857144?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4727326679791857144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/4727326679791857144'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/04/running-rac-at-home.html' title='Running RAC at home.'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3628226979394017176.post-6316412042309118286</id><published>2007-04-18T22:59:00.000+01:00</published><updated>2007-06-27T06:04:05.555+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Hello everybody....</title><content type='html'>Welcome everyone to my Blog, which will hopefully overtake Oracle Metalink in popularity over the next coming weeks :)&lt;br /&gt;&lt;br /&gt;I will be mainly posting tips and (my own) views on Oracle RDBMS and life as an Oracle DBA. In addition, I will be adding other less IT related stuff to liven things up a bit, and maybe some of my photos for you to check out from a future project I have in mind called "Lunchtime London" - which may get off the ground in about 12 years from now if I ever find the time ;-)&lt;br /&gt;&lt;br /&gt;OK, so a brief intro about myself: I am an Oracle DBA and have been working with Oracle products for over 8 years now. My platform of choice is Unix, and of course the ever popular Linux. Having worked on Oracle since the days of Oracle 7, I hope to post tips I have picked up over the years, and of course learn from your great comments and suggestions.&lt;br /&gt;&lt;br /&gt;OK, well enough of the intro, lets go!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3628226979394017176-6316412042309118286?l=orasnap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6316412042309118286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3628226979394017176/posts/default/6316412042309118286'/><link rel='alternate' type='text/html' href='http://orasnap.blogspot.com/2007/04/hello-everybody.html' title='Hello everybody....'/><author><name>Stewart F</name><uri>http://www.blogger.com/profile/16478719742208962122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
