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

Home -> Community -> Usenet -> c.d.o.misc -> Re: problem with gather_schema_stats after updating a BLOB column

Re: problem with gather_schema_stats after updating a BLOB column

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 06 Jun 2002 15:25:50 GMT
Message-ID: <3CFF7EF5.A6145D3A@exesolutions.com>


slim wrote:

> Hi,
> -- this is a sample code, where the exception occurs when calculating
> -- statistics
> -- ORA-04020: deadlock detected while trying to lock object
> USER1.tab_pictures
> -- thanks for help
>
> DECLARE
> blob_gra BLOB;
> BEGIN
> SELECT pic_graphic
> INTO blob_gra
> FROM tab_pictures
> WHERE pic_id = 100 AND
> pic_type = 'GIF'
> FOR UPDATE;
> DBMS_LOB.OPEN( blob_gra, DBMS_LOB.LOB_READWRITE );
> DBMS_LOB.CLOSE( blob_gra);
>
> dbms_stats.gather_schema_stats(ownname => 'USER1',
> cascade => TRUE);
> EXCEPTION
> WHEN OTHERS THEN
> RAISE;
> END;
Lets see ... you lock a record by doing a SELECT FOR UPDATE. And you don't release the lock ... I wonder what could be the problem? Hmmmm. <g>

Daniel Morgan Received on Thu Jun 06 2002 - 10:25:50 CDT

Original text of this message

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