Recover Database from Trn log

  • Hi all,

    I have a strange issue here. I have been provided with only the <filename>.trn file which is 14 GB in size. the task is to recover the database from this file. I don't have access either the backup's or the MDF/LDF files. I am a newbie to SQL server and don't know how to go about this (i'm not even sure if this is possible). Can someone help me please?

    Regards,

    Kaushik

  • Have you implemented the Log Shipping?

    That file most likelly generated from the Log Shipping process

  • i'm not sure as this is from one of my customer's. I believe that they have enabled log shipping and have their recovery model set to Full. Hence the large size of the Database. This customer is complaining that the DB was growing in leaps and bounds and hence I had asked them to send me a copy of their databse to see what might be wrong. and he sent me the TRN file instead of the normal backup file. hence i was in doubt if i could restore it (I have never worked with log shipping so far and i think i will do that now ..). I think i can do that now in the normal way and also suggest them to turn of log Shipping and change the recovery Model to Simple for our Database atleast to prevent the transaction logs from growing.

     

    Regards,

    Kaushik

  • You can't recover a database from just a transaction log. The TRN contains activity against the database, not the database itself.  The DB is growing, or the log is growing ?

  • The Log is growing not the database. I wanted to know if it is possible to restore the database using the trn log but i guess we can't. I did a quick read on the transaction logs and log shipping and realized this.

    I have already suggested that they change the recovery model to simple and turn off log shipping, I have also suggested that they shrink the database once clean up the log.

    Is there anything else that I can suggest ? Please Advise.

  • If it's a production DB, then "simple" is not recommended because then you cannot recover to a point in time. You'll only be able to recover back to the last full backup. They should be backing up the trans log regularly which will truncate the unused portion of the log.  Shrinking the DB will reclaim unused space on the DB, but doesn't really have anything to do with this problem. 

  • Got the customer to send me a proper backup copy of their database ... Thanks to all for providing valuable suggestions on this thread...

    Regards,

    Kaushik

Viewing 7 posts - 1 through 7 (of 7 total)

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