What permission is needed to set Database read-only?
Form Query Analyzer or Management Studio, you can issue the following command:

ALTER DATABASE database-name SET READ_ONLY


As mentioned here, you need the alter database rights and you must set the database to single mode.


  Changing the state of a database or filegroup to READ_ONLY or
  READ_WRITE requires exclusive access to the database.


USE master;
GO
ALTER DATABASE AdventureWorks2012
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE AdventureWorks2012
SET READ_ONLY;
GO
ALTER DATABASE AdventureWorks2012
SET MULTI_USER;
GO