Translate

Friday, March 2, 2012

Can we set model database to READ ONLY ?

When I saw this question, I thought “NO WAY”. However, I gave it a try.

To my surprise, I was able to set READ ONLY to model database.

Then I created the database and it was a read only database which didn’t surprise me.

image

You can see, I was able to to set model to read only and when I created a new database it is read only.

However, after restarting SQL Server , tempdb will not be in READ ONLY.

This is the surprise.

If you check http://msdn.microsoft.com/en-us/library/ms186388.aspx#2 , it says you can’t set model database to read only mode.

image

1 comment: