locked
When I run snapshot agent SnapshotGenerationAgent.GenerateSnapshot(), it fails.. RRS feed

  • Question

  • when i run SnapshotGenerationAgent.GenerateSnapshot(), it fails.
    the log file generated is as follows

    ............................
    ............................
    Flushing cabinet folder
    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 'FCIDestroy()'.
    Message Code: 4
     
    what this error indicates .. i am not able to track what is mistake
    pls let me konw asap

    FOLLOWING IS THE CODE THAT I AM USING TO RUN SNAPSHOT AGENT

    private static EReturnValue generateSnapshot()
    {
    if (!publisherConn.IsOpen)
    {
    return EReturnValue.Failure;
    }
    EReturnValue retVal = EReturnValue.Success;
    SnapshotGenerationAgent agent=new SnapshotGenerationAgent();;

    try
    {
    //SET THE STATUS EVENT
    mPublicationStatusInfo = new StringBuilder(1024);//CAPACITY IS 1024
    agent.Status += new AgentCore.StatusEventHandler(snapshotAgentStatus);
    agent.Distributor = DistributorName;
    agent.DistributorLogin = DBLogin;
    agent.DistributorPassword = DBPassword;
    agent.Publisher = PublisherName;
    agent.PublisherLogin = DBLogin;
    agent.PublisherPassword = DBPassword;
    agent.PublisherDatabase = PublicationDatabaseName;
    agent.ReplicationType = ReplicationType.Merge;
    agent.Publication = PublicationName;

    agent.GenerateSnapshot();
    retVal = EReturnValue.Success;
    }
    catch (Exception ex)
    {
    #if debug
    MessageBox.Show(ex.Message);
    #endif
    retVal = EReturnValue.Failure;
    }
    finally
    {
    writeStatusInfoInLogFile();
    }
    return retVal;
    }




    • Moved by Max Wang_1983 Friday, April 22, 2011 10:07 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, September 14, 2007 12:24 PM