Turning off Transaction Logging

  • Hello,

    I have a new database which I have created for a specific, large, data load exercise. I don't want any of the transactions logged as I'm short of disk space and I can always re-run the data load if I have problems. Can anyone tell me how I prevent SQLServer 2000 from filling up the log file?

    My DBA is away on a 2 week holiday, so I can't turn to him for help.

    Regards

  • Hello,

    you have to change database recovery model to simple. Select the database and by right-clicking and selecting options you can change the recovery model.

    By default the recovery model of a database is set to full after its creation.

    PSA

  • If you read the articles suggested by Anirban Paul, you'll understand that you can't eliminate the use of transaction logs in SQL Server. You should use the simple recovery model, as PSA suggested, so the t-log will be truncated on checkpoint and use user-defined transactions to load the data in manageable chunks so the t-log doesn't fill up.

    Greg

  • The big thing that Greg mentioned is to load in chunks, or reduce the batch size. If you load with BCP, there's a setting to commit after xxx rows, same for most DTS tasks as well. This will allow the transaction log to clear after those rows instead of requiring the entire load to be a single transaction, which would mean that your recovery model doesn't matter.

Viewing 5 posts - 1 through 4 (of 4 total)

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