Results 1 to 8 of 8

Thread: Database seems to grow out of control

  1. #1
    Join Date
    Oct 2002
    Location
    Trinidad
    Posts
    52

    Database seems to grow out of control

    My database has tables that change each day. Jobs are scheduled to delete and copy from an AS/400 into these Databases. Most times these tables are copied without any problem, but occasionally the database increases in size, filling up the Disk. All other jobs then fail for a lack of space. Or you get an error message on the failed jobs saying that the transaction log is full. (I have truncate log on checkpoint selected.) On checking the physical disk space the disk has no free space and the database size has ballooned.

    Most times, shrinking the Database frees up some space, but not much. A few hours later most of the space is released. How can I prevent this from happening? I have the automatically grow file option selected, could this be the problem? And if so, how should this be configured to prevent my databases from "over inflating?"

    Thanks

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Is db log file on this disk? How big the log file is? What's sql version? Do you enable db option 'truncate log on checkpoint'? If not, do you backup log?

  3. #3
    Join Date
    Oct 2002
    Location
    Trinidad
    Posts
    52
    The log file IS on the same disk as the database. I do have truncate log on checkpoint selected. The log is currently 185MB (the database is also at an acceptable size right now- 2GB, but like I said it can grow up to 7GB). I do not backup the log file. I'm running SQL 7.0. Thanks.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    It could be caused by long running transaction. If a transaction which started earlier does not commit, even though other transaction which started after it committed, sql server can't truncate log.

    Try to break your data pull job into multiple smaller jobs with frequenct commits.

  5. #5
    Join Date
    Oct 2002
    Location
    Trinidad
    Posts
    52
    What do you mean by less frequent commits. I do have the data copy broken into many jobs, but according to what you're saying I may still have to break them up even smaller.

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    Maybe. What's log size when the db grows to 7gb?

  7. #7
    Join Date
    Oct 2002
    Location
    Trinidad
    Posts
    52
    I don't remember right now. But I'll check when it happens again. Hopefully if I can break up the jobs this will not happen again.

  8. #8
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    when the job runs. run another job that can do the "checkpoint" every 1 min.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •