Unable to restore the log files to DR

  • Seems like you made the DB to Single USer but some other connection is holding the DB. SQL Agent might be holding check the processes access the DB. Kill all connection and then try.

  • Did you think it would still need fixing :-D?

  • jacksonandrew321 (4/5/2016)


    Try to run this:

    ALTER DATABASE Databasename

    SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    GO

    It won't work.

    ALTER DATABASE requires that the session running it can connect to the DB. If the DB is in single user mode and there's a user connected (as the OP's error message states), then the session running the ALTER DATABASE can't connect to the DB and hence can't run.

    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
  • alter the log shipping configuration to disconnect users during the database restores. Its not an error you're seeing, you've told LS you don't want to disconnect users. When the connections have closed and the restore runs it'll be able to gain exclusive access to the secondary

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 4 posts - 1 through 5 (of 5 total)

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