<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Random Thoughts &#187; oracle</title>
	<atom:link href="http://alexlurthu.wordpress.com/category/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexlurthu.wordpress.com</link>
	<description>Straight from the heart!</description>
	<lastBuildDate>Fri, 04 Dec 2009 20:54:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='alexlurthu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/2e18259658cdc132622f409f5fd659ca?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Random Thoughts &#187; oracle</title>
		<link>http://alexlurthu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://alexlurthu.wordpress.com/osd.xml" title="Random Thoughts" />
		<item>
		<title>Script to obtain the count of archive logs applied during recovery</title>
		<link>http://alexlurthu.wordpress.com/2008/04/10/script-to-obtain-the-count-of-archive-logs-applied-during-recovery/</link>
		<comments>http://alexlurthu.wordpress.com/2008/04/10/script-to-obtain-the-count-of-archive-logs-applied-during-recovery/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 07:02:22 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://alexlurthu.wordpress.com/?p=42</guid>
		<description><![CDATA[Pass the start date + time and end date + time to the following script. It looks at the alert log file and obtains the no of archive logs that have been applied during media recovery in that time interval.
#!/usr/bin/perl -w

BEGIN { push @INC,"/home/user/TimeDate-1.16/lib/" }
use Date::Parse;
$start=str2time(@ARGV[0]);
chomp(@ARGV[1]);
$end=str2time(@ARGV[1]);

$log='path to the log file';
open(ALERTLOGFILE,$log) or die "Not able to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexlurthu.wordpress.com&blog=1310241&post=42&subd=alexlurthu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Pass the start date + time and end date + time to the following script. It looks at the alert log file and obtains the no of archive logs that have been applied during media recovery in that time interval.</p>
<pre>#!/usr/bin/perl -w

BEGIN { push @INC,"/home/user/TimeDate-1.16/lib/" }
use Date::Parse;
$start=str2time(@ARGV[0]);
chomp(@ARGV[1]);
$end=str2time(@ARGV[1]);

$log='path to the log file';
open(ALERTLOGFILE,$log) or die "Not able to open ".$log;
$progress=-1;
$count=0;
while(&lt;ALERTLOGFILE&gt;){

if(/^[A-Z][a-z]{2}\s[A-Z][a-z]{2}/){
  $time=str2time($_);

  if(($time &gt;= $start) &amp;&amp; ($time &lt;= $end)){
   $progress=1;
   }else{
     $progress=-1;
   }
}
if(/^Media Recovery Log/){
  if($progress == 1){
    $count+=1;
  }
}
}
print $count ."\n";</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/alexlurthu.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/alexlurthu.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexlurthu.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexlurthu.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexlurthu.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexlurthu.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexlurthu.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexlurthu.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexlurthu.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexlurthu.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexlurthu.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexlurthu.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexlurthu.wordpress.com&blog=1310241&post=42&subd=alexlurthu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexlurthu.wordpress.com/2008/04/10/script-to-obtain-the-count-of-archive-logs-applied-during-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9200ed713840b8e3b58d6c565a85e946?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>my first oracle regex</title>
		<link>http://alexlurthu.wordpress.com/2008/04/03/my-first-oracle-regex/</link>
		<comments>http://alexlurthu.wordpress.com/2008/04/03/my-first-oracle-regex/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 14:07:13 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://alexlurthu.wordpress.com/?p=37</guid>
		<description><![CDATA[REGEXP_REPLACE(target_name,&#8217;(([\.]&#124;[:])[a-z,A-Z,0-9]*)&#124;(-[0-9]{3})&#8217;,&#8221;)
It was written to transform host entries in the table of the format &#8220;aaa-bbb-001.ccc.ddd.eeeeeee.fff&#8221; to aaa-bbb . The underlying requirement was to get one distinct entry for all RAC nodes in a cluster.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexlurthu.wordpress.com&blog=1310241&post=37&subd=alexlurthu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="color:#333399;">REGEXP_REPLACE(target_name,&#8217;(([\.]|[:])[a-z,A-Z,0-9]*)|(-[0-9]{3})&#8217;,&#8221;)</span></p>
<p>It was written to transform host entries in the table of the format &#8220;aaa-bbb-001.ccc.ddd.eeeeeee.fff&#8221; to aaa-bbb . The underlying requirement was to get one distinct entry for all RAC nodes in a cluster.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/alexlurthu.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/alexlurthu.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexlurthu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexlurthu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexlurthu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexlurthu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexlurthu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexlurthu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexlurthu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexlurthu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexlurthu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexlurthu.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexlurthu.wordpress.com&blog=1310241&post=37&subd=alexlurthu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexlurthu.wordpress.com/2008/04/03/my-first-oracle-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9200ed713840b8e3b58d6c565a85e946?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>10 Commandments to tame Oracle Database</title>
		<link>http://alexlurthu.wordpress.com/2007/07/27/10-commandments-to-tame-oracle-database/</link>
		<comments>http://alexlurthu.wordpress.com/2007/07/27/10-commandments-to-tame-oracle-database/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 12:29:45 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[guidelines]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://alexlurthu.wordpress.com/2007/07/27/10-commandments-to-tame-oracle-database/</guid>
		<description><![CDATA[1. Is index always the best way.. Should I really use the index or just do a full table scan.
2. Use bind variables everywhere. Parse once execute many times.
3. Should i partition the table ? What type of partition ? (range,list, hash etc)
4. What can be done in SQL is better done in SQL, never [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexlurthu.wordpress.com&blog=1310241&post=25&subd=alexlurthu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>1. Is index always the best way.. Should I really use the index or just do a full table scan.</p>
<p>2. Use bind variables everywhere. Parse once execute many times.</p>
<p>3. Should i partition the table ? What type of partition ? (range,list, hash etc)</p>
<p>4. What can be done in SQL is better done in SQL, never try with PL/SQL.</p>
<p>5. All &#8220;drop table&#8221; and &#8220;truncate table&#8221; commands work better after good backup of that table. (Storage is pretty cheap these days!)</p>
<p>6. Classify a query as I/O intensive or CPU intensive. Run a CPU intensive query in identified windows when there is high CPU idle time. (Same with I/O intensive query)</p>
<p>7. Never create any standalone functions/procedures. Package them based on functional dependency of each of them.</p>
<p>8. Table with millions of rows will not respond as fast as the table with 1 million rows.</p>
<p>9. Hardware scalability is not the solution. Design for Application Scalability.</p>
<p>10. Constraints are better enforced at the Database end than the Application end.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/alexlurthu.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/alexlurthu.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexlurthu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexlurthu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexlurthu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexlurthu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexlurthu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexlurthu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexlurthu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexlurthu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexlurthu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexlurthu.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexlurthu.wordpress.com&blog=1310241&post=25&subd=alexlurthu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexlurthu.wordpress.com/2007/07/27/10-commandments-to-tame-oracle-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9200ed713840b8e3b58d6c565a85e946?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
	</channel>
</rss>