http://www.sqlservercentral.com/blogs/sql_server_dba/2012/02/17/sql-server-read-only-database-status-/

Printed 2014/09/21 06:07AM

SQL Server – read only database status

2012/02/17

This post describes how to return the database read-only status via T-SQL .

The system view – sys.databases  returns a column called is_read_only.  

The column returns either 1 or 0

 1 = read only

0 = read write

   SELECT [name] ,is_read_only  
   FROM sys.databases  
   ORDER BY [name]

 

See Also

SQL Server Database Status,monitoring and Restores

SQL Database Status with sys.databases


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.