<?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>Oracle DBA Daily Experiences</title>
	<atom:link href="http://blog.flimatech.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.flimatech.com</link>
	<description>Share and promote Oracle info, technology, tips and solutions</description>
	<lastBuildDate>Fri, 10 Sep 2010 17:48:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
			<div  style="padding:7px; display: block; margin-left: auto; margin-right: auto; text-align: center;"><!-- Ad number: 1 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-2258632212766256"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text";
		google_ad_channel =""; google_color_border = "FAFCFF";
		google_color_link = "F58727"; google_color_bg = "FAFCFF";
		google_color_text = "000000"; google_color_url = "008000";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>	<item>
		<title>How to list triggers on a database in SQLServer?</title>
		<link>http://blog.flimatech.com/?p=1518</link>
		<comments>http://blog.flimatech.com/?p=1518#comments</comments>
		<pubDate>Fri, 10 Sep 2010 17:20:51 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1518</guid>
		<description><![CDATA[Using the following SQL statement, it will list triggers on database. It also prints trigger name, table the trigger is on, is it a insert, update and delete triggering event, after and instead of trigger, if the trigger is enabled or disabled SELECT trigger_name = name , trigger_owner = USER_NAME(uid) , table_name = OBJECT_NAME(parent_obj) , [...]]]></description>
			<content:encoded><![CDATA[<p>Using the following SQL statement, it will list triggers on database. It also prints trigger name, table the trigger is on, is it a insert, update and delete triggering event, after and instead of trigger, if the trigger is enabled or disabled</p>
<p>SELECT trigger_name = name<br />
     , trigger_owner = USER_NAME(uid)<br />
     , table_name = OBJECT_NAME(parent_obj)<br />
     , isinsert = OBJECTPROPERTY( id, &#8216;ExecIsInsertTrigger&#8217;)<br />
     , isupdate = OBJECTPROPERTY( id, &#8216;ExecIsUpdateTrigger&#8217;)<br />
     , isdelete = OBJECTPROPERTY( id, &#8216;ExecIsDeleteTrigger&#8217;)<br />
     , isafter = OBJECTPROPERTY( id, &#8216;ExecIsAfterTrigger&#8217;)<br />
     , isinsteadof = OBJECTPROPERTY( id, &#8216;ExecIsInsteadOfTrigger&#8217;)<br />
     , status = CASE OBJECTPROPERTY(id, &#8216;ExecIsTriggerDisabled&#8217;) WHEN 1 THEN &#8216;Disabled&#8217; ELSE &#8216;Enabled&#8217; END<br />
FROM sysobjects<br />
WHERE type = &#8216;TR&#8217;</p>
<p>Output:<br />
tr_test1_insert	dbo	test1	1	0	0	1	0	Enabled</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1518</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find the session and SQL statement that is not closing the ResultSet?</title>
		<link>http://blog.flimatech.com/?p=1512</link>
		<comments>http://blog.flimatech.com/?p=1512#comments</comments>
		<pubDate>Fri, 10 Sep 2010 01:02:42 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[General DBA]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[maximum open cursors exceeded]]></category>
		<category><![CDATA[open_cursors]]></category>
		<category><![CDATA[ORA-01000]]></category>
		<category><![CDATA[v$open_cursor]]></category>
		<category><![CDATA[V$session]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1512</guid>
		<description><![CDATA[There was an issue the other day where the application session ran out of open cursors resulting the following error Exception: java.sql.SQLException: ORA-01000: maximum open cursors exceeded So using the following SQL we found the session had reached the max limit of cursors (open_cursors) and thereby found the SQL which was causing the issue and [...]]]></description>
			<content:encoded><![CDATA[<p>There was an issue the other day where the application session ran out of open cursors resulting the following error<br />
Exception: java.sql.SQLException: ORA-01000: maximum open cursors exceeded</p>
<p>So using the following SQL we found the session had reached the max limit of cursors (open_cursors) and thereby found the SQL which was causing the issue and<br />
SQL&gt; select s.username, s.sid, a.value<br />
from v$sesstat a, v$statname b, v$session s<br />
where a.statistic# = b.statistic#  and s.sid=a.sid<br />
and b.name = &#039;opened cursors current&#039;<br />
and s.username = &#039;SCOTT&#039;;</p>
<p>USERNAME                              SID   COUNT(1)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
SCOTT                              143         17<br />
<b>SCOTT                               89         1000</b></p>
<p>To display the current limit set in the database<br />
SQL&gt; show parameter open_cursors</p>
<p>NAME                                 TYPE        VALUE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;-<br />
open_cursors                         integer     1000</p>
<p>So using V$open_cursor and joining with V$session we were able to find the SQL that wasn&#8217;t closing the cursor.<br />
select vo.sql_id, count(1) from v$open_cursor vo, v$session vs<br />
where vs.sid = vo.sid and vs.username = &#039;SCOTT&#039;<br />
group by vo.sql_id order by count(1);</p>
<p>SQL_ID          COUNT(1)<br />
&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
&#8230;<br />
9gs5t9bj7q686         21<br />
<b>2na94tfc9ukuk       1000</b></p>
<p>SQL&gt; select sql_text from v$sqltext where sql_id = &#8217;2na94tfc9ukuk&#8217;;</p>
<p>SQL_TEXT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
select * from table1</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1512</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lists foreign key(s) on a table</title>
		<link>http://blog.flimatech.com/?p=1509</link>
		<comments>http://blog.flimatech.com/?p=1509#comments</comments>
		<pubDate>Mon, 06 Sep 2010 16:22:45 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[General DBA]]></category>
		<category><![CDATA[foreign]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[primary]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1509</guid>
		<description><![CDATA[Using the following anonymous store procedure one can list the foreign key on a table and it&#8217;s column. It also recursively traverses tables to see if there are other tables dependent on it&#8217;s primary key. set serveroutput on format wrapped DECLARE l_vc2_table_owner VARCHAR2(30) := upper(&#039;&#38;1&#039;); l_vc2_table_name VARCHAR2(30) := upper(&#039;&#38;2&#039;); PROCEDURE get_ind_columns(l_vc2_owner IN VARCHAR2, l_vc2_index_name IN [...]]]></description>
			<content:encoded><![CDATA[<p>Using the following anonymous store procedure one can list the foreign key on a table and it&#8217;s column. It also recursively traverses tables to see if there are other tables dependent on it&#8217;s primary key.</p>
<p>set serveroutput on format wrapped<br />
DECLARE<br />
   l_vc2_table_owner VARCHAR2(30) := upper(&#039;&amp;1&#039;);<br />
   l_vc2_table_name VARCHAR2(30) := upper(&#039;&amp;2&#039;);</p>
<p>PROCEDURE get_ind_columns(l_vc2_owner IN VARCHAR2, l_vc2_index_name IN VARCHAR2, l_vc2_pad IN VARCHAR2<br />
                           , l_vc2_out_table_key OUT VARCHAR2)<br />
IS<br />
   CURSOR l_cur_ind_columns IS<br />
      SELECT column_name FROM dba_ind_columns<br />
       WHERE index_owner = l_vc2_owner AND index_name = l_vc2_index_name<br />
      ORDER BY column_position;<br />
   l_vc2_columns VARCHAR2(100);<br />
BEGIN<br />
   FOR l_rec IN l_cur_ind_columns<br />
   LOOP<br />
      IF l_vc2_columns IS NULL THEN<br />
	 l_vc2_columns := l_rec.column_name;<br />
      ELSE<br />
         l_vc2_columns := l_vc2_columns || &#039; &#039; || l_rec.column_name;<br />
      END IF;<br />
   END LOOP;<br />
   l_vc2_out_table_key := &#039; (&#039; || l_vc2_columns || &#039;)&#039;;<br />
END;</p>
<p>PROCEDURE print_pk(l_vc2_table_owner IN VARCHAR2, l_vc2_table_name IN VARCHAR2, l_vc2_pad IN VARCHAR2) IS<br />
   CURSOR l_cur_main IS<br />
      SELECT di.owner, di.index_name<br />
        FROM dba_indexes di, dba_constraints dc<br />
       WHERE di.table_owner = l_vc2_table_owner and di.table_name = l_vc2_table_name<br />
         AND dc.owner = di.owner and dc.constraint_name = di.index_name<br />
         AND di.uniqueness = &#039;UNIQUE&#039;;<br />
   l_rec_main l_cur_main%ROWTYPE;<br />
   l_vc2_ind_columns VARCHAR2(1000);</p>
<p>FUNCTION check_fk(l_vc2_owner IN VARCHAR2, l_vc2_index_name IN VARCHAR2)<br />
RETURN BOOLEAN<br />
IS<br />
   CURSOR l_cur_fk IS<br />
      SELECT dc.owner, dc.table_name, dc.constraint_name<br />
        FROM dba_constraints dc, dba_cons_columns dcc<br />
       WHERE dc.r_owner = l_vc2_owner AND dc.r_constraint_name = l_vc2_index_name<br />
        AND dc.owner = dcc.owner AND dc.constraint_name = dcc.constraint_name;<br />
   l_rec l_cur_fk%rowtype;<br />
   l_b_status BOOLEAN;<br />
BEGIN<br />
   OPEN l_cur_fk;<br />
   FETCH l_cur_fk INTO l_rec;<br />
   IF l_cur_fk%FOUND THEN<br />
	l_b_status := TRUE;<br />
   ELSE<br />
	l_b_status := FALSE;<br />
   END IF;<br />
   CLOSE l_cur_fk;<br />
   RETURN l_b_status;<br />
END;</p>
<p>PROCEDURE print_fk(l_vc2_owner IN VARCHAR2, l_vc2_index_name IN VARCHAR2,<br />
	           l_vc2_table_owner IN VARCHAR2, l_vc2_table_name IN VARCHAR2,<br />
	           l_vc2_pad IN VARCHAR2)<br />
IS<br />
   CURSOR l_cur_fk IS<br />
      SELECT dc.owner, dc.table_name, dc.constraint_name<br />
        FROM dba_constraints dc, dba_cons_columns dcc<br />
       WHERE dc.r_owner = l_vc2_owner AND dc.r_constraint_name = l_vc2_index_name<br />
        AND dc.owner = dcc.owner AND dc.constraint_name = dcc.constraint_name;<br />
   l_rec l_cur_fk%rowtype;</p>
<p>   CURSOR l_cur_dcc(l_vc2_owner IN VARCHAR2, l_vc2_constraint_name IN VARCHAR2) IS<br />
      SELECT column_name FROM dba_cons_columns<br />
        WHERE owner = l_vc2_owner AND constraint_name = l_vc2_constraint_name<br />
   ORDER BY position;</p>
<p>   l_vc2_cons_columns VARCHAR(500);<br />
BEGIN<br />
   OPEN l_cur_fk;<br />
   FETCH l_cur_fk INTO l_rec;<br />
   IF l_cur_fk%FOUND THEN<br />
      WHILE l_cur_fk%FOUND<br />
      LOOP<br />
      l_vc2_cons_columns := &#039;&#039;;<br />
         FOR l_rec_dcc IN l_cur_dcc(l_rec.owner, l_rec.constraint_name)<br />
         LOOP<br />
	    IF l_vc2_cons_columns IS NULL THEN<br />
	       l_vc2_cons_columns := l_rec_dcc.column_name;<br />
	    ELSE<br />
	       l_vc2_cons_columns := l_vc2_cons_columns || &#039; &#039; || l_rec_dcc.column_name;<br />
   	    END IF;<br />
         END LOOP;<br />
         dbms_output.put_line(l_vc2_pad || &#039;   Table FK: &#039; || l_rec.owner || &#039;.&#039; || l_rec.table_name<br />
	                   &#8212; || &#039; &#039; || l_rec.constraint_name<br />
   		           || &#039; (&#039; || l_vc2_cons_columns || &#039;)&#039;);<br />
         print_pk(l_rec.owner, l_rec.table_name, l_vc2_pad || &#039;   &#039;);</p>
<p>         FETCH l_cur_fk INTO l_rec;<br />
      END LOOP;<br />
   END IF;<br />
   CLOSE l_cur_fk;<br />
END;</p>
<p>BEGIN<br />
   OPEN l_cur_main;<br />
   FETCH l_cur_main INTO l_rec_main;<br />
   IF l_cur_main%FOUND THEN<br />
      WHILE l_cur_main%FOUND<br />
      LOOP<br />
         IF check_fk(l_rec_main.owner, l_rec_main.index_name) THEN<br />
            l_vc2_ind_columns := &#039;&#039;;<br />
            get_ind_columns(l_rec_main.owner, l_rec_main.index_name, l_vc2_pad, l_vc2_ind_columns);<br />
            dbms_output.put_line(l_vc2_pad || &#039;Table: &#039; || l_vc2_table_owner || &#039;.&#039; || l_vc2_table_name<br />
		  || &#039; &#039; || l_vc2_ind_columns);<br />
            print_fk(l_rec_main.owner, l_rec_main.index_name, l_vc2_table_owner, l_vc2_table_name, l_vc2_pad);<br />
         END IF;<br />
         FETCH l_cur_main INTO l_rec_main;<br />
      END LOOP;<br />
   END IF;<br />
END;<br />
BEGIN<br />
   print_pk(l_vc2_table_owner, l_vc2_table_name, &#039;&#039;);<br />
END;<br />
/</p>
<p>Output:<br />
Table: SCOTT.TABLE1  (TABLE1_KEY)<br />
   Table FK: SCOTT.TABLE2 (TABLE2_FKEY)<br />
   Table: SCOTT.TABLE2  (TABLE2_KEY)<br />
      Table FK: SCOTT.TABLE3 (TABLE3_FK)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1509</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
			<div  style="padding:7px; display: block; margin-left: auto; margin-right: auto; text-align: center;"><!-- Ad number: 2 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-2258632212766256"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text";
		google_ad_channel =""; google_color_border = "FAFCFF";
		google_color_link = "F58727"; google_color_bg = "FAFCFF";
		google_color_text = "000000"; google_color_url = "008000";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>	<item>
		<title>How to find the last time a session performed any activity?</title>
		<link>http://blog.flimatech.com/?p=1506</link>
		<comments>http://blog.flimatech.com/?p=1506#comments</comments>
		<pubDate>Sat, 28 Aug 2010 04:26:23 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[General DBA]]></category>
		<category><![CDATA[trace]]></category>
		<category><![CDATA[activity]]></category>
		<category><![CDATA[call]]></category>
		<category><![CDATA[last]]></category>
		<category><![CDATA[last_call_et]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1506</guid>
		<description><![CDATA[In v$session the column last_call_et has value which tells us the last time (seconds) ago when the session performed any activity within the database. select username, floor(last_call_et / 60) &#34;Minutes&#34;, status from v$session where username is not null &#8212; to ignore background process order by last_call_et; USERNAME Minutes STATUS &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8211; SYS 0 ACTIVE [...]]]></description>
			<content:encoded><![CDATA[<p>In v$session the column last_call_et has value which tells us the last time (seconds) ago when the session performed any activity within the database.</p>
<p>select username, floor(last_call_et / 60) &#34;Minutes&#34;, status<br />
from   v$session<br />
where  username is not null  &#8212; to ignore background process<br />
order by last_call_et;</p>
<p>USERNAME                          Minutes STATUS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8211;<br />
SYS                                     0 ACTIVE<br />
SCOTT                                   0 INACTIVE<br />
SYSTEM                                 34 INACTIVE<br />
..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1506</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explain plan execution plan</title>
		<link>http://blog.flimatech.com/?p=1498</link>
		<comments>http://blog.flimatech.com/?p=1498#comments</comments>
		<pubDate>Mon, 23 Aug 2010 04:35:53 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[Tuning]]></category>
		<category><![CDATA[execution]]></category>
		<category><![CDATA[explain]]></category>
		<category><![CDATA[incorrect]]></category>
		<category><![CDATA[plan]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1498</guid>
		<description><![CDATA[Explain plan may not relay the correct execution plan optimizer may run, the following link shows an example Explain Plan Lies]]></description>
			<content:encoded><![CDATA[<p>Explain plan may not relay the correct execution plan optimizer may run, the following link shows an example<br />
<a href='http://kerryosborne.oracle-guy.com/2008/10/explain-plan-lies/'>Explain Plan Lies</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1498</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>whereiz &#8211; find all version of a command</title>
		<link>http://blog.flimatech.com/?p=1492</link>
		<comments>http://blog.flimatech.com/?p=1492#comments</comments>
		<pubDate>Sat, 21 Aug 2010 20:21:29 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[whereiz]]></category>
		<category><![CDATA[which]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1492</guid>
		<description><![CDATA[Using the following script it will find all version of a command in $PATH (from Unix Power Tools) $ cat /tmp/whereiz #!/bin/sh testx=&#34;test -x&#34; fixpath=&#34;`echo $PATH &#124; sed \ -e &#039;s/^:/.:/&#039; \ -e &#039;s/::/:.:/g&#039; \ -e &#039;s/:$/:./&#039;`&#34; # echo $fixpath # IFS has a colon, space and a tab IFS=&#34;: &#34; for command do where=&#34;&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Using the following script it will find all version of a command in $PATH (from Unix Power Tools)</p>
<p>$ cat /tmp/whereiz<br />
#!/bin/sh<br />
testx=&#34;test -x&#34;</p>
<p>fixpath=&#34;`echo $PATH | sed \<br />
        -e &#039;s/^:/.:/&#039; \<br />
        -e &#039;s/::/:.:/g&#039; \<br />
        -e &#039;s/:$/:./&#039;`&#34;</p>
<p># echo $fixpath<br />
# IFS has a colon, space and a tab<br />
IFS=&#34;:  &#34;<br />
for command<br />
do<br />
        where=&#34;&#34;<br />
        for direc in $fixpath<br />
        do $testx $direc/$command &amp;&amp; where=&#34;$where $direc/$command&#34;<br />
        done<br />
        case &#34;$where&#34; in<br />
        ?*) echo $where ;;<br />
        esac<br />
done</p>
<p><b>Example</b><br />
$ /tmp/whereiz ls grep<br />
/bin/ls /tmp/ls<br />
/bin/grep</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1492</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run a logout script in k-shell</title>
		<link>http://blog.flimatech.com/?p=1490</link>
		<comments>http://blog.flimatech.com/?p=1490#comments</comments>
		<pubDate>Sat, 21 Aug 2010 07:41:07 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[k-shell]]></category>
		<category><![CDATA[korn]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[logout]]></category>
		<category><![CDATA[trap]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1490</guid>
		<description><![CDATA[By setting trap one can run a logout script when a k-shell is being terminated. The built-in command trap in k-shell allows one to customize shell when a signal is received. # Set to run $HOME/.logout script when shell is terminated $ trap &#8216;. $HOME/.logout&#8217; 0 # display list of signals setup $ trap trap [...]]]></description>
			<content:encoded><![CDATA[<p>By setting trap one can run a logout script when a k-shell is being terminated.  The built-in command trap in k-shell allows one to customize shell when a signal is received.</p>
<p># Set to run $HOME/.logout script when shell is terminated<br />
$ trap &#8216;. $HOME/.logout&#8217; 0<br />
# display list of signals setup<br />
$ trap<br />
trap &#8212; &#8216;. $HOME/.logout&#8217; EXIT</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1490</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
			<div  style="padding:7px; display: block; margin-left: auto; margin-right: auto; text-align: center;"><!-- Ad number: 3 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-2258632212766256"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text";
		google_ad_channel =""; google_color_border = "FAFCFF";
		google_color_link = "F58727"; google_color_bg = "FAFCFF";
		google_color_text = "000000"; google_color_url = "008000";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>	<item>
		<title>How to find permissions granted on user in a database?</title>
		<link>http://blog.flimatech.com/?p=1488</link>
		<comments>http://blog.flimatech.com/?p=1488#comments</comments>
		<pubDate>Thu, 19 Aug 2010 04:54:11 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[Grant]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sql sever]]></category>
		<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1488</guid>
		<description><![CDATA[Run the following SQL to find permissions granted on users on the database select case when p.protecttype = 205 then &#039;GRANT&#039; when p.protecttype = 206 then &#039;DENY&#039; else &#039;unknown&#039; end + &#039; &#039; + case when p.action = 193 then &#039;SELECT&#039; when p.action = 197 then &#039;UPDATE&#039; when p.action = 195 then &#039;INSERT&#039; when p.action [...]]]></description>
			<content:encoded><![CDATA[<p>Run the following SQL to find permissions granted on users on the database</p>
<p>select<br />
    case when p.protecttype = 205 then &#039;GRANT&#039;<br />
         when p.protecttype = 206 then &#039;DENY&#039;<br />
         else &#039;unknown&#039;<br />
    end + &#039; &#039; +<br />
    case when p.action = 193 then &#039;SELECT&#039;<br />
         when p.action = 197 then &#039;UPDATE&#039;<br />
         when p.action = 195 then &#039;INSERT&#039;<br />
         when p.action = 196 then &#039;DELETE&#039;<br />
         when p.action = 224 then &#039;EXECUTE&#039;<br />
         else &#039;unknown&#039;<br />
    end + &#039; ON &#039; + objectowner.name + &#039;.&#039; + o.NAME +  &#039; TO &#039; + u.name<br />
  from sysusers u<br />
    inner join sysprotects p on u.uid = p.uid<br />
    inner join sysobjects o on o.id = p.id<br />
    inner join sysusers objectowner on o.uid = objectowner.uid<br />
WHERE u.name = &#039;username&#039;<br />
  order by o.name, u.name</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1488</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change auto extensible from all datafiles to OFF</title>
		<link>http://blog.flimatech.com/?p=1484</link>
		<comments>http://blog.flimatech.com/?p=1484#comments</comments>
		<pubDate>Wed, 28 Jul 2010 21:44:07 +0000</pubDate>
		<dc:creator>Alex Lima</dc:creator>
				<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[tablespace]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1484</guid>
		<description><![CDATA[set serveroutput on BEGIN for i in (select file_name,autoextensible from dba_data_files where autoextensible = &#8216;YES&#8217;) loop dbms_output.put_line(&#8216;File name is: &#8216;&#124;&#124;i.file_name&#124;&#124;&#8217; and autoextensible is: &#8216;&#124;&#124;i.autoextensible); execute immediate &#8216;alter database datafile &#8221;&#8217;&#124;&#124;i.file_name&#124;&#124;&#8221;&#8217; autoextend off&#8217;; end loop; END; /]]></description>
			<content:encoded><![CDATA[<p>set serveroutput on<br />
BEGIN<br />
for i in (select file_name,autoextensible from dba_data_files where autoextensible = &#8216;YES&#8217;) loop<br />
  dbms_output.put_line(&#8216;File name is: &#8216;||i.file_name||&#8217; and autoextensible is: &#8216;||i.autoextensible);<br />
  execute immediate &#8216;alter database datafile &#8221;&#8217;||i.file_name||&#8221;&#8217; autoextend off&#8217;;<br />
end loop;<br />
END;<br />
/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1484</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to send an email not using xp_sendmail in SQLServer?</title>
		<link>http://blog.flimatech.com/?p=1482</link>
		<comments>http://blog.flimatech.com/?p=1482#comments</comments>
		<pubDate>Wed, 28 Jul 2010 05:21:37 +0000</pubDate>
		<dc:creator>Amin Jaffer</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.flimatech.com/?p=1482</guid>
		<description><![CDATA[From the following KB article it list couple of store procedures which can be used to send email through SQLServer. One of the feature it has the &#8220;From/Sender&#8221; can be passed in a parameter where as in case xp_sendmail it can&#8217;t be. http://support.microsoft.com/kb/312839]]></description>
			<content:encoded><![CDATA[<p>From the following KB article it list couple of store procedures which can be used to send email through SQLServer.  One of the feature it has the &#8220;From/Sender&#8221; can be passed in a parameter where as in case xp_sendmail it can&#8217;t be.<br />
<a href='http://support.microsoft.com/kb/312839'>http://support.microsoft.com/kb/312839</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flimatech.com/?feed=rss2&amp;p=1482</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
