Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "collection was modified enumeration operation may not execute" when restoring database backup in Azure Data Studio

I'm extremely new to databases so please bear with me.

I've set up local SQL Server running on a Docker container (using a Mac). I'm trying to restore SQL database using Azure Data Studio (v1.14.0) but it's not working.

I used the guide on database.guide but keep getting errors. I have no clue what it means.

Restore database failed: collection was modified; enumeration operation may not execute

I have tried restoring .bak-file from a backup made on my school computer (used SQL Server Management Studio on a PC), tried restoring with the bak-file from Database.guide. I also made a backup from my current DB in Azure and tried restoring that one - didn't work either.

like image 286
SpaceMonkeyMonty Avatar asked Dec 21 '19 15:12

SpaceMonkeyMonty


1 Answers

I finally got it to work! When restoring, in the files tab I ticked the box "Relocate all files" and specified the location to relocate the data and log files to /var/opt/mssql/data and that worked.

like image 182
SpaceMonkeyMonty Avatar answered Sep 21 '22 12:09

SpaceMonkeyMonty