SQL Server Performance

log ship help

Discussion in 'SQL Server Log Shipping' started by noZZa, Dec 12, 2003.

  1. noZZa New Member

    Hi,

    I just accidently deleted a database that was being log shipped to, and now it wont restore the logs.

    I restored the database, and when I try to restore the logs by running the old job it tells me this:

    Executed as user: sa. The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step. [SQLSTATE 42000] (Error 4306) RESTORE LOG is terminating abnormally. [SQLSTATE 42000] (Error 3013) Mail sent. [SQLSTATE 01000] (Error 17967). The step failed.


    Err help, gonna get my ass kicked for this
  2. satya Moderator

    It occurs when you try to rstore either a differential or log backup and that database restored did not have with NORECOVERY clause which is must for upcoming log restore.

    Start again with database restore using WITH NORECOVERY clause (take a fresh backup from live server) and then start LS process.

    You must restore the full source database backup on the destination database by using either the NORECOVERY or the STANDBY option for log shipping to work.

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com
  3. Luis Martin Moderator

    From BOL:

    Error 4306
    Severity Level 16
    Message Text
    The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step.

    Explanation
    After the database has been recovered, no further restore operations may be performed.

    Action
    To recover a database, start the sequence over and use the NORECOVERY clause on all RESTORE statements except the last. If you are maintaining a standby server and want to bring up the database in read-only mode between restore operations, use the STANDBY clause of RESTORE instead of the NORECOVERY clause.


    See Also

    Backing Up and Restoring Databases

    RESTORE

    Troubleshooting Backing Up and Restoring



    Luis Martin

    ...Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
    Bertrand Russell
  4. satya Moderator

    .... and with regard to error 17697 about mail - as the job will send the mail under the context of the account that SQL Agent runs under, log into query analyzer with the account that the agent starts under and attempt to send mail. And I think it represents mail was sent.

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com

Share This Page