Home Forums SQL Server 2005 Administering How space is allocated for new objects in the data files? RE: How space is allocated for new objects in the data files?

  • This error is occurring because the database LOG file is either too large for what has been allocated or the SQL server disk is full. Here are some important things that can be done to prevent and remove this error:

    It is important that you setup the database to automatically shrink itself. This is done in SQL Enterprise Manager by finding the database of interest, clicking with the right mouse button then selecting properties. Under the Options folder make sure you have selected "Truncate Log on CheckPoint", "Select into/bulk copy", and "Auto Shrink". These options will significantly help control the size of the database and log file. This will also compact the database on a daily basis. After making these changes it may take minutes and possibly more than 1 hour for the server to recover from the problem and shrink the database.

    Setup a routine maintenance plan to backup the database and log file. At minimum the database and log file should be backed up weekly. On high traffic sites this should be done daily. Normall the LOG file will not shrink until it has been backed up at which time SQL truncates the log and shrinks the file.

    If number 1 is not the cause of your problem you should also check that the hard drive holding the databases on the SQL server is not full. A full hard drive has also been known to cause this problem. If this is the cause of the problem consider moving the database to another larger drive.

    Lastly, the cause of the problem might be that your database size has been restricted and you are exceeding these restrictions. This is most common with a web hosting provider who may limit your database size. Having them increase the database and log file size will fix the problem. Keep in mind they may charge you more money for the extra space. A good size for a site with less than 100,000 impressions/day might be 50MB on the database and 10MB on the log file. Allowing the database and log file to automatically grow will also resolve the problem. A sample of this is shown below for the database file. Because the database can grow without any restrictions this error will be prevented.