10.12.07

Transaction log grows with Bulk Logged?

Posted in DBA, Microsoft Sql server, TSQL at 10:55 am by Hedwig Lodrigo

When using the Bulk-Logged recovery model your server logs the bulk commands minimally, our so you think. For sql server to log minimally other criteria should be met!

First off the table should not be replicated. And when you do your bulk logged command you also need to lock the table.

SAMPLE

sp_tableoption target_table, 'table lock on bulk load', 1

INSERT INTO target_table
(a,
b
)
SELECT
a,
b
FROM
source_table

sp_tableoption target_table, 'table lock on bulk load', 0

Comments are closed.