Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    7

    Unanswered: How to clear the logs

    I want to clear the whole transaction log and sql server log...ie., just clear all the entires....how

  2. #2
    Join Date
    Jan 2004
    Location
    Shanghai,China
    Posts
    76
    dump tran db_name to data_device
    go

    At this point, any completed transactions will be flushed out to disk. If you don't care about the recoverability of the database, you can issue the following command:

    dump tran db_name with truncate_only

    If that doesn't work, you can use the with no_log option instead of the with truncate_only.

    Remember that dumping the log only clears out completed transaction.

  3. #3
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Code:
     sp_dboption YourDB, "trunc log", true
    ... if you (or your DBA) don't execute dump tran YourDB

Posting Permissions

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