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

Home -> Community -> Usenet -> c.d.o.server -> Re: DDL/DML and rollback

Re: DDL/DML and rollback

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 6 Feb 2005 00:46:13 -0800
Message-ID: <117679573.000019db.007@drn.newsguy.com>


In article <cu4l4d$pq0$1_at_nemesis.news.tpi.pl>, vertigo says...
>
>
>
>>
>> Think of it: when your database crashes during drop table, and the DDL
>> hasn't been yet automatically committed, shouldn't Oracle be capable
>> to rollback the operation?
>>
>
>Ok, but what about truncate:
>I found that: 'truncate is a DDL statement and generates no rollback
>information'. What happen when database crashes during truncate table ?
>

there is no undo generated for the segment being truncated (no need, the data is left untouched on disk)

however, the dictionary updates that take place generate UNDO - so that in the event of a crash in the middle of the truncate (before it completes, before it commits) -- the database will be able to "undo" the partial truncate.

>Thanx
>Michal
>

-- 
Thomas Kyte
Oracle Public Sector
http://asktom.oracle.com/
opinions are my own and may not reflect those of Oracle Corporation
Received on Sun Feb 06 2005 - 02:46:13 CST

Original text of this message

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