January 21, 2010 at 3:56 pm
YEs! I want my point back.. it would be my first... 🙁
Stibally 😀
January 21, 2010 at 10:17 pm
Mine is wrong too! mdf 3 MB + LDF 1 MB = 4 MB for SQL 2005 EE.
Question should be more accurate but anyway I enjoy all this discussion 😛
Cheers!
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
January 22, 2010 at 5:11 am
The moderator or who ever checks the questions in QOD can make it compulsory to include the specific version of SQL or have a option that says the question implies to all the versions of SQL.
"Keep Trying"
January 22, 2010 at 6:57 am
Lynn Pettis (1/21/2010)
No luck, knowledge. What issues? I simply assumed a default install of SQL Server 2005 (none was specified), made a decision based on what I have seen when creating simple sandbox databases at home. Had I looked at SQL Server 2008, I'd have gotten wrong, as then default size of model has changed.
Interesting, as my default (out of the box) SQL Server 2005 and 2008 developer editions create a 3+1 MB database. I'm curious as to why yours is 2+1. Was it upgraded from SQL Server 2000? Or does it have something to do with options selected.
In any event, the resulting "default" size is immaterial, as it is based upon the size [du jour] of the model database.
January 22, 2010 at 7:26 am
One more log for the fire.
I ran a simple CREATE DATABASE mydb
using SQL Query Analyzer against my 2005 Developer edition, and the size came out to 1.68 compared to 1.69 for the model. The disk size of both mdf files was 1216 KB.
Then I used the 2005 SSMS UI to create a 'New database' named mydb2 and the resulting size is 3MB. 2MB mdf and 1MB ldf. My model db is still 1216 KB.
Go figure...
January 22, 2010 at 9:14 am
Tom Garth (1/22/2010)
I ran a simpleCREATE DATABASE mydb
...
Then I used the 2005 SSMS UI to create a 'New database'
...
Bravo, Tom!
Of course SSMS does not use the 'CREATE DATABASE xxx' statement without parameters, it explicitly defines all the file names, file sizes etc.
How didn't I see that the author had created his database via SSMS :blush:
So the answer does not (explicitly) depend on model's size, it depends on some SSMS internal algorithm!
Edit: silly miswording corrected
January 22, 2010 at 9:24 am
vk-kirov (1/22/2010)
So the answer does not (explicitly) depend on model's size, it depends on some SSMS internal algorithm!
So I'll repeat my earlier statement that the correct answer should have been: "It depends (on lots of things)"
January 22, 2010 at 1:03 pm
development edition 2005, 64 bit - 3 and and 1 mb
January 22, 2010 at 2:39 pm
does anyone read MS documentation? Do you people even have the fainest idea what the "MODEL" database is used?
January 22, 2010 at 3:36 pm
timfle (1/22/2010)
does anyone read MS documentation? Do you people even have the fainest idea what the "MODEL" database is used?Obviously vk kirov doesn't (although I have worked with people from russia - and for the most part they are the posterior part of an ***)
Although we all know that the russian version of sql server is different from the other versions because of security concerns.
And I am sure i will cease to exist after vk kirov turns my name over to the russian mafia
It would be okay by me if you just ceased to exist on SSC!
January 23, 2010 at 10:54 am
timfle (1/22/2010)
does anyone read MS documentation?Obviously vk kirov doesn't
Of course I may have overlooked something. Could you please post a suitable link to BOL and explain my mistake? I'll be very grateful to you.
timfle (1/22/2010)
Although we all know that the russian version of sql server is different from the other versions because of security concerns.
Shame on me, but I've never seen Russian versions of MSSQL (they do exist, of course (2005 and 2008)) 🙂
January 23, 2010 at 1:40 pm
timfle (1/22/2010)
--------------------------------------------------------------------------------
does anyone read MS documentation?
Obviously vk kirov doesn't
Of course I may have overlooked something. Could you please post a suitable link to BOL and explain my mistake? I'll be very grateful to you.
timfle (1/22/2010)
--------------------------------------------------------------------------------
Although we all know that the russian version of sql server is different from the other versions because of security concerns.
Shame on me, but I've never seen Russian versions of MSSQL (they do exist, of course (2005 and 2008))
ok vk-kirov
link to 2008 BOL: ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/29ddac46-7a0f-4151-bd94-75c1908c89f8.htm
excerpt of text:
size
Is the initial size of the file.
When size is not supplied for the primary file, the Database Engine uses the size of the primary file in the model database. When a secondary data file or log file is specified but size is not specified for the file, the Database Engine makes the file 1 MB. The size specified for the primary file must be at least as large as the primary file of the model database.
my comments about russian version of SQL Server were SARCASM - as we all know - if this were the old Soviet union days - SQL Server would have been invented in USSR and stolen by american capitalist pigs
January 23, 2010 at 5:57 pm
timfle (1/23/2010)
link to 2008 BOL: ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/29ddac46-7a0f-4151-bd94-75c1908c89f8.htmexcerpt of text:
size
Is the initial size of the file.
When size is not supplied for the primary file, the Database Engine uses the size of the primary file in the model database. When a secondary data file or log file is specified but size is not specified for the file, the Database Engine makes the file 1 MB. The size specified for the primary file must be at least as large as the primary file of the model database.
1) How does this correlate with your earlier statement (The answer is the same size as the model database)? As we can see, the size of the newly created log file will not be equal to the model db log file size (unless modellog.ldf = 1 MB).
2) How about the case when log file specifications are missing at all? (e.g. 'CREATE DATABASE TestDB' – even this simple statement can be run)
BOL say what will happen (please check the link you provided):
If LOG ON is not specified, one log file is automatically created that has a size that is 25 percent of the sum of the sizes of all the data files for the database or 512 KB, whichever is larger.
Once again, the size of the newly created log file will not be equal to the model db log file size.
3) The author of the question says in the explanation he created the database via SSMS UI. In this case SSMS specifies all file properties. For example, my SSMS 2008 produces this script:
CREATE DATABASE [TestDB] ON PRIMARY
( NAME = N'TestDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDB.mdf' ,
SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'TestDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDB_log.ldf' ,
SIZE = 1024KB , FILEGROWTH = 10%)
What is the relation between this code and the model database size?
---------------------
timfle (1/23/2010)
as we all know - if this were the old Soviet union days - SQL Server would have been invented in USSR and stolen by american capitalist pigs
Excuse me, who are these mysterious "we all"? 😀 Please don't tell that "we all" = "my very self" :hehe:
timfle (1/23/2010)
my comments about russian version of SQL Server were SARCASM
We all see your great sense of humor. Stand-up comedy scene is waiting for you 😉
January 23, 2010 at 6:10 pm
vk-kirov (1/23/2010)
3)CREATE DATABASE [TestDB] ON PRIMARY
( NAME = N'TestDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDB.mdf' ,
SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'TestDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDB_log.ldf' ,
SIZE = 1024KB , FILEGROWTH = 10%)
What is the relation between this code and the model database size?
By the way, the size of my model.mdf is 2304 KB, the size of my modellog.ldf is 512 KB; these values are not equal to 3072 and 1024 from the script.
January 23, 2010 at 7:27 pm
kirov - as you think this is a matter of such great concern - please call microsoft and pay them to explain
I for one don;t really give a horse's posterior and in all the years I have been doing dba work IT HAS NEVER MATTERED
Viewing 15 posts - 61 through 75 (of 88 total)
You must be logged in to reply to this topic. Login to reply