<?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>abughali.com</title>
	<atom:link href="http://abughali.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://abughali.com</link>
	<description>IT and Business Blog by Mahmoud Abu-Ghali</description>
	<lastBuildDate>Thu, 04 Mar 2010 19:19:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Bloom&#8217;s Taxonomy</title>
		<link>http://abughali.com/2010/02/blooms-taxonomy/</link>
		<comments>http://abughali.com/2010/02/blooms-taxonomy/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 20:53:39 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=149</guid>
		<description><![CDATA[Benjamin Bloom created this taxonomy for categorizing level of abstraction of questions that commonly occur in educational settings. The taxonomy provides a useful structure in which to categorize test questions, since professors will characteristically ask questions within particular levels, and if you can determine the levels of questions that will appear on your exams, you [...]]]></description>
			<content:encoded><![CDATA[<p>Benjamin Bloom created this taxonomy for categorizing level of abstraction of questions that commonly occur in educational settings. The taxonomy provides a useful structure in which to categorize test questions, since professors will characteristically ask questions within particular levels, and if you can determine the levels of questions that will appear on your exams, you will be able to study using appropriate strategies.</p>
<table border="1" cellpadding="3" align="center">
<tbody>
<tr>
<td valign="top">
<h3>Competence</h3>
</td>
<td valign="top">
<h3>Skills Demonstrated</h3>
</td>
</tr>
<tr>
<td valign="top"><strong>Knowledge </strong></td>
<td valign="top">
<ul>
<li>Observation and recall of information</li>
<li>Question keywords:<br />
<em>list, define, tell, describe, identify, show, label, collect, examine, tabulate, quote, name, who, when, where</em></li>
</ul>
</td>
</tr>
<tr>
<td valign="top"><strong><strong>Comprehension</strong></strong></td>
<td valign="top">
<ul>
<li> Understanding information or making sense of ideas</li>
<li>Question keywords:<br />
<em>summarize, describe, interpret, contrast, predict, associate, distinguish, estimate, differentiate, discuss, extend</em></li>
</ul>
</td>
</tr>
<tr>
<td valign="top"><strong>Application</strong></td>
<td valign="top">
<ul>
<li> Applying knowledge or understanding in unfamiliar contexts</li>
<li>Question keywords:<br />
<em>apply, demonstrate, calculate, complete, illustrate, show, solve, examine, modify, relate, change, classify, experiment, discover</em></li>
</ul>
</td>
</tr>
<tr>
<td valign="top"><strong>Analysis</strong></td>
<td valign="top">
<ul>
<li> Using methods or theories in unfamiliar situations to identify structures and patterns and to solve problems.</li>
<li>Question keywords:<br />
<em>analyze, separate, order, explain, connect, classify, arrange, divide, compare, select, explain, infer</em></li>
</ul>
</td>
</tr>
<tr>
<td valign="top"><strong>Synthesis</strong></td>
<td valign="top">
<ul>
<li> Combining ideas to make something new</li>
<li>Question keywords:<br />
<em>combine, integrate, modify, rearrange, substitute, plan, create, design, invent, what if?, compose, formulate, prepare, generalize, rewrite</em></li>
</ul>
</td>
</tr>
<tr>
<td valign="top"><strong>Evaluation</strong></td>
<td valign="top">
<ul>
<li> Discriminating between ideas and making judgments about value based on reasoned argument</li>
<li>Question keywords:<br />
<em>assess, decide, rank, grade, test, measure, recommend, convince, select, judge, explain, discriminate, support, conclude, compare, summarize</em></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>* From Benjamin S. Bloom <em>Taxonomy of educational objectives</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2010/02/blooms-taxonomy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Javamail: Sending to multiple recipients</title>
		<link>http://abughali.com/2010/02/javamail-sending-to-multiple-recipients/</link>
		<comments>http://abughali.com/2010/02/javamail-sending-to-multiple-recipients/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 20:33:13 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=144</guid>
		<description><![CDATA[The following code snippet demonstrates how you can send to multiple recipients from java : String toList = &#34;email1@emailserver.com,email2@emailserver.com&#34; ; String to &#91;&#93; = to.split&#40;&#34;,&#34;&#41;; &#160; InternetAddress&#91;&#93; addresses = new InternetAddress&#91;to.length&#93;; &#160; for &#40;int i = 0; i &#60; to.length; i++&#41; addresses&#91;i&#93; = new InternetAddress&#40;to&#91;i&#93;&#41;; &#160; msg.setRecipients&#40;Message.RecipientType.TO, addresses&#41;;]]></description>
			<content:encoded><![CDATA[<p>The following code snippet demonstrates how you can send to multiple recipients from java :</p>

<div class="wp_codebox"><table><tr id="p1442"><td class="code" id="p144code2"><pre class="java" style="font-family:monospace;"> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> toList <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;email1@emailserver.com,email2@emailserver.com&quot;</span> <span style="color: #339933;">;</span>
 <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> to <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> to.<span style="color: #006633;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>        
&nbsp;
 InternetAddress<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> addresses <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> InternetAddress<span style="color: #009900;">&#91;</span>to.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> to.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
    addresses<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> InternetAddress<span style="color: #009900;">&#40;</span>to<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 msg.<span style="color: #006633;">setRecipients</span><span style="color: #009900;">&#40;</span>Message.<span style="color: #006633;">RecipientType</span>.<span style="color: #006633;">TO</span>, addresses<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2010/02/javamail-sending-to-multiple-recipients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No need for sql loader!</title>
		<link>http://abughali.com/2010/02/no-sql-loader/</link>
		<comments>http://abughali.com/2010/02/no-sql-loader/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 20:20:55 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=115</guid>
		<description><![CDATA[Scriptella is an open source ETL (Extract-Transform-Load) and script execution tool written in Java. I used it to load data from csv file to Oracle. Of course it can be used to load from any data source to any data source. It has been used as a migration tool for data for many tasks. Sample [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://scriptella.javaforge.com/">Scriptella</a> is an open source ETL (Extract-Transform-Load) and script execution tool written in Java. I used it to load data from csv file to Oracle. Of course it can be used to load from any data source to any data source. It has been used as a migration tool for data for many tasks.</p>
<p>Sample etl.xml file :</p>

<div class="wp_codebox"><table><tr id="p1156"><td class="code" id="p115code6"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;etl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;connection</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;in&quot;</span> <span style="color: #000066;">driver</span>=<span style="color: #ff0000;">&quot;csv&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;data.csv&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  headers=false
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/connection<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;connection</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;out&quot;</span> <span style="color: #000066;">driver</span>=<span style="color: #ff0000;">&quot;oracle&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;jdbc:oracle:thin:@127.0.0.1:1521:orcl&quot;</span></span>
<span style="color: #009900;">      <span style="color: #000066;">classpath</span>=<span style="color: #ff0000;">&quot;ojdbc14.jar&quot;</span> <span style="color: #000066;">user</span>=<span style="color: #ff0000;">&quot;test&quot;</span> <span style="color: #000066;">password</span>=<span style="color: #ff0000;">&quot;test&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #808080; font-style: italic;">&lt;!-- Empty the destination table --&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">connection-id</span>=<span style="color: #ff0000;">&quot;out&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    truncate table TEMP1 ;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;query</span> <span style="color: #000066;">connection-id</span>=<span style="color: #ff0000;">&quot;in&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #808080; font-style: italic;">&lt;!-- Empty query means select all columns --&gt;</span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">connection-id</span>=<span style="color: #ff0000;">&quot;out&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
          INSERT INTO TEMP1 VALUES ('$1', $2)
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/query<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/etl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>in data.csv :</p>

<div class="wp_codebox"><table><tr id="p1157"><td class="code" id="p115code7"><pre class="xml" style="font-family:monospace;">text1,1
text2,2
text3,3</pre></td></tr></table></div>

<p>Sample Java class (ojdbc14.jar and scriptella.jar should be in your class path) :</p>

<div class="wp_codebox"><table><tr id="p1158"><td class="code" id="p115code8"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">scriptella.execution.EtlExecutor</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">scriptella.execution.EtlExecutorException</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MainRunner <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
         EtlExecutor.<span style="color: #006633;">newExecutor</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;etl.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>EtlExecutorException e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span> 
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2010/02/no-sql-loader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postpaid to Prepaid Credit Transfer</title>
		<link>http://abughali.com/2009/11/postpaid-to-prepaid-credit-transfer/</link>
		<comments>http://abughali.com/2009/11/postpaid-to-prepaid-credit-transfer/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 22:24:27 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=98</guid>
		<description><![CDATA[Zain Kuwait launches new Credit Transfer Service through SMS from/to any subscription type (prepaid/postpaid). You simply need to send &#39;sub&#39; to 99998 through an SMS and you will be subscribed free of charge, and there is no extra fees or commission for the transaction itself. If you are a postpaid subscriber, your monthly bill will [...]]]></description>
			<content:encoded><![CDATA[<p>Zain Kuwait launches new Credit Transfer Service through SMS from/to any subscription type (prepaid/postpaid). You simply need to send &#39;sub&#39; to 99998 through an SMS and you will be subscribed free of charge, and there is no extra fees or commission for the transaction itself. If you are a postpaid subscriber, your monthly bill will be debited directly. <a href="http://www.kw.zain.com/kw/af/core/home/channel.do?channelId=-11217&amp;selectedChannels=-11217,-8156,-8155,-8153&amp;lang=en" target="_blank">Here</a> you can read about the rules and how to enjoy this service. It&#39;s really a Wonderful World!</p>
]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/postpaid-to-prepaid-credit-transfer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Illusion : Impossible Figures</title>
		<link>http://abughali.com/2009/11/visual-illusion-impossible-figures/</link>
		<comments>http://abughali.com/2009/11/visual-illusion-impossible-figures/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 22:18:36 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=88</guid>
		<description><![CDATA[Our eyes sometimes seem to play tricks on us in the form of visual illusions. One type of illusion involves impossible figures, such as the one in the video above. Impossible figures fool the brain into creating the impression of a whole figure when the figure is viewed from certain perspectives.&#160;In particular, our brains work [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://abughali.com/2009/11/visual-illusion-impossible-figures/"><em>Click here to view the embedded video.</em></a></p>
<p>
	Our eyes sometimes seem to play tricks on us in the form of visual illusions. One type of illusion involves impossible figures, such as the one in the video above. Impossible figures fool the brain into creating the impression of a whole figure when the figure is viewed from certain perspectives.&nbsp;In particular, our brains work in two general modes of visual processing:</p>
<p>1- Bottom-up processing: The process by which the brain forms perceptions by piecing together bits and pieces of sensory data to form meaningful patterns.</p>
<p>2- Top-down processing: The process by which the brain forms perceptions by recognizing whole patterns without first piecing together their component parts.</p>
<p>Source : <a href="http://www.amazon.com/gp/product/0547148143">Psychology, Concepts and Applications By Jeffrey S. Nevid</a></p>
]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/visual-illusion-impossible-figures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Protecting Your Ideas</title>
		<link>http://abughali.com/2009/11/protecting-your-ideas/</link>
		<comments>http://abughali.com/2009/11/protecting-your-ideas/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 15:08:39 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=76</guid>
		<description><![CDATA[Copyright is an exclusive right that protects the creators of original works of authorship such as literary, dramatic, musical, and artistic works. Copyrighted material is denoted by the symbol ©.  Type of Protection What It Covers Time Required Cost Copyright Works of original authorship About 2 weeks About $30 Trademark Logos, names, phrases 6 &#8211; 12 [...]]]></description>
			<content:encoded><![CDATA[<p>Copyright is an exclusive right that protects the creators of original works of authorship such as literary, dramatic, musical, and artistic works. Copyrighted material is denoted by the symbol ©. </p>
<table width="100%" border="1" cellspacing="3" cellpadding="3">
<tr>
<th scope="col">
<div align="center"><strong>Type of Protection</strong></div>
</th>
<th scope="col">
<div align="center"><strong>What It Covers</strong></div>
</th>
<th scope="col">
<div align="center"><strong>Time Required</strong></div>
</th>
<th scope="col">
<div align="center"><strong>Cost</strong></div>
</th>
</tr>
<tr>
<th nowrap="nowrap" scope="row">
<div align="left">Copyright</div>
</th>
<td>Works of original authorship</td>
<td nowrap="nowrap">About 2 weeks</td>
<td nowrap="nowrap">About $30</td>
</tr>
<tr>
<th nowrap="nowrap" scope="row">
<div align="left">Trademark</div>
</th>
<td>Logos, names, phrases</td>
<td nowrap="nowrap">6 &ndash; 12 months</td>
<td nowrap="nowrap">$900 - $1,500</td>
</tr>
<tr>
<th nowrap="nowrap" scope="row">
<div align="left">Design patent</div>
</th>
<td>Look of an original product</td>
<td nowrap="nowrap">Up to 2 years</td>
<td nowrap="nowrap">$5,000 - $20,000</td>
</tr>
<tr>
<th nowrap="nowrap" scope="row">
<div align="left">Utility patent</div>
</th>
<td>How an original product works</td>
<td nowrap="nowrap">2 &ndash; 5 years</td>
<td nowrap="nowrap">$5,000 - $20,000</td>
</tr>
<tr>
<th nowrap="nowrap" scope="row">
<div align="left">Business method patent</div>
</th>
<td>A business process</td>
<td nowrap="nowrap">2 &ndash; 5 years</td>
<td nowrap="nowrap">$5,000 - $20,000</td>
</tr>
</table>
<p>Source: “How to Knock Out Knock Offs,” Business Week, March 14, 2005.</p>
]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/protecting-your-ideas/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Who else is on your server?</title>
		<link>http://abughali.com/2009/11/who-else-is-on-your-server/</link>
		<comments>http://abughali.com/2009/11/who-else-is-on-your-server/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:31:42 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=57</guid>
		<description><![CDATA[Many system administrators use scripts to help them in the process of managing a server. A common problem is finding out exactly what users are on the system and what they are doing. Several tools are available on the system to see who is online, what processes are running, and pipeing them together can resolve [...]]]></description>
			<content:encoded><![CDATA[<p>Many system administrators use scripts to help them in the process of managing a server. A common problem is finding out exactly what users are on the system and what they are doing.<br />
Several tools are available on the system to see who is online, what processes are running, and pipeing them together can resolve many problems. Here are 2 small scripts that will show, first if a user is online, and then what he is running:</p>

<div class="wp_codebox"><table><tr id="p5710"><td class="code" id="p57code10"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">who</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$1</span>
<span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-aux</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$1</span></pre></td></tr></table></div>

<p>The variable $1 here means the first command line argument, from a shell script. The who command first checks if the user is online, then ps will show all the processes currently running under that user's UID.</p>
]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/who-else-is-on-your-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who owns this port</title>
		<link>http://abughali.com/2009/11/who-owns-this-port/</link>
		<comments>http://abughali.com/2009/11/who-owns-this-port/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:27:53 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=55</guid>
		<description><![CDATA[An interesting UNIX command is the fuser program. This program can tell you which user and process owns a port. For example, the following command will tell you who owns port 6000: fuser -v -n tcp 6000]]></description>
			<content:encoded><![CDATA[<p>An interesting UNIX command is the fuser program. This program can tell you which user and process owns a port. For example, the following command will tell you who owns port 6000:</p>

<div class="wp_codebox"><table><tr id="p5512"><td class="code" id="p55code12"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">fuser</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-n</span> tcp <span style="color: #000000;">6000</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/who-owns-this-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle&#8217;s Temporary Tables</title>
		<link>http://abughali.com/2009/11/oracles-temporary-tables/</link>
		<comments>http://abughali.com/2009/11/oracles-temporary-tables/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:18:56 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=53</guid>
		<description><![CDATA[Temporary tables are used to hold intermediate resultsets, either for the duration of a transaction or a session. The data held in a temporary table is only ever visible to the current session – no other session will ever see any other session's data, even if the current session COMMITs the data. Multi-user concurrency is [...]]]></description>
			<content:encoded><![CDATA[<p>Temporary tables are used to hold intermediate resultsets, either for the duration of a transaction or a session. The data held in a temporary table is only ever visible to the current session – no other session will ever see any other session's data, even if the current session COMMITs the data. Multi-user concurrency is not an issue with regards to temporary tables either, one session can never block another session by using a temporary table. Even if we 'lock' the temporary table, it will not prevent other sessions using their temporary table, temporary tables generate significantly less REDO then regular tables would.</p>
<p>Oracle's temporary tables are similar to temporary tables in other relational databases with the main exception being that they are 'statically' defined. You create them once per database, not once per stored procedure in the database. They always exist – they will be in the data dictionary as objects, but will always appear empty until your session puts data into them. The fact that they are statically defined allows us to create views that reference temporary tables, to create stored procedures that use static SQL to reference them, and so on.</p>
<p>Temporary tables may be session-based (data survives in the table across commits but not a disconnect/reconnect). They may also be transaction-based (data disappears after a commit). </p>
<p>Here is an example showing the behavior of both.</p>

<div class="wp_codebox"><table><tr id="p5315"><td class="code" id="p53code15"><pre class="plsql" style="font-family:monospace;"><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=CREATE"><span style="color: #00F;">create</span></a> global temporary <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TABLE"><span style="color: #00F;">table</span></a> temp_table_session
 <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=ON"><span style="color: #00F;">on</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=COMMIT"><span style="color: #00F;">commit</span></a> preserve rows
 <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=AS"><span style="color: #00F;">as</span></a>
 <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=SELECT"><span style="color: #00F;">select</span></a> <span style="color: #00F;">*</span> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=FROM"><span style="color: #00F;">from</span></a> scott<span style="color: #00F;">.</span>emp<span style="color: #00F;">;</span></pre></td></tr></table></div>

<p>The ON COMMIT PRESERVE ROWS clause makes this a session-based temporary table. Rows will stay in this table until my session disconnects or I physically remove them via a DELETE or TRUNCATE. Only my session can see these rows; no other session will ever see 'my' rows even after I COMMIT:</p>

<div class="wp_codebox"><table><tr id="p5316"><td class="code" id="p53code16"><pre class="plsql" style="font-family:monospace;"><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=CREATE"><span style="color: #00F;">create</span></a> global temporary <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TABLE"><span style="color: #00F;">table</span></a> temp_table_transaction
 <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=ON"><span style="color: #00F;">on</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=COMMIT"><span style="color: #00F;">commit</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=DELETE"><span style="color: #00F;">delete</span></a> rows
 <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=AS"><span style="color: #00F;">as</span></a>
 <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=SELECT"><span style="color: #00F;">select</span></a> <span style="color: #00F;">*</span> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=FROM"><span style="color: #00F;">from</span></a> scott<span style="color: #00F;">.</span>emp<span style="color: #00F;">;</span></pre></td></tr></table></div>

<p>The ON COMMIT DELETE ROWS makes this a transaction-based temporary table. When your session commits, the rows disappear. The rows will disappear by simply giving back the temporary extents allocated to our table – there is no overhead involved in the automatic clearing of temporary tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/oracles-temporary-tables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle Autonomous Transactions</title>
		<link>http://abughali.com/2009/11/oracle-autonomous-transactions/</link>
		<comments>http://abughali.com/2009/11/oracle-autonomous-transactions/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:02:19 +0000</pubDate>
		<dc:creator>abughali</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://abughali.com/?p=49</guid>
		<description><![CDATA[Autonomous transactions allow you to create a new transaction within a transaction that may commit or roll back changes, independently of its parent transaction. They allow you to suspend the currently executing transaction, start a new one, do some work and commit or roll back, all without affecting the currently executing transaction state. The directive [...]]]></description>
			<content:encoded><![CDATA[<p>Autonomous transactions allow you to create a new transaction within a transaction that may commit or roll back changes, independently of its parent transaction. They allow you to suspend the currently executing transaction, start a new one, do some work and commit or roll back, all without affecting the currently executing transaction state.</p>
<p>The directive PRAGMA AUTONOMOUS_TRANSACTION tells the database that this procedure, when executed, is to be executed as a new autonomous transaction, independently of its parent transaction.</p>
<p>To ilustrate this by an example, let's create one logging table that will be used to log some actions within your package.</p>

<div class="wp_codebox"><table><tr id="p4919"><td class="code" id="p49code19"><pre class="plsql" style="font-family:monospace;"><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=CREATE"><span style="color: #00F;">create</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TABLE"><span style="color: #00F;">table</span></a> actions_log
<span style="color: #00F;">&#40;</span> username <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=VARCHAR2"><span style="color: #00F;">varchar2</span></a><span style="color: #00F;">&#40;</span><span style="color: #800;">30</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=TIMESTAMP"><span style="color: #00F;">timestamp</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=DATE"><span style="color: #00F;">date</span></a><span style="color: #00F;">,</span>
notes <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=VARCHAR2"><span style="color: #00F;">varchar2</span></a><span style="color: #00F;">&#40;</span><span style="color: #800;">1000</span><span style="color: #00F;">&#41;</span>
<span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span></pre></td></tr></table></div>

<p>Then your package will have an autonomous transaction procedure ..</p>

<div class="wp_codebox"><table><tr id="p4920"><td class="code" id="p49code20"><pre class="plsql" style="font-family:monospace;"><a href="http://www.oracle.com/pls/db92/db92.drilldown?word=CREATE"><span style="color: #00F;">create</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=OR"><span style="color: #00F;">or</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=REPLACE"><span style="color: #000;">replace</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=PACKAGE"><span style="color: #00F;">package</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=BODY"><span style="color: #00F;">body</span></a> my_pkg
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=AS"><span style="color: #00F;">as</span></a>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=PROCEDURE"><span style="color: #00F;">procedure</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=LOG"><span style="color: #000;">log</span></a><span style="color: #00F;">&#40;</span> p_notes <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=IN"><span style="color: #00F;">in</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=VARCHAR2"><span style="color: #00F;">varchar2</span></a><span style="color: #00F;">&#41;</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=AS"><span style="color: #00F;">as</span></a>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=PRAGMA"><span style="color: #00F;">pragma</span></a> autonomous_transaction<span style="color: #00F;">;</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=BEGIN"><span style="color: #00F;">begin</span></a>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INSERT"><span style="color: #00F;">insert</span></a> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=INTO"><span style="color: #00F;">into</span></a> actions_log <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=VALUES"><span style="color: #00F;">values</span></a>
<span style="color: #00F;">&#40;</span> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=USER"><span style="color: #000;">user</span></a><span style="color: #00F;">,</span> <a href="http://www.oracle.com/pls/db92/db92.drilldown?word=SYSDATE"><span style="color: #000;">sysdate</span></a><span style="color: #00F;">,</span> p_notes <span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=COMMIT"><span style="color: #00F;">commit</span></a><span style="color: #00F;">;</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=END"><span style="color: #00F;">end</span></a><span style="color: #00F;">;</span>
<span style="color: #00F;">...</span>
<span style="color: #00F;">...</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=LOG"><span style="color: #000;">log</span></a> <span style="color: #00F;">&#40;</span><span style="color: #F00;">'Action 1'</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">...</span>
<span style="color: #00F;">...</span>
<a href="http://www.oracle.com/pls/db92/db92.drilldown?word=END"><span style="color: #00F;">end</span></a><span style="color: #00F;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://abughali.com/2009/11/oracle-autonomous-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
