RE: PL/SQL differences between Solaris & Linux

From: William Wagman <wjwagman_at_ucdavis.edu>
Date: Thu, 24 Jul 2008 08:29:00 -0700
Message-ID: <FE043305B38A0F448F3924429D650C2A08507C65@VEXBE2.ex.ad3.ucdavis.edu>


William,

In response to your first statement, yes, in order to get the code to work on the linux installation it was necessary to make the changes I listed. The solaris code did not conform to the requirements in the PL/SQL documentation and yet worked. Upon porting the code to linux it failed until the noted changes were made. Yes, the two installations have the same version of PL/SQL, both 9.2.0.8.0. A change across releases is less surprising to me than a difference across platforms, particularly when code violates requirements. Although, an aside, I did find that in the Solaris version of 10g there is still reference to a developers local directory in the dbstart script.

Thanks for the reply.

Bill Wagman
Univ. of California at Davis
IET Campus Data Center
wjwagman_at_ucdavis.edu
(530) 754-6208
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of William Robertson Sent: Thursday, July 24, 2008 4:58 AM
To: oracle-l
Subject: Re: PL/SQL differences between Solaris & Linux

Ah, I was assuming that

 > "I had to make the following changes..."

meant you had made the changes that followed ;)

There have been cases in the past where things were allowed that should not have been, such as mismatches between package specs and bodies around 8i I think, and a literal space assigned to a numeric variable became 0 for one or two early releases, then the next version would fix it and inevitably there was code that no longer compiled. Do your two environments claim to have identical versions of PL/SQL?

-----Original message-----
From: William Wagman
Date: 24/7/08 01:11
> William,
>
> Thanks for the response. Thankfully, I can't take credit for the code.
A
> bug or some other glitch is the only thing I can think of as the docs
> clearly state you can't do that. Oh well, perhaps another of life's
> mysteries.
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of William Robertson
> Sent: Wednesday, July 23, 2008 3:39 PM
> To: oracle-l
> Subject: Re: PL/SQL differences between Solaris & Linux
>
> If the gods are angry, my guess it's at the redundant SELECT FROM DUAL

> and the way you duplicate the error code. What on Earth is the purpose

> of that? Is an ORA-01555 error greatly improved by logging it as
> "-1555: ORA-01555"?
>
> Regarding the different behaviour, I'm afraid I have no idea, looks
> like a bug crept in on the Solaris version, or the fix crept in on the
> Linux one. Why the restriction is there in the first place I'll also
> never
> know.
>
>
> -----Original message-----
> From: William Wagman
> Date: 23/7/08 19:29
>
>> Greetings,
>>
>> We are in the process of moving our 9.2.0.8.0 EE database from
Solaris
>> SunOS 5.8 Generic_117350-54 sun4u sparc SUNW,Sun-Fire-480R to Linux
>> 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:58:43 EDT 2008 x86_64 x86_64
>> x86_64 GNU/Linux and have found an issue with some PL/SQL code. The
>> following PL/SQL code segment (if the entire procedure would help,
it's
>> only 100 lines, let me know) compiled successfully on Solaris...
>>
>> EXCEPTION
>> WHEN OTHERS
>> THEN
>> SELECT ucd.log_seq.NEXTVAL
>> INTO v_error_row
>> FROM DUAL;
>>
>> INSERT INTO ucd.LOG
>> VALUES (v_error_row, 'APS',
'CARD_SERVICE_FIX','PROCEDURE',
>> 'ERROR', SQLCODE || ': ' || SQLERRM || '.',
SYSDATE);
>>
>> This code on linux generated the error PL/SQL: ORA-00984: column not
>> allowed here
>> Which is to be expected (I guess) as I this is apparently not
>> supported with SQLCODE and SQLERRM and I had to make the following
>> changes...
>>
>> v_error_string VARCHAR2 (4000);
>> .
>> EXCEPTION
>> WHEN OTHERS
>> THEN
>> v_error_string := SQLCODE || ': ' || SQLERRM || '.';
>> SELECT ucd.log_seq.NEXTVAL
>> INTO v_error_row
>> FROM DUAL;
>>
>> INSERT INTO ucd.LOG
>> VALUES (v_error_row, 'APS', 'CARD_SERVICE_FIX',
>> 'ERROR', v_error_string, SYSDATE);
>>

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 24 2008 - 10:29:00 CDT

Original text of this message