SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How do you restore a deleted record/s directly from the SQL transaction log?


How do you restore a deleted record/s directly from the SQL transaction log?

Author
Message
RayMan007
RayMan007
SSC-Enthusiastic
SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)

Group: General Forum Members
Points: 111 Visits: 284
How do you restore a deleted record/s directly from the SQL transaction log? I would also like to add that the database is huge. So, restoring from a full SQL backup along with the transaction logs is not an option. Also, I am not interested in any third party tools $$$$, unless it is free.;-)

I want to use TSQL to accomplish this mission.
Shawn Melton
Shawn Melton
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5943 Visits: 3537
You can use T-SQL to find in the log where your deleted record is at, but the only way you are going to get it back is from a restore if the delete was already committed.

You can find a walkthrough of using fn_dblog here on MSSQLTips.com.

Shawn Melton
Twitter: @wsmelton
Blog: blog.wsmelton.info
RayMan007
RayMan007
SSC-Enthusiastic
SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)

Group: General Forum Members
Points: 111 Visits: 284
Hi Shawn, there is no way to restore a record directly from the transaction log? That is too bad, I have a huge database and I do not have the room on my drive to create a duplicate database. I would think that Microsoft SQL team would have some provision (TSQL system stored procedure) that would allow a simple operation like this.
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95453 Visits: 38968
ray santalis-466762 (4/4/2014)
Hi Shawn, there is no way to restore a record directly from the transaction log? That is too bad, I have a huge database and I do not have the room on my drive to create a duplicate database. I would think that Microsoft SQL team would have some provision (TSQL system stored procedure) that would allow a simple operation like this.


What you think is a simple operation really is not. The transaction log isn't meant to be used the way you are attempting to use it. In addition, the VLF's get flagged as inactive when it does not have any active transactions.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
RayMan007
RayMan007
SSC-Enthusiastic
SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)SSC-Enthusiastic (111 reputation)

Group: General Forum Members
Points: 111 Visits: 284
Thanks everyone!:-D

I just wanted to make sure.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search