Problem restoring a DB on a linked server - (log shipping inspired!!)

  • Hi there,

    I'm trying to carry out log shipping, but when I try to restore the productive DB on the standby server it gets stuck in 'loading'.

    At the moment I'm just trying to restore from a one step job on the productive server.  The step is

    "EXEC BACKUPSQL.LogShipping.dbo.TestRestoreDB"

    When this job completes, it shows a 'successful' history, but the db is stuck in 'loading' on the linked server.

    When I execute this statement from the productive server in Query Analyzer I get an "OLEDB/Provider time out" error and the DB being restored is still stuck in 'loading'.

    When I run the stored procedure "TestRestoreDB" from the linked server it restores the db into read-only mode which is what I want. 

    Both servers are Win2K with SQL2K. 

    Does anyone have any ideas?

    Cheers

    Al

    The code for the stored procedure "TestRestoreDB" on the linked server is:

    CREATE PROCEDURE TestRestoreDB

    AS

    RESTORE DATABASE TEST_ProdMan

    FROM DISK = 'D:\Program Files\Microsoft SQL Server\MSSQL\LOGSHIP\CDFNZ_ProdMan_DB.BAK'

    WITH STANDBY = 'D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\TEST_ProdMan_Undo.ldf',

    RESTRICTED_USER,

    REPLACE,

    MOVE 'CDFNZ_ProdMan_Data' TO 'D:\Program Files\Microsoft SQL Server\MSSQL\DATA\TEST_ProdMan_Data.mdf',

    MOVE 'CDFNZ_ProdMan_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\DATA\TEST_ProdMan_Log.ldf'

    WAITFOR DELAY '00:00:05'

    GO

  • yeah... definitely stuck in loading.  yeah.  definitely a monday.



    A.J.
    DBA with an attitude

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

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