<?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/"
	>

<channel>
	<title>Kudithipudi.Org &#187; Databases</title>
	<atom:link href="http://kudithipudi.org/category/technology/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://kudithipudi.org</link>
	<description>Too much time on hand!!!</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:01:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HOW TO : Dowload content from Oracle Metalink (Support) using wget</title>
		<link>http://kudithipudi.org/2011/02/10/how-to-dowload-content-from-oracle-metalink-support-using-wget/</link>
		<comments>http://kudithipudi.org/2011/02/10/how-to-dowload-content-from-oracle-metalink-support-using-wget/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 13:57:11 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=929</guid>
		<description><![CDATA[The usual process for a DBA to download files from Oracle Metalink (support) site is Login to Metalink from his/her workstation Download the file Upload the file to the database server Use the file Say your database is in a data center and your workstation doesn&#8217;t have high speed connectivity to the data center, you [...]]]></description>
			<content:encoded><![CDATA[<p>The usual process for a DBA to download files from Oracle Metalink (support) site is</p>
<ul>
<li>Login to Metalink from his/her workstation</li>
<li>Download the file</li>
<li>Upload the file to the database server</li>
<li>Use the file</li>
</ul>
<p>Say your database is in a data center and your workstation doesn&#8217;t have high speed connectivity to the data center, you can use the following trick to download content to a l[u]inux server in the data center that has Internet connectivity (and hopefully it is not your database server <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<ul>
<li>Log into Metalink from your workstation</li>
<li>Grab the link to the file/content you want to download (for example, we recently tried to download clusterware for Oracle 11G, and the link was http://download.oracle.com/otn/linux/oracle11g/linux.x64_11gR1_clusterware.zip)</li>
<li>Log into a server in your data center (it should have connectivity to the Internet and also to your database server)</li>
<li>Download the file using wget</li>
</ul>
<pre class="brush: bash; title: ; notranslate">wget http://download.oracle.com/otn/linux/oracle11g/linux.x64_11gR2_clusterware.zip --user ORACLE_ID --password ORACLE_ID_PASSWORD</pre>
<blockquote>
<ul>
<li>Replace the link with the link to your content and use your Oracle ID and password.</li>
</ul>
</blockquote>
<ul>
<li>The file downloaded will have a strange name since wget  appends the sessionID to the end of the file. In the example I used above, the name of the file was &#8220;<strong>linux.x64_11gR2_clusterware.zip\?e\=1297470492\&amp;h\=a66b265cc967a68c611052cb8e54356f</strong>&#8220;</li>
<li>Rename the file and strip off the unnecessary data in the name using mv</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2011/02/10/how-to-dowload-content-from-oracle-metalink-support-using-wget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lessons of the Trade : Purging Databases</title>
		<link>http://kudithipudi.org/2010/07/12/lessons-of-the-trade-purging-databases/</link>
		<comments>http://kudithipudi.org/2010/07/12/lessons-of-the-trade-purging-databases/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:33:09 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=825</guid>
		<description><![CDATA[We ran into an interesting issue at work recently. Documenting the solution for my records.. BACKGROUND : We had a table in one of our databases that served as a &#8220;hopping&#8221; point for some jobs. Data was inserted into this table and at jobs get kicked off at periodic intervals to &#8220;process&#8221; the data and [...]]]></description>
			<content:encoded><![CDATA[<p>We ran into an interesting issue at work recently. Documenting the solution for my records..</p>
<p>BACKGROUND : We had a table in one of our databases that served as a &#8220;hopping&#8221; point for some jobs. Data was inserted into this table and at jobs get kicked off at periodic intervals to &#8220;process&#8221; the data and delete it.</p>
<p>CURRENT METHOD : Launch multiple jobs to process the data and delete the rows as soon as the data is processed. This is causing locks on the table because there are multiple delete operations occurring at the same time. Which in turn means that the jobs cannot complete processing the data causing the table to grow in size.</p>
<p>PROPOSED METHOD : Add a new column to the table called &#8220;PROCESSED_STATE&#8221; and modify the &#8220;processing&#8221; jobs to set a flag &#8220;Y&#8221; in this column as soon as the data is processed. Create a new job that will be launched periodically, which checks the PROCESSED_STATE column and if the flag is set to &#8220;Y&#8221;, deletes the row.</p>
<p>Morale of the story.. <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .. Multiple deletes on a table are bad. Better way is to have multiple updates and one delete.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2010/07/12/lessons-of-the-trade-purging-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Pass environment variables when using sudo</title>
		<link>http://kudithipudi.org/2009/05/21/how-to-pass-environment-variables-when-using-sudo/</link>
		<comments>http://kudithipudi.org/2009/05/21/how-to-pass-environment-variables-when-using-sudo/#comments</comments>
		<pubDate>Thu, 21 May 2009 04:27:17 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=604</guid>
		<description><![CDATA[Say you need to sudo as a particular user and run a command and at the same time you need to pass an environmental variable to the command, you can do it by passing the command in doublequotes. For example, I want to start Oracle while I am logged in as another user (vinay), I [...]]]></description>
			<content:encoded><![CDATA[<p>Say you need to sudo as a particular user and run a command and at the same time you need to pass an environmental variable to the command, you can do it by passing the command in doublequotes.</p>
<p>For example, I want to start Oracle while I am logged in as another user (vinay), I can start the database using dbstart by issues</p>
<p><code>"sudo su - oracle -c "dbstart /$ORACLE_HOME"</code></p>
<p>$ORACLE_HOME is an environmental variable listed under user oracle&#8217;s environment.</p>
<p>Needless to say, you need to ensure that you have sudo configured to allow your userID to su to oracle.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/05/21/how-to-pass-environment-variables-when-using-sudo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lessons of the trade : Troubleshooting database perfromance</title>
		<link>http://kudithipudi.org/2009/03/11/lessons-of-the-trade-troubleshooting-database-perfromance/</link>
		<comments>http://kudithipudi.org/2009/03/11/lessons-of-the-trade-troubleshooting-database-perfromance/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 06:46:38 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=561</guid>
		<description><![CDATA[If you have ever worked in an IT shop, you will know that the one thing you cannot escape from is issues related to Database performance. Now, I am no DBA in any way or fashion, but thought I should record some of the common issues and ways they have been overcome in my career [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever worked in an IT shop, you will know that the one thing you cannot escape from is issues related to Database performance. Now, I am no DBA in any way or fashion, but thought I should record some of the common issues and ways they have been overcome in my career so far. More for self records than trying to teach someone <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<ul>
<li>Network Related
<ul>
<li>Check if the NIC (network interface) on the DB server has any speed mis match with the network device (most probably a switch) that it is connected to.</li>
<li>Check the latency between the application and the DB (pertains to applications connecting to DB over WAN links)</li>
</ul>
</li>
<li>System Related
<ul>
<li>Check if a rouge process is using all the system resources.</li>
<li>Check if the disk sub system is performing optimally
<ul>
<li>Recommend using RAID 10 for transactional systems.</li>
<li>Don&#8217;t forget to check those batteries on the RAID controllers <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
</li>
<li>Check if the DB is just running out of gas.
<ul>
<li>Long term capacity trending records come in handy here.</li>
</ul>
</li>
</ul>
</li>
<li>Database Related
<ul>
<li>Views are evil.. if created the wrong way. Esp, on data that is accessed frequently. Remember that you are now making two calls to the database. One to read the data, One to create the view.</li>
<li>Ensure your logs are not being <span style="text-decoration: line-through;">writted ot</span> (thx Ray for pointing out the typo) written to the same disk subsystem as your data files.</li>
<li>Indexes are good.. But only to an extent. If the size of your indexes is twice the size of your data.. you have an issue.</li>
<li>Check for invalid objects. You will be surprised how many times, people overlook this.</li>
<li>Sometimes, it helps to flush the SGA (Oracle specific). Be aware that it will slow down the response time for a while (until the cache gets populated again).</li>
<li>Avoid excessive monitoring. Esp. with tools that query the system tables quite frequently. This has a negative impact on the database performance.</li>
</ul>
</li>
</ul>
<p>Did you run into any strange situations and figured out a solution? Please feel free to add your comments below&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/03/11/lessons-of-the-trade-troubleshooting-database-perfromance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Lessons of the trade : Data purge in databases..</title>
		<link>http://kudithipudi.org/2009/01/27/lessons-of-the-trade-data-purge-in-databases/</link>
		<comments>http://kudithipudi.org/2009/01/27/lessons-of-the-trade-data-purge-in-databases/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 03:47:44 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=499</guid>
		<description><![CDATA[Quick note to myself.. If you have a high volume transactional database and are looking to purge data from a table(s).. make sure you purge the data in small chunks. If you purge the data in larger chunks (rows), other processes trying to access the data on those tables have to go to the redo [...]]]></description>
			<content:encoded><![CDATA[<p>Quick note to myself.. If you have a high volume transactional database and are looking to purge data from a table(s).. make sure you purge the data in small chunks. If you purge the data in larger chunks (rows), other processes trying to access the data on those tables have to go to the redo logs to access the data, since the purge job will put a lock on the table. This obviously adds latency to the queries.. So purge the data in smaller chunks (rows), forcing the database to flush the redo logs.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2009/01/27/lessons-of-the-trade-data-purge-in-databases/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

