Creating a database with MAXSIZE = 0MB! | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Creating a database with MAXSIZE = 0MB!

What kind of database will it create? What does the MAXSIZE = 0MB means? Shouldn’t this be the maximum size of database which should be greater than SIZE = 100MB?
CREATE DATABASE DatabaseName
ON PRIMARY
( NAME = DatabaseName_DATA
, FILENAME = ‘E:SQLSERVERDATADatabaseName_Data.mdf’
, SIZE = 100MB
, MAXSIZE = 0MB
, FILEGROWTH = 200MB )
Thanks,
DilliGrg
Why don’t you try it out? [<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />]<br /><pre id="code"><font face="courier" size="2" id="code"><br />Server: Msg 5103, Level 16, State 1, Line 1<br />MAXSIZE cannot be less than SIZE for file ‘DatabaseName_DATA’.<br /></font id="code"></pre id="code"><br /><br />–<br />Frank Kalis<br />Moderator<br />Microsoft SQL Server MVP<br />Webmaster:<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a>
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by FrankKalis</i><br /><br />Why don’t you try it out? [<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />]<br /><pre id="code"><font face="courier" size="2" id="code"><br />Server: Msg 5103, Level 16, State 1, Line 1<br />MAXSIZE cannot be less than SIZE for file ‘DatabaseName_DATA’.<br /></font id="code"></pre id="code"><br /><br />–<br />Frank Kalis<br />Moderator<br />Microsoft SQL Server MVP<br />Webmaster:<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a><br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br /><br />Frank,[<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br /> Thanks for the reply. I tried myself too and got the same error message so wasn’t sure if we can create database with maxsize of 0 mb. I know the initial size of the database cannot be less than the model database. Actually, I got this script from other colleague and told me that they ran the script successfully and created the database. I was surprised and not sure what to say. I just wanted to confirm.<br /><br />Thanks,<br />DilliGrg
]]>