I am trying to add an table articles to my transactional replication setup. When I do, the snapshot error fails with the following message:
Source: Microsoft.SqlServer.Smo
Target Site: Microsoft.SqlServer.Management.Smo.SqlSmoObject GetSmoObject(Microsoft.SqlServer.Management.Sdk.Sfc.Urn)
Message: Attempt to retrieve data for object failed for Server '<servername>'.
Stack: at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.BuildSmoObjectArrayAndUrnLookupTable(IDictionary& dictUrnKeyArticleScriptingBundles)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: Microsoft.SqlServer.Smo, Error number: 0)
Get help: http://help/0
Source: Microsoft.SqlServer.Smo
Target Site: Microsoft.SqlServer.Management.Smo.ObjectKeyBase CreateKeyFromUrn(Microsoft.SqlServer.Management.Sdk.Sfc.Urn)
Message: The input Urn must specify Name at level UserDefinedFunction.
Stack: at Microsoft.SqlServer.Management.Smo.SchemaCollectionBase.CreateKeyFromUrn(Urn urn)
at Microsoft.SqlServer.Management.Smo.Server.GetSmoObjectRec(Urn urn)
at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn) (Source: Microsoft.SqlServer.Smo, Error number: 0)
Get help: http://help/0
Specifics:
- Transactional replication: Both Immediate Sync and Allow Anonymous are set to 0.
- Publisher and Distributer are same server: SQL Server Standard 2008 R2 (10.50.4000.0) on Windows 2008 R2 SP1
- If I add even one table article (doesn't matter, I've tried different ones), I get the error above when I run the snapshot agent.
- If I remove the table just added and rerun the snapshot agent, it succeeds with the message "A snapshot was not generated because no subscriptions needed initialization", so at least I don't have to reinitialize (thank goodness!).
Any ideas as to what might be causing this, and how I can add articles to my existing publication?
Thanks in advance for your help.