Systems Engineering and RDBMS

Changing the database to be Read/Write

Posted by decipherinfosys on June 29, 2009

A few days back, we had written a post on how to go about changing a database to be in a read only mode and the scenarios when you would do that.  You can read more on that here.  A reader asked how to change it back to be a read/write DB.  It’s pretty simple and you can use the same set of commands as we had shown in that post – just change the READ_ONLY to be READ_WRITE.  Here is an example:

USE MASTER
GO
/*Mark it as Singe User*/
ALTER DATABASE DECIPHERTEST SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
/*Mark the database as Read Write*/
ALTER DATABASE DECIPHERTEST SET READ_WRITE
GO
/*Mark it back to Multi User now*/
ALTER DATABASE DECIPHERTEST SET MULTI_USER
GO

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>