Exception Message: The snapshot could not be generated because the publisher is inactive.

Issue:- Snapshot Agent throw errors while setting up transactional replication. Replication scripted out from another server and applied with the new publisher, distributor and subscriber details.

Message
Microsoft (R) SQL Server Snapshot Agent
[Assembly Version = 10.0.0.0, File Version = 10.0.2531.0 ((Katmai_PCU_Main).090329-1045 )]
Copyright (c) 2008 Microsoft Corporation.
The timestamps prepended to the output lines are expressed in terms of UTC time.
User-specified agent parameter values:
———————————————————
-Publisher XXX
-PublisherDB XXX
-Publication XXX
-Distributor xxx
-DistributorSecurityMode 1
-XJOBID 0xD7BA2FCE2969D04190810F46C6FDF533
———————————————————
Connecting to Distributor ‘xxx’
The replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentException
Exception Message: The snapshot could not be generated because the publisher is inactive.
Message Code: 54057

Resolution:-

Run this on the Distributor

sp_changedistpublisher ‘<Publisher server name>’, ‘active’, ‘true’
GO

This entry was posted in Replication, SQL Server, Troubleshooting and tagged . Bookmark the permalink.

Leave a Reply