December 14, 2023 at 8:02 pm
How to fix Recovery Pending State in SQL Server Database,please help
December 14, 2023 at 8:17 pm
i just did restore database with lates backup waiting for restore
December 14, 2023 at 8:18 pm
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
Change is inevitable... Change for the better is not.
December 14, 2023 at 9:01 pm
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
December 14, 2023 at 9:30 pm
and when I put backonline get this error: Unable to open the physical file "J: filename Operating system error 5: "5(Access is denied.)".
December 14, 2023 at 10:51 pm
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\.
December 15, 2023 at 1:28 pm
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
January 25, 2024 at 4:25 pm
This was removed by the editor as SPAM
March 22, 2024 at 3:38 am
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
March 22, 2024 at 7:27 pm
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