Daily & Exclusive Content

Delivered by FeedBurner Links


Powered by TypePad
SQL Server – read only database status

17 February,2012 by Jack Vamvas

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

Author: Jack Vamvas (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on SQL Server – read only database status | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer