Re: question regarding truncate operation
- From: "Tibor Karaszi" <tibor_please.no.email_karaszi@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Jun 2009 08:46:12 +0200
Correct. Nowadays, we actually do use the terms fully and minimally logged. :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Vadivel" <Vadivel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:3AF77A34-8CDC-4DAF-A0D0-BCEA6718AAC6@xxxxxxxxxxxxxxxx
We can say that, the deallocation of data pages means that the data rows
still actually exist in the data pages. But the Extents have been marked as
empty for reuse.
Also I don't think there is anything in SQL Server which is not logged. How
much of it gets logged would be the difference between various commands.
Tony/Tibor: Correct me if I am wrong with this stmt :)
Best Regards
Vadivel
http://vadivel.blogspot.com
"Tony Rogerson" wrote:
truncate table - if that is what you are talking about Pradeep is still
transaction aware...
select *
into fred
from sys.objects
go
begin tran
truncate table fred
select COUNT(*) from fred
rollback
select COUNT(*) from fred
The table "fred" will still be populated
If you create a delete trigger on "fred" then that will not fire.
Once you have committed its like you have "saved" the word document - its
done, and dusted - the only way to recover is to restore the database and
log to a point in time before the transaction you did.
Tony.
"SqlBeginner" <SqlBeginner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6301E139-1169-4463-BFA2-CAB0389A3B43@xxxxxxxxxxxxxxxx
>I read that truncate logs the deallocation of the data pages in >which the
> data exists.
>
> Actually wanted to know more on what exactly is getting logged?
>
> When truncate is called within a transaction and if that > transaction is
> rolled back the data is recovered smoothly. When sql server can > do it why
> it
> cannot do for committed transactions?
>
> Regards
> Pradeep
.
- References:
- question regarding truncate operation
- From: SqlBeginner
- Re: question regarding truncate operation
- From: Tony Rogerson
- Re: question regarding truncate operation
- From: Vadivel
- question regarding truncate operation
- Prev by Date: RE: check for temp table exists
- Next by Date: Re: check for temp table exists
- Previous by thread: Re: question regarding truncate operation
- Next by thread: Re: question regarding truncate operation
- Index(es):
Relevant Pages
|