0

I'm facing a strange issue where my backup fail with the message :

Msg 3906, Level 16, State 1, Line 5

Failed to update database "MyDBB" because the database is read-only.

Msg 3013, Level 16, State 1, Line 5

BACKUP DATABASE is terminating abnormally.

I saw a post talking about in-memory object causing that issue but in this case, there is no "memory optimized data".

There is a "FileStream file" but I couldn't find any documentation explaining this behavior.

Did anyone faced that issue before ? Any way to go around it without setting the DB to read_write ?

Thank you

3
  • Comments here -- thelonedba.wordpress.com/2019/03/03/… -- hint that Filestream data, like in-memory objects, can cause this error when backing up read-only databases.
    – Doug Deden
    Commented Feb 28 at 20:48
  • That's the link I was refering to. So you're saying that FileStream have the same behavior as in-memory object ? I think (can't find evidence to prouve it) that the backup used to work... Would that be possible that "something" caused the backup to stop working ? Thanks Commented Feb 29 at 13:16
  • I'm not sure, but that article sure implies it. I, too, can't find any other documentation. Can you do a test? Make a database. Back it up. Make it read-only. Back it up. Add a Filestream thingy. Back it up. See when it goes from "working" to "not working".
    – Doug Deden
    Commented Feb 29 at 23:11

1 Answer 1

0

Check whether you can execute update statement on any table in the database (Make sure you have connected to db using same user that application is using).

If yes, then this error should not be there.

If no, toggle the option Database Read-Only from SQL server [Right click on database -> Properties -> Options -> Database Read-Only]. (For me this option was false still I was getting the error. So I toggled it twice and it worked.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.