To view/find database is in read only/read write by querying sys.databases, if the value of is_read_only is 0 the database is in read/write, if returns 1 then database is in read only mode.
SELECT name, is_read_only from sys.databases WHERE name = ‘model’
name is_read_only
————- ————
model 0