代码改变世界

SQLServer将数据库置为只读

2022-05-18 09:34  abce  阅读(221)  评论(0编辑  收藏  举报

将数据库置为只读

use [master]

go
alter database [database-name] set read_only with no_wait;
go

  

取消只读

use [master]
go

alter database [database-name] set read_write with no_wait;
go