Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Package variable corruption?

Re: Package variable corruption?

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 26 Jan 2007 09:25:51 -0800
Message-ID: <1169832348.548412@bubbleator.drizzle.com>


spam_at_thunkbox.com wrote:
> I have a couple of PL/SQL stored procedures on Oracle 9.2.0.2.0, one of
> which keeps track of a checksum, shown below (extraneous procedures
> removed):
>
> CREATE OR REPLACE PACKAGE BODY flow_utils AS
> TYPE byte_arr_t IS VARRAY(4) OF RAW(1);
> g_bytes byte_arr_t := byte_arr_t('00', '00', '00', '00');
> PROCEDURE calc_line_chksum(p_line IN STRING) IS
> i PLS_INTEGER := 1;
> BEGIN
> FOR j IN 1 .. length(p_line) LOOP
> g_bytes(i) := utl_raw.bit_xor(g_bytes(i),
> utl_raw.cast_to_raw(substr(p_line, j, 1)));
> i := i + 1;
> IF (i = 5) THEN
> i := 1;
> END IF;
> END LOOP;
> END calc_line_chksum;
> PROCEDURE init_chksum_bytes IS
> BEGIN
> g_bytes := byte_arr_t('00', '00', '00', '00');
> END init_chksum_bytes;
> END flow_utils;
>
> The other procedure writes files using UTL_FILE. When I open each file,
> I call init_chksum_bytes and for each line in the file I write I also
> call calc_line_checksum. Before I close the file, I write the checksum.
> This procedure is called from a DMBS_JOB.
>
>
> The daily job creates about 150 files, so far during Jan, around 3000
> files have been created with good checksums. However 4 or the 3000 so
> far have bad checksums. Recreating the file using the same routines
> creates a good checksum.
> This sounds like some sort of corruption I can't find anything about
> this on Metalink.
>
> Any ideas anyone?

The one that comes to mind is 9.2.0.2. Patch it!

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Jan 26 2007 - 11:25:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US