<?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:blogger='http://schemas.google.com/blogger/2008' 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-3205618955630808671</id><updated>2024-08-29T13:39:40.574-07:00</updated><category term="recovery"/><category term="Flashback"/><category term="PENDING"/><category term="index"/><category term="optimizer"/><category term="privileges"/><category term="locks"/><category term="performance"/><category term="stats"/><category term="Installation options"/><category term="Startup"/><category term="advisor"/><category term="backup"/><category term="chained rows"/><category term="constraint"/><category term="functions"/><category term="isqlplus"/><category term="maintenance"/><category term="profiles"/><category term="rman"/><category term="roles"/><category term="ASM"/><category term="Command line tools"/><category term="DDL"/><category term="Data movement"/><category term="FlashRecoveryArea"/><category term="Init Params"/><category term="InternalWorkings"/><category term="Management"/><category term="PL/SQL"/><category term="Packages"/><category term="Trigger"/><category term="accounts"/><category term="alerts"/><category term="catcha"/><category term="consumer group"/><category term="data block"/><category term="dbca"/><category term="dictionary"/><category term="query performance"/><category term="resource manager"/><category term="rowid"/><category term="security"/><category term="segments"/><category term="tablespace"/><category term="tnslistener"/><category term="undo"/><title type='text'>Cheng&#39;s Oracle</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default?start-index=26&amp;max-results=25'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-6689435759716875314</id><published>2008-05-17T10:31:00.000-07:00</published><updated>2008-05-18T18:41:50.083-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><category scheme="http://www.blogger.com/atom/ns#" term="rman"/><title type='text'>RMAN commands</title><content type='html'>&lt;strong&gt;To enable control file autobackup &lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; CONFIGURE CONTROLFILE AUTOBACKUP ON;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To change the default format for autobackup file name &lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE disk TO &#39;/u1/oradata/cf_ORCL_auto_&lt;span style=&quot;color:#ff0000;&quot;&gt;%F&lt;/span&gt;&#39;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where &lt;span style=&quot;font-family:courier new;color:#ff0000;&quot;&gt;%F&lt;/span&gt; is mandatory and translates into &lt;span style=&quot;font-family:courier new;&quot;&gt;c-IIIIIIIIII-YYYYMMDD-QQ&lt;/span&gt; being:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;IIIIIIII&lt;/span&gt; the DBID&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;YYYYMMDD&lt;/span&gt; timestamp of the backup&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;QQ&lt;/span&gt; a sequence that starts with &lt;span style=&quot;font-family:courier new;&quot;&gt;00&lt;/span&gt; and ends with &lt;span style=&quot;font-family:courier new;&quot;&gt;FF&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style=&quot;font-size:0;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Use the &lt;span style=&quot;font-family:courier new;color:#ff0000;&quot;&gt;SHOW&lt;/span&gt; command to list current settings&lt;/strong&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;strong&gt; &lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;RMAN&gt; &lt;span style=&quot;color:#ff0000;&quot;&gt;SHOW&lt;/span&gt; CONTROLFILE AUTOBACKUP FORMAT;&lt;br /&gt;RMAN&gt; &lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;SHOW&lt;/span&gt; EXCLUDE;&lt;br /&gt;RMAN&gt; &lt;span style=&quot;color:#ff0000;&quot;&gt;SHOW&lt;/span&gt; ALL;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:0;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Use the &lt;span style=&quot;font-family:courier new;color:#ff0000;&quot;&gt;CLEAR&lt;/span&gt; command to reset any persistent settings to its default value&lt;/span&gt; &lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;RMAN&gt; CONFIGURE BACKUP OPTIMIZATION &lt;span style=&quot;color:#ff0000;&quot;&gt;CLEAR&lt;/span&gt;;&lt;br /&gt;RMAN&gt; CONFIGURE MAXSETSIZE &lt;span style=&quot;color:#ff0000;&quot;&gt;CLEAR&lt;/span&gt;;&lt;br /&gt;RMAN&gt; CONFIGURE DEFAULT DEVICE TYPE &lt;span style=&quot;color:#ff0000;&quot;&gt;CLEAR&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configure the default device type for automatic channel allocation&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;RMAN&gt; CONFIGURE DEFAULT DEVICE TYPE TO sbt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or manually allocate a channel&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; RUN {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;2&gt; &lt;span style=&quot;color:#ff0000;&quot;&gt;ALLOCATE CHANNEL c1 DEVICE TYPE disk;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;3&gt; BACKUP DATAFILE &#39;/u0/oradata/user01.dbf&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;4&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configure parallelism&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; CONFIGURE DEVICE TYPE disk &lt;span style=&quot;color:#ff0000;&quot;&gt;PARALLELISM 3&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Specify the maximum backup piece size&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; CONFIGURE CHANNEL DEVICE TYPE DISK &lt;span style=&quot;color:#ff0000;&quot;&gt;MAXPIECESIZE 2G&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Format the name of the generated backup files&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; RUN {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;2&gt; ALLOCATE CHANNEL d1 DEVICE TYPE disk&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;3&gt; &lt;span style=&quot;color:#ff0000;&quot;&gt;FORMAT &#39;/disk1/backups/%U&#39;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;4&gt; BACKUP DATABASE PLUS ARCHIVELOG; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Some backup options (more on Administration Workshop II 3-9)&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; BACKUP device type disk tag &#39;%TAG&#39; database include current controlfile;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; BACKUP database plus archivelog;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; BACKUP datafile &#39;/u0/oradata/user01.dbf&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;RMAN&gt; BACKUP &lt;span style=&quot;color:#ff0000;&quot;&gt;AS BACKUPSET&lt;/span&gt; TABLESPACE hr_data; &lt;/span&gt;(&lt;span style=&quot;color:#ff0000;&quot;&gt;AS BACKUPSET&lt;/span&gt; can be omitted if RMAN is configured in mode BACKUPSET)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;After a online backup, remember to archive current redo logs using:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SQL&gt; ALTER SYSTEM ARCHIVE LOG CURRENT;&lt;br /&gt;&lt;/span&gt;or all archive logs:&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SQL&gt; ALTER SYSTEM ARCHIVE LOG ALL;&lt;/span&gt;&lt;br /&gt;or a specific redo group:&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SQL&gt; ALTER SYSTEM ARCHIVE LOG GROUP n;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;More on backups at &lt;a href=&quot;http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96519/backup.htm&quot;&gt;http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96519/backup.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;See &lt;span style=&quot;color:#ff0000;&quot;&gt;backup constraints&lt;/span&gt; at Administration Workshop II 3-10&lt;br /&gt;See parallel backup commands at Administration Workshop II 3-11&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;strong&gt;To create a clone database or a standby database from backups of the target database&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; DUPLICATE database to auxiliaryDb;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To flashback a database&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; &lt;span style=&quot;color:#3333ff;&quot;&gt;FLASHBACK&lt;/span&gt; DATABASE&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;2&gt; TO TIME = TO_DATE&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;3&gt; (&#39;06/25/03 12:00:00&#39;,&#39;MM/DD/YY HH:MI:SS&#39;);&lt;br /&gt;&lt;span style=&quot;font-size:0;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;after you have performed flashback database you should remember to reset logs:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;color:#ff0000;&quot;&gt;SQL&gt; ALTER DATABASE RESETLOGS;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To restore/recover&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; RESTORE/RECOVER database;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; RESTORE/RECOVER tablespace &lt;tablespace&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;RMAN&gt; RESTORE/RECOVER datafile &lt;datafile&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Reporting commands&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;LIST&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;REPORT&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-size:0;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;For catalog maintenance (Administration Workshop II 3-8)&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;CROSSCHECK&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;DELETE&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;CHANGE&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;LIST&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/6689435759716875314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/6689435759716875314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6689435759716875314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6689435759716875314'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/rman-commands.html' title='RMAN commands'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-8836341365390543655</id><published>2008-05-17T10:19:00.000-07:00</published><updated>2008-05-18T18:43:06.106-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><category scheme="http://www.blogger.com/atom/ns#" term="rman"/><title type='text'>RMAN command-line arguments</title><content type='html'>(Administration Workshop II 2-27)&lt;br /&gt;First set the ORACLE_SID env&lt;br /&gt;$ export ORACLE_SID=orcl&lt;br /&gt;&lt;br /&gt;Writing RMAN output to a log file&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;$ rman &lt;span style=&quot;color:#3333ff;&quot;&gt;TARGET&lt;/span&gt; sys/oracle &lt;span style=&quot;color:#3333ff;&quot;&gt;LOG&lt;/span&gt;=$HOME/oradata/u03/rman.log &lt;span style=&quot;color:#3333ff;&quot;&gt;APPEND&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Executing a command file when RMAN is invoked&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;$ rman &lt;span style=&quot;color:#3333ff;&quot;&gt;TARGET&lt;/span&gt; sys/oracle &lt;span style=&quot;color:#3333ff;&quot;&gt;CMDFILE&lt;/span&gt;=$HOME/scripts/my_rman_script.rcv&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;Establishes database connections on RMAN startup (both TARGET and CATALOG DBs)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;$ rman &lt;span style=&quot;color:#3333ff;&quot;&gt;TARGET&lt;/span&gt; sys/oracle@orcl &lt;span style=&quot;color:#3333ff;&quot;&gt;CATALOG&lt;/span&gt; rman/rman@rcat&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;span style=&quot;font-family:courier new;color:#3333ff;&quot;&gt;NOCATALOG&lt;/span&gt; is the default mode (rman will use the control file as rman repository) unless a &lt;span style=&quot;font-family:courier new;color:#3333ff;&quot;&gt;CATALOG&lt;/span&gt; database is specified.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/8836341365390543655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/8836341365390543655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/8836341365390543655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/8836341365390543655'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/rman-command-line-arguments.html' title='RMAN command-line arguments'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-1904320994714921372</id><published>2008-05-16T15:27:00.000-07:00</published><updated>2008-05-16T15:35:27.138-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="InternalWorkings"/><title type='text'>Administration Workshop II. 10-3. Table types</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Ordinary (heap organized table):&lt;/span&gt; Data is stored as an unordered collection (heap).&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Partitioned table:&lt;/span&gt; data is divided into smaller, more manageable pieces.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Index-organized table (IOT): &lt;/span&gt;Rows (key and non-key values) are sorted and stored in a B-tree index structure.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Clustered table:&lt;/span&gt; related data from more than one table are stored together. In other words, a cluster is a group of tables that &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;share the same data blocks&lt;/span&gt; because they share common columns and are often used together.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/1904320994714921372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/1904320994714921372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/1904320994714921372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/1904320994714921372'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/10-3-table-types.html' title='Administration Workshop II. 10-3. Table types'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-5339056787479485971</id><published>2008-05-14T18:01:00.000-07:00</published><updated>2008-05-14T18:04:55.512-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="catcha"/><category scheme="http://www.blogger.com/atom/ns#" term="index"/><title type='text'>Administration Workshop II. 4-14. re-creating indexes</title><content type='html'>Use options to reduce the time it takes to create the index:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PARALLEL&lt;/li&gt;&lt;li&gt;NOLOGGING&lt;/li&gt;&lt;/ul&gt;SQL&gt; CREATE INDEX rname_idx ON hr.regions (region_name) PARALLEL 4;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);font-size:180%;&quot; &gt;WARNING: if you created the index with PARALLEL option 4, then you&#39;ll need to change it back to PARALLEL 1 after the index is created so that it doesn&#39;t use 4 CPUs every time it access the index later!&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/5339056787479485971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/5339056787479485971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5339056787479485971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5339056787479485971'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/administration-workshop-ii-4-14-re.html' title='Administration Workshop II. 4-14. re-creating indexes'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-5279577687701151345</id><published>2008-05-13T18:14:00.000-07:00</published><updated>2008-05-13T18:17:32.936-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FlashRecoveryArea"/><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><title type='text'>Administration Workshop II. 2-16. Monitoring the Flash Recovery Area evolution with EM</title><content type='html'>Go to Enterprise Manager -&gt; Related Links -&gt; All metrics. Click on Recovery Area link then again on the percentage number to see the chart.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/5279577687701151345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/5279577687701151345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5279577687701151345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5279577687701151345'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/administration-workshop-ii-2-16.html' title='Administration Workshop II. 2-16. Monitoring the Flash Recovery Area evolution with EM'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-6221732934465790351</id><published>2008-05-13T18:02:00.001-07:00</published><updated>2008-05-13T18:08:35.645-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><title type='text'>Administration Workshop II. 2-5. RMAN Performance Enhancements</title><content type='html'>&lt;ul&gt;&lt;li&gt;Automatic &lt;span style=&quot;font-weight: bold;&quot;&gt;parallelization&lt;/span&gt; of backup, restore, and recovery operations&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;No generation of extra redo&lt;/span&gt; during online database backups&lt;/li&gt;&lt;li&gt;Backups that are restricted to &lt;span style=&quot;font-weight: bold;&quot;&gt;limit the number of reads per file per second&lt;/span&gt; to avoid interfering with OLTP work&lt;/li&gt;&lt;li&gt;The use of &lt;span style=&quot;font-weight: bold;&quot;&gt;multiplexing, which can prevent flooding of any one file with reads and writes&lt;/span&gt; while still keeping a tape drive streaming&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/6221732934465790351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/6221732934465790351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6221732934465790351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6221732934465790351'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/administration-workshop-ii-2-5-rman.html' title='Administration Workshop II. 2-5. RMAN Performance Enhancements'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-524701351700642710</id><published>2008-05-13T17:58:00.000-07:00</published><updated>2008-05-13T18:02:04.603-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><title type='text'>Administration Workshop II. 2-5. Use RMAN to detect block corruption</title><content type='html'>You can use RMAN to detect block corruption. The information relating to the block corruption that is detected during backup can be obtained by using the &lt;span style=&quot;font-family: courier new;&quot;&gt;V$BACKUP_CORRUPTION&lt;/span&gt; and &lt;span style=&quot;font-family: courier new;&quot;&gt;V$COPY_CORRUPTION&lt;/span&gt; dynamic views.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/524701351700642710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/524701351700642710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/524701351700642710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/524701351700642710'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/administration-workshop-ii-2-5-use-rman.html' title='Administration Workshop II. 2-5. Use RMAN to detect block corruption'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-6174139328681315854</id><published>2008-05-13T17:39:00.000-07:00</published><updated>2008-05-13T17:57:35.604-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><title type='text'>Administration Workshop II. 2-14. Using a Flash Recovery Area with RMAN</title><content type='html'>Flash Recovery Area simplifies managing disk space and files related to backup and recovery:&lt;br /&gt;&lt;ul&gt;&lt;li style=&quot;font-weight: bold;&quot;&gt;When the flash recovery area is used, RMAN automatically uses Oracle Managed Files (OMF) for its backup files.&lt;/li&gt;&lt;li&gt;Each time RMAN creates a file in the flash recovery area, the Oracle database updates the list of files that are no longer required on disk. &lt;span style=&quot;font-weight: bold;&quot;&gt;When a file needs to be written into the flash recovery area and space is not available for that file, the Oracle database deletes a file that is on the obsolete files list and writes a notification to the alert log.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;A warning is issued when the flash recovery area experiences space pressure or is low on free space because there are no files that can be deleted from the flash recovery area. To resolve the problem, you can:&lt;br /&gt;&lt;br /&gt;- add disk space&lt;br /&gt;- back up your files to a tertiary device&lt;br /&gt;- delete the files from the flash recovery area using RMAN&lt;br /&gt;- or change the RMAN retention policy.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;The flash recovery area is configured by setting the &lt;span style=&quot;font-family:courier new;&quot;&gt;DB_RECOVERY_FILE_DEST&lt;/span&gt; initialization parameter. The &lt;span style=&quot;font-family:courier new;&quot;&gt;DB_RECOVERY_FILE_DEST_SIZE&lt;/span&gt; parameter specifies its size.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/6174139328681315854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/6174139328681315854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6174139328681315854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6174139328681315854'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/administration-workshop-ii-2-14-using.html' title='Administration Workshop II. 2-14. Using a Flash Recovery Area with RMAN'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-2251730262832053998</id><published>2008-05-11T08:57:00.000-07:00</published><updated>2008-05-11T09:19:01.247-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data movement"/><title type='text'>18-12. How to avoid generating REDO entries</title><content type='html'>Even though a database is in archive log mode, it&#39;s possible to individually disable logging for a particular table. To do so:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Set the NOLOGGING attribute for the table or&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=&quot;subhead1&quot;&gt;Specifying the &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;UNRECOVERABLE &lt;/span&gt;Clause in the Control File. Example:&lt;br /&gt;&lt;/p&gt; &lt;pre space=&quot;preserve&quot; class=&quot;oac_no_warn&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;UNRECOVERABLE&lt;/span&gt;&lt;br /&gt;LOAD DATA&lt;br /&gt;INFILE &#39;sample.dat&#39;&lt;br /&gt;INTO TABLE emp&lt;br /&gt;(ename VARCHAR2(10), empno NUMBER(4));&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/2251730262832053998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/2251730262832053998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/2251730262832053998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/2251730262832053998'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/18-12-how-to-avoid-generating-redo.html' title='18-12. How to avoid generating REDO entries'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-6405030163816792402</id><published>2008-05-11T08:30:00.000-07:00</published><updated>2008-05-11T08:45:10.681-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="functions"/><title type='text'>Timestamp manipulation</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;Get the timestamp &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);font-size:100%;&quot; &gt;10 minutes earlier&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; from &lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-size:100%;&quot; &gt;now:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;SYSTIMESTAMP&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;- INTERVAL &#39;10&#39; minute&lt;/span&gt; FROM DUAL;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Get the timestamp &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);font-size:100%;&quot; &gt;1 year later&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; from the &lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);font-size:100%;&quot; &gt;specified timestamp:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;timestamp&#39;2004-02-29 00:00:00&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;+ INTERVAL &#39;1&#39; year(1)&lt;/span&gt; FROM dual;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Extract fields from a timestamp:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;     SELECT&lt;br /&gt;     &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;EXTRACT&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;year&lt;/span&gt; FROM       current_timestamp) EY,&lt;br /&gt;     EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;month&lt;/span&gt; FROM current_timestamp) EM,&lt;br /&gt;     EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;day &lt;/span&gt; FROM current_timestamp) ED,&lt;br /&gt;     EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;hour&lt;/span&gt; FROM current_timestamp) EH,&lt;br /&gt;     EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;minute&lt;/span&gt; FROM current_timestamp) EM,&lt;br /&gt;   EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;second&lt;/span&gt; FROM current_timestamp) ES,&lt;br /&gt;   EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;timezone_hour&lt;/span&gt; FROM current_timestamp)       TH,&lt;br /&gt;   EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;timezone_minute&lt;/span&gt; FROM current_timestamp) TM,&lt;br /&gt;   EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;timezone_region&lt;/span&gt; FROM current_timestamp)       TR,&lt;br /&gt;   EXTRACT(&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;timezone_abbr&lt;/span&gt; FROM current_timestamp ) TA&lt;br /&gt;   FROM dual;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;More on: &lt;a href=&quot;http://www.psoug.org/reference/timestamp.html&quot;&gt;Oracle Timestamp Data Type&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/6405030163816792402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/6405030163816792402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6405030163816792402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6405030163816792402'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/timestamp-manipulation.html' title='Timestamp manipulation'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-4672494376897209114</id><published>2008-05-10T13:07:00.000-07:00</published><updated>2008-05-10T13:13:01.760-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flashback"/><category scheme="http://www.blogger.com/atom/ns#" term="PENDING"/><title type='text'>17-25. Flashback Versions Query Considerations</title><content type='html'>&lt;span style=&quot;font-size:180%;&quot;&gt;The VERSIONS clause cannot be used to query&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;External tables&lt;/li&gt;&lt;li&gt;Temporary tables&lt;/li&gt;&lt;li&gt;Fixed tables&lt;/li&gt;&lt;li&gt;Views&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;The VERSIONS clause cannot span DDL commands&lt;/span&gt;&lt;br /&gt;The VERSIONS clause in a SELECT statement cannot produce versions of rows across the DDL statements that change the structure of the corresponding tables. This means that the query stops producing rows after it reaches a time in the past when the table structure was changed.&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;What if I want to flashback version query after a DDL? is it possible?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Segment shrink operations are filtered out&lt;/span&gt;&lt;br /&gt;Certain maintenance operations, such as a segment shrink, may move table rows across blocks. In this case, the version query filters out such phantom versions because the row data remains the same.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/4672494376897209114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/4672494376897209114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4672494376897209114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4672494376897209114'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/17-25-flashback-versions-query.html' title='17-25. Flashback Versions Query Considerations'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-8876424681575574156</id><published>2008-05-10T13:00:00.000-07:00</published><updated>2008-05-10T13:05:39.341-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flashback"/><title type='text'>17-9. Flashback Database Limitations</title><content type='html'>&lt;ul&gt;&lt;li&gt;You cannot use Flashback Database if the control file has been restored or re-created.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Data file dropped after Flashback target time cannot be recovered (the dropped data file is added to the control file and marked offline, but it is not flashed back)&lt;/li&gt;&lt;li&gt;Data file that has been shrunk since the Flashback target time cannot be flashed back. &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Any such data files must be taken offline before performing the flashback operation.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/8876424681575574156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/8876424681575574156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/8876424681575574156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/8876424681575574156'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/17-9-flashback-database-limitations_10.html' title='17-9. Flashback Database Limitations'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-1947451317942821318</id><published>2008-05-05T20:59:00.001-07:00</published><updated>2008-05-05T21:05:44.077-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flashback"/><category scheme="http://www.blogger.com/atom/ns#" term="PENDING"/><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><title type='text'>17-7. Flashback Database: Reducing Restore Time</title><content type='html'>With Flashback Database, &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;the time to recover a database is now proportional to the number of changes that need to be backed out (and not to the size of the database)&lt;/span&gt; because you do not have to restore data files.&lt;br /&gt;&lt;br /&gt;The Oracle database periodically logs &quot;before images&quot; of data blocks in the Flashback Database logs. Bock images can be reused to quickly back out the data file changes to any time at which flashback logs are captured just before the desired target time. &lt;span style=&quot;color: rgb(255, 204, 0);&quot;&gt;Then, changes from the redo log files are applied to fill in the gap (????? why applying the redo log?).&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/1947451317942821318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/1947451317942821318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/1947451317942821318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/1947451317942821318'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/17-7-flashback-database-reducing.html' title='17-7. Flashback Database: Reducing Restore Time'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-4427456654908109108</id><published>2008-05-05T19:20:00.000-07:00</published><updated>2008-05-05T19:56:32.780-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="recovery"/><title type='text'>16-8. Loss of a Redo Log File</title><content type='html'>Database Control does not allow you to clear a log group that has not been archived. Doing so breaks the chain of redo information. If you must clear an unarchived log group, you should &lt;span style=&quot;font-weight: bold;&quot;&gt;immediately &lt;/span&gt;take a full backup of the whole database. Failure to do so may result in a loss of data if another failure ocurrs.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/4427456654908109108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/4427456654908109108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4427456654908109108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4427456654908109108'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/16-8-loss-of-redo-log-file.html' title='16-8. Loss of a Redo Log File'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-4982721282067281133</id><published>2008-05-04T17:42:00.001-07:00</published><updated>2008-05-04T17:45:54.554-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><title type='text'>15-19. Flash Recovery Area</title><content type='html'>The Flash Recovery Area contains:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Archived logs *&lt;/li&gt;&lt;li&gt;Backups&lt;/li&gt;&lt;li&gt;Flashback logs&lt;/li&gt;&lt;/ul&gt;Oracle recommends that the size of the flash recovery area be at least twice the size of the database so that it can hold one backup &lt;strong&gt;and&lt;/strong&gt; several archived logs.&lt;br /&gt;&lt;br /&gt;*If you have configured your archived logs to be written to this location (with the USE_DB_RECOVERY_AREA flag in one of the locations), then it is important to monitor this space to ensure that it des not reach its capacity.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/4982721282067281133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/4982721282067281133' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4982721282067281133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4982721282067281133'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/15-19-flash-recovery-area.html' title='15-19. Flash Recovery Area'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-1243845504193456754</id><published>2008-05-04T13:47:00.000-07:00</published><updated>2008-05-04T13:49:52.325-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><title type='text'>15-16. Backup control file to a trace file</title><content type='html'>&lt;span style=&quot;font-family:courier new;&quot;&gt;SQL&gt; ALTER DATABASE BACKUP CONTROLFILE TO TRACE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It would be backed up at the location specified at &lt;span style=&quot;font-family:courier new;&quot;&gt;USER_DUMP_DEST&lt;/span&gt; initialization parameter with a name &lt;span style=&quot;font-family:courier new;&quot;&gt;sid_ora_pid.trc&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/1243845504193456754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/1243845504193456754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/1243845504193456754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/1243845504193456754'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/15-16-backup-control-file-to-trace-file.html' title='15-16. Backup control file to a trace file'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-6015086208655449778</id><published>2008-05-03T13:11:00.000-07:00</published><updated>2008-05-03T13:16:57.711-07:00</updated><title type='text'>15-7. Backup sets vs. image copies</title><content type='html'>&lt;span style=&quot;font-size:180%;&quot;&gt;Data blocks&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Image copies:&lt;/span&gt; all data blocks&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Backup sets:&lt;/span&gt; no empty data blocks are copied (saves space). Typically 20% of database space is empty data block.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;Granularity&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Image copies:&lt;/span&gt; only the file we need has to be copied&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Backup sets:&lt;/span&gt; all backup set must be retrieved even though only one of them is needed&lt;br /&gt;&lt;br /&gt;A backup of a database running in NOARCHIVELOG mode must have all three attributes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;offline&lt;/li&gt;&lt;li&gt;full backup (level 0)&lt;/li&gt;&lt;li&gt;whole database&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/6015086208655449778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/6015086208655449778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6015086208655449778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6015086208655449778'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/05/15-7-backup-sets-vs-image-copies.html' title='15-7. Backup sets vs. image copies'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-8979198256503601496</id><published>2008-04-21T20:55:00.000-07:00</published><updated>2008-04-21T20:56:54.817-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PENDING"/><title type='text'>9-6 to 9-11</title><content type='html'></content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/8979198256503601496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/8979198256503601496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/8979198256503601496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/8979198256503601496'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/9-6-to-9-11.html' title='9-6 to 9-11'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-5140912649066307692</id><published>2008-04-16T14:35:00.000-07:00</published><updated>2008-04-16T14:37:48.645-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="advisor"/><title type='text'>13-15. SQL Access Advisor</title><content type='html'>This advisor requires that you identify a SQL workload, which is a representative set of SQL statenments that access the schema. You can select you workload from different sources including current and recent SQL activity, a SQL repository, or a user-defined workload such as from a development environment.&lt;br /&gt;The SQL Access Advisor may make recommendations such as creating indexes or materialized views to improve your query performance for the given workload.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/5140912649066307692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/5140912649066307692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5140912649066307692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5140912649066307692'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/13-15-sql-access-advisor.html' title='13-15. SQL Access Advisor'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-4488801690190969817</id><published>2008-04-16T12:57:00.000-07:00</published><updated>2008-04-16T13:15:04.086-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="optimizer"/><title type='text'>13-9. SQL Tuning Advisor</title><content type='html'>Oracle&#39;s Tuning Advisor calls Automatic Tuning Optimizer (ATO) to perform 4 types of analysis:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Statistics Analysis:&lt;/span&gt; The Automatic Tuning Optimizer checks each query object for missing or stale statistics, and makes recommendations to gather relevant statistics.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Profiling (Tune SQL plan):&lt;/span&gt; The ATO verifies its own estimates and collects auxiliary information to remove estimation errors. It builds a SQL profile using the auxiliary information and makes a recommendation to create it. When a SQL profile is created, it enables the query optimizer to generate a well-tuned plan.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Access path Analysis:&lt;/span&gt; the ATO explores whether a new index can be used to significantly improve access to each table in the query and, when appropriate, makes recommendations to create such indexes.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Structure Analysis: &lt;/span&gt;The ATO tries to identify SQL statements that use bad plans and makes relevant suggestions to restructure them. The suggested changes can be syntactic as well as semantic.&lt;/li&gt;&lt;/ul&gt;It&#39;s important to choose the appropriate scope for the tuning task. If you choose the &lt;span style=&quot;font-weight: bold;&quot;&gt;Limited &lt;/span&gt;option, then recommendations are based on:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Statistics check&lt;/li&gt;&lt;li&gt;Access path analysis&lt;/li&gt;&lt;li&gt;SQL structure analysis&lt;/li&gt;&lt;/ul&gt;If you choose &lt;span style=&quot;font-weight: bold;&quot;&gt;comprehensive &lt;/span&gt;option, then &lt;span style=&quot;font-weight: bold;&quot;&gt;SQL profile &lt;/span&gt;recommendations are generated as well.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/4488801690190969817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/4488801690190969817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4488801690190969817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/4488801690190969817'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/13-9-sql-tuning-advisor.html' title='13-9. SQL Tuning Advisor'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-6133205428498875763</id><published>2008-04-13T17:09:00.001-07:00</published><updated>2008-04-16T12:56:26.162-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alerts"/><title type='text'>12-22. Server-generated alerts</title><content type='html'>&lt;div&gt;A few key metrics that can provide early problem notifications are:&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Average File Read Time (centiseconds)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Dump Area Used (%)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Response Time (per transaction)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SQL Response Time (%)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Tablespace Used (%)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Wait Time (%)&lt;/li&gt;&lt;/ul&gt;By default, the following server-generated alerts are enabled:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Tablespace Space Usage (warnings 85%, critical 97%)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Snapshot Too Old&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Recovery Area Low on Free Space&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Resumable Session Suspended&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;To set or edit a threshold for your whole database, select Manage Metrics in the Related Links region of the database home page.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;There are two kinds of server-generated alerts:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Threshold (stateful) alerts:&lt;/span&gt; they are configured by setting a warning and critical threshold values on database metrics. For example: Physical Reads per second, User commits per second, SQL Service Response Time, etc.&lt;br /&gt;Except for the Tablespace Space Usage metric, which is database related, the other metrics are instance related.&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Stateful alerts appear in &lt;/span&gt;&lt;span style=&quot;font-family: courier new; color: rgb(255, 0, 0);&quot;&gt;DBA_OUTSTANDING_ALERTS&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; and when cleared, go to &lt;/span&gt;&lt;span style=&quot;font-family: courier new; color: rgb(255, 0, 0);&quot;&gt;DBA_ALERT_HISTORY&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Nonthreshold (stateless) alerts: &lt;/span&gt;corresponds to specific database events such as Snapshot Too Old errors, Recovery Area Low On Free Space, and Resumable Session Suspended.&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Stateless alerts go directly to the history table&lt;/span&gt;. Clearing a stateless alert makes sense only in the Database Control environment because Database Control stores stateless alerts in its own repository.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/6133205428498875763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/6133205428498875763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6133205428498875763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/6133205428498875763'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/12-22-server-generated-alerts.html' title='12-22. Server-generated alerts'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-5728477083123127167</id><published>2008-04-13T16:54:00.000-07:00</published><updated>2008-04-13T16:57:09.887-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="advisor"/><title type='text'>12-21. The DBMS_ADVISOR Package</title><content type='html'>The DBMS_ADVISOR package contains all constants and procedure declarations for all advisor modules. You can use this package to execute tasks via command line.&lt;br /&gt;To execute advisor procedures, you must be granted the ADVISOR privilege. The ADVISOR privilege permits full access to the advisor procedures and views.&lt;br /&gt;&lt;br /&gt;Procedures:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;CREATE_TASK&lt;/li&gt;&lt;li&gt;DELTE_TASK&lt;/li&gt;&lt;li&gt;EXECUTE_TASK&lt;/li&gt;&lt;li&gt;INTERRUPT_TASK&lt;/li&gt;&lt;li&gt;GET_TASK_REPORT&lt;/li&gt;&lt;li&gt;RESUME_TASK&lt;/li&gt;&lt;li&gt;UPDATE_TASK_ATTRIBUTES&lt;/li&gt;&lt;li&gt;SET-TASK_PARAMETER&lt;/li&gt;&lt;li&gt;MARK_RECOMMENDATION&lt;/li&gt;&lt;li&gt;GET_TASK_SCRIPT&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/5728477083123127167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/5728477083123127167' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5728477083123127167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/5728477083123127167'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/12-21-dbmsadvisor-package.html' title='12-21. The DBMS_ADVISOR Package'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-7480439487897029001</id><published>2008-04-13T13:30:00.000-07:00</published><updated>2008-04-13T13:41:20.609-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="optimizer"/><category scheme="http://www.blogger.com/atom/ns#" term="stats"/><title type='text'>12-8. Using the Optimizer Statistics</title><content type='html'>Go to the Enterprise Manager page for managing optimizer statistics by clicking Manage Optimizer Statistics on the Administration tabbed page. Note that &lt;span style=&quot;font-family:courier new;&quot;&gt;GATHER_STATS_JOB&lt;/span&gt; should be enabled and for this to work, you should set &lt;span style=&quot;font-family:courier new;&quot;&gt;STATISTICS_LEVEL&lt;/span&gt; initialization parameter is set to at least &lt;span style=&quot;font-family:courier new;&quot;&gt;TYPICAL.&lt;/span&gt;&lt;br /&gt;&lt;span &gt;&lt;/span&gt;&lt;br /&gt;From Manage Optimizer Statistcs page, you can perform the following tasks on statistics:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Gather optimizer statistics manually. this action submits the job that GATHER_STATS_JOB automatically does. This should be done in the case where a table&#39;s contents have changed so much between automatic gathering jobs that the statistics no longer represent the table accurately. Examples of this are a table that is truncated in the middle of the day and a batch job that runs and adds large amounts of data to a table.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Restore optimizer statistics to a point in the past. The point in time chosen must be within the optimizer statistics retention period, which defaults to 30 days.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Lock optimizer statistics to guarantee that the statistics for certain objects are never overwritten. This is useful if statistics have been calculated for a certain table at a time when well-representative data is present, and you want to always have those statistics. No fluctuation in the table affects the statistics if they are locked.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Unlock optimizer statistics to undo the previously done lock&lt;/li&gt;&lt;li&gt;Delete optimizer statistics to delete statistics.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/7480439487897029001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/7480439487897029001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/7480439487897029001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/7480439487897029001'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/12-8-using-optimizer-statistics.html' title='12-8. Using the Optimizer Statistics'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-2078077853613781895</id><published>2008-04-12T17:59:00.000-07:00</published><updated>2008-04-13T13:27:16.772-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chained rows"/><category scheme="http://www.blogger.com/atom/ns#" term="maintenance"/><category scheme="http://www.blogger.com/atom/ns#" term="optimizer"/><category scheme="http://www.blogger.com/atom/ns#" term="query performance"/><category scheme="http://www.blogger.com/atom/ns#" term="stats"/><title type='text'>When to re-organize a table</title><content type='html'>Notes from: &lt;a href=&quot;http://www.oracle.com/technology/oramag/oracle/02-nov/o62asktom.html&quot;&gt;All about chained rows&lt;/a&gt; @ Ask Tom&lt;br /&gt;&lt;br /&gt;Before jumping into the topic, we need to first clarify some concepts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A row that doesn&#39;t fit into a block A needs to be &lt;strong&gt;&quot;chained&quot;&lt;/strong&gt; with another block B.&lt;/li&gt;&lt;li&gt;Now, if there was another row in the block A then it needs to be &lt;strong&gt;&quot;migrated&quot;&lt;/strong&gt; to another block when block A fills up.&lt;/li&gt;&lt;li&gt;a Full table scan example is &lt;span style=&quot;font-family:courier new;color:#3333ff;&quot;&gt;SELECT * FROM t&lt;/span&gt;&lt;/li&gt;&lt;li&gt;a query using an index is for example &lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;SELECT * FROM t WHERE t.col1 = 1&lt;/span&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/span&gt;(it uses the index on col1 to find the row where t.col1 = 1)&lt;/li&gt;&lt;/ul&gt;Migrated rows and their impact on:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Full table scan:&lt;/strong&gt; are not affected by migrated rows since it picks up data while reading the disks&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Querying migrated rows with index (instead of full table scan):&lt;/strong&gt; go through the ROWID pointer (that was left behind when a row was migrated) to find the data it needs so it adds 1 to &lt;strong&gt;Table Fetch Continue Row&lt;/strong&gt; count.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Chained rows and their impact on:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Full table scan:&lt;/strong&gt; since we can&#39;t find the data in one place only, we will need an additional read to find all the data&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Querying chained rows with index (instead of full table scan):&lt;/strong&gt; idem.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br /&gt;Chained rows are inevitable so there&#39;s not much we can do unless the data model could be changed so that fewer data is stored - but that&#39;s a functional problem. On the other hand, if we have lots of migrated rows that each of them would perfectly fit in one datablock, then we could potentially reorganize the table to reduce the additional disk lookup.</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/2078077853613781895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/2078077853613781895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/2078077853613781895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/2078077853613781895'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/when-to-re-organize-table.html' title='When to re-organize a table'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3205618955630808671.post-7881688778879565885</id><published>2008-04-12T16:51:00.000-07:00</published><updated>2008-04-13T13:24:10.900-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chained rows"/><category scheme="http://www.blogger.com/atom/ns#" term="maintenance"/><category scheme="http://www.blogger.com/atom/ns#" term="optimizer"/><category scheme="http://www.blogger.com/atom/ns#" term="stats"/><title type='text'>12-5. Optimizer Statistics</title><content type='html'>Optimizer statistics include table, column, index and system statistics. They provide the optimizer a statistically correct snapshot of data storage and distribution, which the optimizer uses to make decisions on how to access data.&lt;br /&gt;&lt;br /&gt;The statistics that are collected include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Size of the table or index (in database blocks)&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT &lt;span style=&quot;color:#ff0000;&quot;&gt;blocks &lt;/span&gt;FROM dba_tables WHERE owner=&#39;hr&#39; AND table_name=&#39;EMPLOYEES&#39;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Number of rows&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT &lt;span style=&quot;color:#ff0000;&quot;&gt;num_rows&lt;/span&gt; FROM dba_tables WHERE owner=&#39;hr&#39; AND table_name=&#39;EMPLOYEES&#39;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Average row size and chain count (tables only)&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT &lt;span style=&quot;color:#ff0000;&quot;&gt;avg_row_len, chain_cnt&lt;/span&gt; FROM dba_tables WHERE owner=&#39;hr&#39; AND table_name=&#39;EMPLOYEES&#39;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Height and number of deleted leaf rows (indexes only)&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Optimizer statistics are collected automatically by the preconfigured &lt;span style=&quot;font-family:courier new;&quot;&gt;GATHER_STATS_JOB&lt;/span&gt;, which runs during predefined maintenance windows, &lt;strong&gt;once per day&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;A large table that experiences 10 percent growth (or reduction) within a 24-hour period is usually considered too volatile for statistics collection once per day to be sufficient. For tables that experience this level of change, Oracle recommends collecting statistics more frequently so it won&#39;t exceed 10 percent growth between collection periods.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Statistics can be manually collected by using Enterprise Manager or through the use of the &lt;span style=&quot;font-family:courier new;&quot;&gt;DBMS_STATS &lt;/span&gt;package as shown here:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SQL&gt; EXEC dbms_stats.gather_table_stats(&#39;HR&#39;, &#39;EMPLOYEES&#39;);&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://chengoracle.blogspot.com/feeds/7881688778879565885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3205618955630808671/7881688778879565885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/7881688778879565885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3205618955630808671/posts/default/7881688778879565885'/><link rel='alternate' type='text/html' href='http://chengoracle.blogspot.com/2008/04/12-5-optimizer-statistics.html' title='12-5. Optimizer Statistics'/><author><name>Cheng Lee</name><uri>http://www.blogger.com/profile/12625693269929055755</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.google.com/cheng.lee/Rl5Drm_bI4E/AAAAAAAACoY/mfZFSqmUsiM/s160-c/ElCaNDelColorado.jpg'/></author><thr:total>0</thr:total></entry></feed>