<?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>Ramin Hossaini&#039;s Blog &#187; How-to</title>
	<atom:link href="http://blog.ramin-hossaini.com/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ramin-hossaini.com</link>
	<description></description>
	<lastBuildDate>Sun, 01 Jan 2012 17:30:38 +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>An introduction to Yahoo! Pipes</title>
		<link>http://blog.ramin-hossaini.com/2011/01/01/an-introduction-to-yahoo-pipes/</link>
		<comments>http://blog.ramin-hossaini.com/2011/01/01/an-introduction-to-yahoo-pipes/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 13:59:23 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Pipes]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=836</guid>
		<description><![CDATA[<!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> --><!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> -->Yahoo! isn't exactly one of my favourite companies out there, and it isn't hard to figure out why when you see how they've acquired and maintained technologies like Delicious and Flickr. That being said, I have to say I'm a big fan of Yahoo! Pipes, and I haven't been able to find an alternative that's [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2009/02/18/google-reader-hack/' rel='bookmark' title='Use Google Reader to find out rough estimate of RSS subscribers'>Use Google Reader to find out rough estimate of RSS subscribers</a></li>
<li><a href='http://blog.ramin-hossaini.com/2007/07/27/firefox-extension-dragdropupload/' rel='bookmark' title='Firefox extension: DragDropUpload'>Firefox extension: DragDropUpload</a></li>
<li><a href='http://blog.ramin-hossaini.com/2008/12/05/finding-new-photos-on-flickr-almost-effortlessly/' rel='bookmark' title='Finding new photos on Flickr (almost effortlessly)'>Finding new photos on Flickr (almost effortlessly)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a><p>Yahoo! isn't exactly one of my favourite companies out there, and it isn't hard to figure out why when you see how they've acquired and maintained technologies like <a href="http://www.delicious.com/">Delicious</a> and <a href="http://www.flickr.com/">Flickr</a>.</p>
<p>That being said, I have to say I'm a big fan of <a href="http://pipes.yahoo.com/pipes/">Yahoo! Pipes</a>, and I haven't been able to find an alternative that's as good.</p>
<p>The name is derived from the Unix pipe where simple commands can be combined together to create output that meets your needs.</p>
<h2>Example</h2>
<p>So here's a very simple example: let's say you have a specific RSS feed (in this example, the <a href="http://feeds.guardian.co.uk/theguardian/football/rss">Guardian football RSS feed</a>) you like - but you're only interested in very specific news (in this example, we only want content relating to Liverpool FC).</p>
<p>Go to Yahoo! Pipes and create a new pipe. Then add the RSS feed as input:</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2011/01/2011-01-01_152256.png" alt="" title="2011-01-01_152256" width="562" height="249" class="alignnone size-full wp-image-837" /></p>
<p>Click on the input-box and you should be able to see a preview of what the input is like:</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2011/01/2011-01-01_152327.png" alt="" title="2011-01-01_152327" width="473" height="182" class="alignnone size-full wp-image-839" /></p>
<p>Under the 'Operators' menu on the left, drag a 'filter' module into your pipe, add some rules and then connect the boxes together:</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2011/01/2011-01-01_152338.png" alt="" title="2011-01-01_152338" width="566" height="376" class="alignnone size-full wp-image-840" /></p>
<p>Click on the 'pipe output' box to see a preview of the new output:</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2011/01/2011-01-01_152402.png" alt="" title="2011-01-01_152402" width="440" height="198" class="alignnone size-full wp-image-841" /></p>
<p>Once you've saved your pipe, click on 'Run pipe' and get the output's RSS feed address:</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2011/01/2011-01-01_152701.png" alt="" title="2011-01-01_152701" width="702" height="262" class="alignnone size-full wp-image-842" /></p>
<p>I'm curious to see how others use Yahoo! Pipes - leave a comment if you think of something.</p>
<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2009/02/18/google-reader-hack/' rel='bookmark' title='Use Google Reader to find out rough estimate of RSS subscribers'>Use Google Reader to find out rough estimate of RSS subscribers</a></li>
<li><a href='http://blog.ramin-hossaini.com/2007/07/27/firefox-extension-dragdropupload/' rel='bookmark' title='Firefox extension: DragDropUpload'>Firefox extension: DragDropUpload</a></li>
<li><a href='http://blog.ramin-hossaini.com/2008/12/05/finding-new-photos-on-flickr-almost-effortlessly/' rel='bookmark' title='Finding new photos on Flickr (almost effortlessly)'>Finding new photos on Flickr (almost effortlessly)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2011/01/01/an-introduction-to-yahoo-pipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ridding Twitter of Annoyances</title>
		<link>http://blog.ramin-hossaini.com/2010/06/05/ridding-twitter-of-annoyances/</link>
		<comments>http://blog.ramin-hossaini.com/2010/06/05/ridding-twitter-of-annoyances/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 15:32:31 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=766</guid>
		<description><![CDATA[<!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> --><a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a>Fact: Life is tough when you're easily irritated online. Twitter is an amazing service (if used properly). It's a great way of getting news quickly, and personally, I find it to be a great place to find entertaining people. It definitely has its uses. With that said, I have to say that every one of [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2008/12/04/how-to-get-a-stuck-filter-off-a-lens/' rel='bookmark' title='How to get a stuck-filter off a lens'>How to get a stuck-filter off a lens</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> --><p>Fact: Life is tough when you're easily irritated online.</p>
<p>Twitter is an amazing service (if used properly). It's a great way of getting news quickly, and personally, I find it to be a great place to find entertaining people. It definitely has its uses.</p>
<p>With that said, I have to say that every one of us have been annoying to someone, somewhere, at some time. It happens. However, with certain folks, it happens more regularly than others. Look - that's fine. That's what makes us all different. It's also what makes me find you annoying. </p>
<p>The most common solution is unfollowing someone (or taking it a step further by blocking and reporting them for spam). Easier said than done. Sometimes you have a couple conversations with a person and fool yourself into thinking you're friends. It happens. So what to do?</p>
<p>TweetDeck has recently (version 0.34+) implemented an amazing feature: Global filter</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_151200.png" alt="" title="2010-06-05_151200" width="482" height="415" class="alignnone size-full wp-image-767" /></p>
<h2>A Couple Essentials</h2>
<h3>Bieber</h3>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_152514.png" alt="" title="2010-06-05_152514" width="540" height="64" class="alignnone size-full wp-image-769" /></p>
<p>Let's face it. Justin Bieber exists. He also commands an legion of hormone-crazed teenagers online. Add his name to that filter list, as shown above, and you should be alright though. It's actually a fortunate thing that he has a unique name. So you should be safe to filter it as a word completely.</p>
<h3>Formspring</h3>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_152920.png" alt="" title="2010-06-05_152920" width="540" height="70" class="alignnone size-full wp-image-771" /></p>
<p>Formspring is a service that allows people to ask questions anonymously. Seems very popular. I've noticed that this happens among people who seem to think they're more famous than they actually are. I don't have any intention of asking you anything.</p>
<p>The easiest solution is to add "www.formspring" as a keyword.</p>
<h3>Knitting</h3>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_153738.png" alt="" title="2010-06-05_153738" width="534" height="85" class="alignnone size-full wp-image-773" /></p>
<p>No real explanation needed for this one. Just block that keyword and be done with it.</p>
<h2>Exaggeration and Excess-Enthusiasm</h2>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_154318.png" alt="" title="2010-06-05_154318" width="539" height="75" class="alignnone size-full wp-image-775" /></p>
<p>It's a tough one figuring out the ideal number of exclamation-marks. Which number is ideal? I'm not entirely sure, but 6 has worked well for me (!!!!!!)</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_154459.png" alt="" title="2010-06-05_154459" width="533" height="64" class="alignnone size-full wp-image-776" /></p>
<p>Again, it's tough to say how many is the ideal number to filter here. My studies have shown that 5-S's (sssss) is too much. </p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_155633.png" alt="" title="2010-06-05_155633" width="542" height="74" class="alignnone size-full wp-image-781" /></p>
<p>This is usually an indication that you should probably be following more mature Tweeters. Otherwise, "meeee" is a great keyword to filter.</p>
<h2>Affection</h2>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_155046.png" alt="" title="2010-06-05_155046" width="547" height="88" class="alignnone size-full wp-image-778" /></p>
<p>"<3": You're better off unfollowing this person completely.</p>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_155231.png" alt="" title="2010-06-05_155231" width="534" height="86" class="alignnone size-full wp-image-779" /></p>
<p>"♥": I wish I could block this, but TweetDeck seems to have some sort of unicode limitations - you might have to put up with this kind of Tweet for the time being.</p>
<h2>People using Twitter as an IM service</h2>
<p>You've seen this happen. Mutual-friends reply back and forth, then keep going for about 30 or 40 tweets. Amazing. I hate you. Solution: Add both their names to the keyword filter-list with an '@' as a prefix. For example: @AnnoyingPerson</p>
<h2>Sources worth filtering</h2>
<h3>Foursquare</h3>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_110610.png" alt="" title="2010-06-05_110610" width="540" height="68" class="alignnone size-full wp-image-772" /></p>
<p>Foursquare is a service that allows people to act exactly like dogs pissing on trees marking their territory. Everybody fights for the "Mayor" position at a restaurant by "checking-in" regularly. </p>
<p>Block it by adding "foursquare" to your 'sources' filter-list.</p>
<h3>Twitterfeed</h3>
<p>Some Twitter accounts are linked to blogs. Each time a new article is published, a Tweet is published at the same time. I have an RSS reader, and I'm not scared to use it.</p>
<h3>API</h3>
<p><img src="http://blog.ramin-hossaini.com/wp-content/uploads/2010/06/2010-06-05_160314.png" alt="" title="2010-06-05_160314" width="543" height="68" class="alignnone size-full wp-image-783" /></p>
<p>API almost always is a post by a bot.</p>
<h2>Remaining Challenges</h2>
<h3>"your" versus "you're"</h3>
<p>Also known as the Inability to understand the difference between "your" and "you're". If done consistently, this serves as a sure-fire way of determining a person's intellectual capacity. Unfortunately, I haven't been able to find a way of filtering this kind of stupidity other than unfollowing the person completely.</p>
<h3>High-frequency Tweeters</h3>
<p>Again, I have no solution for this. You might just have to add them to the from-people-list. </p>
<h2>Conclusion</h2>
<p>This is by no means an exhaustive list. Your annoyance-threshold may vary. If you have more suggestions, please leave a comment below.</p>
<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2008/12/04/how-to-get-a-stuck-filter-off-a-lens/' rel='bookmark' title='How to get a stuck-filter off a lens'>How to get a stuck-filter off a lens</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/06/05/ridding-twitter-of-annoyances/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu: Installing Apache, PHP 5, and MySQL 5</title>
		<link>http://blog.ramin-hossaini.com/2010/06/01/ubuntu-installing-apache-php-5-and-mysql-5/</link>
		<comments>http://blog.ramin-hossaini.com/2010/06/01/ubuntu-installing-apache-php-5-and-mysql-5/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 10:02:06 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=762</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a>Apache sudo apt-get install apache2 Locations: HTML directory: /var/www Apache2 conf: /etc/apache2/apache2.conf PHP 5 Install PHP, and also enable the PHP and Rewrite module in Apache: sudo apt-get install php5 sudo a2enmod php5 sudo a2enmod rewrite Locations: php.ini: /etc/php5/apache2/php.ini MySQL 5 sudo apt-get install mysql-server sudo apt-get install php5-mysql Restart Apache sudo /etc/init.d/apache2 restart Related [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2008/03/23/simple-mysql-backup-script/' rel='bookmark' title='Simple MySQL backup-script'>Simple MySQL backup-script</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/04/25/mysql-batch-update-of-all-entries-in-table-that-match-condition/' rel='bookmark' title='[MySQL] Batch update of all entries in table that match condition'>[MySQL] Batch update of all entries in table that match condition</a></li>
<li><a href='http://blog.ramin-hossaini.com/2009/10/06/creating-a-tunnel-and-socks-proxy-with-putty/' rel='bookmark' title='Creating a tunnel and SOCKS proxy with Putty'>Creating a tunnel and SOCKS proxy with Putty</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a><h2>Apache</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2</pre></div></div>

<p>Locations:</p>
<ul>
<li>HTML directory: /var/www</li>
<li>Apache2 conf: /etc/apache2/apache2.conf</li>
</ul>
<h2>PHP 5</h2>
<p>Install PHP, and also enable the PHP and Rewrite module in Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod rewrite</pre></div></div>

<p>Locations:</p>
<ul>
<li>php.ini: /etc/php5/apache2/php.ini</li>
</ul>
<h2>MySQL 5</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-mysql</pre></div></div>

<h2>Restart Apache</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2008/03/23/simple-mysql-backup-script/' rel='bookmark' title='Simple MySQL backup-script'>Simple MySQL backup-script</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/04/25/mysql-batch-update-of-all-entries-in-table-that-match-condition/' rel='bookmark' title='[MySQL] Batch update of all entries in table that match condition'>[MySQL] Batch update of all entries in table that match condition</a></li>
<li><a href='http://blog.ramin-hossaini.com/2009/10/06/creating-a-tunnel-and-socks-proxy-with-putty/' rel='bookmark' title='Creating a tunnel and SOCKS proxy with Putty'>Creating a tunnel and SOCKS proxy with Putty</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/06/01/ubuntu-installing-apache-php-5-and-mysql-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: Recovering a Tablespace</title>
		<link>http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/</link>
		<comments>http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/#comments</comments>
		<pubDate>Sat, 22 May 2010 22:57:37 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[Tablespace]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=753</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a>The situation: The database was not shutdown cleanly and a tablespace needed recovery because of an outstanding transaction that wasn’t committed. If you simply STARTUP the database, the tablespace will still be in RECOVER mode and won’t be available. First, startup the database in restrict mode: 1 SQL&#62; startup restrict List all tablespaces and check [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/03/14/backing-up-an-oracle-database-without-rman/' rel='bookmark' title='Backing up an Oracle database without RMAN'>Backing up an Oracle database without RMAN</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/' rel='bookmark' title='Oracle: Forcing a checkpoint'>Oracle: Forcing a checkpoint</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/turning-archive-log-mode-on-and-off/' rel='bookmark' title='Turning Archive-log mode on and off'>Turning Archive-log mode on and off</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><h2>The situation:</h2>
<p>The database was not shutdown cleanly and a tablespace needed recovery because of an outstanding transaction that wasn’t committed.</p>
<p>If you simply STARTUP the database, the tablespace will still be in RECOVER mode and won’t be available.</p>
<p>First, startup the database in restrict mode:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> startup restrict</pre></td></tr></table></div>

<p>List all tablespaces and check the ONLINE_STATUS:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> tablespace_name<span style="color: #66cc66;">,</span> online_status <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dba_data_files;
&nbsp;
TABLESPACE_NAME                ONLINE_STATUS
<span style="color: #808080; font-style: italic;">------------------------------ ---------------</span>
USERS                          <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>
UNDOTBS1                       <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>
SYSAUX                         <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>                         <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>
TEST                           RECOVER
&nbsp;
<span style="color: #cc66cc;">5</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ROWS</span> selected.</pre></td></tr></table></div>

<p>In this case, the TEST tablespace requires recovery:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> RECOVER <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> TEST;
&nbsp;
Media recovery complete.</pre></td></tr></table></div>

<p>Check tablespaces again:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> tablespace_name<span style="color: #66cc66;">,</span> online_status <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dba_data_files;
&nbsp;
TABLESPACE_NAME                ONLINE_STATUS
<span style="color: #808080; font-style: italic;">------------------------------ --------------</span>
USERS                          <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>
UNDOTBS1                       <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>
SYSAUX                         <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>                         <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>
TEST                           <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OFFLINE</span>
&nbsp;
<span style="color: #cc66cc;">5</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ROWS</span> selected.</pre></td></tr></table></div>

<p>The tablespace doesn’t need further recovery at this stage and can be placed ONLINE:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ALTER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> TEST <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ONLINE</span>;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> altered.</pre></td></tr></table></div>

<p>Get the database out of restrict mode:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ALTER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span> DISABLE RESTRICTED <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SESSION</span>;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span> altered.</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/03/14/backing-up-an-oracle-database-without-rman/' rel='bookmark' title='Backing up an Oracle database without RMAN'>Backing up an Oracle database without RMAN</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/' rel='bookmark' title='Oracle: Forcing a checkpoint'>Oracle: Forcing a checkpoint</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/turning-archive-log-mode-on-and-off/' rel='bookmark' title='Turning Archive-log mode on and off'>Turning Archive-log mode on and off</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: Forcing a checkpoint</title>
		<link>http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/</link>
		<comments>http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/#comments</comments>
		<pubDate>Sat, 22 May 2010 22:53:02 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Checkpoint]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=751</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a>A checkpoint makes sure that all changes to the database (that are still in buffers) are written to the datafiles. 1 2 3 SQL&#62; ALTER SYSTEM CHECKPOINT; &#160; SYSTEM altered. Related posts: Oracle: Recovering a Tablespace Oracle: Basic user-logon auditing Backing up an Oracle database without RMAN
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/' rel='bookmark' title='Oracle: Recovering a Tablespace'>Oracle: Recovering a Tablespace</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/' rel='bookmark' title='Oracle: Basic user-logon auditing'>Oracle: Basic user-logon auditing</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/03/14/backing-up-an-oracle-database-without-rman/' rel='bookmark' title='Backing up an Oracle database without RMAN'>Backing up an Oracle database without RMAN</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><p>A checkpoint makes sure that all changes to the database (that are still in buffers) are written to the datafiles.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ALTER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span> CHECKPOINT;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span> altered.</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/' rel='bookmark' title='Oracle: Recovering a Tablespace'>Oracle: Recovering a Tablespace</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/' rel='bookmark' title='Oracle: Basic user-logon auditing'>Oracle: Basic user-logon auditing</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/03/14/backing-up-an-oracle-database-without-rman/' rel='bookmark' title='Backing up an Oracle database without RMAN'>Backing up an Oracle database without RMAN</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: Basic user-logon auditing</title>
		<link>http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/</link>
		<comments>http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/#comments</comments>
		<pubDate>Sat, 22 May 2010 22:51:28 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Auditing]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=747</guid>
		<description><![CDATA[<!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> --><!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> -->Oracle 8i introduced logon-triggers which could be used for auditing. To start, create a table which will store your audit-logs (I usually do this as SYSTEM): 1 2 3 4 5 6 7 8 9 10 CREATE TABLE AUDIT$user_logs &#40; user_id VARCHAR2&#40;30&#41;, session_id NUMBER&#40;8&#41;, host VARCHAR2&#40;30&#41;, logon_day DATE, logon_time VARCHAR2&#40;10&#41; &#41;; &#160; TABLE created. Next, [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/15/basic-auditing-in-oracle/' rel='bookmark' title='Basic Auditing in Oracle'>Basic Auditing in Oracle</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/' rel='bookmark' title='Oracle: List all database-links'>Oracle: List all database-links</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/' rel='bookmark' title='Oracle: Forcing a checkpoint'>Oracle: Forcing a checkpoint</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><p>Oracle 8i introduced logon-triggers which could be used for auditing.</p>
<p>To start, create a table which will store your audit-logs (I usually do this as SYSTEM):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AUDIT</span>$user_logs
 <span style="color: #66cc66;">&#40;</span>
    user_id           <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
    session_id        <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
    host              <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
    logon_day         <span style="color: #993333; font-weight: bold; text-transform: uppercase;">DATE</span><span style="color: #66cc66;">,</span>
    logon_time        <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>
 <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> created.</pre></td></tr></table></div>

<p>Next, create the trigger to capture the data:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OR</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">REPLACE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRIGGER</span>
 logon_audit_trigger
 AFTER LOGON <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">DATABASE</span>
 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span>
 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INSERT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INTO</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AUDIT</span>$user_logs <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VALUES</span><span style="color: #66cc66;">&#40;</span>
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">USER</span><span style="color: #66cc66;">,</span>
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYS_CONTEXT</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'USERENV'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'SESSIONID'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYS_CONTEXT</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'USERENV'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'HOST'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSDATE</span><span style="color: #66cc66;">,</span>
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_CHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSDATE</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'hh24:mi:ss'</span><span style="color: #66cc66;">&#41;</span>
 <span style="color: #66cc66;">&#41;</span>;
 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;
 <span style="color: #66cc66;">/</span>
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRIGGER</span> created.</pre></td></tr></table></div>

<h2>Display Audit-data:</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AUDIT</span>$user_logs;
&nbsp;
USER_ID         SESSION_ID HOST               LOGON_DAY LOGON_TIME
<span style="color: #808080; font-style: italic;">--------------- ---------- ------------------ --------- ----------</span>
DBSNMP              <span style="color: #cc66cc;">123716</span> HOST               01<span style="color: #66cc66;">-</span>OCT<span style="color: #66cc66;">-</span>08 <span style="color: #cc66cc;">10</span>:<span style="color: #cc66cc;">21</span>:<span style="color: #cc66cc;">32</span>
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>              <span style="color: #cc66cc;">123717</span> DOMAIN\PCNUMBER    01<span style="color: #66cc66;">-</span>OCT<span style="color: #66cc66;">-</span>08 <span style="color: #cc66cc;">10</span>:<span style="color: #cc66cc;">21</span>:<span style="color: #cc66cc;">53</span>
SYSMAN                   <span style="color: #cc66cc;">0</span> HOST               01<span style="color: #66cc66;">-</span>OCT<span style="color: #66cc66;">-</span>08 <span style="color: #cc66cc;">10</span>:<span style="color: #cc66cc;">21</span>:<span style="color: #cc66cc;">58</span></pre></td></tr></table></div>

<h2>Disable and Enable Logon-auditing:</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">ALTER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRIGGER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>.LOGON_AUDIT_TRIGGER DISABLE
<span style="color: #66cc66;">/</span>
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">ALTER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRIGGER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>.LOGON_AUDIT_TRIGGER ENABLE
<span style="color: #66cc66;">/</span></pre></td></tr></table></div>

<h2>To purge audit-data:</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRUNCATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AUDIT</span>$user_logs</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/15/basic-auditing-in-oracle/' rel='bookmark' title='Basic Auditing in Oracle'>Basic Auditing in Oracle</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/' rel='bookmark' title='Oracle: List all database-links'>Oracle: List all database-links</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-forcing-a-checkpoint/' rel='bookmark' title='Oracle: Forcing a checkpoint'>Oracle: Forcing a checkpoint</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: List all database-links</title>
		<link>http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/</link>
		<comments>http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/#comments</comments>
		<pubDate>Tue, 18 May 2010 17:02:03 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=744</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> -->To list all db-links (must be a user with permission to select from sys.dba_db_links) in a database: SELECT * FROM DBA_DB_LINKS; Sample output: 1 2 3 4 5 6 SQL&#62; SELECT * FROM DBA_DB_LINKS; &#160; OWNER DB_LINK USERNAME HOST CREATED ------- ---------- ---------- ------- ---------- SYSTEM TEST_LINK SCOTT TST11 26-SEP-08 SCOTT HR_LINK HR TST11 26-SEP-08 [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/' rel='bookmark' title='Oracle: Basic user-logon auditing'>Oracle: Basic user-logon auditing</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/listing-key-oracle-database-files/' rel='bookmark' title='Listing key Oracle Database files'>Listing key Oracle Database files</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/' rel='bookmark' title='Oracle: Recovering a Tablespace'>Oracle: Recovering a Tablespace</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> --><p>To list all db-links (must be a user with permission to select from sys.dba_db_links) in a database:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> DBA_DB_LINKS;</pre></div></div>

<p>Sample output:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> DBA_DB_LINKS;
&nbsp;
OWNER   DB_LINK    USERNAME   HOST    CREATED
<span style="color: #808080; font-style: italic;">------- ---------- ---------- ------- ----------</span>
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SYSTEM</span>  TEST_LINK  SCOTT      TST11   <span style="color: #cc66cc;">26</span><span style="color: #66cc66;">-</span>SEP<span style="color: #66cc66;">-</span>08
SCOTT   HR_LINK    HR         TST11   <span style="color: #cc66cc;">26</span><span style="color: #66cc66;">-</span>SEP<span style="color: #66cc66;">-</span>08</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/' rel='bookmark' title='Oracle: Basic user-logon auditing'>Oracle: Basic user-logon auditing</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/listing-key-oracle-database-files/' rel='bookmark' title='Listing key Oracle Database files'>Listing key Oracle Database files</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-recovering-a-tablespace/' rel='bookmark' title='Oracle: Recovering a Tablespace'>Oracle: Recovering a Tablespace</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: Recycle listener.log</title>
		<link>http://blog.ramin-hossaini.com/2010/05/16/oracle-recycle-listener-log/</link>
		<comments>http://blog.ramin-hossaini.com/2010/05/16/oracle-recycle-listener-log/#comments</comments>
		<pubDate>Sun, 16 May 2010 18:08:10 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Listener]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=741</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a><a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a>Oracle stores a log-file (listener.log) under $ORACLE_HOME/network/log that keeps track of all connections made to the database. Oracle keeps this file as an open file-stream, so even if you rename the file, it still keeps on growing as new connections are made. This method will let you recycle/truncate/purge listener.log without resorting to taking the listener [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/turning-archive-log-mode-on-and-off/' rel='bookmark' title='Turning Archive-log mode on and off'>Turning Archive-log mode on and off</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/03/14/backing-up-an-oracle-database-without-rman/' rel='bookmark' title='Backing up an Oracle database without RMAN'>Backing up an Oracle database without RMAN</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/03/09/enabling-trace/' rel='bookmark' title='Enabling Trace'>Enabling Trace</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><p>Oracle stores a log-file (listener.log) under $ORACLE_HOME/network/log that keeps track of all connections made to the database.</p>
<p>Oracle keeps this file as an open file-stream, so even if you rename the file, it still keeps on growing as new connections are made.</p>
<p>This method will let you recycle/truncate/purge listener.log without resorting to taking the listener down which would cause a disruption to users.</p>
<p>The idea is to turn log_status off, create a new file, then turn log_status on again</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ lsnrctl <span style="color: #000000; font-weight: bold;">set</span> log_status off
$ <span style="color: #c20cb9; font-weight: bold;">mv</span> listener.log listener.log.old
$ <span style="color: #c20cb9; font-weight: bold;">touch</span> listener.log
$ lsnrctl <span style="color: #000000; font-weight: bold;">set</span> log_status on</pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/turning-archive-log-mode-on-and-off/' rel='bookmark' title='Turning Archive-log mode on and off'>Turning Archive-log mode on and off</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/03/14/backing-up-an-oracle-database-without-rman/' rel='bookmark' title='Backing up an Oracle database without RMAN'>Backing up an Oracle database without RMAN</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/03/09/enabling-trace/' rel='bookmark' title='Enabling Trace'>Enabling Trace</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/05/16/oracle-recycle-listener-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Auditing in Oracle</title>
		<link>http://blog.ramin-hossaini.com/2010/05/15/basic-auditing-in-oracle/</link>
		<comments>http://blog.ramin-hossaini.com/2010/05/15/basic-auditing-in-oracle/#comments</comments>
		<pubDate>Sat, 15 May 2010 11:53:26 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Auditing]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=738</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a><!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> -->To check if auditing is enabled: SHOW parameter AUDIT; To enable auditing, modify/add the following in your PFILE and restart the database: audit_trail = db; To audit SELECTs on an object: AUDIT SELECT ON object; To list all Audit data on a database: SELECT * FROM sys.aud$; Purge/delete entries from the audit table: DELETE FROM [...]
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/' rel='bookmark' title='Oracle: Basic user-logon auditing'>Oracle: Basic user-logon auditing</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/' rel='bookmark' title='Oracle: List all database-links'>Oracle: List all database-links</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/listing-key-oracle-database-files/' rel='bookmark' title='Listing key Oracle Database files'>Listing key Oracle Database files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a><p>To check if auditing is enabled:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;">SHOW parameter <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AUDIT</span>;</pre></div></div>

<p>To enable auditing, modify/add the following in your PFILE and restart the database:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;">audit_trail <span style="color: #66cc66;">=</span> db;</pre></div></div>

<p>To audit SELECTs on an object:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">AUDIT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span> object;</pre></div></div>

<p>To list all Audit data on a database:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> sys.aud$;</pre></div></div>

<p>Purge/delete entries from the audit table:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">DELETE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> sys.aud$;</pre></div></div>

<p>To view audit data:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> sys.aud$;</pre></div></div>

<p>To disable auditing:</p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">NOAUDIT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ANY</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span>;</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2010/05/22/oracle-basic-user-logon-auditing/' rel='bookmark' title='Oracle: Basic user-logon auditing'>Oracle: Basic user-logon auditing</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/05/18/oracle-list-all-database-links/' rel='bookmark' title='Oracle: List all database-links'>Oracle: List all database-links</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/02/16/listing-key-oracle-database-files/' rel='bookmark' title='Listing key Oracle Database files'>Listing key Oracle Database files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/05/15/basic-auditing-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[MySQL] Batch update of all entries in table that match condition</title>
		<link>http://blog.ramin-hossaini.com/2010/04/25/mysql-batch-update-of-all-entries-in-table-that-match-condition/</link>
		<comments>http://blog.ramin-hossaini.com/2010/04/25/mysql-batch-update-of-all-entries-in-table-that-match-condition/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 22:36:45 +0000</pubDate>
		<dc:creator>Ramin Hossaini</dc:creator>
				<category><![CDATA[Dev & Design]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.ramin-hossaini.com/?p=705</guid>
		<description><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><span style="display: none;">Private</span></a><!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> -->Lest ye forget. 1 UPDATE &#60;table&#62; SET &#60;column&#62;=&#60;value&#62; WHERE &#60;condition&#62;; Related posts: Canon releases 40D Firmware-update Ubuntu: Installing Apache, PHP 5, and MySQL 5 Migrating WordPress
Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2009/01/23/canon-releases-40d-firmware-update/' rel='bookmark' title='Canon releases 40D Firmware-update'>Canon releases 40D Firmware-update</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/06/01/ubuntu-installing-apache-php-5-and-mysql-5/' rel='bookmark' title='Ubuntu: Installing Apache, PHP 5, and MySQL 5'>Ubuntu: Installing Apache, PHP 5, and MySQL 5</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/04/18/migrating-wordpress/' rel='bookmark' title='Migrating WordPress'>Migrating WordPress</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php"><!-- Private Link --></a><p>Lest ye forget.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">UPDATE</span> <span style="color: #CC0099;">&lt;</span>table<span style="color: #CC0099;">&gt;</span> <span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #CC0099;">&lt;</span>column<span style="color: #CC0099;">&gt;=&lt;</span>value<span style="color: #CC0099;">&gt;</span> <span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #CC0099;">&lt;</span>condition<span style="color: #CC0099;">&gt;</span><span style="color: #000033;">;</span></pre></td></tr></table></div>

<p>Related posts:<ol>
<li><a href='http://blog.ramin-hossaini.com/2009/01/23/canon-releases-40d-firmware-update/' rel='bookmark' title='Canon releases 40D Firmware-update'>Canon releases 40D Firmware-update</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/06/01/ubuntu-installing-apache-php-5-and-mysql-5/' rel='bookmark' title='Ubuntu: Installing Apache, PHP 5, and MySQL 5'>Ubuntu: Installing Apache, PHP 5, and MySQL 5</a></li>
<li><a href='http://blog.ramin-hossaini.com/2010/04/18/migrating-wordpress/' rel='bookmark' title='Migrating WordPress'>Migrating WordPress</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.ramin-hossaini.com/2010/04/25/mysql-batch-update-of-all-entries-in-table-that-match-condition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<!-- <a href="http://blog.ramin-hossaini.com/cotton/cottonoccurrence.php">Private</a> --></channel>
</rss>

