Full Tranlog on a CDC enabled DB

· Uncategorized

I was finally able to simulate my problem with the full tranlog on a CDC enabled DB.

I created one table and enabled it for CDC.

–          BEGIN TRAN

–          INSERT records into this table filling up the tranlog to 95%. (not 100% because this will rollback the transaction and space in the tranlog can be reused after a tranlog backup)

–          COMMIT

CDC will only start filling up the capture tables after the final COMMIT but the CDC capture job also needs tranlog space to succeed filling up the _CT tables. On the other hand, the original tranlog entries can only be reused after the records are replicated. Good example of a logical deadlock

So the “CREATE DATABASE…FOR ATTACH_REBUILD_LOG” (previous blog) was not necessary if only the tranlog size was limited from the start, so there was some disk space free to enlarge the file just to handle this one big transaction.

I remember from the early days that transactions should always be as short as possible ant that file size should be defined up front.

Still counts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: