Sunday, 3 July 2016

Failed to Update Database , because the database is Read-Only.

The update statement will be failed due to the Read only mode of the database.
To resolve the error please follow the below steps.

Change the Database Read only to Normal Mode.

Please Refer the replication of the error in the below image.



You can see the database color is changed to grey color and in bracket it is marked as Read only.



Change the database mode using below T-SQL statement as shown below.


Once executed successfully yon can refresh the database and found the database is coming back to normal mode as shown below.


After changed to Read Write mode, you can execute the update statement and it will be updated successfully as shown below.



Steps to change the Mode of the database to read only

Execute the below T-SQL statement.



You can noticed that the database mode has been changed to Read-Only mode as shown below.


No comments:

Post a Comment