how to restore .trn files in databases

  • Dear all,

    i have restore backup till last night

    we have the trn every 10 mint

    now, i want to restore datbase till today 12:10Pm,

    can any body help me how to restore databse till time

  • This article has all the details.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Dear All,

    we folows the below query

    1)

    Restore databse TESTDB

    from disk='c:\backup\testbackup.bak'

    with replace,norecory

    After some changes in database, we want to restore the data,we have the trn file

    2)

    Restore log TESTDB

    from disk='c:\transcation\testdb_20101205.trn'

    with norecovery

    but, we got the msg

    Msg 3117, Level 16, State 4, Line 1

    The log or differential backup cannot be restored because no files are ready to rollforward.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE LOG is terminating abnormally.

    please help me

    regards,

    zahid shah

  • The transaction log backups must be restored in the same sequence as they were backed up after the FULL backup. The log backup that you are trying to restore, was it taken immediately taken after the full backup?

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • zahidshah (12/6/2010)


    After some changes in database, we want to restore the data,we have the trn file

    What do you mean by 'after some changes'?

    The error indicates that you brought the database online (not that some logs are missing, that would be a mismatched LSN error). Once the database is online (recovered) no further restores can be done. If you want to restore logs, you need to restore the full backup WITH NORECOVERY, then restore the logs WITH NORECOVERY, with nothing happening in between.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I think you need to do some reading in Books on line regardsing the role of the transaction log and the backup and recovery options avalable. This is clearly a misunderstanding on what a transaction log backup means.

    Read here and follow the further read contained therein

    http://msdn.microsoft.com/en-us/library/ms177446.aspx

    CodeOn

    😛

  • on tuesday we want to restore databse on stand by server,

    we have monday full backup and approx 40 transaction log till 1PM of tuesday

    we run the below query

    Restore database Databasename

    from disk='c:\backup\testbackup.bak'

    with norecovery

    restoration sucssfully till mondy night

    Now, we want to restore multiple trans till 1 pm

    so we run below query

    Restore log databasename

    from disk='c:\transcation\testdb_20101205.trn'

    with norecovery

    but, we got the msg

    Msg 3117, Level 16, State 4, Line 1

    The log or differential backup cannot be restored because no files are ready to rollforward.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE LOG is terminating abnormally.

    please help me

  • zahidshah (12/9/2010)


    Restore database Databasename

    from disk='c:\backup\testbackup.bak'

    with norecovery

    You ran it exactly like that? You ran no other restore commands prior to the log restore? No one else ran a 'restore database with recovery' statement?

    The error indicates that the database was recovered (restore with recovery) before trying to restore the log. If you're doing any restore through the gui, doublecheck that you set the option correctly, it's not the default.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for reply.....

Viewing 9 posts - 1 through 8 (of 8 total)

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