<?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>MemoSoup &#187; SQL</title>
	<atom:link href="http://www.memosoup.com/category/sql-scripts/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>mySQL: How to reset root password</title>
		<link>http://www.memosoup.com/20120206/mysql-how-to-reset-root-password.html</link>
		<comments>http://www.memosoup.com/20120206/mysql-how-to-reset-root-password.html#comments</comments>
		<pubDate>Sun, 05 Feb 2012 22:48:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[reset]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=455</guid>
		<description><![CDATA[<p>If the password for the mysql &#8220;root&#8221; user is lost, it&#8217;s still possible reset it to some other value. The restart of the mySQL server will be necessary, of course.</p> <p>The following should be done:</p> <p>Stop the server It could be done normally:</p> /etc/init.d/mysql stop <p>or effectively:</p> ps -ef &#124; grep mysql ... mysql 25079 [...]]]></description>
			<content:encoded><![CDATA[<p>If the password for the mysql &#8220;root&#8221; user is lost, it&#8217;s still possible reset it to some other value.<br />
The restart of the mySQL server will be necessary, of course.</p>
<p>The following should be done:</p>
<p><strong>Stop the server</strong><br />
It could be done normally:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql stop</div></div>
<p>or effectively:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-ef</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> mysql<br />
...<br />
mysql <span style="color: #000000;">25079</span> <span style="color: #000000;">1</span> &nbsp; <span style="color: #000000;">0</span> &nbsp; Jan <span style="color: #000000;">31</span> ? &nbsp;<span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqld<br />
...<br />
<span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #660033;">-9</span> <span style="color: #000000;">25079</span></div></div>
<p><em>Please ensure that the proper process is killed!</em></p>
<p><strong>Start MySQL server without security checking</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysqld_safe <span style="color: #660033;">--skip-grant-tables</span> <span style="color: #000000; font-weight: bold;">&amp;</span></div></div>
<p><strong>Connect to mySQL without password</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql <span style="color: #660033;">-u</span> root</div></div>
<p><strong>Reset mySQL root password</strong></p>
<div class="codecolorer-container mysql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="mysql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://search.mysql.com/search?site=refman-%35%31&amp;q=USE"><span style="color: #990099; font-weight: bold;">use</span></a> mysql<span style="color: #000033;">;</span><br />
<a href="http://search.mysql.com/search?site=refman-%35%31&amp;q=UPDATE"><span style="color: #990099; font-weight: bold;">update</span></a> <a href="http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html"><span style="color: #000099;">user</span></a> <a href="http://search.mysql.com/search?site=refman-%35%31&amp;q=SET"><span style="color: #990099; font-weight: bold;">set</span></a> <a href="http://dev.mysql.com/doc/refman/%35%2E%31/en/encryption-functions.html"><span style="color: #000099;">password</span></a><span style="color: #CC0099;">=</span><a href="http://dev.mysql.com/doc/refman/%35%2E%31/en/encryption-functions.html"><span style="color: #000099;">PASSWORD</span></a><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">&quot;NEW<span style="color: #008080; font-weight: bold;">_</span>PASSWORD&quot;</span><span style="color: #FF00FF;">&#41;</span> <a href="http://search.mysql.com/search?site=refman-%35%31&amp;q=WHERE"><span style="color: #990099; font-weight: bold;">where</span></a> <a href="http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html"><span style="color: #000099;">user</span></a><span style="color: #CC0099;">=</span><span style="color: #008000;">'root'</span><span style="color: #000033;">;</span><br />
flush <a href="http://search.mysql.com/search?site=refman-%35%31&amp;q=PRIVILEGES"><span style="color: #990099; font-weight: bold;">privileges</span></a><span style="color: #000033;">;</span></div></div>
<p>Use the real new password instead of the string &#8220;NEW_PASSWORD&#8221;.</p>
<p><strong>Restart mySQL server</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql stop<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql start</div></div>
<p><strong>Check the connection</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20120206%2Fmysql-how-to-reset-root-password.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20120206/mysql-how-to-reset-root-password.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="mySQL: How to reset root password" data-url="http://www.memosoup.com/20120206/mysql-how-to-reset-root-password.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20120206/mysql-how-to-reset-root-password.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: get the tablespace structure</title>
		<link>http://www.memosoup.com/20120119/oracle-get-the-tablespace-structure.html</link>
		<comments>http://www.memosoup.com/20120119/oracle-get-the-tablespace-structure.html#comments</comments>
		<pubDate>Thu, 19 Jan 2012 09:35:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[structure]]></category>
		<category><![CDATA[tablespace]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=439</guid>
		<description><![CDATA[<p>The easiest method to get the tablespace structure is to use the dbms_metadata package:</p> SET linesize 200 LONG 50000 pagesize 5000 SELECT dbms_metadata.get_ddl&#40;'TABLESPACE',tablespace_name &#41; FROM dba_tablespaces WHERE tablespace_name IN &#40; '&#38;your_tablespace' &#41;; <p>Additionally, exp/imp (or expdp/impdp) utilities could be used. They could generate the DDL statements for all objects in the database, which could be [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest method to get the tablespace structure is to use the <strong>dbms_metadata</strong> package:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> linesize <span style="color: #cc66cc;">200</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LONG</span> <span style="color: #cc66cc;">50000</span> pagesize <span style="color: #cc66cc;">5000</span><br />
<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> dbms_metadata.get_ddl<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'TABLESPACE'</span><span style="color: #66cc66;">,</span>tablespace_name <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dba_tablespaces<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> tablespace_name <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'&amp;your_tablespace'</span> <span style="color: #66cc66;">&#41;</span>;</div></div>
<p>Additionally, exp/imp (or expdp/impdp) utilities could be used. They could generate the DDL statements for all objects in the database, which could be very useful.</p>
<p><strong>exp/imp</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">exp <span style="color: #007800;">userid</span>=<span style="color: #ff0000;">&quot; '/ as sysdba' &quot;</span> <span style="color: #007800;">rows</span>=n <span style="color: #007800;">file</span>=my.dmp <span style="color: #007800;">full</span>=y<br />
imp <span style="color: #007800;">userid</span>=<span style="color: #ff0000;">&quot; '/ as sysdba' &quot;</span> <span style="color: #007800;">file</span>=my.dmp <span style="color: #007800;">full</span>=y <span style="color: #007800;">show</span>=y <span style="color: #000000; font-weight: bold;">&gt;</span> full_structure.sql <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span></div></div>
<p><strong>Warning!</strong> exp could not get the contents of the encrypted tablespaces.</p>
<p><strong>expdp/impdp</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">expdp <span style="color: #ff0000;">&quot;'/ as sysdba'&quot;</span> <span style="color: #007800;">dumpfile</span>=mydp.dmp <span style="color: #007800;">directory</span>=DATA_PUMP_DIR <span style="color: #007800;">content</span>=metadata_only &nbsp;<span style="color: #007800;">full</span>=y<br />
impdp <span style="color: #ff0000;">&quot;'/ as sysdba'&quot;</span> <span style="color: #007800;">dumpfile</span>=mydp.dmp <span style="color: #007800;">directory</span>=DATA_PUMP_DIR <span style="color: #007800;">sqlfile</span>=full_structure.sql</div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20120119%2Foracle-get-the-tablespace-structure.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20120119/oracle-get-the-tablespace-structure.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: get the tablespace structure" data-url="http://www.memosoup.com/20120119/oracle-get-the-tablespace-structure.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20120119/oracle-get-the-tablespace-structure.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: buffer overflow (ORU-10027)</title>
		<link>http://www.memosoup.com/20110406/oracle-buffer-overflow-oru-10027.html</link>
		<comments>http://www.memosoup.com/20110406/oracle-buffer-overflow-oru-10027.html#comments</comments>
		<pubDate>Wed, 06 Apr 2011 13:03:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[overflow]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=409</guid>
		<description><![CDATA[<p>Sometimes it&#8217;s necessary to show the output of the PL/SQL script. Usually the dbms_output package is used:</p> SET serveroutput ON DECLARE &#160;i NUMBER ; BEGIN &#160;i:=0 ; &#160;WHILE i&#60; 100000 LOOP &#160; i:=i+1 ; &#160; dbms_output.put_line&#40;'This is just test line #' &#124;&#124; TO_CHAR&#40;i&#41; &#41; ; &#160;END LOOP ; END; / <p>After several thousands lines the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s necessary to show the output of the PL/SQL script.<br />
Usually the <strong>dbms_output</strong> package is used:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> serveroutput <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span><br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">DECLARE</span><br />
&nbsp;i <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span> ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp;i:<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span> ;<br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHILE</span> i<span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">100000</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span> <br />
&nbsp; i:<span style="color: #66cc66;">=</span>i<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> ;<br />
&nbsp; dbms_output.put_line<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'This is just test line #'</span> <span style="color: #66cc66;">||</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_CHAR</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> ;<br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span> ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;<br />
<span style="color: #66cc66;">/</span></div></div>
<p>After several thousands lines the following error message is displayed:</p>
<blockquote><p>
ORA-20000: ORU-10027: buffer overflow, limit of 20000 bytes<br />
ORA-06512: at &#8220;SYS.DBMS_OUTPUT&#8221;, line 32<br />
ORA-06512: at &#8220;SYS.DBMS_OUTPUT&#8221;, line 97<br />
ORA-06512: at &#8220;SYS.DBMS_OUTPUT&#8221;, line 112<br />
ORA-06512: at line 8
</p></blockquote>
<p>The error message means, that the internal buffer of dbms_output is full. How to increase it?<br />
The following methods could be used:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">...<br />
dbms_package.enable<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100000</span><span style="color: #66cc66;">&#41;</span> ;<br />
...</div></div>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">...<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> serveroutput <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SIZE</span> <span style="color: #cc66cc;">100000</span><br />
...</div></div>
<p>In Oracle 10gR2 the new addition <strong>&#8220;size unlimited&#8221;</strong> could be used:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">...<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> serveroutput <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SIZE</span> unlimited<br />
...</div></div>
<p>If these methods do not work, the <strong>temporary table</strong> could be used:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SEQUENCE</span> my_output_seq ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> global <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TEMPORARY</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> my_output_table<span style="color: #66cc66;">&#40;</span> my_row <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span><span style="color: #66cc66;">,</span> my_out <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">120</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> ;<br />
...<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">INSERT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INTO</span> my_output_table <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VALUES</span> <span style="color: #66cc66;">&#40;</span> my_output_seq.<span style="color: #993333; font-weight: bold; text-transform: uppercase;">NEXTVAL</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'This is some string'</span> <span style="color: #66cc66;">&#41;</span> ;<br />
...<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> my_out <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> my_output_table <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ORDER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> my_row ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">DROP</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> my_output_table ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">DROP</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SEQUENCE</span> my_output_seq ;</div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20110406%2Foracle-buffer-overflow-oru-10027.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20110406/oracle-buffer-overflow-oru-10027.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: buffer overflow (ORU-10027)" data-url="http://www.memosoup.com/20110406/oracle-buffer-overflow-oru-10027.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20110406/oracle-buffer-overflow-oru-10027.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: how to clone profiles</title>
		<link>http://www.memosoup.com/20110324/oracle-how-to-clone-profiles.html</link>
		<comments>http://www.memosoup.com/20110324/oracle-how-to-clone-profiles.html#comments</comments>
		<pubDate>Thu, 24 Mar 2011 17:00:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[profile]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=368</guid>
		<description><![CDATA[<p>Here is the simple script for cloning the Oracle profiles.</p> SET serveroutput ON DECLARE &#160;CURSOR c_profiles IS &#160; SELECT PROFILE, RESOURCE_NAME, LIMIT &#160; FROM dba_profiles &#160; ORDER BY PROFILE, resource_name; &#160; s_PROFILE &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; dba_profiles.PROFILE%TYPE ; &#160; s_prev_PROFILE &#160; &#160; &#160; &#160;dba_profiles.PROFILE%TYPE ; &#160; s_RESOURCE_NAME &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the simple script for cloning the Oracle profiles.</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> serveroutput <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span><br />
<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">DECLARE</span><br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">CURSOR</span> c_profiles <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IS</span><br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">PROFILE</span><span style="color: #66cc66;">,</span> RESOURCE_NAME<span style="color: #66cc66;">,</span> LIMIT<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dba_profiles <br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ORDER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">PROFILE</span><span style="color: #66cc66;">,</span> resource_name;<br />
<br />
&nbsp; s_PROFILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dba_profiles.PROFILE%<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TYPE</span> ;<br />
&nbsp; s_prev_PROFILE &nbsp; &nbsp; &nbsp; &nbsp;dba_profiles.PROFILE%<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TYPE</span> ;<br />
&nbsp; s_RESOURCE_NAME &nbsp; &nbsp; &nbsp; dba_profiles.RESOURCE_NAME%<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TYPE</span> ;<br />
&nbsp; s_LIMIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dba_profiles.LIMIT%<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TYPE</span> ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
<br />
s_prev_PROFILE :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'no_such_profile'</span> ;<br />
<br />
dbms_output.enable<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1000000</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">OPEN</span> c_profiles;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span><br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FETCH</span> c_profiles <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INTO</span> s_PROFILE<span style="color: #66cc66;">,</span>s_RESOURCE_NAME<span style="color: #66cc66;">,</span>s_LIMIT ;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span> <span style="color: #66cc66;">&#40;</span> s_prev_profile <span style="color: #66cc66;">&lt;&gt;</span> s_profile <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">THEN</span><br />
&nbsp; &nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp; &nbsp; &nbsp; dbms_output.put_line <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'--'</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; dbms_output.put_line <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'create profile &quot;'</span><span style="color: #66cc66;">||</span>s_profile<span style="color: #66cc66;">||</span><span style="color: #ff0000;">'&quot; limit '</span> <span style="color: #66cc66;">||</span>s_RESOURCE_NAME<span style="color: #66cc66;">||</span> <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">||</span> s_LIMIT<span style="color: #66cc66;">||</span><span style="color: #ff0000;">';'</span> <span style="color: #66cc66;">&#41;</span> ;<br />
&nbsp; &nbsp; &nbsp; s_prev_profile :<span style="color: #66cc66;">=</span> s_profile ;<br />
&nbsp; &nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ELSE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;dbms_output.put_line <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'alter profile &quot;'</span><span style="color: #66cc66;">||</span>s_profile<span style="color: #66cc66;">||</span> <span style="color: #ff0000;">'&quot; limit '</span> <span style="color: #66cc66;">||</span>s_RESOURCE_NAME<span style="color: #66cc66;">||</span> <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">||</span> s_LIMIT <span style="color: #66cc66;">||</span> <span style="color: #ff0000;">';'</span> <span style="color: #66cc66;">&#41;</span> ;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span>;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">EXIT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHEN</span> c_profiles%NOTFOUND ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span> ;<br />
<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">CLOSE</span> c_profiles ;<br />
<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;<br />
<span style="color: #66cc66;">/</span></div></div>
<p><span id="more-368"></span><br />
Output example:</p>
<blockquote><p>
@clone_profile</p>
<p>create profile &#8220;DEFAULT&#8221; limit COMPOSITE_LIMIT UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit CONNECT_TIME UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit CPU_PER_CALL UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit CPU_PER_SESSION UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit FAILED_LOGIN_ATTEMPTS 10;<br />
alter profile &#8220;DEFAULT&#8221; limit IDLE_TIME UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit LOGICAL_READS_PER_CALL UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit LOGICAL_READS_PER_SESSION UNLIMITED;<br />
alter profile &#8220;DEFAULT&#8221; limit PASSWORD_GRACE_TIME 7;<br />
alter profile &#8220;DEFAULT&#8221; limit PASSWORD_LIFE_TIME 180;<br />
alter profile &#8220;DEFAULT&#8221; limit PASSWORD_LOCK_TIME 1;</p>
<p>create profile &#8220;MONITORING_PROFILE&#8221; limit COMPOSITE_LIMIT DEFAULT;<br />
alter profile &#8220;MONITORING_PROFILE&#8221; limit FAILED_LOGIN_ATTEMPTS UNLIMITED;
</p></blockquote>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20110324%2Foracle-how-to-clone-profiles.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20110324/oracle-how-to-clone-profiles.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: how to clone profiles" data-url="http://www.memosoup.com/20110324/oracle-how-to-clone-profiles.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20110324/oracle-how-to-clone-profiles.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: quotes and quote operator</title>
		<link>http://www.memosoup.com/20110111/oracle-quote-and-quote-operator.html</link>
		<comments>http://www.memosoup.com/20110111/oracle-quote-and-quote-operator.html#comments</comments>
		<pubDate>Tue, 11 Jan 2011 13:45:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[operator]]></category>
		<category><![CDATA[quote]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=327</guid>
		<description><![CDATA[<p>There are several methods to put the quote into the string.</p> <p>The first (and very traditional) one: use 2 quotes.</p> SELECT 'This '' is quote' FROM dual; <p>If there are more than one quote, it&#8217;s difficult to read and write such strings</p> <p>The second: use chr(39)</p> SELECT 'This ' &#124;&#124; CHR&#40;39&#41; &#124;&#124; ' is quote' [...]]]></description>
			<content:encoded><![CDATA[<p>There are several methods to put the quote into the string.</p>
<p>The first (and very traditional) one: <strong>use 2 quotes.</strong></p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #ff0000;">'This '</span><span style="color: #ff0000;">' is quote'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual;</div></div>
<p>If there are more than one quote, it&#8217;s difficult to read and write such strings</p>
<p>The second: <strong>use chr(39)</strong></p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #ff0000;">'This '</span> <span style="color: #66cc66;">||</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">CHR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">39</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">||</span> <span style="color: #ff0000;">' is quote'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual;</div></div>
<p>The third: <strong>put the quote into the variable</strong></p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">DECLARE</span><br />
&nbsp;s_quote <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">''</span><span style="color: #ff0000;">''</span> ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp;dbms_output.put_line<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'This '</span> <span style="color: #66cc66;">||</span> s_quote <span style="color: #66cc66;">||</span> <span style="color: #ff0000;">' is quote'</span> <span style="color: #66cc66;">&#41;</span> ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;</div></div>
<p>And, finally, Oracle 10g has added new feature: <strong>quote operator</strong>.</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> q<span style="color: #ff0000;">'[This '</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IS</span> quote<span style="color: #66cc66;">&#93;</span><span style="color: #ff0000;">' from dual ;</span></div></div>
<p>The general form is <strong>q&#8217;X string X&#8217;</strong>. Here X is just some character. If the brackets are used, Oracle expects the closing bracket for the end of the string.</p>
<p>Here are the additional examples:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> q<span style="color: #ff0000;">'(This '</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IS</span> quote<span style="color: #66cc66;">&#41;</span><span style="color: #ff0000;">' from dual ;<br />
select q'</span><span style="color: #66cc66;">|</span>This <span style="color: #ff0000;">' is quote|'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> q<span style="color: #ff0000;">'#This '</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IS</span> quote#<span style="color: #ff0000;">' from dual ;<br />
select q'</span>#This <span style="color: #ff0000;">' is quote#'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual ;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> q<span style="color: #ff0000;">'?This '</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IS</span> quote?<span style="color: #ff0000;">' from dual ;<br />
select q'</span>TThis <span style="color: #ff0000;">' is quoteT'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual ;</div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20110111%2Foracle-quote-and-quote-operator.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20110111/oracle-quote-and-quote-operator.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: quotes and quote operator" data-url="http://www.memosoup.com/20110111/oracle-quote-and-quote-operator.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20110111/oracle-quote-and-quote-operator.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: problem relinking binaries on Solaris</title>
		<link>http://www.memosoup.com/20101224/oracle-problem-relinking-binaries-on-solaris.html</link>
		<comments>http://www.memosoup.com/20101224/oracle-problem-relinking-binaries-on-solaris.html#comments</comments>
		<pubDate>Fri, 24 Dec 2010 11:53:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[relink]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=323</guid>
		<description><![CDATA[<p>I&#8217;ve got the following message relinking the binaries on Solaris:</p> <p>ld: fatal: dlopen() of support library (libmakestate.so.1) failed with error:</p> <p>ld.so.1: /usr/ccs/bin/sparcv9/ld: fatal: /usr/lib/libmakestate.so.1: wrong ELF class: ELFCLASS32</p> <p>The problem was caused by missing 64-bit library libmakestate.so.1 in /usr/lib.</p> <p>The normal library should look like the following:</p> <p>[#] file /usr/lib/sparcv9/libmakestate.so.1 libmakestate.so.1: ELF 64-bit MSB dynamic [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got the following message relinking the binaries on Solaris:</p>
<p><em>ld: fatal: dlopen() of support library (libmakestate.so.1) failed with error:</em></p>
<p><em></em><em>ld.so.1: /usr/ccs/bin/sparcv9/ld: fatal: /usr/lib/libmakestate.so.1: wrong ELF class: ELFCLASS32</em></p>
<p>The problem was caused by missing 64-bit library libmakestate.so.1 in /usr/lib.</p>
<p>The normal library should look like the following:</p>
<p><em>[#] file /usr/lib/sparcv9/libmakestate.so.1<br />
libmakestate.so.1: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped</em></p>
<p><em><br />
</em>If the library does not exist or is incorrect, it should be reinstalled from the package <strong>SUNWsprox</strong> ( Sun WorkShop Bundled 64-bit make library)</p>
<p>This command checks, if the package is installed in the system:<br />
[#]  <strong>pkginfo -i SUNWsprox</strong></p>
<p>After installing the package relink works fine.<strong> </strong></p>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20101224%2Foracle-problem-relinking-binaries-on-solaris.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20101224/oracle-problem-relinking-binaries-on-solaris.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: problem relinking binaries on Solaris" data-url="http://www.memosoup.com/20101224/oracle-problem-relinking-binaries-on-solaris.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20101224/oracle-problem-relinking-binaries-on-solaris.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: eval function</title>
		<link>http://www.memosoup.com/20100211/oracle-eval-function.html</link>
		<comments>http://www.memosoup.com/20100211/oracle-eval-function.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 13:40:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[eval]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=271</guid>
		<description><![CDATA[<p>The function takes some expression as the argument and executes it, returning output in the varchar string</p> CREATE OR REPLACE FUNCTION eval &#40;expr VARCHAR2&#41; RETURN VARCHAR2 AS &#160; ret VARCHAR2&#40;4000&#41;; BEGIN &#160; EXECUTE IMMEDIATE 'begin :result := ' &#124;&#124; expr &#124;&#124; '; end;' USING OUT ret; &#160; RETURN ret; END; / <p>The discussion and examples [...]]]></description>
			<content:encoded><![CDATA[<p>The function takes some expression as the argument and executes it, returning output in the varchar string</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OR</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">REPLACE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FUNCTION</span> eval <span style="color: #66cc66;">&#40;</span>expr <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">RETURN</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">AS</span> <br />
&nbsp; ret <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4000</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">EXECUTE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IMMEDIATE</span> <span style="color: #ff0000;">'begin :result := '</span> <span style="color: #66cc66;">||</span> expr <span style="color: #66cc66;">||</span> <span style="color: #ff0000;">'; end;'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">USING</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OUT</span> ret;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">RETURN</span> ret;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;<br />
<span style="color: #66cc66;">/</span></div></div>
<p>The discussion and examples could be found <a href="http://www.adp-gmbh.ch/blog/2005/may/5.html">there</a></p>

<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20100211%2Foracle-eval-function.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20100211/oracle-eval-function.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: eval function" data-url="http://www.memosoup.com/20100211/oracle-eval-function.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100211/oracle-eval-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: list of the system events</title>
		<link>http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html</link>
		<comments>http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html#comments</comments>
		<pubDate>Wed, 10 Feb 2010 16:17:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[event]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=269</guid>
		<description><![CDATA[<p>This piece of code show the list of events, set in the Oracle database</p> SET serveroutput ON &#160;DECLARE &#160; event_level NUMBER; &#160;BEGIN &#160; dbms_output.enable&#40;20000&#41; ; &#160; FOR i IN 10000..33999 LOOP &#160; &#160; &#160;sys.dbms_system.read_ev&#40;i,event_level&#41;; &#160; &#160; &#160;IF &#40;event_level &#62; 0&#41; THEN &#160; &#160; &#160; &#160; dbms_output.put_line&#40;'Event '&#124;&#124;TO_CHAR&#40;i&#41;&#124;&#124;' set at level '&#124;&#124; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;TO_CHAR&#40;event_level&#41;&#41;;
&#160; &#160; &#160;END IF;
&#160; END LOOP;
END;
 
				
			 
				
			 
				Tweet 
			
		news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<p>This piece of code show the list of events, set in the Oracle database</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> serveroutput <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span><br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">DECLARE</span><br />
&nbsp; event_level <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span>;<br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp; dbms_output.enable<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20000</span><span style="color: #66cc66;">&#41;</span> ;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FOR</span> i <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IN</span> <span style="color: #cc66cc;">10000</span>..<span style="color: #cc66cc;">33999</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span><br />
&nbsp; &nbsp; &nbsp;sys.dbms_system.read_ev<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">,</span>event_level<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span> <span style="color: #66cc66;">&#40;</span>event_level <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">THEN</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dbms_output.put_line<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Event '</span><span style="color: #66cc66;">||</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_CHAR</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">||</span><span style="color: #ff0000;">' set at level '</span><span style="color: #66cc66;">||</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_CHAR</span><span style="color: #66cc66;">&#40;</span>event_level<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span>;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span>;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;</div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20100210%2Foracle-list-of-the-system-events.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: list of the system events" data-url="http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: list of the running transactions</title>
		<link>http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html</link>
		<comments>http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 12:58:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[run]]></category>
		<category><![CDATA[transaction]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=267</guid>
		<description><![CDATA[<p>This query shows SID, username and start time of the running transaction. In addition, number of the used blocks is shown.</p> SELECT a.sid, a.status, a.username, b.xidusn, b.used_urec, b.used_ublk, b.START_TIME FROM v$session a, v$transaction b WHERE a.saddr = b.ses_addr ORDER BY START_TIME DESC; Tweet news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<p>This query shows SID, username and start time of the running transaction.<br />
In addition, number of the used blocks is shown.</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> a.sid<span style="color: #66cc66;">,</span> a.status<span style="color: #66cc66;">,</span> a.username<span style="color: #66cc66;">,</span> b.xidusn<span style="color: #66cc66;">,</span> b.used_urec<span style="color: #66cc66;">,</span> b.used_ublk<span style="color: #66cc66;">,</span> b.START_TIME<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> v$session a<span style="color: #66cc66;">,</span> v$transaction b<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> a.saddr <span style="color: #66cc66;">=</span> b.ses_addr<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">ORDER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> START_TIME <span style="color: #993333; font-weight: bold; text-transform: uppercase;">DESC</span>;</div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20100209%2Foracle-list-of-the-running-transactions.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: list of the running transactions" data-url="http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: internal sql types</title>
		<link>http://www.memosoup.com/20100209/oracle-internal-sql-types.html</link>
		<comments>http://www.memosoup.com/20100209/oracle-internal-sql-types.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 12:51:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=265</guid>
		<description><![CDATA[<p>Here is the list of the Oracle SQL types and their internal codes:</p> SELECT t.typecode,o.name FROM sys.TYPE$ t, sys.obj$ o WHERE BITAND &#40;t.properties, 16&#41; = 16 AND t.toid = o.oid$ ORDER BY t.typecode <p>&#8216;</p> Tweet news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<p>Here is the list of the Oracle SQL types and their internal codes:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> t.typecode<span style="color: #66cc66;">,</span>o.name<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> sys.<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TYPE</span>$ t<span style="color: #66cc66;">,</span> sys.obj$ o<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> <br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BITAND</span> <span style="color: #66cc66;">&#40;</span>t.properties<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">16</span><br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">AND</span> t.toid <span style="color: #66cc66;">=</span> o.oid$<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">ORDER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> t.typecode</div></div>
<p>&#8216;</p>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20100209%2Foracle-internal-sql-types.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20100209/oracle-internal-sql-types.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Oracle: internal sql types" data-url="http://www.memosoup.com/20100209/oracle-internal-sql-types.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100209/oracle-internal-sql-types.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

