In this tutorial we will see how we can place our SQL Server database in ReadWrite mode:
ALTER DATABASE DB_NAME SET READ_ONLY
EXEC sp_dboption 'DB_NAME', 'read only'
ALTER DATABASE DB_NAME SET READ_WRITE