<?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; oracle</title>
	<atom:link href="http://remidian.com/category/oracle/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>Purging SYSAUX tablespace (Purging AWR reports)</title>
		<link>http://remidian.com/oracle/purging-sysaux-tablespace-purging-awr-reports.html</link>
		<comments>http://remidian.com/oracle/purging-sysaux-tablespace-purging-awr-reports.html#comments</comments>
		<pubDate>Tue, 18 Aug 2009 10:52:10 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[Grid]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://remidian.com/?p=265</guid>
		<description><![CDATA[Dump below is of a session clearing the sysaux tablespace. It turned out that something went wrong with the automatic AWR gathering/purging and the sysaux tablespace became very large. Thanks to this blog I found script below wich displays the various sysaux components and their sizes. SQL&#62; col &#34;Space (M)&#34; for 999,999.99&#160;&#160; SQL&#62; SQL&#62; SELECT [...]]]></description>
			<content:encoded><![CDATA[<p>
Dump below is of a session clearing the sysaux tablespace. <span id="more-265"></span>It turned out that something went wrong with the automatic AWR gathering/purging and the sysaux tablespace became very large.
</p>
<p>
Thanks to <a href="http://jhdba.wordpress.com/2009/05/19/purging-statistics-from-the-sysaux-tablespace/">this blog</a> I found script below wich displays the various sysaux components and their sizes.
</p>
<pre>
SQL&gt; col &quot;Space (M)&quot; for 999,999.99&nbsp;&nbsp;
SQL&gt; 
SQL&gt; SELECT 
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;occupant_name,&nbsp;&nbsp;
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;round( space_usage_kbytes/1024) &quot;Space (M)&quot;,&nbsp;&nbsp;
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;schema_name, 
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;move_procedure
&nbsp;&nbsp;6&nbsp;&nbsp;FROM 
&nbsp;&nbsp;7&nbsp;&nbsp;&nbsp;&nbsp;v$sysaux_occupants&nbsp;&nbsp;
&nbsp;&nbsp;8&nbsp;&nbsp;ORDER BY 
&nbsp;&nbsp;9&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;
 10&nbsp;&nbsp;/
OCCUPANT_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Space (M) SCHEMA_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MOVE_PROCEDURE
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
AO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_AMD.Move_OLAP_Catalog
XSOQHIST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.00 SYS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_XSOQ.OlapiMoveProc
&nbsp;
22 rows selected.
&nbsp;
SQL&gt;&nbsp;&nbsp; 
SQL&gt; 
</pre>
<p>
Next thing I retrieve the oldest and latest AWR snapshot, turns out to be 2007&#8230;
</p>
<pre>
SQL&gt; SELECT 
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;snap_id, begin_interval_time, end_interval_time 
&nbsp;&nbsp;3&nbsp;&nbsp;FROM 
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;SYS.WRM$_SNAPSHOT 
&nbsp;&nbsp;5&nbsp;&nbsp;WHERE 
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;snap_id = ( SELECT MIN (snap_id) FROM SYS.WRM$_SNAPSHOT)
&nbsp;&nbsp;7&nbsp;&nbsp;UNION 
&nbsp;&nbsp;8&nbsp;&nbsp;SELECT 
&nbsp;&nbsp;9&nbsp;&nbsp;&nbsp;&nbsp;snap_id, begin_interval_time, end_interval_time 
 10&nbsp;&nbsp;FROM 
 11&nbsp;&nbsp;&nbsp;&nbsp;SYS.WRM$_SNAPSHOT 
 12&nbsp;&nbsp;WHERE 
 13&nbsp;&nbsp;&nbsp;&nbsp;snap_id = ( SELECT MAX (snap_id) FROM SYS.WRM$_SNAPSHOT)
 14&nbsp;&nbsp;/
&nbsp;&nbsp; SNAP_ID BEGIN_INTERVAL_TIME&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;-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7556 <strong>15-09-07 08:44:42,810</strong> 15-09-07 11:01:11,950
&nbsp;&nbsp;&nbsp;&nbsp; 23698 18-08-09 11:00:41,612 18-08-09 12:00:53,074
&nbsp;
</pre>
<p>
<em><br />
I prefer SYS.WRM$_SNAPSHOT instead of DBA_HIST_SNAPSHOT because I saw strange results in (Release 10.1.0.5).<br />
</em><br />
Now use the dbms_workload_repository package to remove the AWR snapshots.
</p>
<pre>
BEGIN&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;dbms_workload_repository.drop_snapshot_range(low_snap_id =&gt; 7556, high_snap_id=&gt;15000);&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; 
END;
/
</pre>
<h3>Speed up &#8216;removal&#8217; of old AWR reports</h3>
<p>
@#$%^&#038;*()_ removing the entries takes ages and fails on undo errors &#8230; Metalink note Doc ID: 852028.1 states that I can safely remove the AWR metadata tables and recreate them.
</p>
<blockquote><p>
If none of the above suits as everything is set proper then consider clean up and rebuild AWR repository to clear all the space.
</p></blockquote>
<pre>
SQL&gt; connect / as sysdba 
SQL&gt; @?/rdbms/admin/catnoawr.sql 
SQL&gt; @?/rdbms/admin/catawrtb.sql 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/purging-sysaux-tablespace-purging-awr-reports.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Manually triggering Metric Collection (clearing -tablespace- Alerts)</title>
		<link>http://remidian.com/oracle/grid/manually-triggering-metric-collection-clearing-alerts.html</link>
		<comments>http://remidian.com/oracle/grid/manually-triggering-metric-collection-clearing-alerts.html#comments</comments>
		<pubDate>Tue, 19 Feb 2008 09:28:50 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[Grid]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/grid/manually-triggering-metric-collection-clearing-alerts.html</guid>
		<description><![CDATA[Manually triggering metric collection in Oracle Enterprise Manager (GRID control) Here&#8217;s the scenario: You have an Alert that your tablespace is &#8216;full&#8217;, You enlarge the tablespace, The &#8216;Tablespace Full Alert&#8217; is still in your dashbord for the next 24 (x) hours since you&#8217;ve configured this metric to be collected once every 24 (x) hours, You [...]]]></description>
			<content:encoded><![CDATA[<p>Manually triggering metric collection in Oracle Enterprise Manager (GRID control)</p>
<p><span id="more-72"></span></p>
<p>
Here&#8217;s the scenario:
</p>
<ol>
<li>You have an Alert that your tablespace is &#8216;full&#8217;,</li>
<li>You enlarge the tablespace,</li>
<li>The &#8216;Tablespace Full Alert&#8217; is still in your dashbord for the next 24 (x) hours since you&#8217;ve configured this metric to be collected once every 24 (x) hours,</li>
<li>You <strong>want</strong> however to &#8216;remove&#8217; (clear) this Alert. In order to achive this you will have to to re-evaluate this metric collection &#8230;</li>
</ol>
<p>
Here is how you do it (for anything storage related on your database server):
</p>
<pre>
$ emctl control agent runCollection &lt;hostname&gt;:host host_storage
</pre>
<p>
See the Oracle docs, <a href="http://download.oracle.com/docs/cd/B19306_01/em.102/b40002/emctl.htm#sthref202<br />
">2.7.6 Reevaluating Metric Collections</a>. It shows you how to retrieve the correct <em>collection</em> name for any <em>metric</em>.
</p>
<p>
You will find yourself <code>grep</code>-ing through &#8216;$ORACLE_HOME/sysman/admin/metadata/*xml&#8217; and &#8216;$ORACLE_HOME/sysman/admin/default_collection/*xml&#8217; &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/grid/manually-triggering-metric-collection-clearing-alerts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase idle time for OMS frontend sessions</title>
		<link>http://remidian.com/oracle/grid/increase-idle-time-for-oms-frontend-and-some-more-configuration-directives.html</link>
		<comments>http://remidian.com/oracle/grid/increase-idle-time-for-oms-frontend-and-some-more-configuration-directives.html#comments</comments>
		<pubDate>Mon, 28 Jan 2008 11:43:01 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[Grid]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/grid/increase-idle-time-for-oms-frontend-and-some-more-configuration-directives.html</guid>
		<description><![CDATA[Some additional configuration directives. To increase the idle time for the OMS frontend sessions edit the &#8216;oracle.sysman.eml.maxInactiveTime&#8217; configuration parameter your Oracle Management Server&#8217;s emoms.properties file. The parameter value unit is in minutes and the default is 15 minutes which is a bit short I suppose. I have set it to 4 hours as you can [...]]]></description>
			<content:encoded><![CDATA[<p>Some additional configuration directives.<span id="more-70"></span></p>
<p>
To increase the idle time for the OMS frontend sessions edit the &#8216;oracle.sysman.eml.maxInactiveTime&#8217; configuration parameter your Oracle Management Server&#8217;s emoms.properties file. The parameter value unit is in minutes and the default is 15 minutes which is a bit short I suppose. I have set it to 4 hours as you can see in the example below.
</p>
<pre>
$ cat $ORACLE_HOME/sysman/config/emoms.properties | grep maxInactiveTime
oracle.sysman.eml.maxInactiveTime=240
$
&nbsp;
</pre>
<p>
For more info see the &#8216;<a href="http://download.oracle.com/docs/cd/B19306_01/em.102/b40002/addnl_tasks.htm#sthref1347">Enterprise Manager Advanced Configuration</a>&#8216; book </p>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/grid/increase-idle-time-for-oms-frontend-and-some-more-configuration-directives.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch SQL statements in parallel (multiple) sessions</title>
		<link>http://remidian.com/oracle/dba-util/batch-sql-in-parallel.html</link>
		<comments>http://remidian.com/oracle/dba-util/batch-sql-in-parallel.html#comments</comments>
		<pubDate>Fri, 18 Jan 2008 17:39:58 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[DBA util]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/dba-util/batch-sql-in-parallel.html</guid>
		<description><![CDATA[So it was decided &#8216;this batch&#8217; had to be done &#8216;this weekend&#8217;. Thousands of SQL statements some of them would take minutes others hours&#8230; And MAKE SURE it&#8217;s finished monday. I hate babysitting multiple sessions having to create multiple SQL Scripts to spread the workload (it&#8217;s on a 20+ CPUS&#8217;s database server) So I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>So it was decided &#8216;this batch&#8217; had to be done &#8216;this weekend&#8217;. Thousands of SQL statements some of them would take minutes others hours&#8230; And MAKE SURE it&#8217;s finished monday.<span id="more-68"></span>
<p>
I hate babysitting <em>multiple</em> sessions having to create <em>multiple</em> SQL Scripts to spread the workload (it&#8217;s on a 20+ CPUS&#8217;s database server) So I wrote this PL/SQL &#8216;application&#8217; in a hurry to enable starting multiple databases sessions in <code>nohup</code>, each session picks up the next SQL statement &#8216;available&#8217; (WHERE endtime IS NULL). It will save me some sleep.
</p>
<h3>Setup</h3>
<h6>The table holding my SQL statements</h6>
<pre>
CREATE TABLE batchsql
 ( batchid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(64)&nbsp;&nbsp;&nbsp;&nbsp;NOT NULL
 , sqlid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTEGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOT NULL UNIQUE
 , sqltext&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;varchar2(4000)&nbsp;&nbsp;NOT NULL
 , starttime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATE
 , endtime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATE
 , sqlcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTEGER
 , sqlerrm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(256)
 , error_stack&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(4000)
 , error_backtrace&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(4000)
 );
</pre>
<p><em>would be nicer to make the &#8216;sqlid&#8217; column a compisone unique key with the batchid (harmless off course).</em></p>
<h6>The anonymous PL/SQL block that will loop and execute these statements</h6>
<pre>
DECLARE
&nbsp;&nbsp;v_batchid&nbsp;&nbsp;batchsql.batchid%TYPE;
&nbsp;&nbsp;i_sqlid&nbsp;&nbsp;&nbsp;&nbsp;batchsql.sqlid%TYPE;
&nbsp;&nbsp;v_sqltext&nbsp;&nbsp;batchsql.sqltext%TYPE;
&nbsp;
&nbsp;&nbsp;i_sqlcode&nbsp;&nbsp;PLS_INTEGER;
&nbsp;&nbsp;v_sqlerrm&nbsp;&nbsp;VARCHAR2(256);
&nbsp;
&nbsp;&nbsp;i&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PLS_INTEGER;
&nbsp;
BEGIN
&nbsp;
<strong>&nbsp;&nbsp;v_batchid := &#039;DB01_ANALYZE_20080118&#039;;</strong>
&nbsp;&nbsp;i&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := 0;
&nbsp;
&nbsp;&nbsp;LOOP
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&#45;- get statement that nobody is working on
&nbsp;&nbsp;&nbsp;&nbsp;SELECT sqlid,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqltext
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTO i_sqlid,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v_sqltext
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM batchsql
&nbsp;&nbsp;&nbsp;&nbsp; WHERE batchid = v_batchid
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND starttime IS NULL
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND rownum = 1;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;i := i +1;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&#45;- open new block for &#039;sqltext&#039; statement
&nbsp;&nbsp;&nbsp;&nbsp;BEGIN
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- first set the starttime, (lock statement) to make sure 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- no other session will pick up the same statement
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UPDATE batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET starttime = SYSDATE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE sqlid = i_sqlid;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COMMIT;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- execute the statement
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXECUTE IMMEDIATE v_sqltext;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- everything went well, register endtime and commit
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UPDATE batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET endtime = SYSDATE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE sqlid = i_sqlid;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COMMIT;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;EXCEPTION
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHEN OTHERS THEN
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- error occured, register endtime and errors
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i_sqlcode := SQLCODE;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v_sqlerrm := SQLERRM;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UPDATE batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET endtime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= SYSDATE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , sqlcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= i_sqlcode
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , sqlerrm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= v_sqlerrm
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , error_stack&nbsp;&nbsp;= DBMS_UTILITY.FORMAT_ERROR_STACK()
&#45;- Uncomment &#039;FORMAT_ERROR_BACKTRACE()&#039; for pre 10G
&#45;- , error_backtrace = DBMS_UTILITY.FORMAT_ERROR_BACKTRACE()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE sqlid = i_sqlid;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;COMMIT;
&nbsp;&nbsp;&nbsp;&nbsp;END;
&nbsp;
&nbsp;&nbsp;END LOOP;
&nbsp;
EXCEPTION
&nbsp;&nbsp;WHEN NO_DATA_FOUND THEN
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;IF i = 0 THEN
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_OUTPUT.PUT_LINE ( &#039;No SQL Statements found for batch &#039;&#039;&#039; || v_batchid || &#039;&#039;&#039;&#039;);
&nbsp;&nbsp;&nbsp;&nbsp;ELSE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_OUTPUT.PUT_LINE ( &#039;Carried out &#039; || TO_CHAR(i) || &#039; SQL statements&#039;);
&nbsp;&nbsp;&nbsp;&nbsp;END IF;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;DBMS_OUTPUT.PUT_LINE ( &#039;Time is &#039;&#039;&#039; || to_CHAR(SYSDATE, &#039;DD-MON-YY hh24:mi:ss&#039;) || &#039;&#039;&#039;&#039;);
&nbsp;
END;
/
&nbsp;
</pre>
<h3>Example</h3>
<p>
Suppose I have to analyze a bunch of tables, I will first have to fill my &#8216;batchsql&#8217; table with all the SQL Statements that belong to this batch, I identify the batch to &#8216;DB01_ANALYZE_20080118&#8242;.
</p>
<h6>Generate some SQL statements and insert them in the batchsql table</h6>
<pre>
SQL&gt; DEFINE BATCHID&nbsp;&nbsp;= &quot;&#039;&#039;DB01_ANALYZE_20080118&#039;&#039;&quot;
SQL&gt; DEFINE QUOTE&nbsp;&nbsp;&nbsp;&nbsp;= &quot;&#039;&#039;&quot;
SQL&gt; SELECT &#039;INSERT INTO batchsql 
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( batchid, sqlid, sqltext)
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUES
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( &amp;BATCHID,&#039; || ROWNUM || &#039;, &amp;QUOTE.ANALYZE TABLE &#039; || table_name || &#039; COMPUTE STATISTICS&amp;QUOTE);&#039;
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp; FROM user_tables
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;WHERE rownum &lt; 5
&nbsp;&nbsp;7&nbsp;&nbsp;/
&#039;INSERTINTOBATCHSQL(BATCHID,SQLID,SQLTEXT)VALUES(&#039;&#039;DB01_ANALYZE_20080118&#039;&#039;,&#039;||ROWNUM||&#039;,&#039;&#039;ANALYZETABLE&#039;||TABLE_
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
INSERT INTO batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( batchid, sqlid, sqltext)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUES
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( &#039;DB01_ANALYZE_20080118&#039;,1, &#039;ANALYZE TABLE BATCHSQL COMPUTE STATISTICS&#039;);
&nbsp;
INSERT INTO batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( batchid, sqlid, sqltext)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUES
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( &#039;DB01_ANALYZE_20080118&#039;,2, &#039;ANALYZE TABLE DEMO COMPUTE STATISTICS&#039;);
&nbsp;
SQL&gt; 
</pre>
<p>
Do test the error handling I insert one bogus statement that will generate an error.
</p>
<pre>
SQL&gt; INSERT INTO batchsql
&nbsp;&nbsp;2&nbsp;&nbsp; ( batchid, sqlid, sqltext)
&nbsp;&nbsp;3&nbsp;&nbsp; VALUES
&nbsp;&nbsp;4&nbsp;&nbsp; ( &#039;DB01_ANALYZE_20080118&#039;, 5, &#039;HELLO WORLD!&#039;);
&nbsp;
1 row created.
&nbsp;
SQL&gt; 
SQL&gt; 
</pre>
<p>
Now look at the contents of the batchsql table, we see three statements for the &#8216;DB01_ANALYZE_20080118&#8242; batch.
</p>
<pre>
SQL&gt; select batchid, sqlid, sqltext, starttime, endtime, sqlcode, sqlerrm from batchsql;
BATCHID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQLID SQLTEXT&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;STARTTIME ENDTIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQLCODE SQLERRM
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-
DB01_ANALYZE_20080118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5 HELLO WORLD!
DB01_ANALYZE_20080118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 ANALYZE TABLE BATCHSQL COMPUTE STATISTICS
DB01_ANALYZE_20080118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 ANALYZE TABLE DEMO COMPUTE STATISTICS
&nbsp;
SQL&gt; 
</pre>
<p>Start a session that will start executing statements found in the batchsql table for batch &#8216;DB01_ANALYZE_20080118&#8242;:</p>
<pre>
SQL&gt; ed
Wrote file afiedt.buf
&nbsp;
&nbsp;&nbsp;1&nbsp;&nbsp;DECLARE
&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;v_batchid&nbsp;&nbsp;batchsql.batchid%TYPE;
&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;i_sqlid&nbsp;&nbsp;&nbsp;&nbsp;batchsql.sqlid%TYPE;
&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;v_sqltext&nbsp;&nbsp;batchsql.sqltext%TYPE;
&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;i_sqlcode&nbsp;&nbsp;PLS_INTEGER;
&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;v_sqlerrm&nbsp;&nbsp;VARCHAR2(256);
&nbsp;&nbsp;7&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PLS_INTEGER;
&nbsp;&nbsp;8&nbsp;&nbsp;BEGIN
&nbsp;&nbsp;9&nbsp;&nbsp;&nbsp;&nbsp;v_batchid := &#039;DB01_ANALYZE_20080118&#039;;
 10&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;&nbsp;&nbsp;&nbsp; := 0;
 11&nbsp;&nbsp;&nbsp;&nbsp;LOOP
 12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- get statement that nobody is working on
 13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SELECT sqlid,
 14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqltext
 15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTO i_sqlid,
 16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v_sqltext
 17&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM batchsql
 18&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE batchid = v_batchid
 19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND starttime IS NULL
 20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND rownum = 1;
 21&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i := i +1;
 22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- open new block for &#039;sqltext&#039; statement
 23&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEGIN
 24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- first set the starttime, (lock statement) to make sure
 25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- no other session will pick up the same statement
 26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UPDATE batchsql
 27&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET starttime = SYSDATE
 28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE sqlid = i_sqlid;
 29&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COMMIT;
 30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- execute the statement
 31&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXECUTE IMMEDIATE v_sqltext;
 32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- everything went well, register endtime and commit
 33&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UPDATE batchsql
 34&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET endtime = SYSDATE
 35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE sqlid = i_sqlid;
 36&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COMMIT;
 37&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXCEPTION
 38&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHEN OTHERS THEN
 39&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#45;- error occured, register endtime and errors
 40&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i_sqlcode := SQLCODE;
 41&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v_sqlerrm := SQLERRM;
 42&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UPDATE batchsql
 43&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET endtime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= SYSDATE
 44&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , sqlcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= i_sqlcode
 45&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , sqlerrm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= v_sqlerrm
 46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , error_stack&nbsp;&nbsp;= DBMS_UTILITY.FORMAT_ERROR_STACK()
 47&nbsp;&nbsp;&#45;- Uncomment &#039;FORMAT_ERROR_BACKTRACE()&#039; for pre 10G
 48&nbsp;&nbsp;&#45;- , error_backtrace = DBMS_UTILITY.FORMAT_ERROR_BACKTRACE()
 49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE sqlid = i_sqlid;
 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COMMIT;
 51&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END;
 52&nbsp;&nbsp;&nbsp;&nbsp;END LOOP;
 53&nbsp;&nbsp;EXCEPTION
 54&nbsp;&nbsp;&nbsp;&nbsp;WHEN NO_DATA_FOUND THEN
 55&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF i = 0 THEN
 56&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_OUTPUT.PUT_LINE ( &#039;No SQL Statements found for batch &#039;&#039;&#039; || v_batchid || &#039;&#039;&#039;&#039;);
 57&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELSE
 58&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_OUTPUT.PUT_LINE ( &#039;Carried out &#039; || TO_CHAR(i) || &#039; SQL statements&#039;);
 59&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END IF;
 60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBMS_OUTPUT.PUT_LINE ( &#039;Time is &#039;&#039;&#039; || to_CHAR(SYSDATE, &#039;DD-MON-YY hh24:mi:ss&#039;) || &#039;&#039;&#039;&#039;);
 61* END;
 62&nbsp;&nbsp;/
Carried out 3 SQL statements
Time is &#039;18-JAN-08 18:37:01&#039;
&nbsp;
PL/SQL procedure successfully completed.
&nbsp;
SQL&gt; REM and again
SQL&gt; /
No SQL Statements found for batch &#039;DB01_ANALYZE_20080118&#039;
Time is &#039;18-JAN-08 18:37:20&#039;
&nbsp;
PL/SQL procedure successfully completed.
&nbsp;
SQL&gt; 
SQL&gt; 
</pre>
<p>
Pretty straigh forward, not?
</p>
<ul>
<li>The first run the starttime column is NULL (for every row),</li>
<li>The statements are executed, both the starttime and the endtime are updated at every single execution</li>
<li>The second run find no rows where starttime IS NULL and will not execute any statement at all.</li>
</ul>
<p>
See the log results.
</p>
<pre>
SQL&gt; select batchid, sqlid, sqltext, starttime, endtime, sqlcode, sqlerrm from batchsql;
BATCHID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQLID SQLTEXT&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;STARTTIME ENDTIME&nbsp;&nbsp; SQLCODE SQLERRM
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
DB01_ANALYZE_20080118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5 HELLO WORLD!&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; 18-JAN-08 18-JAN-08&nbsp;&nbsp;&nbsp;&nbsp;-900 ORA-00900: invalid S
&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;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QL statement
&nbsp;
DB01_ANALYZE_20080118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 ANALYZE TABLE BATCHSQL COMPUTE STATISTICS&nbsp;&nbsp;18-JAN-08 18-JAN-08
DB01_ANALYZE_20080118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 ANALYZE TABLE DEMO COMPUTE STATISTICS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;18-JAN-08 18-JAN-08
&nbsp;
SQL&gt; 
</pre>
<p>
Of course, you can add extra functionalities as many as you would like, store the sessionid for every SQL statement, have multiple runs for a batch to reuse statements, etc etc. Oh and of course I should rewrite it to a SQL Procedure or Package.
</p>
<p>
The babysitting is now minimized to running this query:
</p>
<pre>
&nbsp;
col batch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for 9999
col completed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for 9999
col todo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for 9999
col activesessions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for 9999999&nbsp;&nbsp;&nbsp;&nbsp; head &quot;ACTIVE|SESSIONS&quot;
col errors&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for 99999
col elapsed_seconds&nbsp;&nbsp;&nbsp;&nbsp; for 9999999&nbsp;&nbsp;&nbsp;&nbsp; head &quot;ELAPSED|SECONDS&quot;
col avg_execution_time&nbsp;&nbsp;for 9999999&nbsp;&nbsp;&nbsp;&nbsp; head &quot;AVG|EXECUTION|TIME&quot;
col percentage_complete for 9999999&nbsp;&nbsp;&nbsp;&nbsp; head &quot;PERCENTAGE|COMPLETE&quot;
&nbsp;
&#45;- as I only have one batch loaded I don&#039;t need to filter on the batchid
select batch.c&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;batch,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; completed.c&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;completed,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; batch.c - completed.c&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;todo,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_char( times.started, &#039;DD-MM-HH hh24:mi&#039;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;started,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_char( times.lastcompleted, &#039;DD-MM-HH hh24:mi&#039;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastcompleted,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; round( completed.c / batch.c * 100, 1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; percentage_complete,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activesessions.c&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; activesessions,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errors.c&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errors,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( sysdate - times.started) *24*60*60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elapsed_seconds,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trunc( ( sysdate - times.started)*24*60*60 / completed.c)&nbsp;&nbsp;avg_execution_time,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_char( sysdate +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( batch.c - completed.c) *
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( (sysdate - times.started) / completed.c)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , &#039;DD-MM-HH hh24:mi&#039;)&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;est_end_time
 from ( select count(*) as c from batchsql )&nbsp;&nbsp;&nbsp;&nbsp;batch
&nbsp;&nbsp;&nbsp;&nbsp;, ( select count(*) as c from batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where endtime is not null)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; completed
&nbsp;&nbsp;&nbsp;&nbsp;, ( select count(*) as c
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where starttime is not null
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and endtime is null)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activesessions
&nbsp;&nbsp;&nbsp;&nbsp;, ( select count(*) as c
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from batchsql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where sqlcode is not null )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errors
&nbsp;&nbsp; , ( select min(starttime) started,
&nbsp;&nbsp;&nbsp;&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sp;&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;PERCENTAGE&nbsp;&nbsp; ACTIVE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELAPSED EXECUTION
BATCH COMPLETED&nbsp;&nbsp;TODO STARTED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LASTCOMPLETED&nbsp;&nbsp;&nbsp;&nbsp;COMPLETE SESSIONS ERRORS&nbsp;&nbsp;SECONDS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TIME EST_END_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;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
 1524&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 492&nbsp;&nbsp;1032 18-01-06 18:45 18-01-10 22:01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;11756&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23 19-01-04 04:52
&nbsp;
SQL&gt; 
SQL&gt; 
SQL&gt; select*from batchsql where sqlcode is not null;
BATCHID&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQLID
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
SQLTEXT
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
STARTTIME&nbsp;&nbsp;ENDTIME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQLCODE SQLERRM
&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
ERROR_STACK
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
ERROR_BACKTRACE
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
DB01_ANALYZE_20080118&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;84
ANALYZE TABLE ********
18-01-2008 18-01-2008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-1555 ORA-01555: snapshot too old: rollback segment number 2 with name &quot;_SYSSMU2$&quot; too small
ORA-01555: snapshot too old: rollback segment number 2 with name &quot;_SYSSMU2$&quot; too small
&nbsp;
SQL&gt; 
&nbsp;
</pre>
<h3>UPDATE 2010-05-10T11:04:21+00:00</h3>
<p>
Make sqlid non unique and add trigger to generate sqlid&#8217;s.
</p>
<pre>
CREATE TABLE batchsql
 ( batchid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(64)&nbsp;&nbsp;&nbsp;&nbsp;NOT NULL
 , sqlid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTEGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOT NULL
 , sqltext&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;varchar2(4000)&nbsp;&nbsp;NOT NULL
 , starttime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATE
 , endtime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATE
 , sqlcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTEGER
 , sqlerrm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(256)
 , error_stack&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(4000)
 , error_backtrace&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2(4000)
 );
&nbsp;
CREATE SEQUENCE s_batchsql;
&nbsp;
CREATE OR REPLACE TRIGGER t_batchsql
BEFORE INSERT ON batchsql
FOR EACH ROW
WHEN (new.sqlid IS NULL)
BEGIN
&nbsp;&nbsp;SELECT s_batchsql.NEXTVAL
&nbsp;&nbsp;INTO&nbsp;&nbsp; :new.sqlid
&nbsp;&nbsp;FROM&nbsp;&nbsp; dual;
END;
/
</pre>
<p>
Create script to execute statements from batch table
</p>
<pre>
export ORAENV_ASK=NO;
export ORACLE_SID=sfsse001;
/usr/local/bin/oraenv
&nbsp;
sqlplus -silent &#039;/ as sysdba&#039; &lt;&lt;EOF
&nbsp;
column d new_value d
select to_char( sysdate, &#039;YYYYMMDD-HH24MISS&#039;) d from dual;
&nbsp;
set serveroutput on
&nbsp;
spool batch_&amp;d.log
&nbsp;
@r.sql
&nbsp;
spool off
&nbsp;
EOF
&nbsp;
</pre>
<pre>
$ nohup r.sh &amp;
&nbsp;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/dba-util/batch-sql-in-parallel.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really delete (&#8216;corrupt&#8217;) Agent from OMS repository</title>
		<link>http://remidian.com/oracle/grid/agent-corruption-status-in-oms.html</link>
		<comments>http://remidian.com/oracle/grid/agent-corruption-status-in-oms.html#comments</comments>
		<pubDate>Thu, 17 Jan 2008 13:42:05 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[Grid]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/grid/agent-corruption-status-in-oms.html</guid>
		<description><![CDATA[Here&#8217;s how to overcome ORA-20206 in Oracle GRID environment, agent status unclear&#8230; Scenario Removed (Windows) Agent from Grid. (With SQL Server Management plugin) Tried to restart this SAME agent, errors below occur. # $ORACLE_HOME/sysman/log/emagent.log contains &#160; 2008-01-17 14:13:52 Thread-4032 EMAgent started successfully (00702) 2008-01-17 14:14:21 Thread-2720 &#60;Upload Manager&#62; Unsuccessful Upload attempts for XML file exceeds [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to overcome ORA-20206 in Oracle GRID environment, agent status unclear&#8230;<span id="more-67"></span></p>
<h3>
Scenario<br />
</h3>
<ul>
<li>Removed (Windows) Agent from Grid. (With SQL Server Management plugin)</li>
<li>Tried to restart this SAME agent, errors below occur.</li>
</ul>
<pre>
# $ORACLE_HOME/sysman/log/emagent.log contains
&nbsp;
2008-01-17 14:13:52 Thread-4032 EMAgent started successfully (00702)
2008-01-17 14:14:21 Thread-2720 &lt;Upload Manager&gt; Unsuccessful Upload attempts for XML file exceeds specified limit=3, 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Agent will shutdown (00851)
2008-01-17 14:14:21 Thread-4032 EMAgent abnormal terminating (00704)
</pre>
<pre>
# $ORACLE_HOME/sysman/log/emdctl.trc contains
&nbsp;
2008-01-17 14:13:32 Thread-752 WARN&nbsp;&nbsp;http: snmehl_connect: connect failed to (&lt;agent_hostname&gt;:3872): 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No connection could be made because the target machine actively refused it.
 (error = 10061)
2008-01-17 14:13:32 Thread-752 ERROR main: nmectla_agentctl: Error connecting to 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https://&lt;agent_hostname&gt;:3872/emd/main/. Returning status code 1
2008-01-17 14:14:23 Thread-172 WARN&nbsp;&nbsp;http: snmehl_connect: connect failed to 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&lt;agent_hostname&gt;:3872): 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No connection could be made because the target machine actively refused it. (error = 10061)
2008-01-17 14:14:23 Thread-172 ERROR main: nmectla_agentctl: Error connecting to 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https://&lt;agent_hostname&gt;:3872/emd/main/. Returning status code 1
&nbsp;
</pre>
<pre>
# $ORACLE_HOME/sysman/log/emagent.trc contains
&nbsp;
2008-01-17 14:14:18 Thread-192 WARN&nbsp;&nbsp;TargetManager: Regenerating all Metadata
2008-01-17 14:14:18 Thread-192 DEBUG TargetManager: In getTypeAndNameForHostTarget
2008-01-17 14:14:18 Thread-192 DEBUG TargetManager: getTypeAndNameForHostTarget found host, &lt;agent_hostname&gt;
2008-01-17 14:14:18 Thread-192 DEBUG TargetManager: In getTypeAndNameForHostTarget
2008-01-17 14:14:18 Thread-192 DEBUG TargetManager: getTypeAndNameForHostTarget found host, &lt;agent_hostname&gt;
2008-01-17 14:14:18 Thread-192 WARN&nbsp;&nbsp;collector: Regenerating all DefaultColls
2008-01-17 14:14:18 Thread-192 ERROR upload: Failed to upload file A0000001.xml, ret = -6
2008-01-17 14:14:19 Thread-192 WARN&nbsp;&nbsp;upload: FxferSend: received fatal error in header from repository: 
&nbsp;
https://&lt;oms_hostname&gt;:1159/em/upload
&nbsp;
FATAL_ERROR::500|ORA-20206: Target does not exist:&nbsp;&nbsp;Agent does not exist for https://&lt;agent_hostname&gt;:3872/emd/main/
ORA-06512: at &quot;SYSMAN.EMD_LOADER&quot;, line 1795
ORA-06512: at line 1
&nbsp;
.
.
.
&nbsp;
2008-01-17 14:14:21 Thread-2720 ERROR upload: number of fatal error exceeds the limit 3
2008-01-17 14:14:21 Thread-2720 ERROR upload: agent will shutdown now
2008-01-17 14:14:21 Thread-2720 ERROR : Signalled to Exit with status 55
2008-01-17 14:14:21 Thread-4032 ERROR main: EMAgent abnormal terminating
</pre>
<h3>
&#8216;Solution&#8217;<br />
</h3>
<p>
The status of the Agent is unclear, first thing to do is check the SYSMAN.MGMT$TARGET table, if your agent shows up here try to remove it using th OMS frontend or use methods below.
</p>
<pre>
[IAWE239@PGRIDC03.AH.NL:AHC536]
SQL&gt; exec sysman.mgmt_admin.cleanup_agent(&#039;&lt;agent_hostname&gt;:3872&#039;)
BEGIN sysman.mgmt_admin.cleanup_agent(&#039;&lt;agent_hostname&gt;:3872&#039;); END;
&nbsp;
*
ERROR at line 1:
ORA-20206: Target does not exist: &lt;agent_hostname&gt;:3872
ORA-06512: at &quot;SYSMAN.MGMT_ADMIN&quot;, line 788
ORA-06512: at line 1
&nbsp;
[IAWE239@PGRIDC03.AH.NL:AHC536]
SQL&gt; exec sysman.mgmt_admin.delete_target_internal(&#039;&lt;agent_hostname&gt;:3872&#039;, &#039;oracle_emd&#039;);
BEGIN sysman.mgmt_admin.delete_target_internal(&#039;&lt;agent_hostname&gt;:3872&#039;, &#039;oracle_emd&#039;); END;
&nbsp;
*
ERROR at line 1:
ORA-20206:&nbsp;&nbsp;The target does not exist or may have already been deleted:&nbsp;&nbsp;Target name = &lt;agent_hostname&gt;:3872 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and Target type = oracle_emd
ORA-06512: at &quot;SYSMAN.MGMT_ADMIN&quot;, line 645
ORA-06512: at line 1
</pre>
<p>
Now check the records in SYSMAN.MGMT_TARGETS_DELETE
</p>
<pre>
[IAWE239-SYSMAN@PGRIDC03.AH.NL:AHC536]
SQL&gt; SELECT target_name, delete_complete_time, target_guid
&nbsp;&nbsp;2&nbsp;&nbsp;FROM sysman.mgmt_targets_delete
&nbsp;&nbsp;3&nbsp;&nbsp;WHERE target_type = &#039;oracle_emd&#039;;
&nbsp;
TARGET_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DELETE_COM TARGET_GUID
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;--
&lt;agent_hostname&gt;:3872&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17-01-2008 CACA6898BA9051954366482B01EBE9CB
&nbsp;
</pre>
<p>
Oooops, my agent should have been correcly removed&#8230;
</p>
<h3>Really, really, REALLY remove agent from OMS repository</h3>
<p>
Sick and tired of this I decided &#8216;solution&#8217; below: select/remove all recors with GUID of my Agent.
</p>
<pre>
DEFINE TARGET_GUID = &quot;CACA6898BA9051954366482B01EBE9CB&quot;
&nbsp;
SELECT&nbsp;&nbsp; &#039;SELECT COUNT(*) FROM &#039; || table_name || &#039; WHERE target_guid = HEXTORAW(&#039;&#039;&amp;TARGET_GUID&#039;&#039;);&#039;
&#45;- SELECT&nbsp;&nbsp; &#039;DELETE FROM &#039; || table_name || &#039; WHERE target_guid = HEXTORAW(&#039;&#039;&amp;TARGET_GUID&#039;&#039;);&#039;
FROM&nbsp;&nbsp; ( SELECT table_name FROM dba_tab_columns NATURAL JOIN dba_tables WHERE column_name = &#039;TARGET_GUID&#039;)
/
&nbsp;
SQL&gt; REM Or check ALL raw columns

SELECT &#039;SELECT COUNT(*) FROM &#039; || table_name || &#039; WHERE &#039; || column_name || &#039; = HEXTORAW(&#039;&#039;&amp;TARGET_GUID&#039;&#039;);&#039;
&nbsp;&nbsp;FROM ( 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT table_name, column_name 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM dba_tab_columns NATURAL JOIN dba_tables 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE owner = &#039;SYSMAN&#039; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND data_type = &#039;RAW&#039; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )
/
&nbsp;
</pre>
<p>
In my environment there was a mismatch between the MGMT_TARGETS and the MGMT_AGENT_SEC_INFO:
</p>
<pre>
SQL&gt; SELECT COUNT(*) FROM mgmt_targets WHERE target_type = &#039;oracle_emd&#039; ;
&nbsp;&nbsp;COUNT(*)
&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;30
&nbsp;
SQL&gt; SELECT COUNT(*) FROM mgmt_agent_sec_info ;
&nbsp;&nbsp;COUNT(*)
&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;32
&nbsp;
SQL&gt; SELECT * FROM mgmt_agent_sec_info WHERE target_guid = HEXTORAW( &#039;&amp;TARGET_GUID&#039;);
TARGET_GUID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AGENT_KEY
&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
CACA6898BA9051954366482B01EBE9CB ¿¿¿¿.¿¿¿9¿2¿¿KM(¿&lt;+¿¿H¿¿¿¿!¿E&gt;¿¿
</pre>
<p>
<strong><br />
(Windows Only?) &#8216;emctl clearstate agent&#8217; does NOT remove XML files from $ORACLE_HOME/sysman/emd/upload, remove manually from the OS to prevent &#8216;Failed to upload file A0000001.xml&#8217; and &#8216;FxferSend: received fatal error in header from repository&#8217; errors.<br />
</strong>
</p>
<p>
Needless to say, use at your own risk; also see oracle forum thread <a href="http://forums.oracle.com/forums/thread.jspa?threadID=347619">delete old agent</a></p>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/grid/agent-corruption-status-in-oms.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing Alerts in Oracle GRID Control</title>
		<link>http://remidian.com/oracle/grid/clearing-alerts-in-oracle-grid-control.html</link>
		<comments>http://remidian.com/oracle/grid/clearing-alerts-in-oracle-grid-control.html#comments</comments>
		<pubDate>Mon, 12 Nov 2007 13:01:26 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[Grid]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/grid/clearing-alerts-in-enterprise-manager.html</guid>
		<description><![CDATA[Here&#8217;s how to clear alerts from the Oracle GRID manually. For some obscure reason Oracle is very reluctant in providing the information that is described here below. Search Metalink and you will find no entries&#8230; The information below is from dbasupport.com and helps me to clear alerts that the Agent does NOT clear for me. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to clear alerts from the Oracle GRID manually.<span id="more-66"></span></p>
<p>
For some obscure reason Oracle is very reluctant in providing the information that is described here below. Search Metalink and you will find no entries&#8230; The information below is from <a href="http://www.dbasupport.com/oracle/ora10g/clearing_alerts.shtml">dbasupport.com</a> and helps me to clear alerts that the Agent does NOT clear for me.
</p>
<h6>sysman.em_severity</h6>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt;&nbsp;&nbsp;@desc sysman.em_severity
.
.
PROCEDURE DELETE_CURRENT_SEVERITY
 Argument Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In/Out Default?
 &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-- &#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;&#45;--
 P_TARGET_GUID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RAW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN
 P_METRIC_GUID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RAW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN
 P_KEY_VALUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IN
.
.
&nbsp;
</pre>
<h6>Generate SQL to remove alerts from specific targets</h6>
<pre>
select t.target_name
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t.target_type
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collection_timestamp
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message
,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;exec em_severity.delete_current_severity(&#039;&#039;&#039; ||
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.target_guid || &#039;&#039;&#039;,&#039;&#039;&#039; ||
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metric_guid || &#039;&#039;&#039;,&#039;&#039;&#039; ||
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key_value || &#039;&#039;&#039;)&#039; em_severity
from&nbsp;&nbsp; mgmt_targets t
inner join
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mgmt_current_severity s
on
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.target_guid = s.target_guid
where
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; target_name like &#039;&amp;TARGET&#039;
</pre>
<h6>Remove the Alert</h6>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; begin
&nbsp;&nbsp;2&nbsp;&nbsp;em_severity.delete_current_severity(&#039;3DFABFF28D9C283435DBD2491D35B92B&#039;,&#039;3E6F70DB22758B7B9756EF342180E7BB&#039;,&#039;UNDO&#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; 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/grid/clearing-alerts-in-oracle-grid-control.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>invalid objects after clean ctxsys installation (oracle text)</title>
		<link>http://remidian.com/oracle/invalid-objects-after-clean-ctxsys-installation-oracle-text.html</link>
		<comments>http://remidian.com/oracle/invalid-objects-after-clean-ctxsys-installation-oracle-text.html#comments</comments>
		<pubDate>Fri, 09 Nov 2007 11:42:44 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/invalid-objects-after-clean-ctxsys-installation-oracle-text.html</guid>
		<description><![CDATA[The following objects are invalid after a clean ctxsys install. Invalid objects [REMI@DB01.REMIDIAN.COM] SQL&#62; @oj-in OWNER&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;OBJECT_NAME&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;OBJECT_TYPE&#160;&#160;&#160;&#160; CREATED&#160;&#160;&#160;&#160;LAST_DDL_TIME TIMESTAMP&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 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;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;&#45;- CTXSYS&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DBMS_DATA_MINING_DUMMY&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; PACKAGE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 08-11-2007 08-11-2007&#160;&#160;&#160;&#160;2007-11-08:16:26:32 INVALID &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DBMS_DATA_MINING_DUMMY&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; PACKAGE BODY&#160;&#160;&#160;&#160;08-11-2007 08-11-2007&#160;&#160;&#160;&#160;2007-11-08:16:26:32 INVALID &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DM_CLUSTER&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TYPE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;08-11-2007 09-11-2007&#160;&#160;&#160;&#160;2007-11-08:16:26:32 INVALID &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DM_CLUSTERS&#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;08-11-2007 08-11-2007&#160;&#160;&#160;&#160;2007-11-08:16:26:32 INVALID &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DRVODM&#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; PACKAGE BODY&#160;&#160;&#160;&#160;08-11-2007 09-11-2007&#160;&#160;&#160;&#160;2007-11-08:16:26:32 INVALID &#160; [REMI@DB01.REMIDIAN.COM] [...]]]></description>
			<content:encoded><![CDATA[<p>The following objects are invalid after a clean ctxsys install.<span id="more-65"></span></p>
<h6>Invalid objects</h6>
<pre>
[REMI@DB01.REMIDIAN.COM]
SQL&gt; @oj-in
OWNER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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; CREATED&nbsp;&nbsp;&nbsp;&nbsp;LAST_DDL_TIME TIMESTAMP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;-&#45;&#45;-&#45;&#45;-&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;- &#45;&#45;-&#45;&#45;&#45;-
CTXSYS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBMS_DATA_MINING_DUMMY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PACKAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 08-11-2007 08-11-2007&nbsp;&nbsp;&nbsp;&nbsp;2007-11-08:16:26:32 IN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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;08-11-2007 08-11-2007&nbsp;&nbsp;&nbsp;&nbsp;2007-11-08:16:26:32 INVALID
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DRVODM&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; PACKAGE BODY&nbsp;&nbsp;&nbsp;&nbsp;08-11-2007 09-11-2007&nbsp;&nbsp;&nbsp;&nbsp;2007-11-08:16:26:32 INVALID
&nbsp;
[REMI@DB01.REMIDIAN.COM]
SQL&gt;
</pre>
<h3>Solution</h3>
<p>
Information below is from Oracle Metalink Support note &#8216;Doc ID:  Note:421179.1&#8242;, <a href="https://metalink.oracle.com/metalink/plsql/f?p=130:14:9075528638450107162::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,421179.1,1,1,1,helvetica">https://metalink.oracle.com/metalink/plsql/f?p=130:14:9075528638450107162::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,421179.1,1,1,1,helvetica</a>
</p>
<blockquote><p>
You must install Oracle Data Mining (ODM), feature available in Oracle Database Enterprise Edition<br />
(EE), before you install Oracle Text in order to use the SVM classifier and the KMEANS clustering.<br />
All other functions should work without ODM installed, including RULE classifier and TEXTK<br />
clustering.
</p></blockquote>
<h3>Metalink uri&#8217;s</h3>
<p>
Oh and by the way, don&#8217;t you just love the company that wants to be number one in the E-Business realm serves their documents? These unbelievable url&#8217;s even store information about font faces and sizes in it, it think it&#8217;s unbelievable. Did this brilliant application design derive from the same guy that built the Oracle.com portal? Ever tried to visit Oracle.com with a w3c compliant browser like Opera &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/invalid-objects-after-clean-ctxsys-installation-oracle-text.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dbverify in nohup</title>
		<link>http://remidian.com/oracle/dbverify-in-nohup.html</link>
		<comments>http://remidian.com/oracle/dbverify-in-nohup.html#comments</comments>
		<pubDate>Tue, 09 Oct 2007 13:57:05 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/dbverify-in-nohup.html</guid>
		<description><![CDATA[Suffering from corruption in your database, it is nearly just as challenging as in real life&#8230; The other day we suffered from a curruption in a 500+ Gigabyte database, as a sequentual dberify would take about 16+ hours I wrote this one below which starts the dbv&#8217;s in nohup in parallel. My dbv finished within [...]]]></description>
			<content:encoded><![CDATA[<p>
Suffering from corruption in your database, it is nearly just as challenging as in real life&#8230;<span id="more-62"></span>
</p>
<p>
The other day we suffered from a curruption in a 500+ Gigabyte database, as a sequentual dberify would take about 16+ hours I wrote this one below which starts the dbv&#8217;s in nohup in parallel. My dbv finished within the hour, system performance will drop though;)
</p>
<pre>
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; l
&nbsp;&nbsp;1&nbsp;&nbsp;select
&nbsp;&nbsp;2&nbsp;&nbsp;&#039;nohup dbv&#039; ||
&nbsp;&nbsp;3&nbsp;&nbsp; &#039; file=&#039; || file_name ||
&nbsp;&nbsp;4&nbsp;&nbsp; &#039; blocksize=4096&#039; ||
&nbsp;&nbsp;5&nbsp;&nbsp; &#039; logfile=&#039; || file_id || &#039;_&#039; || substr( file_name, instr(file_name,&#039;/&#039;,-1) +1) || &#039;.log &amp;&#039;
&nbsp;&nbsp;6&nbsp;&nbsp;from
&nbsp;&nbsp;7* dba_data_files
</pre>
<pre>
[SYSTEM@DB01.REMIDIAN.COM]
SQL&gt; /
&nbsp;
&#039;NOHUPDBVFILE=&#039;||FILE_NAME||&#039;BLOCKSIZE=4096LOGFILE=&#039;||FILE_ID||&#039;_&#039;||SUBSTR(FILE_NAME,INSTR(FILE_NAME,&#039;/&#039;,-1)+1)||&#039;.LOG&amp;&#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;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\USERS01.DBF blocksize=4096 logfile=4_C:\ORACLE\ORADATA\DB01\DB01\USERS01.DBF.log &amp;
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\SYSAUX01.DBF blocksize=4096 logfile=3_C:\ORACLE\ORADATA\DB01\DB01\SYSAUX01.DBF.log &amp;
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\UNDOTBS01.DBF blocksize=4096 logfile=2_C:\ORACLE\ORADATA\DB01\DB01\UNDOTBS01.DBF.log &amp;
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\SYSTEM01.DBF blocksize=4096 logfile=1_C:\ORACLE\ORADATA\DB01\DB01\SYSTEM01.DBF.log &amp;
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\EXAMPLE01.DBF blocksize=4096 logfile=5_C:\ORACLE\ORADATA\DB01\DB01\EXAMPLE01.DBF.log &amp;
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\P1PERG001.DBF blocksize=4096 logfile=7_C:\ORACLE\ORADATA\DB01\DB01\P1PERG001.DBF.log &amp;
nohup dbv file=C:\ORACLE\ORADATA\DB01\DB01\P1PERG002.DBF blocksize=4096 logfile=8_C:\ORACLE\ORADATA\DB01\DB01\P1PERG002.DBF.log &amp;
&nbsp;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/dbverify-in-nohup.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>11g installation on Linux (Centos)</title>
		<link>http://remidian.com/oracle/new-features/11g/11g-installation-on-linux-centos.html</link>
		<comments>http://remidian.com/oracle/new-features/11g/11g-installation-on-linux-centos.html#comments</comments>
		<pubDate>Sat, 25 Aug 2007 11:37:56 +0000</pubDate>
		<dc:creator>remivisser</dc:creator>
				<category><![CDATA[11g]]></category>

		<guid isPermaLink="false">http://remidian.com/oracle/new-features/11g/11g-installation-on-centos.html</guid>
		<description><![CDATA[@wip]]></description>
			<content:encoded><![CDATA[<p>
@wip <span id="more-56"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://remidian.com/oracle/new-features/11g/11g-installation-on-linux-centos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
