While working on one of project, I have get below given error:
Error Message : Failed to update database “Aspmantra” because the database is read-only
As you can see error message explain the reason why you are not able to write the database. There is no way to write into database when it is read only state. To write into database you have change the state of database from read only to read-write.
To resolve this issue we have 2 ways. One using Sql server management studio and 2nd one using Sql query.
Method 1: Using Sql server Management studio
Connect to Sql server database. After that right click on the database (which is read only), select properties. Database properties window will be open, select options. After that in options look for state and change the database read only value to false.
Method 2: using Sql query
Run the below given query:
ALTER DATABASE aspmantra SET READ_WRITE WITH NO_WAIT
What do you think about this article?
If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.