MDF and LDF File Swaps and Attaching

A quick way to migrate your sql servers has been to copy all the mdf and ldf files and restart the services.

This works great.

However we had to setup a quick report server to get some critical information out, by doing so we now had an issue when restoring all the mdf and ldfs from a previous server. The master database from the previous server had no record of the new report server databases.

You might try attaching them and get an error that says the files are read only and cannot be upgraded.

The fix is simple, create new databases that use the report server database names (ReportServer and ReportServerTempDB). Shutdown the sql server service. Replace the new files with the report server files.

Restart service, everything works.

Leave a Reply

Your email address will not be published. Required fields are marked *