i'm trying to restore one database but i'm facing an error message
please help ASAP matter is urgent
*This post is locked for comments
thanks for you all whoever tried to help today i restart the server then it works i really didn't know why it happened but anyway now its working fine. now i have lot of inquires but i will make a new post for it expecting help from all as usual
thanks
Also make sure...you marked the option "Close existing connections to destination database" under Options tab
Thank you all for the fast responding,
Since I don't know the reason of the problem so I'm gonna try all the solutions one by one and I will let you know once it's solved.
again thank you so much
The answer to the issue you are facing depends on the cause of the problem. All the answers you have been giving are correct and might apply to you.
I will suggest another possible solution, try stooping SQL Server Agent before restoring the DB. Beware that this solution might not be the right solution for you since it will affect all SQL Server, but if this is not an issue for you can try it.
Try stopping Management Reporter Services from the Console. Management Reporter is constantly accessing database.
Also to piggy-back on what Mahmoud and Harry mentioned, be sure to know what other servers or services might be hitting your database. We have a 3rd party asset management software that we've built some custom integrations with and that service hits the server ever minute so you might see a user or service in the activity monitor, you kill the process, go to restore and BAM! there it is again.
After we Kill that user we're not able to restore quick enough before the service hits the server again so you have to navigate to the server that the service resides on and stop it before you can try to restore. Just be sure to start it back up after your restore.
Hello there,
You are not being able to restore the database because it is being in use. Before restoring the database, follow the steps below:
1- On the SQL Management Studio, right click on the instance name and choose "Activity Monitor"
2- On the Activity Monitor, under the "Processes" tab, filter by the specific database which you want to restore upon
3- The activity monitor will show the current processes, as you make sure that all Dynamics GP users are out of the system, right click on the existing processes and choose "Kill Process"
Now as there are no current processes running, proceed with the restore.
Your feedback is highly appreciated,
It appears as though there are several causes, you'll need to rule out. Here's a list:
1. Make sure the user doing the restore has access to the ANTAB.mdf file (all files) in the d:\program files\Microsoft SQL server\MSSQL 12.MSSQLSERVER\MSSQL\DATA\ folder.
2. Make sure the folder above is exempted from your antivirus check, and that no other process is accessing the contents.
3. Make sure you don't have an hourly transaction log back up or other maintenance process accessing this database through SQL Server Agent Services.
Finally, I have a blog post on SQL Restore problems, which usually manifest as cannot obtain exclusive access. Try using the scripts in this database to make sure you are not accidentally locking the ANTAB database with another process.
http://redbeardblogging.blogspot.com/2014/09/restore-failed-for-server-exclusive.html
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156