• Hugo Kornelis (11/16/2011)


    vk-kirov (11/16/2011)


    ...but the question has a minor issue. When I created the QOD database with the DemoTable table and tried to rebuild the index, I got the following error message:

    The statement has been terminated.

    Msg 1101, Level 17, State 12, Line 1

    Could not allocate a new page for database 'QOD' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

    #$%#$^& !!!

    You won't believe the time I spent going over my calculations again and again, to make sure I didn't mess this one up - and then I forget that rebuilding the index will temporarily require double the size. In a few hours, my mailbox will flood with ne wpost notifications of the "I want my point back" type. (kicks self)

    OK, so I am not going crazy then. I calculated that it would be over 1 GB for the data size, realized that there was no way that a reindex on that would work, and picked the error. When I saw it was wrong, I scratched my head. Oh, well, mistakes happen, and in principle this is a very useful exercise as all forms of DBAs, developers, infrastructure, production, all of us need to be able to calculate consumed space. So consider this an encouraging vote.