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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

roll back truncate

Status
Not open for further replies.

fuadhamidov

Programmer
Sep 22, 2003
98
TR
hi

i have a problem.
i have misunderstand truncate function and i have called it.

becouse size of mdf and ldf files have nor changes, i think there should be roll back.

is there any way

thanks for any help
 
You would only be able to roll it back if you had explicitly started a transaction and had not yet committed it (I assume this is not the case).

If not, then you will need to restore the db from a recent backup. Alternatively you could try a third party tool like Lumigent Log Explorer to try and recover the transaction.

--James
 
Lumigent's Log explorer won't be able to roll back a truncate statement as truncate table isn't a logged command. You'll need to restore from backup to resolve this.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Just to clarify, TRUNCATE is not fully logged (it does not log each row delete) but the data page deallocations are logged and you can rollback a TRUNCATE statement.

But as to whether Log Explorer can roll it back after the event from the T-LOG records, I don't know.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top