ACCIDENTALLY REWROTE THE PRODUCTION DATABASE

  • Hi All,

    I really need an immidiate response for this if anybody knows the solution.

    I accidentally rewrote the company's production database data by development data using a DTS package.

    I used the option---Delete rows from destination tables.

    Could anybody please tell me about some way to restore it.

    Thanks,

    Gar

  • Do you have a backup of the production database and of the transaction log??

  • We have the back up for Friday night but the needed work is for yesterday.So Its important to recover yesteday data till 3 pm. All mdf and ldf files are updated to a recent time.

    Is there some way in which i can recover the old logs .

    Thanks..

  • I can't answer that one... probabely someone else may be able to on this site. However a log reader like log explorer might be able to undo the damage you did. And it's reasonably cheap when you see all it can do.

  • You need either a backup or go buy Lumigent/ApexSQL/LogPI log recovery tool and attempt to undo everything.

  • Also once this crisis is over you'll surely be interested in reading this thread :

    The DBA Whoops

  • I am assuming your database is in Full reovery mode, Right?

    and that you have all TRN logs backups since last Full DB Backup right?

    no matter what you do Backup the Transaction Log NOW!

    and reply with your answer, I'll help you out if is possible!! 


    * Noel

  • Thanks,

     

    The database is set up with 'truncate transaction log with checkpoint' option.So may be thats why we dont have earlier transaction logs.

  • >>The database is set up with 'truncate transaction log with checkpoint' option.So may be thats why we dont have earlier transaction logs.<<

    Well, you have learned the hard way that Production DB have to be in FULL recovery mode. Not even Log explorer tools may be able to help you because the minute a check point occur your log data is GONE

    The other problem is that the number one operation a DBA perform  before ANY action is applied on production is to "TAKE A FULL BACKUP"  

    I understand that this is not going to be good news for you but there is nothing much you can do now. Sorry for being carrier of the bad news next time perform the two things I mentioned above invariably.

    good luck

     

     


    * Noel

  • At least he's only losing 12 hours of productions because he had a backup of last friday...

  • Well, let's hope that his shop is not 24/7 and even if it is not depending on the data 12 hours can be devastating for certain companies That's why I wished him good luck.

     


    * Noel

  • I feel for him too... I once lost about 3 months a data for a single very non critical column and I still have shivers about that...

  • Thanks for the valuable advice..I didn't know about the truncate log  option as I am a sql programmer.

    But know I know everything about it.

    And yes you are right about the shivers as I also got them when I knew something was wrong.

    Our company don't have any DBA and we tried log explorer ...But no good;;;

    Anyways, We are trying to solve it another way.

    Meanwhile...Does the tuncate log option still saves the logged data somewhere on the disk ..If yes..then is there some way to retrieve it?

    Thanks.

  • Sorry, as mentioned before the truncate log option removes entries from the log when a checkpoint occurs (such as the end of your DTS job)  Production database should have truncate log on checkpoint turned off (use FULL recovery model if SQL Server 2000)

    Francis

  • time for:

    exec sp_update_resume

     

    possibly time for:

    exec sp_distribute_resume

     

     

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic. Login to reply