almost replicating... final advice?

  • Ok, I had no idea when I first got asked to do this, but im getting better! thanks to all of you who have helped so far..

    ok I am log shipping between 2 sql standard boxes using custom scripts which I got here:

    http://www.sql-server-performance.com/sql_server_log_shipping.asp

    ok, I have created stored procedures for restoring the backups and the logs. Ive created my backup devices. Ive made sql jobs to backup the db/log, move it to my secondary box, restore etc.

    When I launch the restore dabatase job it works perfectly! It truncates, then backs up, then moves, then restores, lovely!

    Im having trouble with the log tho.. once the job launches it backs up my log file to the specified backup device, then it succesfully copies it to the standby server. my problem happens when it tries to restore it via the stored procedure:

    this is the stored procedure:

    CREATE PROCEDURE restore_log_backups AS

    RESTORE LOG db

    FROM DISK = 'E:\Program Files\Microsoft SQL Server\MSSQL\backup\db_log_backup_device.bak'

    WITH

    DBO_ONLY,

    STANDBY = 'E:\Program Files\Microsoft SQL Server\MSSQL\LOG\db\undo_db.ldf'

    WAITFOR DELAY '00:00:05'

    EXEC sp_dboption 'db', 'single user', true

    GO

    the error I get is:

    Executed as user: sa. RESTORE LOG is terminating abnormally. [SQLSTATE 42000] (Error 3013) 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). The step failed.

    any ideas?

  • yes, I would appreciatte it very much

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

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