FIX: You cannot synchronize binary large object (BLOB) data by using a transactional replication when you set the SubscriptionStreams parameter of the Distribution Agent to a value that is larger than 1 in SQL Server 2008

Article translations Article translations
Article ID: 975171 - View products that this article applies to.
Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • In Microsoft SQL Server 2008, you set up a transactional replication on a table that contains binary large object (BLOB) columns.
  • You set the SubscriptionStreams parameter of the Distribution Agent to a value that is greater than 1.
  • You insert data into the binary large object (BLOB) columns. The data size is greater than the value of the OleDbStreamThreshold parameter.

    Note The default value of the OleDbStreamThreshold parameter is 16,384 bytes.
When you synchronize data in this scenario, you may experience the following symptoms:

Symptom 1

The Distribution Agent stops replicating commands. The Distribution Agent status is set to 2. This status that is set to 2 indicates that the last command was replicated successfully. However, there are still some pending commands at the distributor to be replicated to the subscriber. These commands contain binary large object (BLOB) data. The binary large object (BLOB) data size is greater than the value of the OleDbStreamThresold parameter. Additionally, the following error messages are logged in the Distribution Agent log:

Date Time No replicated transactions are available.
Date Time Repl Agent Status: 2
Date Time Adding alert to msdb..sysreplicationalerts: ErrorId = 0,
Transaction Seqno = Transaction Sequence Number, Command ID = 1
Message: Replication-Replication Distribution Subsystem: agent Distribution Agent Name succeeded. No replicated transactions are available.OLE DB Subscriber 'Subscriber Name': exec dbo.sp_MSupdatelastsyncinfo N'Subscriber Name',N'Database Name', Table Name', 0, 2, N'No replicated transactions are available.'

Symptom 2

The Distribution Agent does not run successfully. The Distribution Agent status is 6. The following error messages are logged in the Distribution Agent log:

Date Time Agent message code 20046. Repl Agent Status: 6
Date Time ErrorId = 22, SourceTypeId = 2 ErrorCode = '20046'
ErrorText = ''
Date Time Adding alert to msdb..sysreplicationalerts: ErrorId = 22,
Transaction Seqno = 00000021000000d1004800000000, Command ID = 1
Message: Replication-Replication Distribution Subsystem: agent < Distribution Agent Name > failed. ErrorId = 22, SourceTypeId = 1
ErrorCode = ''
ErrorText = 'if @@trancount > 0 rollback tran'
In addition to the error logged above, the following error is logged to the MSrepl_errors table in the distribution database:
The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 32.

RESOLUTION

The fix for this issue was first released in Cumulative Update 4 for SQL Server 2008 Service Pack 1. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
973602 Cumulative update package 4 for SQL Server 2008 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
970365 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released
Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 1 hotfix to an installation of SQL Server 2008 Service Pack 1. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

WORKAROUND

To work around this issue, use one of the following methods.

Method 1

Set the SubscriptionStreams parameter of the Distribution Agent to a value of 1.

Method 2

You can set the OleDbStreamThreshold parameter of the Distribution Agent to a value that is greater than the largest data size for binary large object (BLOB) columns that have to be replicated. Then, the Distribution Agent will not bind binary large object (BLOB) data as a stream. Starting from SQL Server 2008, binary large object (BLOB) data is bound as a stream when the data size of the binary large object (BLOB) data is less than the value of the OleDbStreamThreshold parameter. This behavior is true by default.

Note If you use this method, the Distribution Agent will take a longer time to replicate binary large object (BLOB) columns.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

REFERENCES

For more information about the OleDbStreamThreshold parameter, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/en-us/library/ms147328.aspx
For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems

For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499 New naming schema for Microsoft SQL Server software update packages

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 975171 - Last Review: March 18, 2010 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
kbsurveynew kbfix kbqfe kbexpertiseadvanced KB975171

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com