Re: Cannot drop a table with dynamic SQL.
From: Anil Sinha <sinha_at_watson.bms.com>
Date: Thu, 14 May 1992 18:58:00 GMT
Message-ID: <14MAY199213584900_at_watson.bms.com>
If you specify RELEASE_CURSOR=YES, after ORACLE executes the SQL statement and the cursor is closed, the precompiler immediately removes the link. This frees memory allocated to the context area and releases parse locks.
Date: Thu, 14 May 1992 18:58:00 GMT
Message-ID: <14MAY199213584900_at_watson.bms.com>
>I have run into a problem which I am not able to solve, so if
>anyone has any hints please inform me.
>The problem is that i cannot drop a modifyed committed table with
>a dynamic SQL statement.
>When I run the following code this error message is presented:
>ORA-00056: DDL lock on object '18815' is already held in an incompatib
Use the Precompiler option RELEASE_CURSOR = YES when you precompile or within your program ( EXEC ORACLE OPTION ( RELEASE_CURSOR = YES)) .
Extracted from Oracle Precompilers :Programmer's guide to precompiler (last paragraph page 10-15)
If you specify RELEASE_CURSOR=YES, after ORACLE executes the SQL statement and the cursor is closed, the precompiler immediately removes the link. This frees memory allocated to the context area and releases parse locks.
I was in a similar situation and I think it still works.
Good luck. Received on Thu May 14 1992 - 20:58:00 CEST