none
Publication Not Working with Compression (SQL Server 2017) RRS feed

  • Question

  • I'm adding a publication via sp_addpublication with the compress_data parameter set to true but it's generating a 14151 application event ID. This was working with SQL Server 2016 and is only a problem since moving to SQL Server 2017.

    The event log shows the following:

    Log Name:      Application
    Source:        MSSQL$AXISDIPLOMAT
    Date:          16/10/2019 10:12:55
    Event ID:      14151
    Task Category: Server
    Level:         Error
    Keywords:      Classic
    User:          SYSAXIS\AXISDiplomatServices
    Computer:      COCOA.systemsaxis.co.uk
    Description:
    Replication-Replication Snapshot Subsystem: agent COCOA\AXISDIPLOMAT-AXISLogs-AXISLogs-5 failed. The replication agent had encountered an exception.
    Source: Replication
    Exception Type: Microsoft.SqlServer.Replication.FciException
    Exception Message: The replication agent had encountered a file compression (cabinet) library error while calling 'FCIC
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MSSQL$AXISDIPLOMAT" />
        <EventID Qualifiers="49152">14151</EventID>
        <Level>2</Level>
        <Task>2</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2019-10-16T09:12:55.153531900Z" />
        <EventRecordID>13058</EventRecordID>
        <Channel>Application</Channel>
        <Computer>COCOA.systemsaxis.co.uk</Computer>
        <Security UserID="S-1-5-21-2143581470-1533220960-538272213-14285" />
      </System>
      <EventData>
        <Data>Replication Snapshot Subsystem</Data>
        <Data>COCOA\AXISDIPLOMAT-AXISLogs-AXISLogs-5</Data>
        <Data>The replication agent had encountered an exception.
    Source: Replication
    Exception Type: Microsoft.SqlServer.Replication.FciException
    Exception Message: The replication agent had encountered a file compression (cabinet) library error while calling 'FCIC</Data>
        <Binary>47370000120000001300000043004F0043004F0041005C0041005800490053004400490050004C004F004D004100540000000D00000064006900730074007200690062007500740069006F006E000000</Binary>
      </EventData>
    </Event>

    The full exception shown in the replication monitor is as follows:

    Message: The replication agent had encountered a file compression (cabinet) library error while calling 'FCICreate()'.
    Stack:    at Microsoft.SqlServer.Replication.CabCreator.ThrowWrappedFciException(String strFormattedFCIAPIString)
       at Microsoft.SqlServer.Replication.CabCreator.InitializeCabCreator(String strCabFolder, String strCabFileName, LogMessageCallback logMessageCallback)
       at Microsoft.SqlServer.Replication.Snapshot.SnapshotFileProcessor..ctor(SnapshotGenerationAgent snapshotGenerationAgent, String strTargetFolder, ControlFlags controlFlags)
       at Microsoft.SqlServer.Replication.Snapshot.SnapshotProvider.SetupSnapshotFileProcessor()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
       at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
       at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQL_UNKNOWN, Error number: 4)
    Get help: http://help/4


    It happens every time I add the publication. If I switch off compression then the error goes away. 

    Can anyone suggest the cause of the error?


    Wednesday, October 16, 2019 10:35 AM

Answers

All replies

  • Hi Steve Thresher,

    Please check that if there is additional message in the SQL error log.  Please check if you can get ideas from this similar thread.

    Best regards,
    Cathy 

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, October 17, 2019 9:08 AM
  • Cab files have to be under 2 Gigs. how large is your snapshot?
    Thursday, October 17, 2019 11:15 AM
    Moderator
  • If I create a CAB with all the .bcp files from the command line then I get an error so it seems reasonable to assume that's the problem:

    cab.ddf(433): ERROR: (FCIAddFile)Data-size or file-count exceeded CAB format limits
    cab.ddf(433): ERROR: MakeCAB aborted.

    Are all files from the replication folder packed into single CAB or is each file compressed individually?

    Monday, October 21, 2019 2:26 PM
  • It is a single cab.
    Monday, October 21, 2019 2:28 PM
    Moderator