Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncate table without logging page deletions

Status
Not open for further replies.

grahams

Programmer
Dec 3, 2002
40
0
0
GB
Hi. I need to truncate a table that has in excess of 2.5 million rows. I have a recent backup (i.e. yesterday) but in truth I don't need the data anyway, the backup is (in this case) purely a paranoia thing. Now, I know truncating the table won't log the individual delete transactions but I believe it will log the page deletions. I don't even really want these logged - is there any way round it?

If not then I'll just have to do the truncate table then truncate the transaction log immediately afterwards.

Can anyone tell me if I'm right about the page deletions being logged?

Cheers,
Graham
 
From Books online:
"TRUNCATE TABLE logs only the deallocation of whole data pages."
 
Ok. Sorry if I didn't express myself properly - I understand that but I'm wondering if there's any way of not logging those page deallocations (I said deletions - my mistake)? I might just drop the table and re-script it actually.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top