Initial size of data file

  • Good Morning Experts,
    If i set initial size of a data file as 700 MB, does SQL Server allocate 700 MB to the data file immediately? Or will it start from 0 and gradually increase?

  • It will allocate 700MB when you create it; hence why it's called Initial datafile size. 😉

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Wednesday, November 1, 2017 10:05 AM

    It will allocate 700MB when you create it; hence why it's called Initial datafile size. 😉

    Thanks Thom. I have a doubt. Suppose I right click Databases and select New Database, enter database name and set initial size of data file as 500 MB and click OK, the new database will be created. This new database is empty, has no data, and 500 MB space(initial size) has been allocated immediately. What information will this 500 MB space contain?

  • It won't contain any information, as there is no data in the database. Think of it like an empty box, it still takes up space with or without stuff in it.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • coolchaitu - Sunday, November 5, 2017 3:51 AM

    Thom A - Wednesday, November 1, 2017 10:05 AM

    It will allocate 700MB when you create it; hence why it's called Initial datafile size. 😉

    Thanks Thom. I have a doubt. Suppose I right click Databases and select New Database, enter database name and set initial size of data file as 500 MB and click OK, the new database will be created. This new database is empty, has no data, and 500 MB space(initial size) has been allocated immediately. What information will this 500 MB space contain?

    If you don't have

    coolchaitu - Sunday, November 5, 2017 3:51 AM

    Thom A - Wednesday, November 1, 2017 10:05 AM

    It will allocate 700MB when you create it; hence why it's called Initial datafile size. 😉

    Thanks Thom. I have a doubt. Suppose I right click Databases and select New Database, enter database name and set initial size of data file as 500 MB and click OK, the new database will be created. This new database is empty, has no data, and 500 MB space(initial size) has been allocated immediately. What information will this 500 MB space contain?

    It will be filled with many mistakes and performance problems that haven't happened yet. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply