Answered by:
How do I recover data?

Question
-
I create a database called VijayDB, create a table called TestTable, and populate the table with some fictitious data:
SET NOCOUNT ON
CREATE DATABASE VijayDB
GO
USE VijayDB
GO
CREATE TABLE TestTable
(
id INT PRIMARY KEY,
relID INT
)
SET NOCOUNT ON
INSERT TestTable VALUES(1, 1)
INSERT TestTable VALUES(2, 5)
INSERT TestTable VALUES(3, 3)
INSERT TestTable VALUES(4, 2)
INSERT TestTable VALUES(5, 7)
INSERT TestTable VALUES(6, 9)
INSERT TestTable VALUES(7, 4)
INSERT TestTable VALUES(8, 5)Now let's say I've thrown away the table or file that showed me those relationships of id <-> relID and allowed me to create the above INSERT statements. I've also closed this Query Analyzer window, so I can't even recover the script I used to populate the table. (Pretend, for a moment, that the script was too long to be memorized.)
So now, I want to UPDATE one row, and I open a new Query Analyzer window and say:
UPDATE TestTable SET relID = 5 After I hit F5, I realize: oh dear, I forgot to add a WHERE clause. I just updated all of the data in my table! I wasn't in a transaction, so I can't roll back. I don't have a backup, so I can't restore. What do I do?
Don't Suggest me to use Third Party Tools. I have to Solve this problem using T-SQL statements or else using SQL server Enterprise Manager Only.
Even I have not used any Transactions and also not used any Backup files also.
can u plz tell me how can i Retrieve the lost data.
Thanks & regards
Vijay Kumar.D
Wednesday, July 9, 2008 11:05 AM
Answers
-
U will have to use some Transaction Log Readers....
http://solutioncenter.apexsql.com/read-a-sql-server-transaction-log/
Seems like you reopened an old thread
Anyways, If its still there in the active portion of transaction log you can also use fn_dblog function
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page- Proposed as answer by Prashanth Jayaram Tuesday, December 30, 2014 3:26 PM
- Marked as answer by pituachMVP Saturday, January 10, 2015 4:26 PM
Tuesday, December 30, 2014 12:24 PM
All replies
-
Simple answer is NO.. you can't. You do not have backup, its not in uncommited trasaction then you can not retrieve the data. In SQL Server 2008, CDC (Change data capture) may help you in this context
Madhu
Wednesday, July 9, 2008 11:11 AM -
Hi,
So, How is it Possible with third party Tools.
This issue will be solved with third party tools.
How they will write the code.
So i think there is a chance but i don't know.
thats why i asked for the Solution
Thanks for your quick reply.
Thanks & Regards
Vijay Kumar.D
Wednesday, July 9, 2008 11:16 AM -
Third party tool read the TransactionLog and rollback the data. i have never used any of these third party tool
Madhu
Wednesday, July 9, 2008 11:39 AM -
U will have to use some Transaction Log Readers....
http://solutioncenter.apexsql.com/read-a-sql-server-transaction-log/
Seems like you reopened an old thread
Anyways, If its still there in the active portion of transaction log you can also use fn_dblog function
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page- Proposed as answer by Prashanth Jayaram Tuesday, December 30, 2014 3:26 PM
- Marked as answer by pituachMVP Saturday, January 10, 2015 4:26 PM
Tuesday, December 30, 2014 12:24 PM -
If the deleted transaction are there in active portion of the log then you can try the below link
http://raresql.com/tag/recover-deleted-data-from-sql-server/
--Prashnath
Tuesday, December 30, 2014 3:26 PM