After using delete statement in sql query to delete some
records...to retrieve the deleted records we can get using
rollback command but till that where it stores means
particular location name i need....(after deleting and
rollback )

Answer Posted / imran

SQL Server keeps log for each deleted records. you can
query these logs via 'fn_dblog' sql server function.

Select [RowLog Contents 0] FROM sys.fn_dblog(NULL, NULL)
WHERE AllocUnitName = 'dbo.TableName' AND Context IN
( 'LCX_MARK_AS_GHOST', 'LCX_HEAP' ) AND Operation in
( 'LOP_DELETE_ROWS' )

But this log is in Hex format. and you need to convert this
Hex format to your actual data.

Given below is the article that can help you to recover the
deleted records in the same way defined above.

http://raresql.com/2011/10/22/how-to-recover-deleted-data-
from-sql-sever/

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you manipulate data?

501


Explain aggregate functions?

567


hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail

1790


What is update locks?

517


What will be the maximum number of index per table?

595






what is raid? : Sql server database administration

559


What is difference between foreign key and unique key?

557


What is linked report?

89


what stored procedure would you use to view lock information? : Sql server administration

589


What is query parameter in ssrs?

120


Where are sql server usernames and passwords stored in the sql server?

618


What is BLOCK statements in SQL?

812


What is difference between stored procedure and user defined function?

558


Explain microsoft sql server functions?

552


Is sql server is free?

552