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
Where are stored procedures in sql server?
Why would you use sql agent?
What Is Rdbms?
How can I create a report based on a query? : sql server management studio
What is the difference between varchar and varchar(max) datatypes?
What is the usage of sign function?
What are acid properties of transaction?
What are the instances when triggers are appropriate?
What is open database communication (odbc)?
How to delete duplicate rows?
Explain what are the events recorded in a transaction log?
What is catalog views?
What is CTE in SQL
what are the disadvantages of cursors? : Sql server database administration
Why I am getting this error when dropping a database in ms sql server?