I try to attach a database to an instance of the localdb server running on the azure-devops agent running the windows-latest image.
Attaching the database fails with the message
Database 'Testdatabase' cannot be upgraded because it is read-only, has read-only files or the user does not have permissions to modify some of the files. Make the database or files writeable, and rerun recovery.
Running the same thing on my local machine succeeds.
I tried setting the file permissions of the mdf and ldf I'm trying to attach to full control for BUILTIN/everyone
, but that fails with the message
Some or all identity references could not be translated
How can I attach my mdf to a localdb instance on the azure-devops hosted agent running the windows-latest
image?
Set file permissions to writable for BUILTIN\Users
for both mdf and ldf, and database creation will succeed.