shrink database

  • Hi

    I have a scheduled job that runs on my server everyday from 2100, and it ends about 2330. I have noticed that the database increase in size during this job, not to mention that it allocates alot of free space and it keeps holding that free space after the job ends.

    Thus I have to shrink the database after this job. No problem, but there has to be away around this?

    I use scheduled shrink right after the job ends, but can I shrink while the job run?

    My shrink settings:

    - max free space in files after shrink: 99%

    - shrink file to [minimum]

    Should I use some other settings? i.e. truncate free space from the end of file.

     

    ps! cross post to: performance tuning and backup forums

    Best regards

    Dan

  • If this job runs every day and needs the extra space then why do you want to shrink the DB (and force it to have to reallocate the extra space each time)?

  • Is the log what's growing? If so, it's possible that your scheduled job is doing lots of updates / deletes, etc. as a single batch which requires more log space. Try breaking your job into several smaller transactions, each of which require less log use.


    --Mitch

Viewing 3 posts - 1 through 2 (of 2 total)

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