Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Jason Brimhall
»
Model DB
42 posts, Page 2 of 5
««
1
2
3
4
5
»
»»
Model DB
Rate Topic
Display Mode
Topic Options
Author
Message
Hugo Kornelis
Hugo Kornelis
Posted Thursday, June 10, 2010 2:46 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 2:24 AM
Points: 5,235,
Visits: 7,040
Interesting find, Jason. I missed my point because I believed Books Online. The only small critisism (sp?) I have on this question is the incorrect use of uppercase ("MODEL" instead of "model"), which will cause errors on a server with a case sensitive collation.
UMG's comment is not entirely correct. SQL Server does nog ignore the READ_ONLY property in model; it just does not propagate it to the new database. Try createing a table in model after setting it to READ_ONLY; you'll see that this fails.
It does of course make sense that the READ_ONLY property won't propagate. After all, creating a database involves writing by itself! And I can also see the value in using READ_ONLY to protect from accidental changes to the model database.
It's just a big shame that the description in Books Online is completely wrong!
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #935225
Daniel Bowlin
Daniel Bowlin
Posted Thursday, June 10, 2010 7:08 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 8:49 AM
Points: 2,672,
Visits: 2,417
I love QOTD. Whether I get them right or I get them wrong, I pretty much always learn something. Thanks for an interesting question.
Post #935328
SQLRNNR
SQLRNNR
Posted Thursday, June 10, 2010 8:00 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:07 PM
Points: 18,733,
Visits: 12,332
Hugo Kornelis (6/10/2010)
Interesting find, Jason. I missed my point because I believed Books Online. The only small critisism (sp?) I have on this question is the incorrect use of uppercase ("MODEL" instead of "model"), which will cause errors on a server with a case sensitive collation.
UMG's comment is not entirely correct. SQL Server does nog ignore the READ_ONLY property in model; it just does not propagate it to the new database. Try createing a table in model after setting it to READ_ONLY; you'll see that this fails.
It does of course make sense that the READ_ONLY property won't propagate. After all, creating a database involves writing by itself! And I can also see the value in using READ_ONLY to protect from accidental changes to the model database.
It's just a big shame that the description in Books Online is completely wrong!
Thanks Hugo. Also, thanks for correcting the case. I think the BOL description should be updated. It is still possible to interpret the findings of this test as supporting BOL (if you stretch it a bit). Think about it, you can set model to READ_ONLY however you can't enforce that setting on a new DB - which makes it appear that the setting is indeed not in effect on model.
However, I will have to investigate a bit further due to the behavior of the wizard. I need to see if I can duplicate the results of michael.kaufmann.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #935362
SQLRNNR
SQLRNNR
Posted Thursday, June 10, 2010 8:02 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:07 PM
Points: 18,733,
Visits: 12,332
stewartc-708166 (6/10/2010)
Good question.
I found the inconsistency with BOL interesting.
Thanks
Thanks
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #935365
DavidSimpson
DavidSimpson
Posted Thursday, June 10, 2010 8:07 AM
SSC Eights!
Group: General Forum Members
Last Login: Friday, May 17, 2013 10:29 AM
Points: 890,
Visits: 931
Good question which I missed because I thought that the model db could not be set to Read_only... very interesting. A good start to the day when you learn something new. As Hugo points out, though, it makes sense because there is value to set the model to read only to protect it from accidental changes once you have it set like you want.
David
Post #935369
SQLRNNR
SQLRNNR
Posted Thursday, June 10, 2010 8:15 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:07 PM
Points: 18,733,
Visits: 12,332
DavidSimpson (6/10/2010)
Good question which I missed because I thought that the model db could not be set to Read_only... very interesting. A good start to the day when you learn something new. As Hugo points out, though, it makes sense because there is value to set the model to read only to protect it from accidental changes once you have it set like you want.
David
Thanks
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #935377
johnf_amic
johnf_amic
Posted Thursday, June 10, 2010 8:19 AM
Old Hand
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 10:37 AM
Points: 349,
Visits: 241
I got 3 out of 4 right. Don't I get partial credit?
Post #935384
SQLRNNR
SQLRNNR
Posted Thursday, June 10, 2010 8:23 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:07 PM
Points: 18,733,
Visits: 12,332
johnf_amic (6/10/2010)
I got 3 out of 4 right. Don't I get partial credit?
You did. You got .75 pts and then it is rounded down for your final score.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #935388
paul.knibbs
paul.knibbs
Posted Thursday, June 10, 2010 8:29 AM
Ten Centuries
Group: General Forum Members
Last Login: 2 days ago @ 3:43 AM
Points: 1,257,
Visits: 4,255
Mark me down as another believer in what Books Online said...I assumed that when it said the model database couldn't be set READ_ONLY that SQL would, you know, actually give you some sort of error when you tried it!
Having said that, it's kind of an odd restriction anyway. The contents of the model database are copied to create a new database--what part of that would be broken if the model database actually WERE read only?
Post #935395
Michael Poppers
Michael Poppers
Posted Thursday, June 10, 2010 8:30 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Thursday, January 17, 2013 2:34 PM
Points: 565,
Visits: 360
CirquedeSQLeil (6/9/2010)
Thanks. True - BOL does state that the MODEL DB cannot be set to ReadOnly, that's why I found this to be an interesting behavior.
Agreed. Good QotD, Jason!
Thanks for pointing out the DB name too.
The radiogroup choice still says "TestA" -- if the proper database name had been listed, I would have chosen it and, by virtue of then receiving FLOOR(0.75) credit, would have missed my QotD point!
Post #935397
« Prev Topic
|
Next Topic »
42 posts, Page 2 of 5
««
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.