I know how to set a user db, in SQL Server, to Read Only mode. Can the Master DB be set to read only? If it is set to read only can users still log in?
Asked
Active
Viewed 374 times
0
-
2There’s this phenomenon that StackOverflow calls the “[XY problem](http://xyproblem.info/)”. It sometimes obscures the root issue you are experiencing. To avoid that pitfall, it’s best to describe your overall objective, and what obstacles you’ve encountered in trying to achieve it, and why you think setting the Master to read-only will help. You’ll get **much** more helpful answers if you [edit] your question to provide a little more background and context. – Dan Bron Jan 16 '18 at 17:24
-
My team is writing code maintenance work and I assumed that this cannot happen (Master in read only mode). I am checking if I am correct. – benjamin moskovits Jan 16 '18 at 17:26
-
What about code maintenance makes you think you need to set master to readonly? – Dan Bron Jan 16 '18 at 17:27
-
We are doing activity against many dbs and someone asked if we have to check if Master is Read Only. – benjamin moskovits Jan 16 '18 at 17:31
-
Go back and ask the person why they asked that and where their concern or worry stems from. This question on SO is premature in my opinion. – Dan Bron Jan 16 '18 at 17:34
-
We need to make changes to the database and then to master. We don't want to make changes to the database and then discover we cannot make changes at the instance level. – benjamin moskovits Jan 16 '18 at 17:43
-
Couldn't you just check the permissions first instead of setting the master db to read-only? This seems like a bad idea. – Jacob H Jan 16 '18 at 17:48
-
Before we make any changes at the db level we check if its read only. I was asked what if we successfully make changes to a user db and then attempt to change the master and fail at that level because the master is set to read only. I suspect that if a user db in an instance is read write then master must be read write and I was trying to check if this was true. – benjamin moskovits Jan 16 '18 at 18:22