The initial snapshot for publication is not yet available

Microsoft.SQLServer.2008.InitialSnapshotForPublicationIsNotYetAvailableRule (Rule)

Knowledge Base article:

Summary

SQL Server logged an error while waiting on the article cache access event.

Causes

You will see the above error under the following circumstances.

For merge replication:

You will see this error when you have created or reinitialized a merge subscription and you started the Merge Agent before you started the Snapshot Agent or before the Snapshot Agent had completed.

For transactional replication:

You have created or reinitialized a transactional subscription which was created with the Yes, initialize the schema and data option and you started the Distribution Agent before you started the Snapshot Agent or before the Snapshot Agent had completed. You will only get this error if the subscription is the only subscription associated with the Distribution Agent or if all subscriptions associated with the Distribution Agent are in the above state. As soon as any one of the subscriptions associated with the Distribution Agent has an available snapshot, the agent history message will instead say either, "No replicated transactions are available," or it will report the number of transactions and commands delivered for other subscriptions associated with this agent. If there is only one article in a transactional publication and that article meets the criteria described above, the error will instead be 21076, "The initial snapshot for article is not yet available."

Resolutions

If the associated Snapshot Agent has not been started since the subscription was created, or if it has not been started since the last time you chose to reinitialize the subscription, you will need to start the Snapshot Agent and let it complete before starting the Merge Agent or Distribution Agent.

If the Snapshot Agent does not complete, check the Snapshot Agent history for errors and address them. If necessary, you can add a log to the Snapshot Agent to see if more details can be returned for any errors that you see.

External

How to enable replication agents for logging to output files in SQL Server

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

Yes

Priority

Defines Alert Priority.

1

Severity

Defines Alert Severity.

1

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
The initial snapshot for publication is not yet available
{0}

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2008.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.2008.InitialSnapshotForPublicationIsNotYetAvailableRule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="true" ConfirmDelivery="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2008.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<PublisherName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</PublisherName>
<EventNumber>21075</EventNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2008.InitialSnapshotForPublicationIsNotYetAvailableRule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
<SuppressionValue>$Data/PublisherName$</SuppressionValue>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>