Results 1 to 4 of 4

Thread: Deleting log file

  1. #1
    Join Date
    Feb 2006
    Posts
    2

    Deleting log file

    For some reason (and I will determine that separately) one of the update jobs that is run to add data to a table is running rampant and adding millions of records to the table. I have a SQL Server 2000 table that only has about 467K legitimate records, but there were over 32 million in it yesterday. All but the 467 have fields with an index number and except for default fields the fields are null. I deleted about 11 million of them yesterday which caused the log file to grow to over 11gig. Now I am experiencing space issues and need to delete this log file. Unfortunately I don't have backup space of that size anywhere to move it to (if I could). What do I do?

    Thank you!
    Chad

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    If the db is in full or bulk-logged recovery model, you can run 'backup log db_name with truncate_only' then shrink log file. Once done, do db full backup.

  3. #3
    Join Date
    Feb 2006
    Posts
    2

    the run command

    Is that a function of the available tasks for database management or something I would run in a different non-menu driven location?

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Run them in query analyzer, use 'dbcc shrinkfile' to shrink log file. You can find detailed syntax in sql books online.

Posting Permissions

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