This Blog show you how to make database read onlu or read/write.
ALTER DATABASE [Database name] SET READ_ONLY WITH NO_WAIT
ALTER DATABASE [Database name] SET READ_WRITE WITH NO_WAIT
ALTER DATABASE [
Database name
] SET READ_WRITE WITH NO_WAIT