April 23, 2007 at 8:35 am
Hello,
Can anybody tell me how can i insert data in one table and do the commits after the data is inserted.
Like use one autocommit.
I´ve one database that is in simple recovery model and i dont understand why transaction log stay full every day.
Can anyone explain me this situation?
Thanks and regards,
Jorge Mendes
Thanks a lot.
Regards,
Jorge Manuel Mendes
April 23, 2007 at 10:23 am
Commit occurrs at the end of the batch, however the transaction log will not truncate if it grows due to the size of the transaction. Consider if you insert 5 million rows, the transaction log will contain an entry and grow according to the action as a whole not on each record, a batch either completes in full or rolls back. If you want to keep from growing the TL so much I suggest breaking the inserts down into smaller batches for each run.
April 23, 2007 at 11:34 am
If you issued a BEGIN TRANSACTION, you must manually commit, but Antares686 has given you a good explanation.
Also, are you getting log full messages? Or do you just see the size as xxx?
April 24, 2007 at 7:42 am
Thanks everybody.
Regards,
Jorge Mendes
Thanks a lot.
Regards,
Jorge Manuel Mendes
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply