Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to config a Database to be read only

Status
Not open for further replies.

Pelson2003

Technical User
Feb 27, 2004
50
US
Very Simple Question

How to configure a database to be read only ?

Microsoft SQL 7.0

Thanks
Nelson
 
see sp_dboption

or right click in enterprise manager.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
To make it read only ...

USE master

EXEC sp_dboption MyDB, 'read only', 'TRUE'

To turn read only off ...

USE master

EXEC sp_dboption 'MyDB', 'read only', 'FALSE'

Replace "MyDB" with your true DB name.











Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top