<?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>remidian.com &#187; 10g</title>
	<atom:link href="http://remidian.com/category/oracle/new-features/10g/feed" rel="self" type="application/rss+xml" />
	<link>http://remidian.com</link>
	<description>Braindumps of Remi Visser, freelance Oracle DBA.</description>
	<lastBuildDate>Mon, 10 May 2010 12:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Oracle Advisor &#8211; DBMS_ADVISOR</title>
		<link>http://remidian.com/oracle/new-features/10g/oracle-advisor-dbms_advisor.html</link>
		<comments>http://remidian.com/oracle/new-features/10g/oracle-advisor-dbms_advisor.html#comments</comments>
		<pubDate>Wed, 05 Sep 2007 13:53:42 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[10g]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/new-features/10g/oracle-advisor-dbms_advisor.html</guid>
		<description><![CDATA[Some ADDM dumps. Remove all advisory reports (ADM). [REMI@DB01.REMIDIAN.COM] SQL&#62; select &#039;exec dbms_advisor.delete_task(&#039;&#039;&#039; &#124;&#124; TASK_NAME &#124;&#124; &#039;&#039;&#039; )&#039; from dba_advisor_tasks; &#160; &#039;EXECDBMS_ADVISOR.DELETE_TASK(&#039;&#039;&#039;&#124;&#124;TASK_NAME&#124;&#124;&#039;&#039;&#039;)&#039; &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- exec dbms_advisor.delete_task(&#039;SYS_AUTO_SPCADV_1300592007&#039; ) exec dbms_advisor.delete_task(&#039;SYS_AUTO_SPCADV_2700592007&#039; ) exec dbms_advisor.delete_task(&#039;SYS_AUTO_SPCADV_2220592007&#039; ) exec dbms_advisor.delete_task(&#039;ADDM:1488676071_1_33108&#039; ) exec dbms_advisor.delete_task(&#039;ADDM:1488676071_1_33113&#039; ) &#160; [REMI@DB01.REMIDIAN.COM] SQL&#62;]]></description>
			<content:encoded><![CDATA[<p>Some ADDM dumps.<span id="more-59"></span></p>
<h3>
Remove all advisory reports (ADM).<br />
</h3>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select &#039;exec dbms_advisor.delete_task(&#039;&#039;&#039; || TASK_NAME || &#039;&#039;&#039; )&#039; from dba_advisor_tasks;
&nbsp;
&#039;EXECDBMS_ADVISOR.DELETE_TASK(&#039;&#039;&#039;||TASK_NAME||&#039;&#039;&#039;)&#039;
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
exec dbms_advisor.delete_task(&#039;SYS_AUTO_SPCADV_1300592007&#039; )
exec dbms_advisor.delete_task(&#039;SYS_AUTO_SPCADV_2700592007&#039; )
exec dbms_advisor.delete_task(&#039;SYS_AUTO_SPCADV_2220592007&#039; )
exec dbms_advisor.delete_task(&#039;ADDM:1488676071_1_33108&#039; )
exec dbms_advisor.delete_task(&#039;ADDM:1488676071_1_33113&#039; )
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/new-features/10g/oracle-advisor-dbms_advisor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new explain plan options (dbms_xplan)</title>
		<link>http://remidian.com/oracle/new-features/10g/new-explain-plan-options.html</link>
		<comments>http://remidian.com/oracle/new-features/10g/new-explain-plan-options.html#comments</comments>
		<pubDate>Tue, 14 Aug 2007 15:32:52 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[10g]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/new-features/10g/new-explain-plan-options.html</guid>
		<description><![CDATA[I still need to upgrade to 10g &#8230; I still tend to use this old fashioned &#8216;set autot trace exp&#8217; [REMI@DB01.REMIDIAN.COM] SQL&#62; set autotrace trace exp [REMI@DB01.REMIDIAN.COM] SQL&#62; select * from dual; &#160; Execution Plan &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#160;&#160; 0&#160;&#160;&#160;&#160;&#160;&#160;SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=2) &#160;&#160; 1&#160;&#160;&#160;&#160;0&#160;&#160; TABLE ACCESS (FULL) OF &#039;DUAL&#039; (TABLE) (Cost=2 Card=1 Bytes &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;=2) [...]]]></description>
			<content:encoded><![CDATA[<p>
I still need to upgrade to 10g &#8230; <span id="more-46"></span>
</p>
<h6>I still tend to use this old fashioned &#8216;set autot trace exp&#8217;</h6>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; set autotrace trace exp
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select * from dual;
&nbsp;
Execution Plan
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=2)
&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp; TABLE ACCESS (FULL) OF &#039;DUAL&#039; (TABLE) (Cost=2 Card=1 Bytes
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=2)
&nbsp;
</pre>
<h6>While in 10g the explain plan is pretty awseome &#8211; dbms_xplan package</h6>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; explain plan for select * from dual;
&nbsp;
Explained.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select * from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
Plan hash value: 3543395131
&nbsp;
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
| Id&nbsp;&nbsp;| Operation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Name | Rows&nbsp;&nbsp;| Bytes | Cost (%CPU)| Time&nbsp;&nbsp;&nbsp;&nbsp; |
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
|&nbsp;&nbsp; 0 | SELECT STATEMENT&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; (0)| 00:00:01 |
|&nbsp;&nbsp; 1 |&nbsp;&nbsp;TABLE ACCESS FULL| DUAL |&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; (0)| 00:00:01 |
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
&nbsp;
8 rows selected.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/new-features/10g/new-explain-plan-options.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Invalidated synonyms</title>
		<link>http://remidian.com/oracle/new-features/10g/invalidated-synonyms.html</link>
		<comments>http://remidian.com/oracle/new-features/10g/invalidated-synonyms.html#comments</comments>
		<pubDate>Wed, 30 Aug 2006 20:33:38 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[10g]]></category>

		<guid isPermaLink="false">http://remidian.com/uncategorized/invalidated-synonyms.html</guid>
		<description><![CDATA[In Oracle 10G synonyms are marked invalid when you perform DDL on the referenced object. Luckily the synonym is marked valid again when you simply touch the invalidated synonym. The status of the synonym becomes valid again and the DBA_OBJECTS.LAST_DDL_TIME and DBA_OBJECTS.TIMESTAMP columns reflect the time the synonym was validated again. Listing below shows an [...]]]></description>
			<content:encoded><![CDATA[<p>
In Oracle 10G synonyms are marked invalid when you perform DDL on the referenced object.<span id="more-19"></span> Luckily the synonym is marked valid again when you simply touch the invalidated synonym. The status of the synonym becomes valid again and the DBA_OBJECTS.LAST_DDL_TIME and DBA_OBJECTS.TIMESTAMP columns reflect the time the synonym was validated again. Listing below shows an example for a <code>create or replace</code> of a view with an associated synonym.
</p>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; create view v_demo as select * from dual;
&nbsp;
View created.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; create synonym s_demo for remi.v_demo;
&nbsp;
Synonym created.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select object_name, object_type, status
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;from all_objects
&nbsp;&nbsp;3&nbsp;&nbsp; where object_name in (&#039;V_DEMO&#039;, &#039;S_DEMO&#039;);
OBJECT_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OBJECT_TYPE&nbsp;&nbsp;&nbsp;&nbsp;STATUS
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
S_DEMO&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; SYNONYM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALID
V_DEMO&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; VIEW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VALID
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; create or replace view v_demo as select * from dual;
&nbsp;
View created.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select object_name,
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object_type,
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status,
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_char( last_ddl_time, &#039;yyyy-mm-dd:hh24:mi:ss&#039;) last_ddl_time,
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timestamp
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;from all_objects
&nbsp;&nbsp;7&nbsp;&nbsp; where object_name in (&#039;V_DEMO&#039;, &#039;S_DEMO&#039;);
OBJECT_NAME&nbsp;&nbsp;OBJECT_TYPE&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LAST_DDL_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIMESTAMP
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
<strong>S_DEMO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYNONYM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VALID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2006-08-30:22:09:30 2006-08-30:22:09:30</strong>
V_DEMO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VIEW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2006-08-30:22:09:30 2006-08-30:22:09:30
</pre>
<p>
Now &#8216;touch&#8217; the synonym, oracle compiles the synonym and marks it valid again. (You will recieve no error.)
</p>
<pre>
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select * from s_demo where 1 = 2 ;
&nbsp;
no rows selected
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select object_name,
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object_type,
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status,
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_char( last_ddl_time, &#039;yyyy-mm-dd:hh24:mi:ss&#039;) last_ddl_time,
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timestamp
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;from all_objects
&nbsp;&nbsp;7&nbsp;&nbsp; where object_name in (&#039;V_DEMO&#039;, &#039;S_DEMO&#039;);
OBJECT_NAME&nbsp;&nbsp;OBJECT_TYPE&nbsp;&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LAST_DDL_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIMESTAMP
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
<strong>S_DEMO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYNONYM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INVALID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2006-08-30:22:09:35 2006-08-30:22:09:35</strong>
V_DEMO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VIEW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2006-08-30:22:09:30 2006-08-30:22:09:30
&nbsp;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/new-features/10g/invalidated-synonyms.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>overcome SP2-0734 when using purge command</title>
		<link>http://remidian.com/oracle/new-features/10g/overcome-sp2-0734-when-using-purge-command.html</link>
		<comments>http://remidian.com/oracle/new-features/10g/overcome-sp2-0734-when-using-purge-command.html#comments</comments>
		<pubDate>Wed, 30 Aug 2006 20:08:07 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[10g]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/new-features/10g/overcome-sp2-0734-when-using-purge-command.html</guid>
		<description><![CDATA[Issue new Oracle 10G &#8216;purge&#8216; command results in &#8216;SP2-0734: unknown command beginning &#8220;purge user&#8230;&#8221; &#8211; rest of line ignored.&#8217; Purge Command in pre 10G SQL*Plus release Whenever you want to issue the &#8216;purge&#8217; command in any pre 10G SQL*Plus client you will notice that SQL*Plus denies to send your command to the server and it [...]]]></description>
			<content:encoded><![CDATA[<p>Issue new Oracle 10G &#8216;<code>purge</code>&#8216; command results in &#8216;SP2-0734: unknown command beginning &#8220;purge user&#8230;&#8221; &#8211; rest of line ignored.&#8217;<span id="more-18"></span></p>
<h3>Purge Command in pre 10G SQL*Plus release</h3>
<p>
Whenever you want to issue the &#8216;purge&#8217; command in any pre 10G SQL*Plus client you will notice that SQL*Plus denies to send your command to the server and it will raise an &#8216;SP2-0734&#8242; error. You can easiliy overcome this by making use of dynamic sql (or just upgrade your client of course).
</p>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; create table demo(k int);
&nbsp;
Table created.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; drop table demo;
&nbsp;
Table dropped.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select * from cat;
TABLE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TABLE_TYPE
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
BIN$HE/mKBNyRajgRAADuhSWrA==$0 TABLE
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; 
[REMI@DB01.REMIDIAN.COM]
SQL&gt; drop table &quot;BIN$HE/mKBNyRajgRAADuhSWrA==$0&quot;;
drop table &quot;BIN$HE/mKBNyRajgRAADuhSWrA==$0&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *
ERROR at line 1:
ORA-38301: can not perform DDL/DML over objects in Recycle Bin
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; <strong>purge user_recyclebin;
SP2-0734: unknown command beginning &quot;purge user&#46;..&quot; - rest of line ignored.</strong>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; prompt &amp;_SQLPLUS_RELEASE
902000700
</pre>
<p>
Solution is beautiful in it&#8217;s simplicity, use dynamic sql and off you go.
</p>
<h6>Purge recycle bin with a pre 10G SQL*Plus client</h6>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; begin 
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;execute immediate &#039;purge user_recyclebin&#039;;
&nbsp;&nbsp;3&nbsp;&nbsp;end;
&nbsp;&nbsp;4&nbsp;&nbsp;/
&nbsp;
PL/SQL procedure successfully completed.
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt; select * from cat;
&nbsp;
no rows selected
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/new-features/10g/overcome-sp2-0734-when-using-purge-command.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automatic Workload Repository</title>
		<link>http://remidian.com/oracle/new-features/10g/automatic-workload-repository.html</link>
		<comments>http://remidian.com/oracle/new-features/10g/automatic-workload-repository.html#comments</comments>
		<pubDate>Sun, 02 Jul 2006 17:58:13 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[10g]]></category>

		<guid isPermaLink="false">http://remidian.com/uncategorized/automatic-workload-repository.html</guid>
		<description><![CDATA[A very short howto for the &#8216;Automatic Workload Repository&#8217;, the successor of perfstat. Interval Some queries; Listing below shows one snapshot is taken every 20 minutes, the snapshot is stored for a week (7 days). [SYSTEM@DB01.REMIDIAN.COM] SQL&#62; select snap_interval, retention &#160;&#160;2&#160;&#160;from&#160;&#160; dba_hist_wr_control &#160;&#160;3&#160;&#160;/ &#160; SNAP_INTERVAL&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;RETENTION &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- +00000 00:20:00.0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;+00007 00:00:00.0 Alter the interval to once [...]]]></description>
			<content:encoded><![CDATA[<p>
A very short howto for the &#8216;Automatic Workload Repository&#8217;, the successor of perfstat. <span id="more-4"></span>
</p>
<h3>Interval</h3>
<p>
Some queries;
</p>
<p>
Listing below shows one snapshot is taken every 20 minutes, the snapshot is stored for a week (7 days).
</p>
<pre>
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; select snap_interval, retention
&nbsp;&nbsp;2&nbsp;&nbsp;from&nbsp;&nbsp; dba_hist_wr_control
&nbsp;&nbsp;3&nbsp;&nbsp;/
&nbsp;
SNAP_INTERVAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RETENTION
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
+00000 00:20:00.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+00007 00:00:00.0
</pre>
<p>
Alter the interval to once every hour and store it for a month (31 days);
</p>
<pre>
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; begin
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp; dbms_workload_repository.modify_snapshot_settings
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( interval&nbsp;&nbsp; =&gt; 60
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;, retention&nbsp;&nbsp;=&gt; 31 * 24 * 60);
&nbsp;&nbsp;5&nbsp;&nbsp;end;
&nbsp;&nbsp;6&nbsp;&nbsp;/
&nbsp;
PL/SQL procedure successfully completed.
&nbsp;
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; select snap_interval, retention
&nbsp;&nbsp;2&nbsp;&nbsp;from&nbsp;&nbsp; dba_hist_wr_control
&nbsp;&nbsp;3&nbsp;&nbsp;/
&nbsp;
SNAP_INTERVAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RETENTION
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
+00000 01:00:00.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+00031 00:00:00.0
&nbsp;
</pre>
<h3>History</h3>
<p>
Five latest snapshots
</p>
<pre>
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; select *
&nbsp;&nbsp;2&nbsp;&nbsp;from&nbsp;&nbsp; (
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select snap_id, startup_time, begin_interval_time, end_interval_time
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; dba_hist_snapshot
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order by snap_id
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )
&nbsp;&nbsp;7&nbsp;&nbsp;where rownum &lt; 6
&nbsp;&nbsp;8&nbsp;&nbsp;/
&nbsp;
&nbsp;&nbsp; SNAP_ID STARTUP_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEGIN_INTERVAL_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_INTERVAL_TIME
&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23 30-JUN-06 05.59.11.000 PM 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.02.04.711 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.02.04.711 PM 30-JUN-06 07.00.29.599 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25 30-JUN-06 05.59.11.000 PM 30-JUN-06 07.00.29.599 PM 30-JUN-06 08.00.33.577 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;26 30-JUN-06 05.59.11.000 PM 30-JUN-06 08.00.33.577 PM 30-JUN-06 09.00.39.837 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;27 30-JUN-06 05.59.11.000 PM 30-JUN-06 09.00.39.837 PM <strong>30-JUN-06 10.00.38.742 PM</strong>
&nbsp;
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; exec dbms_workload_repository.create_snapshot;
&nbsp;
PL/SQL procedure successfully completed.
&nbsp;
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; select *
&nbsp;&nbsp;2&nbsp;&nbsp;from&nbsp;&nbsp; (
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select snap_id, startup_time, begin_interval_time, end_interval_time
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; dba_hist_snapshot
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order by snap_id
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )
&nbsp;&nbsp;7&nbsp;&nbsp;where rownum &lt; 6
&nbsp;&nbsp;8&nbsp;&nbsp;/
&nbsp;
&nbsp;&nbsp; SNAP_ID STARTUP_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEGIN_INTERVAL_TIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_INTERVAL_TIME
&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23 30-JUN-06 05.59.11.000 PM 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.02.04.711 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.02.04.711 PM 30-JUN-06 07.00.29.599 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25 30-JUN-06 05.59.11.000 PM 30-JUN-06 07.00.29.599 PM 30-JUN-06 08.00.33.577 PM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;26 30-JUN-06 05.59.11.000 PM 30-JUN-06 08.00.33.577 PM 30-JUN-06 09.00.39.837 PM
<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;27 30-JUN-06 05.59.11.000 PM 30-JUN-06 09.00.39.837 PM 30-JUN-06 10.00.38.742 PM</strong>
&nbsp;
</pre>
<p>@see</p>
<ul class="oradoc">
<li>
<a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/autostat.htm#i27008">Database Performance Tuning Guide &#8211; 5 Automatic Performance Statistics</a>
</li>
<li><a href="http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_wkrpos.htm#i1003494">Database PL/SQL Packages and Types Reference &#8211; DBMS_WORKLOAD_REPOSITORY</a>
</li>
</ul>
<ul class="links">
<li><a href="http://www.oracle.com/technology/pub/articles/10gdba/week6_10gdba.html">http://www.oracle.com/technology/pub/articles/10gdba/week6_10gdba.html</a>
</li>
<li><a href="http://www.oracle-base.com/articles/10g/AutomaticWorkloadRepository10g.php">http://www.oracle-base.com/articles/10g/AutomaticWorkloadRepository10g.php</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/new-features/10g/automatic-workload-repository.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
