July 2, 2013 at 11:08 am
So I was adjusting the size of a DB for a customer (increasing the size of his QA DB) and noticed something. SQL will let you set an initial size that is larger than the maximum size in Autogrowth.
So, my question, what happens if you do this? If you create a DB (or increase the initial size of a DB) so that, for example, the initial size is 10MB while the maximum size in Autogrowth is 5MB. What would SQL do? Still tell you that there's no space in the DB, or would it let you go up to the new initial size but not beyond?
Just curious, and don't have a system handy to try this out on...
Jason
July 3, 2013 at 3:49 am
well, as long as you have disk, you can pre-grow you file to any desired size. Think of it as a book. You can allocate unused pages, but data will be only filled once you write to those pages. It will remain at the pre grown size but if you use the shrink option, you will be able to see the amount of data vs the amount of space available.
Hope this helps 🙂
July 3, 2013 at 5:39 pm
jasona.work (7/2/2013)
So I was adjusting the size of a DB for a customer (increasing the size of his QA DB) and noticed something. SQL will let you set an initial size that is larger than the maximum size in Autogrowth.So, my question, what happens if you do this? If you create a DB (or increase the initial size of a DB) so that, for example, the initial size is 10MB while the maximum size in Autogrowth is 5MB. What would SQL do? Still tell you that there's no space in the DB, or would it let you go up to the new initial size but not beyond?
Just curious, and don't have a system handy to try this out on...
Jason
You will get an error, as you expected, saying that the "MAX size cannot be less than SIZE".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply