How to change the status of SQL Server Database to Read-Only?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • admin
    Administrator
    • Mar 2007
    • 36

    How to change the status of SQL Server Database to Read-Only?

    To prevent SQL injection which hits database,one may change status of database to read only.

    Follow the below mentioned steps to change status of SQL Server Database to Read-Only:
    1.Precaution: Take a backup of database before making any changes
    2.Login to SQL Server management studio
    3.Run following query
    ALTER DATABASE [DBNAME] SET READ_ONLY WITH NO_WAIT
    (Here DBNAME is your database name)
    4.With your object explorer, you will find database in read only status

    Park B
    Accuwebhosting.com

    Last edited by admin; 07-31-2015, 11:21 AM.
Working...
X