13 February,2013 by Jack Vamvas
If there’s a requirement to not change data on a SQL Server database , a DBA may make a database read only (READ_ONLY). There are some benefits to making a database read only outlined below.
Some notes on READ_ONLY
1) A small performance gain is possible due to no locking , which leads to no blocking. Read more on SQL Server - How to detect and troubleshoot blocking and deadlocks
2) No schema changes or data changes are possible for the duration of the database read only status
3) Consider running optimization processes , such as full UPDATE STATISTICS and eliminate logical fragmentation before changing the status to read only . Check SQL Server Update Statistics with FULL SCAN - SQL Server DBA
--to check the current status SELECT name, is_read_only FROM sys.databases WHERE name = 'database_name' --to make a SQL Server database read only ALTER DATABASE database_name SET READ_ONLY --to make a SQL Server database read-write ALTER DATABASE database_name SET READ_WRITE