How do I recover data?

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

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
http://www.sqlskills.com/blogs/paul/using-fn_dblog-fn_dump_dblog-and-restoring-with-stopbeforemark-to-an-lsn/
http://www.sqlservercentral.com/blogs/livingforsqlserver/2012/11/19/time-pass-with-transaction-log-part-3-fn-dblog/
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

Similar Messages

  • How do i recover data from an external hard drive that was accidentally deleted?  After I verified the drive, a message appeared that said my drive needed to be repaired.  When I tried to access the drive again, the 700 Gigs of music is gone!

    How do i recover data from an external hard drive that was accidentally deleted?  After I verified the drive, a message appeared that said my drive needed to be repaired.  When I tried to access the drive again, the 700 Gigs of music is gone!

    Stop using the drive immediately, un plug it.
    Buy a copy of ProSoft DataRescue 4 and use it to search for deleted files.

  • How do I recover data from my dead hard drive?

    How do I recover data from my dead hard drive?

    Is it dead or corrupt? There are recovery programs out there, however if your HD is head, paying pros to do data recovery is VERY costly.       Some have removed the platters and installed them in likewise drives that dont have head crashes, but torque tolerances are tight, and doing it right is a bit advanced and tricky for most. Ive done HD disk swaps 4 times and had success 3 of the 4 times. It requires cannibalizing another working HD.   In the future remember the golden rule, 2 copies is 1, and one is NONE.
    Its likely you could find a local computer repair station that can do it for you cheaply.  HD dont really "die", they have fried SATA bus, or crashed HEADS........the platters DO demagnatize over long time due to heat and degauss of the data (poor storage, etc).........but in specific, a HARD DRIVE DOESNT DIE ,.........only the flying head mechanisms that read and write the data, and SATA / bus that feeds the data DIES,.......but the data (unless corrupt or magnetically corrupted) is THERE

  • Imovie crashed - how do I recover data

    I was editing a project that included voice recordings thru the computer microphone and adding titles to describe the audio. My imovie program crashed/unexpectedly quit. When I restarted imovie ALL the data was lost. It looks like a brand new project. How can I recover the data? The originals have been destroyed.

    Welcome to the discussion, Billishere. I wish there were more pleasant circumstances.
    1. Look inside the Media folder of the project folder. There may still be media files there — video clips, songs, voiceovers. They may not show up in the project timeline, but they might still be there.
    2. Look too for the project.mov file inside the project folder. This is a special type of QuickTime movie, called a reference movie, with no video or audio of its own, just pointers to files in the Media folder. It is called "Your Project Name.mov". Double-click on it to open in QuickTime Player. If the movie refuses to play, media files are missing. If the movie plays okay from start to finish, the media files are still intact.
    If the project was saved just before the crash, the movie should be up-to-date. You can import the movie into a NEW iMovie project to deliver the contents of the old project to the new. Everything will arrive as a single clip, but everything will be there and play in the proper order.
    If the project hadn't been saved in a long time, the movie may not help much. Each time we save, this movie is updated.
    3. Or, you may be able to simply drag items from the Media folder of the project to the timeline of a NEW project.
    One of two things might have happened:
    1. If you imported video/audio but hadn't saved the project before the crash, that editing would be lost. The editing wouldn't have been saved to the iMovie project file, so iMovie wouldn't recognize the clips in the Media folder. iMovie would ask you about clips it didn't recognized when the project reopened.
    In that case, the Media files might still be there. They won't be there, however, if you told iMovie to discard them, or if you've saved the project subsequent to the crash.
    2. iMovie 4 (and earlier versions) were subject to several types of corruption. Although rare, one was complete destruction of the contents of the project file (the file where clip descriptions are stored) and worse, the trashing of all files in the Media folder. In both those cases, no recovery is possible. The stuff was simply gone.
    As you describe the problem, either is possible. If the Media folder is essentially empty, profound corruption may have occurred. If, however, the Media folder contains lots of stuff or the QuickTime movie plays okay you may be able to rescue items.
    CAUTION: At this point, do not save changes to the project. Doing so may cause iMovie to discard additional files it believes the project no longer needs
    Good luck.
    Karl

  • How I can recover data formated by time machine

    I was using mac book pro in partition 250 GB Mac, 250 GB Windows 7
    when I use time machine for back up, Time machine ask for hard drive and I choose window 7 HD,
    Time machine formated the second hard drive and erased all window files and OS
    Now how can I recove the data ?

    From your Windows backup after reformatting the Windows partition.
    Allan

  • How do I recover data after update from iOS 4to iOS 7

    I just spent several hours making a backup of an iPhone 4S working on iOS 4 before upgrading to iOS 7 in order to use a specific APP.
    After the upgrade and restoring the backup I have lost all my old apps and associated data.
    I am sorely tempted to change to an android phone, unless someone knows how to restore the data in full?

    Stop using the drive immediately, un plug it.
    Buy a copy of ProSoft DataRescue 4 and use it to search for deleted files.

  • How do I recover data from broken iPad mini

    My granddaughter broke the screen on her iPad mini.  When I tried to get it replaced, the repairman stated two pins were dislodged and the touch screen will not work.  How di I recover her pictures etc

    The only way is if you have a backup on a computer or on iCloud.
     Cheers, Tom

  • How to properly recover data from "broken" hard drive?

    Hello Mac users,
    I have a mid 2012 Mountain Lion MacBook Pro. My hard drive recently failed. As I have been working in Thailand, I decided to bring my laptop an Authorized Service Provider (Macintosh Center Co., Ltd.) in Bangkok. Their diagnostic was that my hard drive wasnt working anymore, and I had to change it. The problem is, since I had no backup, I asked them to recover my data and transfer to the new hard drive. But, this Apple Authorized Service Provider told me I had to go somewherelse because they have no software to recover my data! So, I went to the local Joe's repair computer store who retrieved my data from the problematic hard drive to the new one. Now, the problem is that all my "old" data is located in "orphan folders". In other words, counteless files were retrieved without folders and settings.
    So, I would like to know if it is possible to recover my data with all the settings I had and then transfer it to my new hard drive. If it's possible, what software should I use to properly recover my data? If it's not possible, how should I deal with the "orphan folders" and my current settings?
    Thanks in advance for your help.

    First stop using your system, then get a copy of a program that will recover files like Data Rescue 3.  If you have a time machine backup you may be able to restore them. 

  • How do I recover data from a repartioned boot drive?

    Hello all, I am hoping someone can help me with my problem. I have a PowerMac G5 1.8 single CPU. OSX 10.5.
    Recently my 'B' hard drive dedicated to Time Machine failed. I purchased a replacement drive, and when in disk utility I accidentally repartioned my 'A' drive. So now there is no startup disk. Can I reverse what I did? I am thinking no.
    I have Data Rescue by Prosoft, and I scanned it and I can recover all from the A drive (it's about 2 TB for everything). But I don't need to recover the OS since I have the disk. I just want all my data.
    So here are my questions:
    I don't have a 2TB drive. I could purchase one and recover all the data from the A drive. Then what do I do? I assume I would reload a fresh install of 10.5 onto the new B drive (saving A for now). Then how do I get all of my files and setting backs into the new boot drive? Is there an easy way to reimport?
    If I don't buy a 2TB drive, what are my options? Again I assume I would load fresh 10.5 onto B, then try to recover the files I need from the old A drive. I have tons of photos, emails, and some PShop and Illustrator work files.
    What happens of I reload 10.5 back onto the A drive? Will it wipe out all of the files I want to save, or is OSX smart enought to keep data and only install the OS?
    Are there any other options for me?
    Thanks,
    Neal

    nealfromhillsborough wrote:
     Run Data Rescue and cherry pick the data off the original A drive onto the new boot disk B.My fear is that I am not savvy enough to filter through all the files I don't need to find what I do need, and then knowing where on the new drive to put it.
    Safer to recover everything that's recoverable, then pick out what you want, and ensure it's usable.
    Oh, another question. Let's say I get the new 2TB drive and recover everything, does that mean it become a bootable disk again? Wiil it behave like the original A did? I understand there will be some damage, I'm just not clear (and Data Rescue's literature is not clear) on what happens after a full recover. I guess it will just be folders/files that I need to review for what I need.
    No, it won't be bootable; you'll just have a data disc.

  • How can I recover data from a USERS01.DBF file?

    So I had a Hard Drive die and that took out the OS and the Oracle RDBMS Installation (Oracle9i Enterprise Edition, 9.2.0.6.0 on WinXP). Fortunately most of the data in the database (9.5GB worth) was in the USERS01.DBF file which was on another drive and unharmed. I was also able to salvage the CONTROL01.CTL file, but everything else from the database is corrupted and irretrievable.
    I've just setup a new machine with the same version of Oracle and I created a brand new database with the same SID as before. I then tried to do:
    SQL> alter tablespace users offline temporary;
    Tablespace altered.
    (then I swapped the USERS01.DBF file with the original one and then tried to recover it)
    SQL> recover tablespace users;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 9: 'F:\ORAHOME\ORADATA\MYDB\USERS01.DBF'
    ORA-01122: database file 9 failed verification check
    ORA-01110: data file 9: 'F:\ORAHOME\ORADATA\MYDB\USERS01.DBF'
    ORA-01206: file is not part of this database - wrong database id
    Is it even possible to do what I'm trying to? I had no backup of the USERS01.DBF file, but there should be some way to get at the data that is inside it...
    any help or a pointer in the right direction is much appreciated.
    thanks
    -jeff

    Whilst this isn't a direct answer, running any form of "recovery" will require archive logs, and it doesn't appear that you have archive logs related to this data file.
    If you had your system.dbf file in addition to a control file and data file, I'd imagine might have enough to bring a database online using a "cold backup" type restore.
    The specific error you show references the DBID in your data file does not reference the DBID in your control file. You don't appear to have restored your control file backup. This would make your existing .dbf files now not load, though a number of them can be rebuilt, not all of them can.

  • How do I recover data from my macbook pro with a disk that can't be repaired?

    I'm in need of a data recovery solution.  My Macbook pro (17") running OS X Mountain Lion won't boot and is stuck on the gray startup screen with the apple icon and spinning gear and disk utility states "Error: Utility can't repair this disk.  Back up as many of your files as possible, reformat the disk, and restore your backed-up files."  Unfortunately, I don't have a back up and don't know how to access or back up the data on my drive.  Mounting it to another computer as an external drive  via firewire did not work.  Does anyone know of any solutions to extract the data from my macbook pro hard drive before I reformat it?  Any help would be greatly appreciated.

    Hi there
    I really am sorry about your problem.  I have opened up my help centre and it too states '[...]back up as much of your data as possible, reformat the disk, reinstall OS X, and then restore your backed-up data'.  It then says: If you continue to have problems with your disk, it may be physically damaged and need to be replaced. 
    I just noticed it says reinstall OS X.  If it says this then this indicates a rather serious computing problem. 
    Help centre also states: If Disk Utility reports “overlapped extent allocation” errors, two or more files occupy the same space on your disk, and at least one of them is likely to be corrupted. [The next step is the following] Check each file in the list of affected files. [added by me]
    A damage disk causes files to be corrupted.  Also you can repair a disk by deleting corrupt files (i.e. one can still use a damaged disk providing it has been repaired).  Disk Utility is able to help to repair corruption problems but not if your program files have become corrupted due to large-scale damaged disk. 
    I understand why you want to connect to another hard disk because you want to extract your files and I would probably do the same.  I am on a 13-inch Macbook Pro trying to solve your problem.

  • How do I recover data from a single App using an iTunes backup and put it back on my iPhone?

    An app I use (Text Me 2) automatically cleared conversation history. I have an iTunes back-up of it from last year. I tried searching a ton and found articles, but never found a step-by-step article from start to finish describing how I can get only that app's data back on my iPhone without having to restore the entire thing (otherwise I lose all of my last 6 months of content)? All the articles I read stopped after using the iPhone backup extractor to extract, and didn't tell me how to get that back onto my iPhone. I use iTunes on Mac OS Mavericks also.
    Thanks in advance!

    Then what's with all of the programs these two responses mention and being able to restore a single app data?
    If you know you are going to do this in advance and have a jailbroken phone, use AppBackup which you can get through cydia. Otherwise, if this need arises after having restored already, you can get the data from an iPhone backup using iPhone Backup Extractor and/or a Time Machine backup (you can google to find the location of the backups, but I think it's in Application Support > Mobile Sync > Backups), and then restore the documents/library folders of the application using iExplorer (which is by the same people who made iPhone Explorer but was changed for legal reasons and now is slightly more user friendly and suited for this purpose. I just did this to restore my Angry Birds scores/data among other things.
    and
    I do that with iTools. You can backup each app with its data into an ipa file to the computer, to restore it individually. This allows you to merge apps with its data from different backups.
    ...not to mention I found several answers like this in various forums...

  • How do I recover data lost from restoring

    I restored my ipod touch to the settings of a former ipod touch without realizing it would delete all my data. It erased some pictures and video, so I am wondering if there is any way to recover that lost data. Help!

    Not unless you can restore from a backup that was made from the ipod when it was the way you wanted it.

  • How can I recover data that was overwritten by time machine?

    I have a 2 TB external hard drive on which I had archived a lot of video and data files.  I hooked it up to my MacBook Pro thinking that I could also utilize time machine.
    It asked me something ot the effect of "Would you like to use this drive for time machine" (I don't really remember what it asked), but I clicked on 'yes' or 'continue' or whatever and before I knew it, it had erased my hard drive and backed up my MacBook Pro.
    Is there a way to recover that data?
    With fingers and toes crossed.......thanks for any help.
    Mark Rabalais

    Not unless you had a backup of the previous contents on that drive?
    You could try a commercial data recovery suite, but since the TM backup will have overwritten much or all of what was on there previously, the odds of recovering intact and useable files is very small.
    Sorry, but I would say, no, it is gone at this point.

  • IMac not powering up-how can I recover data?

    Hi there,
    My iMac shut itself down and will not start-up again—no lights, fans, nothing. I have tried the steps suggested in the forum already (reset SMU, replace power cord) with no results.
    The mac is old and no longer within warranty so at this point I would just like to recover my data. I would prefer to just do this myself, but is it worth the trouble? Would removing the HD and putting it in a firewire enclosure be a pretty straightforward way to recovery?
    Thanks for any help...

    Hi Marilyn - Google is your friend
    http://www.google.com/search?client=safari&rls=en&q=baredrivedock&ie=UTF-8&oe=UTF-8

Maybe you are looking for

  • Adobe Application Manager CS5 downloads but does not install Spanish update on Windows 8.1 64 bit Spanish

    I have a multi license for Adobe Creative Suite Design Premium CS5 in Spanish. I installed it correctly in Windows 8.1 Spanish 64 bit. Photoshop 32 and 64 bit start, same with Illustrator with some fix. Yet when I look for updates, 10 are found by Ad

  • How to see full HP icons in Devices and Printers Win 7?

    THis post is long because I've included all of the clues for analysis, so please read it all the way through. My HP printer devices - an OfficeJet Pro L7600 All-In-One and a DesignJet T120 - show the same behaviour. In Devices and Printers on my prim

  • Firefox will not start when "firefox.exe" is typed in the start menu

    I usually use Firefox 10.0a1 UX experimental build. I know it's "unstable", but it works just fine for me. Anyways, it was feeling slow today, and was constantly hanging, so I decided to run '''firefox.exe -safe-mode''' from the start menu. I got the

  • Multiple years with SPRUNCONSO

    Hi there, Question about sprunconso storedproc : Does a way exist to launch SPRUNCONSO for multiple years at a time ? I've to launch this calculation for the next 5 years very often on the budget and have to lauch it year by year. I've tried to combi

  • Trace PL/SQL stored procedure

    Hi, I'm working with Oracle since only few weeks. I worked on Informix before. On informix we had the possibilty to put a stored procedure in trace with following line in the stored procedure : if gv_f_trace is not null then set debug file to gv_f_tr