Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

4

You could run a RESTORE HEADERONLY on the backup file to read the contents and get the ServerName column. For example: CREATE DATABASE BLABLA GO backup database BLABLA to disk = 'c:\temp\BLABLA.BAK' RESTORE HEADERONLY FROM DISK = 'c:\temp\BLABLA.BAK' Result: With the servername column being the one you want for the backup(s) residing in the backup file....


3

When restoring a database, is there a way to restore the plan cache so it doesn't have to be re-created during production use? No. The caches will have to warm up based on use. You can force plans using the Query Store for particular queries if you want, as the Query Store is part of the database, and will be present after Restore.


2

From your question, it sounds like the restore has been working daily, for some time. As of today it suddenly stopped working. Yesterday it restored fine with a restored size of around 160GB today it needs 288GB to restore. One of two things probably happened (or a combination of both) The data files (mdf.ndf.) grew a bunch either from lots of new data ...


2

I think you need to revise your question with clarity: Olas scripts meant for following, not for restoring database. Backup DBCC - Integrity Check Maintenance - Index and Statistics Aside from this, you cannot DROP or RESTORE a database while it's part of Availability Group. You can remove a database from availability group with following commands: ...


1

Check the following solution: Solution 1 Check security permission for user Go to the location of the backup folder where you have stored the.BAK file Right click on the backup file and select Properties Go to Security Tab Now check the Deny permission for Authenticated users Click on Edit and remove the Deny Click OK Solution 2 Manually delete the ...


Only top voted, non community-wiki answers of a minimum length are eligible