none
HELP-Create Sample Data by microsofst spoil and grow my mdf ldf -from 5 MB TO 6 GB RRS feed

Answers

  • Well, this is very much expected.

     

    You have just told your server to store > 2 billion rows ( I assume in an int column )

    2 billion times 4 bytes is a bit over 8 Gigs.

     

    If this wasn't your intention, then drop or truncate the table, then look up DBCC SHRINKDATABASE and DBCC SHRINKFILE in BOL (Books on Line)

     

    /Kenneth

     

    Wednesday, May 21, 2008 11:47 AM

All replies

  • Well, this is very much expected.

     

    You have just told your server to store > 2 billion rows ( I assume in an int column )

    2 billion times 4 bytes is a bit over 8 Gigs.

     

    If this wasn't your intention, then drop or truncate the table, then look up DBCC SHRINKDATABASE and DBCC SHRINKFILE in BOL (Books on Line)

     

    /Kenneth

     

    Wednesday, May 21, 2008 11:47 AM
  • is this is a site for teaching  ??

    why he put 2 billion rows ??

    to test the limit of my server ?

    Code Snippet

    How to Create and Use A Numbers Table


     

    Jonathan Kehayias, April 15, 2008


    A Numbers table is simply a table that holds a single integer column with each
    positive integer number in the range from the number 1 to the maximum value
    of an integer 2,147,483,647. Creating a Numbers table is really simple to do
    and it can be used to solve a broad number of problems.

    Some Examples of how to use a Numbers Table are:

     

     

    Wednesday, May 21, 2008 12:19 PM
  • I want to give some kind suggestions.

    1. Never run a single line of code before you know what it supposed to do.
    2. Learn how to estimation. You don't want to take billion rows as piece of cake.

    Trust me, this is a very good lesson you've learn.


    thanks,
    Zuomin

    Wednesday, May 21, 2008 1:06 PM
  • I have no idea of the authors intentions, but it says clearly in the text that the number is a bit over 2 billion.

     

    I assume that this is on a test server anyway?

    Just drop your very large table and try again with a smaller number.

    How many rows would be enough for your own numbers table?

     

    /Kenneth

     

    Wednesday, May 21, 2008 1:08 PM
  • it strange i delete the table and the file size is the same

    the file MDF is 1 giga

    the file LDF_log is  5 giga

    after i delete this table

    where is hide the weight of the file ?

    now i cnoot go baeck to the orginl size !1

     

    Wednesday, May 21, 2008 1:25 PM
  • You have to do a DBCC ShrinkFile option. Also check the log file. If that is also big, Change the Db setting to simple mode and shrink the log file and then put it back to how it was. That should free up your Disk Space. Check BOL for the syntax and samples.

    Like everyone else says, check the code and understand what you are doing before you run any third party code. Not just third party code, even code coming from developers.

     

     

    Wednesday, May 21, 2008 2:22 PM
  • That article is only an example of how to build a numbers table.  I wouldn't have ever expected that someone would actually create a numbers table using the maximum value of an integer to seed the table with.  I have updated the article with a note to warn of this potential issue in the future.

    Wednesday, July 2, 2008 6:24 PM
    Moderator