Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Package variable corruption?
spam_at_thunkbox.com schrieb:
> 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?
>
May that be related to your problem?
http://groups.google.de/group/comp.databases.oracle.server/browse_frm/thread/fdc289883f14e11f/c03ece708380d2be?lnk=gst&q=dbms_job+session+state&rnum=2&hl=de#c03ece708380d2be
Best regards
Maxim Received on Fri Jan 26 2007 - 11:50:46 CST