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 12345»»»

Model Database Expand / Collapse
Author
Message
Posted Tuesday, February 21, 2012 8:36 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 12:18 PM
Points: 33,155, Visits: 15,289
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
Post #1255679
Posted Tuesday, February 21, 2012 8:37 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:19 AM
Points: 5,586, Visits: 24,925
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
Post #1255680
Posted Tuesday, February 21, 2012 8:53 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:16 PM
Points: 2,270, Visits: 3,783
A very good question Steve

Mohammed Moinudheen
Post #1255682
Posted Tuesday, February 21, 2012 9:30 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 4:53 AM
Points: 1,325, Visits: 469
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
Post #1255689
Posted Tuesday, February 21, 2012 9:43 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 2:34 AM
Points: 1,904, Visits: 2,840
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.


----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
Post #1255695
Posted Tuesday, February 21, 2012 9:44 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
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
Post #1255696
Posted Tuesday, February 21, 2012 9:53 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 2:34 AM
Points: 1,904, Visits: 2,840
Please see screen shot of the test I did....I'm running R2....

----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.


  Post Attachments 
model read_only test.JPG (57 views, 32.65 KB)
Post #1255698
Posted Tuesday, February 21, 2012 10:22 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, August 11, 2014 10:25 PM
Points: 1,287, Visits: 1,116
A good question to learn something.

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

Are we missing something here.
Post #1255702
Posted Wednesday, February 22, 2012 12:32 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:45 AM
Points: 13,538, Visits: 10,412
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1255735
Posted Wednesday, February 22, 2012 1:08 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 3:16 AM
Points: 2,494, Visits: 2,375
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
Post #1255743
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse