SQL Server Always On – Minimally Logging Inserts

availability-groupsbulk-insertsql-server-2012t-sqltransaction-log

I have a primary database in FULL recovery mode which is part of Always On group. Is there a way to minimally log insert operation under FULL recovery model?

I have a process that is executed each day and insert few millions of records in a table. While the operations continued the transaction log file size is increased dramatically ( from 1 GB to 40 GB).

As I have read I can used some variations of INSERT which are not fully logging the operation but I am concern about the effect of switching the recovery model?

Best Answer

No. Full recovery model is a prerequisite of AlwaysOn Availability groups as per the check list here, and minimally logged operations are only available under Simple or Bulk Logged recovery.

Quote from the Data Loading Performance Guide:

Minimally logged operations are available only if your database is in bulk-logged or simple recovery mode.

Re trace flag 610, what that added was the ability to do minimally logged inserts to tables with clustered indexes ( and/or non-clustered indexes ) with data already in them. This was not previously available.

The thing to bear in mind about minimally logged transactions as that as soon as a transaction log backup contains one of these, you lose the ability to do point-in-time restore with that backup. So hopefully now you understand why these are not available in Full recovery model