<?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-3671382120795488436</id><updated>2011-12-11T14:11:46.274+01:00</updated><category term='compression'/><category term='kill linux'/><category term='Grid 11g'/><category term='Grid 11g VirtualBox'/><category term='enterprise manager'/><category term='Oracle 10'/><category term='script'/><category term='nls_lang export import'/><category term='SLES9'/><category term='virtualbox clone'/><category term='move tables tablespace'/><category term='emgc OCMRepeater metric collection errors'/><category term='export'/><category term='explain plan'/><category term='flashback query'/><category term='password expired'/><category term='index monitoring usage'/><category term='Golden Gate'/><category term='backup'/><title type='text'>Webgeest DBA blog</title><subtitle type='html'>Anything I use as an Oracle DBA</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-8127453023946967667</id><published>2011-12-11T14:09:00.001+01:00</published><updated>2011-12-11T14:11:46.375+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='enterprise manager'/><title type='text'>Enterprise Manager 12c overview</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;I've been to a demo-day in Hilversum. Really cool stuff.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;This movie will give a short overview of EM12c:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://3.gvt0.com/vi/AJaMvca8ZC8/0.jpg" height="532" width="640"&gt;&lt;param name="movie" value="http://www.youtube.com/v/AJaMvca8ZC8&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="640" height="532"  src="http://www.youtube.com/v/AJaMvca8ZC8&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-8127453023946967667?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/8127453023946967667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/12/enterprise-manager-12c-overview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/8127453023946967667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/8127453023946967667'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/12/enterprise-manager-12c-overview.html' title='Enterprise Manager 12c overview'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-4918235400087489524</id><published>2011-09-22T08:45:00.001+02:00</published><updated>2011-09-22T08:46:16.189+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flashback query'/><title type='text'>Flashback package source in Oracle 9.2</title><content type='html'>&lt;div class="MsoNormal"&gt;&lt;a href="http://3.bp.blogspot.com/-doaVmIxWjtU/TnrZYbp5DAI/AAAAAAAAAt4/Fdcc-wkNSvM/s1600/flash.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-doaVmIxWjtU/TnrZYbp5DAI/AAAAAAAAAt4/Fdcc-wkNSvM/s320/flash.jpg" width="216" /&gt;&lt;/a&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;A developer came to me that he messed up his package source he was working on.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;He asked me if we could retrieve it from backup, preferable from an hour ago. This is typical a flashback scenario, but he was working on 9.2. Is this a problem? No, we can use Flashback Query in 9.2. We just have to query the dba_source view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;The database (development) is not running in archivemode, so we can flash back to any point within the redo logs. This time we flash back to about half an hour ago.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;The output is saved in a spool file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;ALTER SESSION&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp; &amp;nbsp;SET NLS_TIMESTAMP_FORMAT =&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp; &amp;nbsp;'DD-MON-YYYY HH24:MI:SS.FF3';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;set lines 9999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;set trimspool on&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;set pages 9999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;set heading off&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;spool old_version.sql&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;select text from dba_source&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as of timestamp to_timestamp('22-SEP-2011 07:30:00.000')&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;where owner='SCOTT' &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp; and name='MYPACKAGE'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;order by type, line;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;spool off&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-4918235400087489524?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/4918235400087489524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/09/flashback-package-source-in-oracle-92.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4918235400087489524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4918235400087489524'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/09/flashback-package-source-in-oracle-92.html' title='Flashback package source in Oracle 9.2'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-doaVmIxWjtU/TnrZYbp5DAI/AAAAAAAAAt4/Fdcc-wkNSvM/s72-c/flash.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-5817590200490277961</id><published>2011-08-23T10:08:00.000+02:00</published><updated>2011-08-23T10:08:51.838+02:00</updated><title type='text'>Secure Files</title><content type='html'>&lt;div&gt;Today I have been playing with Secure files. Arup Nanda has an excellent article on this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.oracle.com/technetwork/articles/sql/11g-securefiles-084075.html"&gt;Oracle Database 11g: The Top New Features for DBAs and Developers | SecureFiles&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-5817590200490277961?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/5817590200490277961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/08/secure-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5817590200490277961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5817590200490277961'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/08/secure-files.html' title='Secure Files'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-4960070531802536818</id><published>2011-07-02T06:06:00.001+02:00</published><updated>2011-07-02T06:07:09.863+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SLES9'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle 10'/><title type='text'>Some notes on installing 10.2.0.4 on SLES 11 64bits</title><content type='html'>&lt;span style="font-family: Verdana, sans-serif;"&gt;When installing this unsupported combination, some solutions might be:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;- Change the /etc/SuSe-release: backup the original file and change it to SuSe 9.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;- error invoking target of makefile ins_ctx.mk --&amp;gt; install gcc43-32bit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;- error on ins_sysman.mk --&amp;gt; unset LD_LIBRARY_PATH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;- error on ins_emdb.mk --&amp;gt;ignore this error&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Much more can be found on &lt;a href="http://www.puschitz.com/InstallingOracle10g.shtml"&gt;http://www.puschitz.com/InstallingOracle10g.shtml&lt;/a&gt; and &lt;a href="http://support.oracle.com/"&gt;MOS&lt;/a&gt;&amp;nbsp;(My Oracle Support).&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-4960070531802536818?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/4960070531802536818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/07/some-notes-on-installing-10204-on-sles.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4960070531802536818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4960070531802536818'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/07/some-notes-on-installing-10204-on-sles.html' title='Some notes on installing 10.2.0.4 on SLES 11 64bits'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-1300405884005428977</id><published>2011-06-27T10:45:00.007+02:00</published><updated>2011-06-27T14:34:57.230+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='move tables tablespace'/><title type='text'>Move tables, indexes and lobs to another tablespace</title><content type='html'>&lt;span style="font-family: Verdana, sans-serif;"&gt;On some occasions, I have been using a &lt;a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:47812348053"&gt;script from Tom Kyte&lt;/a&gt; to move all objects from one tablespace to another. This script also gets all the indexes of the tables that are being moved. After moving the table, you should rebuild the index.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;The script has been slightly adapted by me, but the main code is by Tom.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;We do need to purge the recyclebin, otherwise you will end up with moving BIN$ objects in your script. What remains sometimes, are the lob segments. These can be moved with:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;alter table &lt;em&gt;owner.table&lt;/em&gt; move lob(&lt;em&gt;columnname&lt;/em&gt;) store as (tablespace &lt;em&gt;newtablespace&lt;/em&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;This has been added in a second part of the query. So the total scripting is like below. You may call it with &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;@moveall USERS USERS2&lt;/span&gt; if you want everything to move to the USERS2 tablespace. Note that it only creates a script, the actual moving has to be done and can take quite a while.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;set echo off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;prompt Enter a value for the OLD tablespace:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;define old_tablespace=&amp;amp;1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;prompt Enter a value for the NEW tablespace:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;define new_tablespace=&amp;amp;2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;column order_col1 noprint&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;column order_col2 noprint&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;set heading off verify off feedback off echo off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;set pages 0 lines 9999 trimspool on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;purge dba_recyclebin;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;spool tmp.sql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;select decode( segment_type, 'TABLE', segment_name, table_name ) order_col1,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;decode( segment_type, 'TABLE', 1, 2 ) order_col2,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;'alter ' || segment_type || ' ' || owner || '.' || segment_name || &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;decode( segment_type, 'TABLE', ' move ', ' rebuild ' ) ||&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;' tablespace &amp;amp;&amp;amp;new_tablespace ' || ';'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;from dba_segments,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;(select table_name, index_name from user_indexes )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;where segment_type in ( 'TABLE', 'INDEX' )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;and segment_name = index_name (+)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;and tablespace_name = '&amp;amp;&amp;amp;old_tablespace'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;order by owner, order_col1, order_col2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;select 'alter table ' || &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;owner || &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;'.' || &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;table_name ||&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;' move lob(' || &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;column_name || &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;') store as (tablespace &amp;amp;&amp;amp;new_tablespace);'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;from dba_lobs where TABLESPACE_NAME='&amp;amp;&amp;amp;old_tablespace'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;spool off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;set heading on verify on feedback on echo on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;REM Now you can:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;REM 1. Backup your database&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;REM 2. Start it restricted if possible&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;REM 3. Run the generated script&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Use it with care, make sure you have a database backup and start up the database in restricted mode if possible.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;After the move, check for unusable indexes and invalid objects. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-1300405884005428977?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/1300405884005428977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/06/move-tables-indexes-and-lobs-to-another.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1300405884005428977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1300405884005428977'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/06/move-tables-indexes-and-lobs-to-another.html' title='Move tables, indexes and lobs to another tablespace'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-540431846060132561</id><published>2011-03-06T07:58:00.008+01:00</published><updated>2011-04-22T11:30:58.059+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='export'/><category scheme='http://www.blogger.com/atom/ns#' term='compression'/><title type='text'>Export large database without using much diskspace</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;I have one pretty large database running in one of our development environments. I was wondering if this Oracle 8i database could be easily exported. I didn't have much space for export files, so I used compression during export with a script a found &amp;nbsp;at &lt;a href="http://www.tc.umn.edu/~hause011/code/exp-imp-db.ksh"&gt;http://www.tc.umn.edu/~hause011/code/exp-imp-db.ksh&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;How much compression would it give me and how long would it take?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Here are some results:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Database 8.1.7.4 on AIX 5.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Export running 40 hours&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;database size: 236 Gb&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;export dumpfile (gzip) 16Gb&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Import would take considerably longer, because indexes would need te be created. I would guess around a week. The export time will probably not have been much shorter without compression.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-540431846060132561?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/540431846060132561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/03/export-large-database-without-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/540431846060132561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/540431846060132561'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/03/export-large-database-without-using.html' title='Export large database without using much diskspace'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-309010208322460887</id><published>2011-02-09T06:18:00.001+01:00</published><updated>2011-04-22T11:31:31.882+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='explain plan'/><title type='text'>explain plan easy!</title><content type='html'>&lt;div style="mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 7.05pt; mso-element-left: center; mso-element-top: 113.9pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;"&gt;&lt;table align="center" cellpadding="0" cellspacing="0" hspace="0" style="text-align: left;" vspace="0"&gt;&lt;tbody&gt;&lt;tr&gt;   &lt;td align="left" style="padding-bottom: 0cm; padding-left: 7.05pt; padding-right: 7.05pt; padding-top: 0cm;" valign="top"&gt;   &lt;h5 align="center" style="text-align: left;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="color: purple; font-size: small;"&gt;EXPLAIN PLAN FOR SELECT *   FROM MYTABLE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h5&gt;&lt;h5 align="center" style="text-align: left;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New';"&gt;&lt;span class="Apple-style-span" style="color: purple; font-size: small;"&gt;SELECT * FROM   TABLE(DBMS_XPLAN.DISPLAY);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h5&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-309010208322460887?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/309010208322460887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2011/02/explain-plan-easy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/309010208322460887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/309010208322460887'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2011/02/explain-plan-easy.html' title='explain plan easy!'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-1356577692802342597</id><published>2010-12-23T08:35:00.000+01:00</published><updated>2010-12-23T08:35:03.493+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualbox clone'/><title type='text'>clone virtual machine in VirtualBox</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;Goal of this procedure:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Source: machine called EntLnx10 with disk EntLnx_10.vdi&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Target: machine called EntLnx09 with disk EntLnx_09.vdi&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Here is what we do:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;start up Virtualbox program.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Go to File &amp;gt; Virtual Media Manager (or press Ctrl-D)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Select the EntLnx_10.vdi and click &lt;b&gt;Release &lt;/b&gt;button.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Select the EntLnx_10.vdi and click &lt;b&gt;Remove &lt;/b&gt;button.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Select the &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;u&gt;Keep&lt;/u&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;button (!!)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Now start a commandline and give the command (also see example below):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[path]\VBoxManage.exe clonehd [path]\sourcedisk.vdi [path]\targetdisk.vdi&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;This starts copying the disk, which might take a while.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;D:\Virtual Machines&amp;gt;"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd "d:\Virtual Machines\EntLnx_10.vdi" "d:\Virtual Machines\EntLnx_09.vdi"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Oracle VM VirtualBox Command Line Management Interface Version 3.2.12&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(C) 2005-2010 Oracle Corporation&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Clone hard disk created in format 'VDI'. UUID: 65a30476-0a44-4dea-aee8-9e0e95a12e7c&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Now add the new disk to Virtualbox:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Go to File &amp;gt; Virtual Media Manager (or press Ctrl-D)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Click Add and select the new vdi file. Click Ok.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Now create a new virtual machine, and select in this process the 'existing' new vdi file as harddisk.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Start up the EntLnx09 machine.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Good luck!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&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/3671382120795488436-1356577692802342597?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/1356577692802342597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/12/clone-virtual-machine-in-virtualbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1356577692802342597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1356577692802342597'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/12/clone-virtual-machine-in-virtualbox.html' title='clone virtual machine in VirtualBox'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-5364463056400983780</id><published>2010-12-06T06:41:00.001+01:00</published><updated>2011-01-18T07:44:07.286+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nls_lang export import'/><title type='text'>Getting the NLS_LANG right for exp and imp</title><content type='html'>If you use the old-fashioned imp en exp tools, you really need to set the NLS_LANG environment variable right. To what value? It can be read from the v$nls_parameters. To make life easier, I always keep this set_nls.sql script available. It creates just the right (Linux) statement to make the setting.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;set heading off&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;set feedback off&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;select 'export NLS_LANG=' || lan.value || '_' || ter.value || '.' || chr.value&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;from v$nls_parameters lan,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; v$nls_parameters ter,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; v$nls_parameters chr&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;where lan.parameter='NLS_LANGUAGE'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;and ter.parameter='NLS_TERRITORY'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;and chr.parameter='NLS_CHARACTERSET';&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;set heading on&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;set feedback on&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This gives me for example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just copy it in your shell environment and fire up the imp or exp!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-5364463056400983780?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/5364463056400983780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/12/getting-nlslang-right-for-exp-and-imp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5364463056400983780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5364463056400983780'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/12/getting-nlslang-right-for-exp-and-imp.html' title='Getting the NLS_LANG right for exp and imp'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-1235526963242795548</id><published>2010-11-21T12:06:00.001+01:00</published><updated>2010-11-23T20:17:48.962+01:00</updated><title type='text'>My favorite alias</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana,sans-serif;"&gt;Aliasses are most useful tiny little means of making life easy on Linux.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana,sans-serif;"&gt;One of my favorites is 'dba'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;alias dba='sqlplus "/ as sysdba" @/home/oracle/scripts/login.sql'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana,sans-serif;"&gt;with the login.sql:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;set sqlprompt "_USER'@'_CONNECT_IDENTIFIER _PRIVILEGE&amp;gt; "&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana,sans-serif;"&gt;This makes login most simple by typing dba and it looks like:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;oracle@server01:~&amp;gt; &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;dba&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;SQL*Plus: Release 11.2.0.1.0 Production on Sun Nov 21 12:04:22 2010&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;Copyright (c) 1982, 2009, Oracle. &amp;nbsp;All rights reserved.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;Connected to:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;With the Partitioning, Oracle Label Security, OLAP, Data Mining,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;Oracle Database Vault and Real Application Testing options&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;SYS@SERVER01 AS SYSDBA&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana,sans-serif;"&gt;What is your favorite alias?&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-1235526963242795548?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/1235526963242795548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/11/my-favorite-alias.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1235526963242795548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1235526963242795548'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/11/my-favorite-alias.html' title='My favorite alias'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-4500016137606417063</id><published>2010-11-19T06:26:00.000+01:00</published><updated>2010-11-19T06:26:24.396+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Golden Gate'/><title type='text'>Hands-on GoldenGate</title><content type='html'>This is a very fine article hands-on for trying GoldenGate:&lt;br /&gt;&lt;a href="http://www.pythian.com/news/7959/oracle-goldengate-installation-part-1/"&gt;http://www.pythian.com/news/7959/oracle-goldengate-installation-part-1/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-4500016137606417063?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/4500016137606417063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/11/hands-on-goldengate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4500016137606417063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4500016137606417063'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/11/hands-on-goldengate.html' title='Hands-on GoldenGate'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-8580594375106224640</id><published>2010-11-11T09:01:00.003+01:00</published><updated>2011-08-15T13:14:25.094+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emgc OCMRepeater metric collection errors'/><title type='text'>Application Deployment targets showing metric collection errors</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;On Grid Control 11.1.0.1.0, running on Weblogic 10.3.2 I had some errors on&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/secFarm_GCDomain/GCDomain/EMGC_OMS1/emgc&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/secFarm_GCDomain/GCDomain/EMGC_OMS1/OCMRepeater&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;'Application Deployment' targets, showing &lt;b&gt;metric collection errors&lt;/b&gt; on the Grid Control.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;For database targets, this is easy to solve by entering the right dbsnmp password :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;i&gt;Targets - Configure&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Now the errors on 'Application Deployment' targets are also easy. Just go to Targets , select the target and click configure. Now there are no configurable properties, no passwords or such, but just click OK button.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MEKCtgLrIek/Tkj_NqnlwgI/AAAAAAAAAtI/3aIprR0Swxg/s1600/ScreenShot007.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="161" src="http://3.bp.blogspot.com/-MEKCtgLrIek/Tkj_NqnlwgI/AAAAAAAAAtI/3aIprR0Swxg/s640/ScreenShot007.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;After a few seconds (almost instantly) the target is shown 'Up' in Grid Control.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_suwBHEeyHU/Tkj_hYGg6bI/AAAAAAAAAtM/9GH8geVIDus/s1600/ScreenShot008.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://3.bp.blogspot.com/-_suwBHEeyHU/Tkj_hYGg6bI/AAAAAAAAAtM/9GH8geVIDus/s640/ScreenShot008.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;How easy can it be?&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/3671382120795488436-8580594375106224640?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/8580594375106224640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/11/application-deployment-targets-showing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/8580594375106224640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/8580594375106224640'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/11/application-deployment-targets-showing.html' title='Application Deployment targets showing metric collection errors'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-MEKCtgLrIek/Tkj_NqnlwgI/AAAAAAAAAtI/3aIprR0Swxg/s72-c/ScreenShot007.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-4682704113267816576</id><published>2010-11-10T09:23:00.000+01:00</published><updated>2010-11-10T09:23:25.552+01:00</updated><title type='text'>Oracle 9R2</title><content type='html'>I thought I would NEVER install Oracle 9R2 again. But our sysadmin wanted to get rid of this old SLES 9 machine, so we reinstalled on SLES10.&lt;br /&gt;Never say never again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-4682704113267816576?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/4682704113267816576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/11/oracle-9r2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4682704113267816576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/4682704113267816576'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/11/oracle-9r2.html' title='Oracle 9R2'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-9091029671939420384</id><published>2010-11-08T11:33:00.057+01:00</published><updated>2010-11-08T15:50:34.374+01:00</updated><title type='text'>Moving datafiles – almost online</title><content type='html'>&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; font-size:11.0pt; font-family:"Calibri","sans-serif";}a:link, span.MsoHyperlink {color:blue; text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;}p.MsoPlainText, li.MsoPlainText, div.MsoPlainText {mso-style-link:"Tekst zonder opmaak Char"; margin:0cm; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Verdana","sans-serif";}span.TekstzonderopmaakChar {mso-style-name:"Tekst zonder opmaak Char"; mso-style-link:"Tekst zonder opmaak"; font-family:"Verdana","sans-serif";}@page WordSection1 {size:595.3pt 841.9pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;In this post I will show a method to move datafiles with minimal downtime. A testcase moves an 8Gb datafile with 5 seconds downtime.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="WordSection1"&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;If you need to move a datafile in Oracle,&amp;nbsp;but the database or even tablespace cannot be taken offline, you have a hard&amp;nbsp;job.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;I came accros the following &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;&lt;a href="http://www.freelists.org/post/oracle-l/Is-it-possible-to-renamemove-datafile-online-possibly-under-RMAN,3"&gt;post&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;and decided to make a nice script around it. The script will put the tablespace&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;in backup mode, copy it to the new location, end the backup mode. After that,&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt; take the datafile offline, rename it in the database, recover it and put it&amp;nbsp;online. &lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;Here is my script (move_online.sql):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-left: solid windowtext 1.0pt; border: none; padding: 0cm 0cm 0cm 4.0pt;"&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Script to move a datafile (almost) online.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Do not use easily, there is a small downtime&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- You can minimize downtime by following these&amp;nbsp;steps:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 1) alter tablespace &amp;lt;TS name&amp;gt; begin backup;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 2) HOST cp &amp;lt;old name&amp;gt; &amp;lt;new name&amp;gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 3) alter tablespace &amp;lt;TS name&amp;gt; end backup;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 4) alter database datafile &amp;lt;old name&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;offline;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 5) alter database rename file &amp;lt;old name&amp;gt; to&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;lt;new name&amp;gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 6) recover datafile &amp;lt;new name&amp;gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- 7) alter database datafile &amp;lt;new name&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;online;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;WHENEVER SQLERROR EXIT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Entry Section&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;set heading off&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;set feedback off&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;set verify off&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;define TSNAME = &amp;amp;TablespaceName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Existing files, pick a low-active file if&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;possible&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Display filestatistics, pick a low-active file if&amp;nbsp;possible&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;col file_name format a40&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;col tablespace_name format a12 heading Tablespace&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; set heading on set lines 120 set pages 999 select&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; f.file_name,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; f.tablespace_name,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; s.phyrds,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; s.phywrts&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;from v$filestat s,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; dba_data_files f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;where f.tablespace_name='&amp;amp;&amp;amp;TSNAME'&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;and f.file_id=s.file#&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;set heading off&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Enter the old file without quotes:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;define OLDFILE = &amp;amp;Old_Filename&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Enter the new file without quotes:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;define NEWFILE = &amp;amp;New_Filename&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Processing&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Set backup status...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter tablespace &amp;amp;&amp;amp;TSNAME begin backup;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Copying file...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;host cp &amp;amp;&amp;amp;OLDFILE &amp;amp;&amp;amp;NEWFILE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt End backup status...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter tablespace &amp;amp;&amp;amp;TSNAME end backup;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Set file offline...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter database datafile '&amp;amp;&amp;amp;OLDFILE' offline;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Rename file in database...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter database rename file '&amp;amp;&amp;amp;OLDFILE' to&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;'&amp;amp;&amp;amp;NEWFILE';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Recover datafile...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;recover datafile '&amp;amp;&amp;amp;NEWFILE';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Set file online...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter database datafile '&amp;amp;&amp;amp;NEWFILE' online;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Cleanup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Rename old file...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;host mv &amp;amp;&amp;amp;OLDFILE &amp;amp;&amp;amp;OLDFILE._`date&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;+"%Y%m%d_%T"`.old&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-- Display Status&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Datafiles with wrong status:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;set feedback on&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;select name, b.status from v$backup b, v$datafile f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; where f.file#=b.file# and b.status !='NOT ACTIVE'&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt All actions are logged in alert logging.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;prompt Ready!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 15px; line-height: 17px;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;Warning:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt; There will be short period of unavailability of the datafile.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;The&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;output looks as follows on my test database (Suse Linux), I marked my input&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt; strings:&lt;/span&gt;&lt;/div&gt;&lt;div style="border-left: solid windowtext 1.0pt; border: none; padding: 0cm 0cm 0cm 4.0pt;"&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: 'Courier New'; font-size: 9pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SQL&amp;gt; @move_online.sql&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Enter value for tablespacename: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;USERS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Existing files, pick a low-active file if possible&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;FILE_NAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tablespace &amp;nbsp; &amp;nbsp;PHYRDS PHYWRTS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;----------------------------------&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;------------ ------- -------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/u04/oradata/DBATST01/users01.dbf &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;USERS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;446 &amp;nbsp; &amp;nbsp; 413&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/u04/oradata/DBATST01/users02.dbf &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;USERS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Enter the old file without quotes:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Enter value for old_filename: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/u04/oradata/DBATST01/users02.dbf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Enter the new file without quotes:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Enter value for new_filename: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/u01/oradata/DBATST01/users02.dbf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Set backup status...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Copying file...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;End backup status...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Set file offline...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Rename file in database...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Recover datafile...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Media recovery complete.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Set file online...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Rename old file...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Datafiles with wrong status:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;no rows selected&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;All actions are logged in alert logging.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Ready!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 15px; line-height: 17px;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;Logging&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;If&amp;nbsp;we take a look at the alert logging, we can see the timing of this:&lt;/span&gt;&lt;/div&gt;&lt;div style="border-left: solid windowtext 1.0pt; border: none; padding: 0cm 0cm 0cm 4.0pt;"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter tablespace USERS begin backup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov &amp;nbsp;8 10:43:28 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Completed: alter tablespace USERS begin backup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:28 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter tablespace USERS end&amp;nbsp;&amp;nbsp; backup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Completed: alter tablespace USERS end backup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:28 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter database datafile&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; '/u04/oradata/DBATST01/users02.dbf' offline&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Completed: alter database datafile&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; '/u04/oradata/DBATST01/users02.dbf' offline&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:28 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter database rename file&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small; line-height: 24px;"&gt;'/u04/oradata/DBATST01/users02.dbf' to '/u01/oradata/DBATST01/users02.dbf'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Starting control autobackup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Control autobackup written to DISK device&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;handle&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small; line-height: 24px;"&gt;'/backup/mdoradb01/DBATST01c-4185353572-20101108-13'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Completed: alter database rename file&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small; line-height: 24px;"&gt;'/u04/oradata/DBATST01/users02.dbf' to '/u01/oradata/DBATST01/users02.dbf'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:29 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ALTER DATABASE RECOVER&amp;nbsp; datafile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;'/u01/oradata/DBATST01/users02.dbf'&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Media Recovery Start&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:29 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Recovery of Online Redo Log: Thread 1 Group 2 Seq 41&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="border: none; margin-bottom: .0001pt; margin-bottom: 0cm; padding: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; Reading mem 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;Mem# 0: /u04/oradata/DBATST01/redo02.log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:29 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Media Recovery Complete (DBATST01)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Completed: ALTER DATABASE RECOVER&amp;nbsp; datafile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small; line-height: 24px;"&gt;'/u01/oradata/DBATST01/users02.dbf'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Mon Nov&amp;nbsp; 8 10:43:32 2010&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter database datafile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;'/u01/oradata/DBATST01/users02.dbf' online&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Starting control autobackup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Control autobackup written to DISK device&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;handle&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small; line-height: 24px;"&gt;'/backup/mdoradb01/DBATST01c-4185353572-20101108-14'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Completed: alter database datafile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;'/u01/oradata/DBATST01/users02.dbf' online&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;We can see, there is about four seconds&amp;nbsp;offline status of the datafile. Now this is a 11Mb datafile. Another testcase&amp;nbsp;moving a 8.2Gb file, took about 6 minutes to copy but we had online 5 seconds(!)&amp;nbsp;offline status.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;Note that the old file is renamed. You should remove it manually afterwards if all went well.&lt;/span&gt;&lt;br /&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;Conclusion of this method is, that we can&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;move datafiles with a minimal offline duration provided that the database is&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;running in archivelog. You have to be aware of the risks. If you have jobs&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13.1944px; line-height: 21px;"&gt;running or queries against the datafile when it is offline, they probably fail.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13.1944px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;Furthermore, if you have many updates and&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;inserts on the tablespace while the copy is running, you might end up with a&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 13px; line-height: 14px;"&gt;lot of redo logging.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;"&gt;Using a file that is not much used (as can&amp;nbsp;be seen from the filestats), and moving the file outside office hours might&amp;nbsp;reduce these risks.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-9091029671939420384?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/9091029671939420384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/11/moving-datafiles-almost-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/9091029671939420384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/9091029671939420384'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/11/moving-datafiles-almost-online.html' title='Moving datafiles – almost online'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-188845136923491458</id><published>2010-09-09T11:42:00.000+02:00</published><updated>2010-09-09T11:42:43.865+02:00</updated><title type='text'>truncate table speed</title><content type='html'>When you delete many rows with DELETE FROM, you generate a lot of redo and undo. It may even fail, if your undo runs out of space or your archive location is insufficient.&lt;br /&gt;&lt;br /&gt;If you need to empty a full table, it is a poor decision to use DELETE. In that case, use TRUNCATE. It is far more efficient and quicker.&lt;br /&gt;&lt;br /&gt;You know it should be quick, but who has the opportunity to test it on a big table?&lt;br /&gt;I had just over 100.000.000 rows in a audit table that had to be cleaned. &lt;br /&gt;&lt;br /&gt;Let's see the results (schema and table name have been changed):&lt;br /&gt;&lt;br /&gt;SQL&gt; select count(1) from SCOTT.AUDIT ;&lt;br /&gt;&lt;br /&gt;  COUNT(1)&lt;br /&gt;----------&lt;br /&gt; 101622759&lt;br /&gt;&lt;br /&gt;Elapsed: 00:02:02.38&lt;br /&gt;&lt;br /&gt;SQL&gt; truncate table SCOTT.AUDIT drop storage;&lt;br /&gt;&lt;br /&gt;Table truncated.&lt;br /&gt;&lt;br /&gt;Elapsed: 00:00:48.69&lt;br /&gt;&lt;br /&gt;48 seconds for 101 million rows. Not bad! Drop storage is default BTW.&lt;br /&gt;Times depend on Operating system. This is a pretty quick Linux server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-188845136923491458?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/188845136923491458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/09/truncate-table-speed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/188845136923491458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/188845136923491458'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/09/truncate-table-speed.html' title='truncate table speed'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-74627972481422225</id><published>2010-07-30T10:30:00.000+02:00</published><updated>2010-07-30T10:30:35.149+02:00</updated><title type='text'>Tiny</title><content type='html'>Are you always looking for Oracle documentation?&lt;br /&gt;It can be found on &lt;a href="http://tinyurl.com/oradoc"&gt;http://tinyurl.com/oradoc&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;For some reason it was never linked on tinyurl.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-74627972481422225?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/74627972481422225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/07/tiny.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/74627972481422225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/74627972481422225'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/07/tiny.html' title='Tiny'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-2619249104929208738</id><published>2010-07-29T08:44:00.002+02:00</published><updated>2011-04-21T07:06:56.374+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='password expired'/><title type='text'>Password expired in 11gR2</title><content type='html'>On most of our 11gR2 databases that we have been using over the last months, the passwords start expiring recently.&lt;br /&gt;I noticed that the default password expiry time is 180 days on the DEFAULT profile, so:&lt;br /&gt;&lt;br /&gt;ALTER PROFILE "DEFAULT" LIMIT PASSWORD_LIFE_TIME UNLIMITED;&lt;br /&gt;&lt;br /&gt;Or, you can create a profile for your application-owners with unlimited password life time - it's up to you.&lt;br /&gt;&lt;br /&gt;Note: this is also a problem on your DBSNMP user in your EMREP database when you use Grid Control with a 11gR2 database for EMREP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-2619249104929208738?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/2619249104929208738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/07/password-expired-in-11gr2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/2619249104929208738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/2619249104929208738'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/07/password-expired-in-11gr2.html' title='Password expired in 11gR2'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-5084017059851207840</id><published>2010-07-29T07:56:00.002+02:00</published><updated>2010-07-29T09:02:54.383+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grid 11g VirtualBox'/><title type='text'>11g Grid Control running on Enterprise Linux - Virtualbox</title><content type='html'>I read &lt;a href="http://www.ora-solutions.net/papers/HowTo_Installation_GridControl_11g_RHEL5.pdf" target="_blank"&gt;this fine paper&lt;/a&gt; by Martin Decker on installing the 11g Grid Control.&lt;br /&gt;It can be pretty easily done with &lt;a href="http://www.virtualbox.org/" target="_blank"&gt;Virtualbox &lt;/a&gt;and &lt;a href="http://www.oracle.com/technetwork/topics/linux/downloads/index.html" target="_blank"&gt;Oracle Enterprise Linux&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You should really try for yourself, especially those who have never worked on 11g Grid. Main difference is that you first install Weblogic application server, then a database (repository) and then the Grid Control. Have fun...!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-5084017059851207840?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/5084017059851207840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/07/11g-grid-control-running-on-enterprise.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5084017059851207840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5084017059851207840'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/07/11g-grid-control-running-on-enterprise.html' title='11g Grid Control running on Enterprise Linux - Virtualbox'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-6365877112537905508</id><published>2010-06-17T09:45:00.000+02:00</published><updated>2010-06-17T09:45:43.382+02:00</updated><title type='text'>Last changed user and date in apex</title><content type='html'>I didn't know I could pass the APP_USER from APEX into a databasetrigger!&lt;br /&gt;The nvl construction saves me from empty fields when updating on backend.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create or replace trigger TRG_BIU&lt;br /&gt;before insert or update on TBL_DEMO&lt;br /&gt;for each row&lt;br /&gt;begin&lt;br /&gt;  :new.DB_LAST_CHANGED_DATE := sysdate();&lt;br /&gt;  :new.DB_LAST_CHANGED_BY   := nvl(v('APP_USER'),USER);&lt;br /&gt;end;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-6365877112537905508?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/6365877112537905508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/06/last-changed-user-and-date-in-apex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6365877112537905508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6365877112537905508'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/06/last-changed-user-and-date-in-apex.html' title='Last changed user and date in apex'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-5287063746473011319</id><published>2010-05-21T21:55:00.000+02:00</published><updated>2010-05-21T21:55:20.602+02:00</updated><title type='text'>Finally got LDAP authentication working in PL/SQL</title><content type='html'>For a project in APEX, I wanted to use LDAP (Active Directory) authentication. It took me a few hours to got it working. The only thing I needed is to change the short 'windows' name into the CN name.&lt;br /&gt;&lt;br /&gt;With the help of this great example:&lt;br /&gt;&lt;a href="http://idevelopment.info/data/Oracle/DBA_tips/LDAP_OID_9.2.0/LDAP_21.shtml"&gt;http://idevelopment.info/data/Oracle/DBA_tips/LDAP_OID_9.2.0/LDAP_21.shtml&lt;/a&gt;&lt;br /&gt;I fixed it.&lt;br /&gt;&lt;br /&gt;The example shows how to login to LDAP and get values from it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-5287063746473011319?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/5287063746473011319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/05/finally-got-ldap-authentication-working.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5287063746473011319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/5287063746473011319'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/05/finally-got-ldap-authentication-working.html' title='Finally got LDAP authentication working in PL/SQL'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-332440785861185269</id><published>2010-04-22T21:46:00.001+02:00</published><updated>2010-07-29T09:03:41.905+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grid 11g'/><title type='text'>Grid Control 11</title><content type='html'>Hi,&lt;br /&gt;The new Grid Control 11.1.0.1.0 is now on OTN available. For Linux only.&lt;br /&gt;So start downloading and test it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-332440785861185269?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/332440785861185269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/04/grid-control-11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/332440785861185269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/332440785861185269'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/04/grid-control-11.html' title='Grid Control 11'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-582063130819171918</id><published>2010-04-03T10:32:00.000+02:00</published><updated>2010-04-03T10:32:01.336+02:00</updated><title type='text'>Oracle Database 11.2 for windows release</title><content type='html'>The 11.2 release for windows x64 has now been released on OTN. We'll have to wait for 32 bits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-582063130819171918?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/582063130819171918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/04/oracle-database-112-for-windows-release.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/582063130819171918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/582063130819171918'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/04/oracle-database-112-for-windows-release.html' title='Oracle Database 11.2 for windows release'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-6088116924478722377</id><published>2010-03-03T09:56:00.007+01:00</published><updated>2010-03-04T13:35:41.029+01:00</updated><title type='text'>Columns showing active databases</title><content type='html'>When I logon to a server with a large number of databases on it, I like to see what instances are active. When the list is growing, a simple grep on e.g. pmon processes would not give a nice list. Columns can be created with the pr command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ls /usr/bin | pr -T4 -W&lt;/span&gt;&lt;screenwidth&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$&lt;screenwidth&gt;&lt;/screenwidth&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The screenwidth in a script can be found with the $(tput cols) variable or - outside a script - with the $COLUMNS variable. Putting it all together gives me the following, which can be sourced in .bash_profile if you like. Nice thing is, that the number of columns is variable and will change depending on your screenwidth.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# Determine number of columns to use&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;MINCOLWD=10 # minimum column width&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SCRNCHAR=$(( $(tput cols) )) # screen width&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;NROFCOLS=$(( $SCRNCHAR / $MINCOLWD )) # number of columns&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ps -ef | grep pmon | grep -v 'grep pmon' | awk '{ print substr($8,10,10) }' | sort | pr -T${NROFCOLS} -W${SCRNCHAR} &amp;gt; list_db.tmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cat list_db.tmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# Determine number of active databases&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;NRACTDB=`ps -ef | grep pmon | grep -v 'grep pmon' | wc -l`&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;echo \&amp;gt;\&amp;gt; Total: $NRACTDB databases active&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The output looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ABCONT61 &amp;nbsp;COVUG02&amp;nbsp; &amp;nbsp;DPSONT&amp;nbsp; &amp;nbsp;ESYUNTD1&amp;nbsp; LNXBTR01&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ABCONT62 &amp;nbsp;CRILS30T&amp;nbsp;&amp;nbsp;DPSTST&amp;nbsp; &amp;nbsp;GFKONT&amp;nbsp;&amp;nbsp; &amp;nbsp;LNXTTO&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;BRFP01&amp;nbsp;&amp;nbsp;&amp;nbsp; CRILS61&amp;nbsp; &amp;nbsp;ECWCTST &amp;nbsp;HBJSONT&amp;nbsp; &amp;nbsp;OAADB&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;BKDWHO&amp;nbsp; &amp;nbsp; CRILS61T&amp;nbsp; ECWPTST &amp;nbsp;INOKDS01 &amp;nbsp;SQWWUR&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;BKDWHT&amp;nbsp; &amp;nbsp; CRILS62&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&amp;gt;&amp;nbsp;Total: 26 databases active&lt;/span&gt;&lt;/screenwidth&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-6088116924478722377?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/6088116924478722377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/03/when-i-logon-to-server-with-large.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6088116924478722377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6088116924478722377'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/03/when-i-logon-to-server-with-large.html' title='Columns showing active databases'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-35352742025476424</id><published>2010-02-18T10:37:00.003+01:00</published><updated>2010-02-18T10:38:48.134+01:00</updated><title type='text'>Managing Statistics</title><content type='html'>Read a good paper on statistics today, by Karen Morton:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://method-r.com/downloads/doc_details/11-managing-statistics-for-optimal-query-performance-karen-morton"&gt;Click here to read this paper&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-35352742025476424?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/35352742025476424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/02/managing-statistics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/35352742025476424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/35352742025476424'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/02/managing-statistics.html' title='Managing Statistics'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-861284814557324514</id><published>2010-02-17T12:03:00.001+01:00</published><updated>2010-02-17T12:18:51.610+01:00</updated><title type='text'>format columns in awk with printf</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CUsers%5Calsemgpa%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CUsers%5Calsemgpa%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Calsemgpa%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:hyphenationzone&gt;21&lt;/w:HyphenationZone&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;NL&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 415 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-520092929 1073786111 9 0 415 0;} @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1593833729 1073750107 16 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	line-height:12.0pt; 	mso-pagination:widow-orphan; 	font-size:9.0pt; 	mso-bidi-font-size:11.0pt; 	font-family:"Verdana","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:595.3pt 841.9pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:35.4pt; 	mso-footer-margin:35.4pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:Standaardtabel; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt;" lang="EN-US"&gt;I was struggling with &lt;b style=""&gt;awk&lt;/b&gt; to display the diskspace on my Linux host in the most convenient way. One problem was that a df command splits the output on two lines, but this is fixed by &lt;b style=""&gt;df -P&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt;" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt;" lang="EN-US"&gt;Formatting the output with &lt;b style=""&gt;awk&lt;/b&gt; required using &lt;b style=""&gt;printf&lt;/b&gt; instead of &lt;b style=""&gt;print&lt;/b&gt;. With &lt;b style=""&gt;printf&lt;/b&gt; you can give formatting to the columns. I came on the following which is seems very usefull in my case.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt;" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;oracle@myserver:~&gt; df -Ph | awk '{ printf "%-12s%8s\n", $6 , $5 }'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;Mounted&lt;span style=""&gt;         &lt;/span&gt;Use%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/&lt;span style=""&gt;                 &lt;/span&gt;9%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/dev&lt;span style=""&gt;              &lt;/span&gt;1%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/boot&lt;span style=""&gt;            &lt;/span&gt;10%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/home&lt;span style=""&gt;             &lt;/span&gt;4%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/opt&lt;span style=""&gt;             &lt;/span&gt;31%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/tmp&lt;span style=""&gt;             &lt;/span&gt;20%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/usr&lt;span style=""&gt;             &lt;/span&gt;52%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/var&lt;span style=""&gt;             &lt;/span&gt;11%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;" lang="EN-US"&gt;/data&lt;span style=""&gt;            &lt;/span&gt;15%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;/backup&lt;span style=""&gt;          &lt;/span&gt;83%&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-861284814557324514?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/861284814557324514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2010/02/format-columns-in-awk-with-printf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/861284814557324514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/861284814557324514'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2010/02/format-columns-in-awk-with-printf.html' title='format columns in awk with printf'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-3060928426989948489</id><published>2009-12-02T11:46:00.004+01:00</published><updated>2010-03-04T13:32:55.946+01:00</updated><title type='text'>Tablespace point in time recovery</title><content type='html'>&lt;span style="font-size: small;"&gt;I'm glad it was just a test for this TSPITR....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;RMAN&amp;gt; run&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;2&amp;gt; { recover tablespace USERS&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;3&amp;gt; until logseq 23 thread 1&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;4&amp;gt; auxiliary destination '/u04/oradata/';&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;5&amp;gt; }&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;Starting recover at 02-DEC-09&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;using target database control file instead of recovery catalog&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;allocated channel: ORA_DISK_1&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;channel ORA_DISK_1: sid=146 devtype=DISK&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;RMAN-00571: ===========================================================&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;RMAN-00571: ===========================================================&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;RMAN-03002: failure of recover command at 12/02/2009 11:41:25&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;RMAN-06455: point-in-time tablespace recovery requires Enterprise Edition&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Ooops.... running SE.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-3060928426989948489?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/3060928426989948489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/12/tablespace-point-in-time-recovery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/3060928426989948489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/3060928426989948489'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/12/tablespace-point-in-time-recovery.html' title='Tablespace point in time recovery'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-1312622498903768527</id><published>2009-11-24T11:55:00.001+01:00</published><updated>2011-04-21T07:03:35.224+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kill linux'/><title type='text'>Kill all processes - the rough way</title><content type='html'>&lt;span style="font-family: verdana;"&gt;On certain occasions, it might be needed to kill several hunderds of processes on a linux machine. Of course you should NOT do this on a production site, but the use of xargs might be handy:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  ps -ef | grep oracle | grep -v bash | awk '{ print $2}' | xargs kill -9&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;With the grep -v you exclude your own putty session.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-1312622498903768527?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/1312622498903768527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/11/kill-all-processes-rough-way.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1312622498903768527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/1312622498903768527'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/11/kill-all-processes-rough-way.html' title='Kill all processes - the rough way'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-8070799522934935881</id><published>2009-11-24T09:41:00.000+01:00</published><updated>2009-11-24T09:47:24.549+01:00</updated><title type='text'>Sqlplus connect on HP-UX</title><content type='html'>&lt;span style="font-family: verdana;"&gt;I had a problem connecting with a script on HP-UX. Somehow it felt like I had seen it earlier....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   sqlplus myuser/mypassword@mydb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The HP-UX does not like the @ sign. You'll need to escape it:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   sqlplus myuser/mypassword\@mydb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;This solved my problem.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-8070799522934935881?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/8070799522934935881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/11/sqlplus-connect-on-hp-ux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/8070799522934935881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/8070799522934935881'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/11/sqlplus-connect-on-hp-ux.html' title='Sqlplus connect on HP-UX'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-33830532403685290</id><published>2009-04-07T14:44:00.000+02:00</published><updated>2009-04-07T14:48:38.672+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nls_lang export import'/><title type='text'>Correct NLS_LANG for exports</title><content type='html'>&lt;span style="font-family: verdana;"&gt;It's important to set the right NLS_LANG environment variable when doing exports/imports.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The following query makes it easy getting the syntax and values right.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set heading off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set feedback off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; select 'export NLS_LANG=' || lan.value || '_' || ter.value || '.' || chr.value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  from v$nls_parameters lan,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       v$nls_parameters ter,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       v$nls_parameters chr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  where lan.parameter='NLS_LANGUAGE'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    and ter.parameter='NLS_TERRITORY'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    and chr.parameter='NLS_CHARACTERSET';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set heading on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set feedback on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;This gives the line (e.g.)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;which can easily be copied before the imp/exp is run.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;For windows environments, you would need to replace 'export' by 'set' in the query.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Enjoy!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-33830532403685290?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/33830532403685290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/04/correct-nlslang-for-exports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/33830532403685290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/33830532403685290'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/04/correct-nlslang-for-exports.html' title='Correct NLS_LANG for exports'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-6891149659319714424</id><published>2009-03-13T07:27:00.001+01:00</published><updated>2010-02-05T06:47:31.868+01:00</updated><title type='text'>determine the Oracle version in a nutshell</title><content type='html'>&lt;span style="font-family: verdana;"&gt;On a host with multiple Oracle versions in multiple Oracle homes, it might be prove hard to quickly determine the Oracle version in a shell script. I came across the following method and like to share it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;First, grep the line from /etc/oratab which contains the ORACLE_SID at the beginning of that line:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  grep -i ^$ORACLE_SID: /etc/oratab&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Then cut everything behind the semicolon away:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;  cut -f2 -d:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;this gives you the Oracle home path.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Now cut out everything behind the first dot:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  cut -f1 -d.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Taking the basename, will remove the path and leave the Oracle version.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;In one statement it will become:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  VERSION=$( basename $(grep -i ^$ORACLE_SID: /etc/oratab | cut -f2 -d: | cut -f1 -d. ) )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;I know that there are different ways. Suggestions welcome!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-6891149659319714424?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/6891149659319714424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/03/determine-oracle-version-in-nutshell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6891149659319714424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6891149659319714424'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/03/determine-oracle-version-in-nutshell.html' title='determine the Oracle version in a nutshell'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-9008371565870863586</id><published>2009-03-10T07:46:00.000+01:00</published><updated>2009-03-10T08:01:12.047+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='index monitoring usage'/><title type='text'>Index montoring</title><content type='html'>&lt;span style="font-family:verdana;"&gt;You easily forget about all the options you have. I came across a situation, where 39 indexes where created on a single table. This extreme number was grown over the years. There was no administration on which indexes were needed for what purpose. Good luck!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Luckily, you have index monitoring that can be turned on.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  alter index MY_IDX_1 monitoring usage;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;If you wait for a considerable amount of time, you will see that v$object_usage will contain information on whether the index was used:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  select index_name,monitoring,used,start_monitoring,end_monitoring&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  from v$object_usage;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Note that it is important to log on as the index owner and not as sysdba to see any information in this view.&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;The USED column will probably (maybe) switch from NO to YES if the index is being used.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;If you turn off the monitoring:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  alter index MY_IDX_1 nomonitoring usage;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;the END_MONITORING date field will be filled.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;You should not turn off monitoring too soon, there might be monthly reports or hardly used screens that incidentally need the index.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;There is a drawback on this. During statististics the index will be used. This will blurr your results. A solution might be to lock statistics during monitoring, using&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  exec dbms_stats.lock_table_stats(ownname=&gt;'SCOTT',tabname=&gt;'DEPT');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;but on heavily changing tables locking statistics might be no such a good idea.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-9008371565870863586?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/9008371565870863586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/03/index-montoring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/9008371565870863586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/9008371565870863586'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/03/index-montoring.html' title='Index montoring'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-6636919697276420186</id><published>2009-03-02T11:22:00.000+01:00</published><updated>2009-03-02T11:24:06.047+01:00</updated><title type='text'>hidden parameter checking</title><content type='html'>You might want to check the value of hidden parameters in Oracle.... Here's how to do this. You can enter a (part of) the parametername (in lowercase) to find what you're looking for.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set pages 8888&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set lines 120&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;select a.ksppinm name,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;b.ksppstvl value,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;b.ksppstdf deflt,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;decode&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;(a.ksppity, 1,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'boolean', 2,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'string', 3,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'number', 4,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'file', a.ksppity) type,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;a.ksppdesc description&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;from&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sys.x$ksppi a,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;sys.x$ksppcv b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;where&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;a.indx = b.indx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;and&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;a.ksppinm like '\_%&amp;amp;Part_Of_Parametername%' escape '\'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;order by&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3671382120795488436-6636919697276420186?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/6636919697276420186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/03/hidden-parameter-checking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6636919697276420186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/6636919697276420186'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/03/hidden-parameter-checking.html' title='hidden parameter checking'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3671382120795488436.post-2022507350999659082</id><published>2009-02-26T19:12:00.000+01:00</published><updated>2009-02-26T19:23:27.175+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Always working on backups....</title><content type='html'>Today I tried to improve a backup. On a host with a large number of databases running, which do change now and then, you would like that your backup more or less manages itself. So it would have to pick up all running databases, and backup these.&lt;br /&gt;&lt;br /&gt;The backup script is stored in a RMAN catalog. The script picks up all databases on a (linux) system and selects them on the running pmon process:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;ps -ef | grep pmon | grep -v 'grep pmon' | awk '{print "backupdb " substr($8,10,8) ";"}' &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;With the awk command, you extract the instance name from the grep output. The result of the grep is put into a tmpwrk.lst file, and looks likes this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;backupdb TEST01;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;backupdb PROD01;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;backupdb PROD02;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;etc.&lt;br /&gt;&lt;br /&gt;The total script I use is the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;#!/bin/sh&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;# Script for backup all databases on the server&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;export ORACLE_BASE=/opt/oracle&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;export ORACLE_HOME=$ORACLE_BASE/product/10.2.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;export PATH=$ORACLE_HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;export WRKDIR=/home/oracle/scripts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;export LOGDIR=/backup/$(hostname)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;export JOBLOG=$LOGDIR/backup_$(hostname).log&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;echo "Starting backup $(hostname) databases at $(date)" &gt; $JOBLOG&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;backupdb()&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;if [ -z $1 ]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  echo "No parameters passed to function."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  return 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  export ORACLE_SID=$1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  rman target / catalog rman/rmanpswd@RMANCAT CMDFILE=$WRKDIR/rman_backup.rcv LOG=$LOGDIR/$ORACLE_SID.backup.log;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  FOUTEN=$(grep 'ERROR MESSAGE' $LOGDIR/$ORACLE_SID.backup.log | wc -l);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  if [ $FOUTEN -ne 0 ]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    cat  LOG=$LOGDIR/$ORACLE_SID.backup.log | nail -s "BACKUP FAILED $ORACLE_SID" mailme@myisp.com;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    echo "$(date) : backup $ORACLE_SID FAILED!!!" &gt;&gt; $JOBLOG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    echo "$(date) : backup $ORACLE_SID completed" &gt;&gt; $JOBLOG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  fi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&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;# MAIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;#-----------------------------------------&lt;/span&gt;&lt;br /&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;# Make list of all active databases&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# and create tmpbck.lst file&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;ps -ef | grep pmon | grep -v 'grep pmon' | awk '{print "backupdb " substr($8,10,8) ";"}' &gt; $WRKDIR/tmpbck.lst&lt;/span&gt;&lt;br /&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;# run database cold backup for this list&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;source $WRKDIR/tmpbck.lst&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;echo "Backup $(hostname) finished at $(date)" &gt;&gt; $JOBLOG&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;exit&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/3671382120795488436-2022507350999659082?l=webgeest.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webgeest.blogspot.com/feeds/2022507350999659082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://webgeest.blogspot.com/2009/02/always-working-on-backups.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/2022507350999659082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3671382120795488436/posts/default/2022507350999659082'/><link rel='alternate' type='text/html' href='http://webgeest.blogspot.com/2009/02/always-working-on-backups.html' title='Always working on backups....'/><author><name>Paul Alsemgeest</name><uri>http://www.blogger.com/profile/10672395053708789650</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/-WB5OkzAC6us/TkuuN1CUclI/AAAAAAAAAtc/TtDF8zRf4GQ/s220/alsemgpa2011.jpg'/></author><thr:total>0</thr:total></entry></feed>
