<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<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/"
	>

<channel>
	<title>Laurent Schneider</title>
	<link>http://laurentschneider.com</link>
	<description>Oracle Certified Master</description>
	<pubDate>Thu, 15 May 2008 13:02:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>10.2.0.4 aix</title>
		<link>http://laurentschneider.com/wordpress/2008/05/10204-aix.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/10204-aix.html#comments</comments>
		<pubDate>Thu, 15 May 2008 13:02:20 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>oracle</category>

		<category>news</category>

		<category>installation</category>

		<category>support</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/10204-aix.html</guid>
		<description><![CDATA[I just noticed 10.2.0.4 is out. I started downloading 1,916,781 KB !


  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2F10204-aix.html';
  addthis_title  = '10.2.0.4+aix';
  addthis_pub    = '';

]]></description>
			<content:encoded><![CDATA[<p>I just noticed 10.2.0.4 is out. I started downloading 1,916,781 KB !
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2F10204-aix.html';
  addthis_title  = '10.2.0.4+aix';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/10204-aix.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to cron?</title>
		<link>http://laurentschneider.com/wordpress/2008/05/how-to-cron.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/how-to-cron.html#comments</comments>
		<pubDate>Thu, 15 May 2008 12:28:57 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>dba</category>

		<category>linux</category>

		<category>unix</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/how-to-cron.html</guid>
		<description><![CDATA[RTFM is not the best answer &#8230; 
man crontab
SunOS 5.10&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Last change: 10 Nov 2005

User Commands&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;crontab(1)
&#160;&#160;&#160;&#160; A crontab file consists of lines of&#160;&#160;six&#160;&#160;fields&#160;&#160;each.&#160;&#160;The
&#160;&#160;&#160;&#160; fields&#160;&#160;are&#160;&#160;separated by spaces or tabs. The first five are
&#160;&#160;&#160;&#160; integer patterns that specify the following:

&#160;&#160;&#160;&#160; minute (0-59),
&#160;&#160;&#160;&#160; hour (0-23),
&#160;&#160;&#160;&#160; day of the month (1-31),
&#160;&#160;&#160;&#160; month of the year (1-12),
&#160;&#160;&#160;&#160; day of the week [...]]]></description>
			<content:encoded><![CDATA[<p>RTFM is not the best answer &#8230; </p>
<p><pre><code>man crontab
SunOS 5.10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last change: 10 Nov 2005

User Commands&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;crontab(1)
&nbsp;&nbsp;&nbsp;&nbsp; A crontab file consists of lines of&nbsp;&nbsp;six&nbsp;&nbsp;fields&nbsp;&nbsp;each.&nbsp;&nbsp;The
&nbsp;&nbsp;&nbsp;&nbsp; fields&nbsp;&nbsp;are&nbsp;&nbsp;separated by spaces or tabs. The first five are
&nbsp;&nbsp;&nbsp;&nbsp; integer patterns that specify the following:

&nbsp;&nbsp;&nbsp;&nbsp; minute (0-59),
&nbsp;&nbsp;&nbsp;&nbsp; hour (0-23),
&nbsp;&nbsp;&nbsp;&nbsp; day of the month (1-31),
&nbsp;&nbsp;&nbsp;&nbsp; month of the year (1-12),
&nbsp;&nbsp;&nbsp;&nbsp; day of the week (0-6 with 0=Sunday).
</code></pre></p>
<p>so far so good. But read this<br />
<pre><code>
&nbsp;&nbsp;&nbsp;&nbsp; Each of these patterns can be either&nbsp;&nbsp;an&nbsp;&nbsp;asterisk&nbsp;&nbsp;(meaning
&nbsp;&nbsp;&nbsp;&nbsp; all legal values) or a list of elements separated by commas.
&nbsp;&nbsp;&nbsp;&nbsp; An element is either a number or two numbers separated by&nbsp;&nbsp;a
&nbsp;&nbsp;&nbsp;&nbsp; minus sign (meaning an inclusive range). Time specified here
&nbsp;&nbsp;&nbsp;&nbsp; is interpreted in the timezone of the cron(1M) daemon, which
&nbsp;&nbsp;&nbsp;&nbsp; is&nbsp;&nbsp;set system-wide in /etc/default/init. Entries do not use
&nbsp;&nbsp;&nbsp;&nbsp; the invoking user&#039;s timezone. The specification of days&nbsp;&nbsp;can
&nbsp;&nbsp;&nbsp;&nbsp; be&nbsp;&nbsp;made&nbsp;&nbsp;by&nbsp;&nbsp;two&nbsp;&nbsp;fields&nbsp;&nbsp;(day&nbsp;&nbsp;of the month and day of the
&nbsp;&nbsp;&nbsp;&nbsp; week). Both are adhered to if specified as a&nbsp;&nbsp;list&nbsp;&nbsp;of&nbsp;&nbsp;ele-
&nbsp;&nbsp;&nbsp;&nbsp; ments. See .
</code></pre></p>
<p><b>See .</b></p>
<p>Let&#8217;s imagine you want to run a job today, Thursday May 15, 2008 at 2:15pm<br />
You write:<br />
<code>15 14 15 05 4 /tmp/run-my-job</code></p>
<p>The job will be run Today at 2:15, next year <b>Friday</b> May 15, 2009 at 2:15pm and next week Thursday May <b>22</b>, 2008 at 2:15pm&#8230; </p>
<p>The correct method is to use<br />
<code>15 14 15 05 * /tmp/run-my-job</code></p>
<p>Specifying both day of week and day of month is not what I expected  <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_twisted.gif' alt=':twisted:' class='wp-smiley' /> </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2Fhow-to-cron.html';
  addthis_title  = 'How+to+cron%3F';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/how-to-cron.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>drop all objects</title>
		<link>http://laurentschneider.com/wordpress/2008/05/drop-all-objects.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/drop-all-objects.html#comments</comments>
		<pubDate>Wed, 14 May 2008 12:56:25 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>oracle</category>

		<category>sql</category>

		<category>dba</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/drop-all-objects.html</guid>
		<description><![CDATA[warning: the script below is destructive and not 100% safe
A question was posted on the french forums of developez.net about how to drop all objects of an user. The drop user toto cascade; followed by create user toto identified by tott; was suggested as an easy answer, but I commented that create user must re-grant [...]]]></description>
			<content:encoded><![CDATA[<p><font color="red">warning: the script below is destructive and not 100% safe</font></p>
<p>A question was posted on the french forums of developez.net about how to drop all objects of an user. The <b>drop user toto cascade;</b> followed by <b>create user toto identified by tott;</b> was suggested as an <i>easy</i> answer, but I commented that create user must re-grant quotas, roles, system privileges, table privileges. Create user must also set the correct security status of the account (password, case-sensitive password, lock status, expiration status, profile), and the password history and failed login history is lost. Also it must set the default and temporary tablespaces.</p>
<p>It is also important to note that &#8220;drop user&#8221; requires dba privileges, when dropping the own object does not require privileges</p>
<p>To drop all objects I tried with plsql and a dictionary loop.</p>
<p><pre><code>select object_type, count(*) 
from user_objects 
group by object_type;

OBJECT_TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COUNT(*)
------------------- ----------
INDEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6
TYPE BODY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
INDEXTYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
PROCEDURE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
JAVA CLASS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2
JAVA RESOURCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
JAVA SOURCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
FUNCTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
TABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10
TRIGGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
MATERIALIZED VIEW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
DATABASE LINK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
PACKAGE BODY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
CLUSTER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
DIMENSION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1
OPERATOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
SEQUENCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
PACKAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1

19 rows selected.

purge recyclebin;

Purge successfully completed.
</code></pre><i><br />
begin<br />
for f in (<br />
  select object_type, object_name from user_objects<br />
    where object_type in (<br />
      &#8216;MATERIALIZED VIEW&#8217;)) loop<br />
  execute immediate<br />
&#8216;drop materialized view &#8220;&#8216;||f.object_name||&#8217;&#8221; preserve table&#8217;;<br />
end loop;<br />
for f in (<br />
  select table_name from user_tables) loop<br />
  execute immediate<br />
    &#8216;drop table &#8220;&#8216;||f.table_name||&#8217;&#8221; cascade constraints&#8217;;<br />
end loop;<br />
for f in (<br />
  select object_type, object_name from user_objects<br />
    where object_type in (<br />
      &#8216;DIMENSION&#8217;,'CLUSTER&#8217;,'SEQUENCE&#8217;,<br />
      &#8216;VIEW&#8217;,'FUNCTION&#8217;,'PROCEDURE&#8217;,<br />
      &#8216;PACKAGE&#8217;,'SYNONYM&#8217;,'DATABASE LINK&#8217;,<br />
      &#8216;INDEXTYPE&#8217;)) loop<br />
  execute immediate &#8216;drop &#8216;||<br />
    f.object_type||&#8217; &#8220;&#8216;||f.object_name||&#8217;&#8221;&#8216;;<br />
  end loop<br />
for f in (<br />
  select object_type, object_name from user_objects<br />
    where object_type in (<br />
      &#8216;JAVA SOURCE&#8217;)) loop<br />
  execute immediate &#8216;drop &#8216;||<br />
    f.object_type||&#8217; &#8220;&#8216;||f.object_name||&#8217;&#8221;&#8216;;<br />
end loop;<br />
for f in (<br />
  select object_type, object_name from user_objects<br />
    where object_type in (<br />
      &#8216;JAVA RESOURCE&#8217;)) loop<br />
  execute immediate &#8216;drop &#8216;||<br />
    f.object_type||&#8217; &#8220;&#8216;||f.object_name||&#8217;&#8221;&#8216;;<br />
end loop;<br />
for f in (<br />
  select object_type, object_name from user_objects<br />
    where object_type in (<br />
      &#8216;JAVA CLASS&#8217;)) loop<br />
  execute immediate &#8216;drop &#8216;||<br />
f.object_type||&#8217; &#8220;&#8216;||f.object_name||&#8217;&#8221;&#8216;;<br />
end loop;<br />
for f in (<br />
  select object_type, object_name from user_objects<br />
    where object_type in (<br />
      &#8216;TYPE&#8217;,'OPERATOR&#8217;)) loop<br />
  execute immediate &#8216;drop &#8216;||<br />
    f.object_type||&#8217; &#8220;&#8216;||<br />
    f.object_name||&#8217;&#8221; force&#8217;;<br />
end loop;<br />
end;<br />
/</p>
<p>PL/SQL procedure successfully completed.</i><pre><code>
select * from user_objects

no rows selected.
</code></pre></p>
<p>All objects of the current schema disappeared, <font color="red">do not try this as sys, this script is destructive with no confirmation</font>
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2Fdrop-all-objects.html';
  addthis_title  = 'drop+all+objects';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/drop-all-objects.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>select distinct collect</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html#comments</comments>
		<pubDate>Tue, 06 May 2008 13:45:25 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>oracle</category>

		<category>sql</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html</guid>
		<description><![CDATA[I answered a question on otn today about distinct. 
Reprased, how to select distinct collection?

select job, collect(distinct deptno) deptnos 
from emp group by job;

JOB&#160;&#160;&#160;&#160;&#160;&#160; DEPTNOS
--------- -------------------------------------------
ANALYST&#160;&#160; SYSTPTJCzBffh0AjgQ59n0o3QCA==(20)
CLERK&#160;&#160;&#160;&#160; SYSTPTJCzBffh0AjgQ59n0o3QCA==(10, 20, 30)
MANAGER&#160;&#160; SYSTPTJCzBffh0AjgQ59n0o3QCA==(10, 20, 30)
PRESIDENT SYSTPTJCzBffh0AjgQ59n0o3QCA==(10)
SALESMAN&#160;&#160;SYSTPTJCzBffh0AjgQ59n0o3QCA==(30)

5 rows selected.

select distinct collect(distinct deptno) deptnos 
from emp group by job;

ERROR at line 1:
ORA-22950: cannot ORDER objects without MAP or ORDER [...]]]></description>
			<content:encoded><![CDATA[<p>I answered a question on otn today about distinct. </p>
<p>Reprased, how to select distinct collection?</p>
<p><pre><code>
select job, collect(distinct deptno) deptnos 
from emp group by job;

JOB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEPTNOS
--------- -------------------------------------------
ANALYST&nbsp;&nbsp; SYSTPTJCzBffh0AjgQ59n0o3QCA==(20)
CLERK&nbsp;&nbsp;&nbsp;&nbsp; SYSTPTJCzBffh0AjgQ59n0o3QCA==(10, 20, 30)
MANAGER&nbsp;&nbsp; SYSTPTJCzBffh0AjgQ59n0o3QCA==(10, 20, 30)
PRESIDENT SYSTPTJCzBffh0AjgQ59n0o3QCA==(10)
SALESMAN&nbsp;&nbsp;SYSTPTJCzBffh0AjgQ59n0o3QCA==(30)

5 rows selected.

select distinct collect(distinct deptno) deptnos 
from emp group by job;

ERROR at line 1:
ORA-22950: cannot ORDER objects without MAP or ORDER method
</code></pre></p>
<p>the message is clear, i need a MAP or ORDER method. Ok, I can do this </p>
<p><pre><code>
create type tt_n as table of number(2);
/

Type created.

create type tt_n_ord as object(
&nbsp;&nbsp;c tt_n,
&nbsp;&nbsp;order member function 
&nbsp;&nbsp;&nbsp;&nbsp;eq (tc tt_n_ord) return integer);
/

Type created.

create type body tt_n_ord as
&nbsp;&nbsp;order member function 
&nbsp;&nbsp;&nbsp;&nbsp;eq (tc tt_n_ord) return integer
&nbsp;&nbsp;is
&nbsp;&nbsp;begin 
&nbsp;&nbsp;&nbsp;&nbsp;if c=tc.c 
&nbsp;&nbsp;&nbsp;&nbsp;then return 0; 
&nbsp;&nbsp;&nbsp;&nbsp;else return 1; 
&nbsp;&nbsp;&nbsp;&nbsp;end if;
&nbsp;&nbsp;end;
end;
/

Type body created.

select distinct 
&nbsp;&nbsp;tt_n_ord(cast(collect(distinct deptno) as tt_n))
from emp group by job;

TT_N_ORD(CAST(COLLECT(DISTINCTDEPTNO)ASTT_N))(C)
------------------------------------------------
TT_N_ORD(TT_N(30))
TT_N_ORD(TT_N(10))
TT_N_ORD(TT_N(10, 20, 30))
TT_N_ORD(TT_N(20))

4 rows selected.</code></pre>
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2Fselect-distinct-collect.html';
  addthis_title  = 'select+distinct+collect';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/select-distinct-collect.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Preserve code formatting</title>
		<link>http://laurentschneider.com/wordpress/2008/05/preserve-code-formatting.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/preserve-code-formatting.html#comments</comments>
		<pubDate>Sat, 03 May 2008 06:47:07 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>blog</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/preserve-code-formatting.html</guid>
		<description><![CDATA[Hey,
This plugin seems to do exactly what I am looking for, enable users to write code in comments.
Preserve Code Formatting
Please test here and give feedback
Warning: this changed the behavior of old posts too, so I have to reformat all older posts to no longer use &#38;lt; in code  


  addthis_url    [...]]]></description>
			<content:encoded><![CDATA[<p>Hey,<br />
This plugin seems to do exactly what I am looking for, enable users to write code in comments.<br />
<a href="http://coffee2code.com/wp-plugins/preserve-code-formatting/">Preserve Code Formatting</a></p>
<p>Please test here and give feedback</p>
<p><font color="red">Warning: this changed the behavior of old posts too, so I have to reformat all older posts to no longer use &amp;lt; in code <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </font>
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2Fpreserve-code-formatting.html';
  addthis_title  = 'Preserve+code+formatting';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/preserve-code-formatting.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>10.2.0.4/Unix</title>
		<link>http://laurentschneider.com/wordpress/2008/05/10204unix.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/10204unix.html#comments</comments>
		<pubDate>Thu, 01 May 2008 14:24:35 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>oracle</category>

		<category>news</category>

		<category>dba</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/10204unix.html</guid>
		<description><![CDATA[Unix users will enjoy this : 10.2.0.4 is available on Solaris and HPUX
patchset 6810189
Still waiting for AIX&#8230;


  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2F10204unix.html';
  addthis_title  = '10.2.0.4%2FUnix';
  addthis_pub    = '';

]]></description>
			<content:encoded><![CDATA[<p>Unix users will enjoy this : 10.2.0.4 is available on Solaris and HPUX<br />
<a href="https://updates.oracle.com/ARULink/PatchDetails/handle_plat_lang_change?patch_num=6810189">patchset 6810189</a></p>
<p>Still waiting for AIX&#8230;
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2F10204unix.html';
  addthis_title  = '10.2.0.4%2FUnix';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/10204unix.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Select bottom rows</title>
		<link>http://laurentschneider.com/wordpress/2008/05/select-bottom-rows.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/05/select-bottom-rows.html#comments</comments>
		<pubDate>Thu, 01 May 2008 09:49:32 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>oracle</category>

		<category>sql</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/05/select-bottom-rows.html</guid>
		<description><![CDATA[Today I answered a question on otn regarding order by.
Let&#8217;s build a different test case.
You have a view that contain an order by. You want to retrieve the last 5 records. However you do not have access to the sort column. 
SYS@LSC01&#62; GRANT CREATE VIEW TO USER_A IDENTIFIED BY A;

Grant succeeded.

SYS@LSC01&#62; GRANT SELECT ON SCOTT.EMP [...]]]></description>
			<content:encoded><![CDATA[<p>Today I answered a question on otn regarding order by.</p>
<p>Let&#8217;s build a different test case.</p>
<p>You have a view that contain an order by. You want to retrieve the last 5 records. However you do not have access to the sort column. </p>
<p><pre><code>SYS@LSC01&gt; GRANT CREATE VIEW TO USER_A IDENTIFIED BY A;

Grant succeeded.

SYS@LSC01&gt; GRANT SELECT ON SCOTT.EMP TO USER_A WITH GRANT OPTION;

Grant succeeded.

SYS@LSC01&gt; CREATE VIEW USER_A.V AS SELECT ENAME FROM SCOTT.EMP 
ORDER BY HIREDATE;

View created.

SYS@LSC01&gt; GRANT CREATE SESSION TO USER_B IDENTIFIED BY B;

Grant succeeded.

SYS@LSC01&gt; GRANT SELECT ON USER_A.V TO USER_B;

Grant succeeded.

SYS@LSC01&gt; CONNECT USER_B/B
Connected.
USER_B@LSC01&gt; SELECT ROWNUM, ENAME FROM USER_A.V WHERE ROWNUM&lt;4;
&nbsp;&nbsp;&nbsp;&nbsp;ROWNUM ENAME
---------- ----------
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 SMITH
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 ALLEN
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 WARD
</code></pre><br />
To get top 3, that was easy <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /><br />
<pre><code>
USER_B@LSC01&gt; SELECT R, ENAME FROM
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;(SELECT ROWNUM R,ENAME
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;FROM USER_A.V
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;ORDER BY ROWNUM DESC)
&nbsp;&nbsp;5&nbsp;&nbsp;WHERE ROWNUM&lt;4 ORDER BY R;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R ENAME
---------- ----------
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12 MILLER
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13 SCOTT
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14 ADAMS
</code></pre></p>
<p>Here we have a sorted view. The OP had an external file. It could be an XML input, or any table or collection that is sorted but does not have a sort key
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F05%2Fselect-bottom-rows.html';
  addthis_title  = 'Select+bottom+rows';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/05/select-bottom-rows.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>disqus comments, part 2</title>
		<link>http://laurentschneider.com/wordpress/2008/04/disqus-comments-part-2.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/04/disqus-comments-part-2.html#comments</comments>
		<pubDate>Tue, 15 Apr 2008 06:27:52 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>blog</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/04/disqus-comments-part-2.html</guid>
		<description><![CDATA[I have decided to remove disqus comments. What I considered to be a bonus, that is CODE POSTING, appears to be worst than before, because the PRE tag does not work.
The main reason I switched back to last week behavior is that the COMMENT FEED does not work any longer. And I hate changes that [...]]]></description>
			<content:encoded><![CDATA[<p>I have decided to remove disqus comments. What I considered to be a bonus, that is CODE POSTING, appears to be worst than before, because the PRE tag does not work.</p>
<p>The main reason I switched back to last week behavior is that the COMMENT FEED does not work any longer. And I hate changes that annoy my readers. </p>
<p>I will keep looking for a comment plugins that allow posting of code</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F04%2Fdisqus-comments-part-2.html';
  addthis_title  = 'disqus+comments%2C+part+2';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/04/disqus-comments-part-2.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>alert log in xml format</title>
		<link>http://laurentschneider.com/wordpress/2008/04/alert-log-in-xml-format.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/04/alert-log-in-xml-format.html#comments</comments>
		<pubDate>Sat, 12 Apr 2008 17:11:56 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>oracle</category>

		<category>sql</category>

		<category>dba</category>

		<category>xml</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/04/alert-log-in-xml-format.html</guid>
		<description><![CDATA[The alert log is in xml format in Oracle 11g. If you want to parse the content of the file and use the XML functions to retrieve the data, you can use this way :
SQL&#62; create or replace directory alert as
&#160;&#160;2&#160;&#160;&#160;&#160;&#039;/app/oracle/diag/rdbms/lsc01/lsc01/alert&#039;;

Directory created.

SQL&#62; var c clob
SQL&#62; declare
&#160;&#160;2&#160;&#160;&#160;&#160; b bfile := bfilename(&#039;ALERT&#039;,&#039;log.xml&#039;);
&#160;&#160;3&#160;&#160;begin
&#160;&#160;4&#160;&#160;&#160;&#160; dbms_lob.open(b,dbms_lob.file_readonly);
&#160;&#160;5&#160;&#160;&#160;&#160; dbms_lob.createtemporary(:c,true);
&#160;&#160;6&#160;&#160;&#160;&#160; dbms_lob.loadfromfile(:c,b,dbms_lob.lobmaxsize);
&#160;&#160;7&#160;&#160;end;
&#160;&#160;8&#160;&#160;/

PL/SQL procedure successfully [...]]]></description>
			<content:encoded><![CDATA[<p>The alert log is in xml format in Oracle 11g. If you want to parse the content of the file and use the XML functions to retrieve the data, you can use this way :<br />
<pre><code>SQL&gt; create or replace directory alert as
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&#039;/app/oracle/diag/rdbms/lsc01/lsc01/alert&#039;;

Directory created.

SQL&gt; var c clob
SQL&gt; declare
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp; b bfile := bfilename(&#039;ALERT&#039;,&#039;log.xml&#039;);
&nbsp;&nbsp;3&nbsp;&nbsp;begin
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp; dbms_lob.open(b,dbms_lob.file_readonly);
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp; dbms_lob.createtemporary(:c,true);
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp; dbms_lob.loadfromfile(:c,b,dbms_lob.lobmaxsize);
&nbsp;&nbsp;7&nbsp;&nbsp;end;
&nbsp;&nbsp;8&nbsp;&nbsp;/

PL/SQL procedure successfully completed.

SQL&gt; select extractvalue(xmlparse(content :c),
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&#039;/msg[@time=&quot;2008-03-30T01:01:13.704+01:00&quot;]/txt/text()&#039;)
&nbsp;&nbsp;3&nbsp;&nbsp;from dual;
EXTRACTVALUE(XMLPARSE(CONTENT:C),&#039;/MSG[@TIME=&quot;2008-03-30T01:01:1
----------------------------------------------------------------

Starting ORACLE instance (normal)
</code></pre>
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F04%2Falert-log-in-xml-format.html';
  addthis_title  = 'alert+log+in+xml+format';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/04/alert-log-in-xml-format.html/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Disqus comments</title>
		<link>http://laurentschneider.com/wordpress/2008/04/disqus-comments.html</link>
		<comments>http://laurentschneider.com/wordpress/2008/04/disqus-comments.html#comments</comments>
		<pubDate>Fri, 11 Apr 2008 08:47:11 +0000</pubDate>
		<dc:creator>Laurent Schneider</dc:creator>
		
		<category>blog</category>

		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2008/04/disqus-comments.html</guid>
		<description><![CDATA[I just replaced the default wordpress comments by Disqus comments. Disqus enable you to track your comments add picture and other fancy staff. 
I have been looking for such a plugin for a very long time (and was too foul to develop it myself).
The amazing bonus with Disqus is that you can post code! Your [...]]]></description>
			<content:encoded><![CDATA[<p>I just replaced the default wordpress comments by Disqus comments. Disqus enable you to track your comments add picture and other fancy staff. </p>
<p>I have been looking for such a plugin for a very long time (and was too foul to develop it myself).</p>
<p>The amazing bonus with Disqus is that you can post code! Your x&lt;1 will be code in code, not a pseudo html tag annoying more than one of my fellow reader.</p>
<p>Feel free to test it on this post.</p>
<p>Thanks to Yas for making me discover this on : <a href="http://oracletoday.blogspot.com">Oracle Today</a></p>
<p>I hope I will not have have to many issues with this new plugin! Feedback welcome
</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F04%2Fdisqus-comments.html';
  addthis_title  = 'Disqus+comments';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://laurentschneider.com/wordpress/2008/04/disqus-comments.html/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
