Making Database Read only or Read/Write

Make Database Read Only


ALTER DATABASE [Database name] SET READ_ONLY WITH NO_WAIT

Make Database Read/Write


ALTER DATABASE [
Database name] SET READ_WRITE WITH NO_WAIT

Next Recommended Reading How to read XML in an SQL Server