Clearing/Releasing data files

  • I recently installed SQL Server 2005 on a new machine. It all appears fine. I ran a large job and the job caused the following files dbname_SHOP_AREA, db_name_LOG1, db_name_LOG2 and db_name_LOG3 to be approx 40Gb in size. How do I clear these down? Is there a setting I have missed in install? or is this a manual task?

    As the next time I run a job it uses up all remaining memory on the machine, so I would like this to free itself after each job completion, is this possible?

    Thanks in advance.

  • It sounds like the database is in FULL recovery mode. So you need to institute log backups. Depending on your data needs, you could set the database to SIMPLE recovery mode and then you wouldn't need the log backups, but you also wouldn't be able to recover to a point in time. After a log backup is completed, you should be able to shrink the files.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Please read through this - Managing Transaction Logs[/url]

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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