System Functions MSSQL Tutorial

EXEC sp_dboption 'YourDatabaseName', 'read only', 'False'
GO