<?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>Parm Patram &#187; SQLPLUS</title>
	<atom:link href="http://oracle.3dub.com/category/sqlplus/feed/" rel="self" type="application/rss+xml" />
	<link>http://oracle.3dub.com</link>
	<description>Oracle, Linux and UNIX tips, tricks and stuff</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:14:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>See long running jobs in the RAC</title>
		<link>http://oracle.3dub.com/2011/08/10/see-long-running-jobs-in-the-rac/</link>
		<comments>http://oracle.3dub.com/2011/08/10/see-long-running-jobs-in-the-rac/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 12:59:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RMAN]]></category>
		<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=828</guid>
		<description><![CDATA[column
select inst_id,opname, totalwork, sofar, time_remaining from gv$session_longops where totalwork > sofar order by time_remaining;
]]></description>
			<content:encoded><![CDATA[<p>column<br />
select inst_id,opname, totalwork, sofar, time_remaining from gv$session_longops where totalwork > sofar order by time_remaining;</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2011/08/10/see-long-running-jobs-in-the-rac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NLS date format</title>
		<link>http://oracle.3dub.com/2011/02/11/nls-date-format/</link>
		<comments>http://oracle.3dub.com/2011/02/11/nls-date-format/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 17:57:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HEADS UP]]></category>
		<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=765</guid>
		<description><![CDATA[
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';

]]></description>
			<content:encoded><![CDATA[<pre>
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2011/02/11/nls-date-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>see tag on raw devices (oracle asm)</title>
		<link>http://oracle.3dub.com/2011/01/10/see-tag-on-raw-devices-oracle-asm/</link>
		<comments>http://oracle.3dub.com/2011/01/10/see-tag-on-raw-devices-oracle-asm/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 19:42:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASM (Automatic Storage Magement)]]></category>
		<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=702</guid>
		<description><![CDATA[cat /dev/raw/raw46 &#124; od -a -N128
]]></description>
			<content:encoded><![CDATA[<p>cat /dev/raw/raw46 | od -a -N128</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2011/01/10/see-tag-on-raw-devices-oracle-asm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run SQL commands from shell script</title>
		<link>http://oracle.3dub.com/2010/11/15/run-sql-commands-from-shell-script/</link>
		<comments>http://oracle.3dub.com/2010/11/15/run-sql-commands-from-shell-script/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 21:32:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=669</guid>
		<description><![CDATA[#!/bin/bash
#
# login to database and run a query
SQL_HOME=WHERE
LOG_HOME=WHERE
SQL_USER=WHAT
SQL_PASS=WHAT
SQL_HOST=WHAT
SQL_DB=WHAT
SQL_PORT=1521
LOGFILE=${SQL_HOME}/output.log
SQL_LOGIN_STR=&#8221;${SQL_HOME}/sqlplus -S ${SQL_USER}/${SQL_PASS}@${SQL_HOST}:${SQL_PORT}/${SQL_DB} &#8221;
cd $SQL_HOME
RESULT=`${SQL_LOGIN_STR} &#60;&#60; EOF
SET HEADING OFF
SELECT NAME FROM V\\$DATABASE;
exit;
EOF`
if [ $RESULT == $SQL_DB ]; then
echo `date`&#8221;: OK: $RESULT&#8221; &#124; sed &#8217;s/\n//g&#8217; &#62;&#62; $LOGFILE
else
echo `date`&#8221;: Got Error: $RESULT&#8221; &#124; sed &#8217;s/\n//g&#8217; &#62;&#62; $LOGFILE
fi
]]></description>
			<content:encoded><![CDATA[<p>#!/bin/bash</p>
<p>#<br />
# login to database and run a query</p>
<p>SQL_HOME=WHERE<br />
LOG_HOME=WHERE<br />
SQL_USER=WHAT<br />
SQL_PASS=WHAT<br />
SQL_HOST=WHAT<br />
SQL_DB=WHAT<br />
SQL_PORT=1521<br />
LOGFILE=${SQL_HOME}/output.log</p>
<p>SQL_LOGIN_STR=&#8221;${SQL_HOME}/sqlplus -S ${SQL_USER}/${SQL_PASS}@${SQL_HOST}:${SQL_PORT}/${SQL_DB} &#8221;</p>
<p>cd $SQL_HOME</p>
<p>RESULT=`${SQL_LOGIN_STR} &lt;&lt; EOF<br />
SET HEADING OFF<br />
SELECT NAME FROM V\\$DATABASE;<br />
exit;<br />
EOF`</p>
<p>if [ $RESULT == $SQL_DB ]; then<br />
echo `date`&#8221;: OK: $RESULT&#8221; | sed &#8217;s/\n//g&#8217; &gt;&gt; $LOGFILE<br />
else<br />
echo `date`&#8221;: Got Error: $RESULT&#8221; | sed &#8217;s/\n//g&#8217; &gt;&gt; $LOGFILE<br />
fi</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2010/11/15/run-sql-commands-from-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write CLOB data to file using UTL_FILE</title>
		<link>http://oracle.3dub.com/2010/04/28/write-clob-data-to-file-using-utl_file/</link>
		<comments>http://oracle.3dub.com/2010/04/28/write-clob-data-to-file-using-utl_file/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 22:36:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=509</guid>
		<description><![CDATA[http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_41.shtml
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_41.shtml">http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_41.shtml</a></p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2010/04/28/write-clob-data-to-file-using-utl_file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Showing object compilation errors.</title>
		<link>http://oracle.3dub.com/2010/03/15/showing-object-compilation-errors/</link>
		<comments>http://oracle.3dub.com/2010/03/15/showing-object-compilation-errors/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 18:46:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=491</guid>
		<description><![CDATA[set wrap on
set pages 20
set lin 200
column name format A25
column type format A15
column seq format 9999
colunn line format 9999
column pos format 999
column text format A100
select name,type,sequence seq,line,position pos,text from dba_errors where owner=&#8217;OWNER&#8217; order by type,name;
]]></description>
			<content:encoded><![CDATA[<p>set wrap on<br />
set pages 20<br />
set lin 200<br />
column name format A25<br />
column type format A15<br />
column seq format 9999<br />
colunn line format 9999<br />
column pos format 999<br />
column text format A100<br />
select name,type,sequence seq,line,position pos,text from dba_errors where owner=&#8217;OWNER&#8217; order by type,name;</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2010/03/15/showing-object-compilation-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Identify invalid online redo logs</title>
		<link>http://oracle.3dub.com/2009/05/04/identify-invalid-online-redo-logs/</link>
		<comments>http://oracle.3dub.com/2009/05/04/identify-invalid-online-redo-logs/#comments</comments>
		<pubDate>Mon, 04 May 2009 11:33:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[REDO LOGS]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=348</guid>
		<description><![CDATA[select group#,l.sequence#,archived,l.status running, lf.status os_status,member from v$log l join v$logfile lf using(group#) order by group#;
NOTES:

The STATUS column of v$logfile (os_status) is NOT refreshed in real-time. Information is updated on log switch.

]]></description>
			<content:encoded><![CDATA[<p>select group#,l.sequence#,archived,l.status running, lf.status os_status,member from v$log l join v$logfile lf using(group#) order by group#;</p>
<p>NOTES:</p>
<ul>
<li>The STATUS column of v$logfile (os_status) is NOT refreshed in real-time. Information is updated on log switch.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2009/05/04/identify-invalid-online-redo-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get block_size for a datafile</title>
		<link>http://oracle.3dub.com/2009/05/01/get-block_size-for-a-datafile/</link>
		<comments>http://oracle.3dub.com/2009/05/01/get-block_size-for-a-datafile/#comments</comments>
		<pubDate>Fri, 01 May 2009 11:06:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DBVERIFY]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=316</guid>
		<description><![CDATA[You may need to get the block size of a datafile before running dbv (DBVERIFY) on it. The following will do this in sqlplus:
set wrap off
select t.name tablespace, file#, d.name datafile, block_size BS from v$datafile d join v$tablespace t using (ts#);
]]></description>
			<content:encoded><![CDATA[<p>You may need to get the block size of a datafile before running dbv (DBVERIFY) on it. The following will do this in sqlplus:</p>
<p>set wrap off<br />
select t.name tablespace, file#, d.name datafile, block_size BS from v$datafile d join v$tablespace t using (ts#);</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2009/05/01/get-block_size-for-a-datafile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Equivalent of mysql limit clase for sqlplus</title>
		<link>http://oracle.3dub.com/2008/11/17/equivalent-of-mysql-limit-clase-for-sqlplus/</link>
		<comments>http://oracle.3dub.com/2008/11/17/equivalent-of-mysql-limit-clase-for-sqlplus/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 03:13:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL & PL/SQL]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=268</guid>
		<description><![CDATA[SELECT a, b, c
FROM
( SELECT a, b, c, ROWNUM rn
  FROM
  ( SELECT a, b, c FROM RECORD
    WHERE AVAIL='Y"
    ORDER BY DATE DESC
  )
  WHERE ROWNUM &#60;= 25
)
WHERE rn &#62;= 21;

This clunky code is the equivalent of mysql's elegant:
select a,b,c from record limit 5 [...]]]></description>
			<content:encoded><![CDATA[<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 4px; overflow: auto; width: 640px; height: 194px;">SELECT a, b, c
FROM
( SELECT a, b, c, ROWNUM rn
  FROM
  ( SELECT a, b, c FROM RECORD
    WHERE AVAIL='Y"
    ORDER BY DATE DESC
  )
  WHERE ROWNUM &lt;= 25
)
WHERE rn &gt;= 21;

This clunky code is the equivalent of mysql's elegant:
select a,b,c from record limit 5 offset 4;</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2008/11/17/equivalent-of-mysql-limit-clase-for-sqlplus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command line history/editing for sqlplus (rlwrap)</title>
		<link>http://oracle.3dub.com/2008/11/11/command-line-historyediting-for-sqlplus-rlwrap/</link>
		<comments>http://oracle.3dub.com/2008/11/11/command-line-historyediting-for-sqlplus-rlwrap/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 16:15:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HEADS UP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=265</guid>
		<description><![CDATA[install rlwrap (available from http://utopia.knoware.nl/~hlub/rlwrap/)
then add this to the bash_profile:
alias sqlplus=&#8217;rlwrap sqlplus&#8217;
]]></description>
			<content:encoded><![CDATA[<p>install rlwrap (available from http://utopia.knoware.nl/~hlub/rlwrap/)</p>
<p>then add this to the bash_profile:</p>
<p>alias sqlplus=&#8217;rlwrap sqlplus&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2008/11/11/command-line-historyediting-for-sqlplus-rlwrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

