SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Model Database


Model Database

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (277K reputation)SSC Guru (277K reputation)SSC Guru (277K reputation)SSC Guru (277K reputation)SSC Guru (277K reputation)SSC Guru (277K reputation)SSC Guru (277K reputation)SSC Guru (277K reputation)

Group: Administrators
Points: 277831 Visits: 19896
Comments posted to this topic are about the item Model Database

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
bitbucket-25253
bitbucket-25253
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29601 Visits: 25280
A good question

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
M&M
M&M
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10650 Visits: 3917
A very good question Steve

M&M
handkot
handkot
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3016 Visits: 588
select @@VERSION
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64) Sep 21 2011 22:45:45 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)



Are answer right?
Which isn't true, you can set the MODEL database to READ_ONLY, and the property is even set, but it isn't propagated to new databases. (You can set it either via ALTER DATABASE or via SSMS.)



I set the value READ_ONLY to the MODEL, but the property has been FALSE for new database
Henrico Bekker
Henrico Bekker
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13621 Visits: 5336
handkot (2/21/2012)
select @@VERSION
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64) Sep 21 2011 22:45:45 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)



Are answer right?
Which isn't true, you can set the MODEL database to READ_ONLY, and the property is even set, but it isn't propagated to new databases. (You can set it either via ALTER DATABASE or via SSMS.)



I set the value READ_ONLY to the MODEL, but the property has been FALSE for new database


I agree, tested in R2, model can be set to READ_ONLY, but new DB not READ_ONLY.
Selected "Yes and No" as the answer.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
Elliott Whitlow
Elliott Whitlow
SSC-Forever
SSC-Forever (48K reputation)SSC-Forever (48K reputation)SSC-Forever (48K reputation)SSC-Forever (48K reputation)SSC-Forever (48K reputation)SSC-Forever (48K reputation)SSC-Forever (48K reputation)SSC-Forever (48K reputation)

Group: General Forum Members
Points: 48876 Visits: 5314
handkot (2/21/2012)
select @@VERSION
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64) Sep 21 2011 22:45:45 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)



Are answer right?
Which isn't true, you can set the MODEL database to READ_ONLY, and the property is even set, but it isn't propagated to new databases. (You can set it either via ALTER DATABASE or via SSMS.)



I set the value READ_ONLY to the MODEL, but the property has been FALSE for new database
You are running SQL 2008(10.0.5500.0) not SQL 2008 R2 (10.5.xxxx.0).. And the answer is correct. Just verified it..

I can't think of a case where I would ever do this but its good to know..

CEWII
Henrico Bekker
Henrico Bekker
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13621 Visits: 5336
Please see screen shot of the test I did....I'm running R2....

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
Attachments
model read_only test.JPG (70 views, 32.00 KB)
baabhu
baabhu
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3717 Visits: 1218
A good question to learn something.

But the new db created are not with read only option.

Are we missing something here. :-)
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)

Group: General Forum Members
Points: 123071 Visits: 13344
Damn you MSDN!
Any documentation that supports the correct answer?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Carlo Romagnano
Carlo Romagnano
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10924 Visits: 3476
Koen Verbeeck (2/22/2012)
Damn you MSDN!
Any documentation that supports the correct answer?

I found this: http://msdn.microsoft.com/en-us/library/ms190249.aspx
It states that:
To change the default values for any one of the database options for all newly created databases, change the appropriate database option in the model database.

In the list of options there is READ_ONLY
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search