Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Set File or FileGroup to READ_ONLY on a busy system. Expand / Collapse
Posted Wednesday, October 2, 2013 12:49 PM



Group: General Forum Members
Last Login: Today @ 10:44 AM
Points: 38,352, Visits: 35,275
According to Books Online and some testing, I think the answer is probably "NO" but I thought I'd ask just in case someone has an oolie to do it. The question is,

Is there a way to set a File (NDF, in this case) or FileGroup (I have one file per filegroup in this case) to READ ONLY on a busy system without having to temporarily gain exclusive access to the database by setting the SINGLE_USER mode?

Thanks folks.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1500884
Posted Wednesday, October 2, 2013 3:41 PM



Group: General Forum Members
Last Login: Today @ 12:41 PM
Points: 42,777, Visits: 39,708
I would imagine not, alter database usually requires an exclusive database lock.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1500945
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse