Re: Weird Truncate Error

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Sun, 27 Feb 2011 21:17:37 +0100
Message-ID: <8svpr9FvkuU1_at_mid.individual.net>


On 18.02.2011 03:59, The Magnet wrote:
> I've looked this up and have gotten nowhere. We have this code in a
> stored procedure:
>
> EXECUTE IMMEDIATE 'TRUNCATE table details_tp';
>
> I get this error when the process is run via BATCH using the CRON:
> ORA-02091: transaction rolled back
>
> But, if I run it by hand, no issues. Additionally, if I put an event
> handler in there and perform a DELETE if the truncate fails, the
> delete works fine.
>
> Any thoughts? How can a truncate fail? What kind of error is that?
> It is not a locking error...... we are all kind of lost.

This is way too few information but I would point to the peculiarities of TRUNCATE not being transactional:

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10006.htm#i2067571

For more detailed answers you should probably post schema, your stored procedure, Oracle version etc.

Cheers

        robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
Received on Sun Feb 27 2011 - 21:17:37 CET

Original text of this message