How to make database read only?


You can use the below script to make the database read only so that no user can edit the database.


USE [master]
GO
ALTER DATABASE [DBName] SET READ_ONLY WITH NO_WAIT
OR
GO
ALTER DATABASE [DBName] SET READ_ONLY
GO

2 thoughts on “How to make database read only?

  1. kaushalpatel245's avatarkaushalpatel245

    how to remove read only from some of the tables of my database in mysql ?

    i dont know how this happened !!

    help me to do solve as fast!!!!

    Reply

Leave a reply to Jugal Shah Cancel reply