dbTalk Databases Forums  

Weird Truncate Error

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Weird Truncate Error in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Magnet
 
Posts: n/a

Default Weird Truncate Error - 02-17-2011 , 08:59 PM






Hi,

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.

Thanks!

Reply With Quote
  #2  
Old   
Robert Klemme
 
Posts: n/a

Default Re: Weird Truncate Error - 02-27-2011 , 02:17 PM






On 18.02.2011 03:59, The Magnet wrote:
Quote:
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/B...6.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/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.