 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Oracle 9i to Oracle 10g Upgrade &#8211; Help needed for some PL/SQL errors</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/</link>
	<description></description>
	<lastBuildDate>Mon, 20 May 2013 05:26:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: prateeksingh</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60993</link>
		<dc:creator>prateeksingh</dc:creator>
		<pubDate>Wed, 18 Mar 2009 19:04:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-60993</guid>
		<description><![CDATA[Hi Carlos,

I re-checked the scnario in an Oracle 8 database server, and it compiles successfully for me.
My guess is that there some compiler settings for 8i and 9i version which are different in yours and mine database server.

Thanks and Regards,
Prateek]]></description>
		<content:encoded><![CDATA[<p>Hi Carlos,</p>
<p>I re-checked the scnario in an Oracle 8 database server, and it compiles successfully for me.<br />
My guess is that there some compiler settings for 8i and 9i version which are different in yours and mine database server.</p>
<p>Thanks and Regards,<br />
Prateek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prateeksingh</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60989</link>
		<dc:creator>prateeksingh</dc:creator>
		<pubDate>Wed, 18 Mar 2009 17:55:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-60989</guid>
		<description><![CDATA[Hi Carlos,

Sorry for wrong information and for the time it might have cost you.

I am compiling on Oracle 9.2.0.4.0 version, when there are no errors.

Thanks and Regards,
Prateek]]></description>
		<content:encoded><![CDATA[<p>Hi Carlos,</p>
<p>Sorry for wrong information and for the time it might have cost you.</p>
<p>I am compiling on Oracle 9.2.0.4.0 version, when there are no errors.</p>
<p>Thanks and Regards,<br />
Prateek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60986</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Wed, 18 Mar 2009 15:49:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-60986</guid>
		<description><![CDATA[Hi Prateek.

I get compile time errors in 8i regardless of whether both the declarations are exactly same or not.

This was my test:

&lt;i&gt;Connected to:
Oracle8i Release &lt;b&gt;8.1.7.4.1&lt;/b&gt; - Production
JServer Release &lt;b&gt;8.1.7.4.1&lt;/b&gt; - Production

SQL&gt; create or replace package the_test as
  2   var1 varchar2(10);
  3   var1 varchar2(10);
  4  
  5   procedure test;
  6  end the_test;
  7  /

Package created.

SQL&gt; create or replace package body the_test as
  2  procedure test is
  3  begin
  4   dbms_output.put_line(&#039;testing&#039;);
  5   var1 := &#039;test&#039;;
  6  end;
  7  end the_test;
  8  /

Warning: Package Body created with compilation errors.

SQL&gt; show errors;
Errors for PACKAGE BODY THE_TEST:

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/2      PLS-00371: at most one declaration for &#039;VAR1&#039; is permitted in the
         declaration section

5/2      PL/SQL: Statement ignored
&lt;/i&gt;
------

If the varable is not referenced in the body, no errors are reported:

&lt;i&gt;SQL&gt; create or replace package the_test as
  2   var1 varchar2(10);
  3   var1 varchar2(10);
  4  
  5   procedure test;
  6  end the_test;
  7  /

Package created.

SQL&gt; 
SQL&gt; 
SQL&gt; create or replace package body the_test as
  2  procedure test is
  3  begin
  4   dbms_output.put_line(&#039;testing&#039;);
  5   --var1 := &#039;test&#039;;
  6  end;
  7  end the_test;
  8  /

Package body created.

SQL&gt; show errors;
No errors.&lt;/i&gt;

Regards,]]></description>
		<content:encoded><![CDATA[<p>Hi Prateek.</p>
<p>I get compile time errors in 8i regardless of whether both the declarations are exactly same or not.</p>
<p>This was my test:</p>
<p><i>Connected to:<br />
Oracle8i Release <b>8.1.7.4.1</b> &#8211; Production<br />
JServer Release <b>8.1.7.4.1</b> &#8211; Production</p>
<p>SQL&gt; create or replace package the_test as<br />
  2   var1 varchar2(10);<br />
  3   var1 varchar2(10);<br />
  4<br />
  5   procedure test;<br />
  6  end the_test;<br />
  7  /</p>
<p>Package created.</p>
<p>SQL&gt; create or replace package body the_test as<br />
  2  procedure test is<br />
  3  begin<br />
  4   dbms_output.put_line(&#8216;testing&#8217;);<br />
  5   var1 := &#8216;test&#8217;;<br />
  6  end;<br />
  7  end the_test;<br />
  8  /</p>
<p>Warning: Package Body created with compilation errors.</p>
<p>SQL&gt; show errors;<br />
Errors for PACKAGE BODY THE_TEST:</p>
<p>LINE/COL ERROR<br />
&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
5/2      PLS-00371: at most one declaration for &#8216;VAR1&#8242; is permitted in the<br />
         declaration section</p>
<p>5/2      PL/SQL: Statement ignored<br />
</i><br />
&#8212;&#8212;</p>
<p>If the varable is not referenced in the body, no errors are reported:</p>
<p><i>SQL&gt; create or replace package the_test as<br />
  2   var1 varchar2(10);<br />
  3   var1 varchar2(10);<br />
  4<br />
  5   procedure test;<br />
  6  end the_test;<br />
  7  /</p>
<p>Package created.</p>
<p>SQL&gt;<br />
SQL&gt;<br />
SQL&gt; create or replace package body the_test as<br />
  2  procedure test is<br />
  3  begin<br />
  4   dbms_output.put_line(&#8216;testing&#8217;);<br />
  5   &#8211;var1 := &#8216;test&#8217;;<br />
  6  end;<br />
  7  end the_test;<br />
  8  /</p>
<p>Package body created.</p>
<p>SQL&gt; show errors;<br />
No errors.</i></p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prateeksingh</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60963</link>
		<dc:creator>prateeksingh</dc:creator>
		<pubDate>Wed, 18 Mar 2009 02:28:30 +0000</pubDate>
		<guid isPermaLink="false">#comment-60963</guid>
		<description><![CDATA[Hi Carlos,

Thanks for the explanations.

Regarding the first error i.e, PLS-00371, I have tested that behavior in 8i and not in 9i. I am not getting any compilation error in 8i. When you have done the double declaration of the variable v1, both the declarations should be exactly same. Have you tested in this way? If you have tested in this way, are you getting run-time error in 8i or compile time error.

Thanks for your explanations for the second and third errors. 

Thanks and Regards,
Prateek]]></description>
		<content:encoded><![CDATA[<p>Hi Carlos,</p>
<p>Thanks for the explanations.</p>
<p>Regarding the first error i.e, PLS-00371, I have tested that behavior in 8i and not in 9i. I am not getting any compilation error in 8i. When you have done the double declaration of the variable v1, both the declarations should be exactly same. Have you tested in this way? If you have tested in this way, are you getting run-time error in 8i or compile time error.</p>
<p>Thanks for your explanations for the second and third errors. </p>
<p>Thanks and Regards,<br />
Prateek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60960</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Wed, 18 Mar 2009 00:37:25 +0000</pubDate>
		<guid isPermaLink="false">#comment-60960</guid>
		<description><![CDATA[Well, I think this is not an answer, but this is what I can tell you about the errors:

PLS-00371:
You can define a variable more than once in a package spec in any version of the database (I think), but you will get an error when some code inside the package body references that variable.  I have tested it in 8i and 10g, and the results were the same.  I find pretty strange that this was different in 9i.  I would say that was a bug in 9i (were you using the last release/patch set for 9i ?)

PLS-00593:
I think that defining a procedure&#039;s parameter with different default value in the spec and the body was permitted in all previous versions of the database, and it was corrected in 10g.  I would say also that this was a bug in previous versions, since you could see the body with some default value for that parameter, but when running the code, the default value used was the one from the spec definition, which was really misleading.

PLS-00216:
Seems to be another bug fixed.  In 8i (and I guess in 9i also) you could define a number with a precision of 42 at maximum, but if you defined the variable with a precision of 43, the error message was &#039;precision constraint must be in range (1 .. 38)&#039;, which was also confusing since a precision of 42 caused no errors.  Do you really need a number with a precision of 40 ?

--------------

I think it was good that you were alerted for these code errors, since you could get unexpected results if they were not reported an compilation time, as in 9i.

Regards,]]></description>
		<content:encoded><![CDATA[<p>Well, I think this is not an answer, but this is what I can tell you about the errors:</p>
<p>PLS-00371:<br />
You can define a variable more than once in a package spec in any version of the database (I think), but you will get an error when some code inside the package body references that variable.  I have tested it in 8i and 10g, and the results were the same.  I find pretty strange that this was different in 9i.  I would say that was a bug in 9i (were you using the last release/patch set for 9i ?)</p>
<p>PLS-00593:<br />
I think that defining a procedure&#8217;s parameter with different default value in the spec and the body was permitted in all previous versions of the database, and it was corrected in 10g.  I would say also that this was a bug in previous versions, since you could see the body with some default value for that parameter, but when running the code, the default value used was the one from the spec definition, which was really misleading.</p>
<p>PLS-00216:<br />
Seems to be another bug fixed.  In 8i (and I guess in 9i also) you could define a number with a precision of 42 at maximum, but if you defined the variable with a precision of 43, the error message was &#8216;precision constraint must be in range (1 .. 38)&#8217;, which was also confusing since a precision of 42 caused no errors.  Do you really need a number with a precision of 40 ?</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>I think it was good that you were alerted for these code errors, since you could get unexpected results if they were not reported an compilation time, as in 9i.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prateeksingh</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60957</link>
		<dc:creator>prateeksingh</dc:creator>
		<pubDate>Tue, 17 Mar 2009 22:23:24 +0000</pubDate>
		<guid isPermaLink="false">#comment-60957</guid>
		<description><![CDATA[Hi Carlos,

Thanks for looking into this. Because its a client code, I cannot post it.

However, I can explain you the scnarios. 

PLS-00371: There was a package P1 which had double definition for a variable V1. Stored Procedure SP1 was trying to consume P1.V1.  SP1 compiled succssfully in Oracle 9i but gave the PLS error in Oracle 10g.

PLS-00593: There was a variable V2 for which was defined in Package P2. The default value of V2 in packages specification and body were different. P2 compiled successfully in Oracle 9i but not in Oracle 10g.

PLS-00216: In a package there was a number variable defined as N1 NUMBER(40,scale). This compiled successfully in Oracle 9i but not in Oracle 10g.

Kindly let me know if you want to know anything more about the code. Thanks once more.

Regards,
Prateek]]></description>
		<content:encoded><![CDATA[<p>Hi Carlos,</p>
<p>Thanks for looking into this. Because its a client code, I cannot post it.</p>
<p>However, I can explain you the scnarios. </p>
<p>PLS-00371: There was a package P1 which had double definition for a variable V1. Stored Procedure SP1 was trying to consume P1.V1.  SP1 compiled succssfully in Oracle 9i but gave the PLS error in Oracle 10g.</p>
<p>PLS-00593: There was a variable V2 for which was defined in Package P2. The default value of V2 in packages specification and body were different. P2 compiled successfully in Oracle 9i but not in Oracle 10g.</p>
<p>PLS-00216: In a package there was a number variable defined as N1 NUMBER(40,scale). This compiled successfully in Oracle 9i but not in Oracle 10g.</p>
<p>Kindly let me know if you want to know anything more about the code. Thanks once more.</p>
<p>Regards,<br />
Prateek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-9i-to-oracle-10g-upgrade-help-needed-for-some-plsql-errors/#comment-60954</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Tue, 17 Mar 2009 21:49:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-60954</guid>
		<description><![CDATA[Could you please post the code (relevant portions) in which these errors are being reported ?]]></description>
		<content:encoded><![CDATA[<p>Could you please post the code (relevant portions) in which these errors are being reported ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.041 seconds using memcached
Object Caching 351/357 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-20 07:07:47 -->