SpaceMonkeyMonty
SpaceMonkeyMonty

Reputation: 431

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.

Upvotes: 15

Views: 4210

Answers (1)

SpaceMonkeyMonty
SpaceMonkeyMonty

Reputation: 431

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.

Upvotes: 28

Related Questions