Sunday, February 19, 2012

How do I disable transaction logging in a stored procedure?

Greetings,

I would like to turn off transaction logging for a long-running stored procedure. It is doing some one-shot utility work in a temporary table. If the stored procedure fails then I'll delete all the rows in the table.

Is is possible to turn off (or at least minimize) the logging for a single stored procedure? I'm looking at this from a performance perspective, thinking that doing no logging will speed things up a bit. The stored procedure will potentially update hundreds of thousands rows.

Am I on the right track or barking up the wrong tree?

Thanks,

BCB

hello,

everything that happens in the database are entered into the transaction log

when you are in the full recovery.

you may only choose any of the three recovery model to handle the log size

1. simple

2. bulk logged

3. fully logged

you can deal with the logs only as a part of your db maintenance procedure.

thanks,

joey

No comments:

Post a Comment