Information Technology Knowledge Base

October 12, 2007

Transaction log grows with Bulk Logged?

Filed under: DBA, Microsoft Sql server, TSQL — Hedwig Lodrigo @ 10:55 am

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

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

Powered by WordPress