emergency!!! RecoveryPending how to fix it?

  • How to fix Recovery Pending State in SQL Server Database,please help

  • i just did restore database with lates backup waiting for restore

  • Gosh... there are a whole lot of reasons why such a thing may have happened.  The first thing I'd do it hit the "REFRESH" in the Object Explorer window and see if it goes away.

    Other than that, it may take some digging in order to prevent any data loss.

    I will suggest that until someone else shows up to help on this thread, that you check the following Google search...

    https://www.google.com/search?q=recovery+pending+sql+server

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • resore fixed it and I strted again moving files to new location:

    USE master; --do this all from the master

    ALTER DATABASE fuu MODIFY FILE (name='fuu',filename='J:\Data\fuu.mdf'); --Filename is new location

    ALTER DATABASE fuu MODIFY FILE (name='fuu_log',filename='i:\Logs\fuu_log.ldf');

     

    ---copied files to new location

    ALTER DATABASE fu SET OFFLINE WITH ROLLBACK IMMEDIATE

    after I try put online I get again RecoveryPending

    ALTER DATABASE fu SET ONLINE

  • and when I put backonline get this error: Unable to open the physical file "J: filename Operating system error 5: "5(Access is denied.)".

  • Did you actually move the files (e.g., using file explorer, powershell, robocopy) before executing alter database? ALTER DATABASE doesn't do that -- just registers the new location.

    If so, it sounds like the SQL Server database engine service user (NT SERVICE\MSSSQLSERVER by default) does not have permissions on J: drive.

    Determine the username which SQL Server service is using, and check permissions on J: and J:\Data\.

  • juliava wrote:

    and when I put backonline get this error: Unable to open the physical file "J: filename Operating system error 5: "5(Access is denied.)".

    You need to grant the sql server service account "modify" authority on the new location.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • This was removed by the editor as SPAM

  • I agree with Johan.  I would recommend : You grant the sql server service account FULL control to the new location.

    The MSSQLSERVER group FULL control may help.  I have used this before.

     

     

    DBASupport

  • Hold up - why are you restoring the database and then moving the files?  You should be performing the restore and placing the files in the new location(s) as needed.

    But even with that - you need to ensure permissions are set correctly for the new location(s).

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

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

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