HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Log file growth issues

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
issuesfilegrowthlog

Problem

We're consolidating data from a bunch of databases into four reporting databases each night.

Because the entire dataset is imported each night we do not need to be able to restore the data to a point in time. Thus the databases are in simple recovery mode.

Each time we run the import however, our database ldf files grow to absurdly large sizes (50+ Gigs).

Is there a way to turn off the logging altogether or get SQL Server to clear those log files sooner?

I'm guessing no for clearing as the log_reuse_wait_desc is ACTIVE_TRANSACTION.

Solution

You can import the data by using operations that can be minimally logged. See Operations That Can Be Minimally Logged and Prerequisites for Minimal Logging in Bulk Import.

And you should consider reducing the duration of transactions during the import. Use batches of limited size and commit periodically.

Context

StackExchange Database Administrators Q#41618, answer score: 6

Revisions (0)

No revisions yet.