Bookmark and Share
How to detect a SQL Server database's read only status
(Publish Date: 2014-7-30 5:19pm, Total Visits: 1004, Today: 6, This Week: 24, This Month: 53)

Query 1

SELECT name, is_read_only
FROM sys.databases
GO

Query 2

SELECT name, is_read_only
FROM sys.databases
WHERE name = 'MyDBName'
GO

Query 3

EXEC sp_dboption "MyDBName", "read only"