none
Replication snapshot error - Value cannot be null Parameter name: strObjectName

    Question

  • Unable to replicate a particular database on SQL 2014 Standard edition. Snapshot agent is not starting up. I was able to replicate other databases from the server.

    Screen shot and logs provided below. Please help.

    Snapshot Error

    2017-10-04 08:20:57.51 SQL Command dump
    2017-10-04 08:20:57.51 ================
    2017-10-04 08:20:57.51 Server: XXXXXXXX\XXXXXXXX
    2017-10-04 08:20:57.51 Database: DB_XXX_NAME
    2017-10-04 08:20:57.51 Command Text: sys.sp_releaseapplock
    2017-10-04 08:20:57.51 Parameters:
    2017-10-04 08:20:57.51                @Resource = XXXXXXXX\XXXXXXXX-DB_XXX_NAME_Pub-4
    2017-10-04 08:20:57.51                @LockOwner = Session
    2017-10-04 08:20:57.51                @DbPrincipal = db_owner
    2017-10-04 08:20:57.52 [0%] The replication agent had encountered an exception.
    2017-10-04 08:20:57.52 Source: Replication
    2017-10-04 08:20:57.52 Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException
    2017-10-04 08:20:57.52 Exception Message: Value cannot be null.
    2017-10-04 08:20:57.52 Parameter name: strObjectName 
    2017-10-04 08:20:57.52 Message Code: 52006
    2017-10-04 08:20:57.52  
    2017-10-04 08:20:57.52 Call Stack:
    2017-10-04 08:20:57.52 Microsoft.SqlServer.Replication.ReplicationAgentSqlException: Value cannot be null.
    2017-10-04 08:20:57.52 Parameter name: strObjectName  ---> System.ArgumentNullException: Value cannot be null.
    2017-10-04 08:20:57.52 Parameter name: strObjectName
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.CommonUtilities.GetSquareBracketQuotedQualifiedName(String strObjectName, String strSchema)
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.Snapshot.SqlServer.BcpLoadOrderingHintResolver.SetupYukonPlusLoadHintCommand(SqlCommand& command)
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior)
    2017-10-04 08:20:57.52    --- End of inner exception stack trace ---
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior)
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate)
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.Snapshot.SqlServer.BcpLoadOrderingHintResolver.ResolveBcpLoadOrderingHint(BaseArticleWrapper articleWrapper)
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.ResolveBcpLoadOrderingHintsAndPartitioningForAllArticles()
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
    2017-10-04 08:20:57.52    at Microsoft.SqlServer.Replication.AgentCore.Run()

    Wednesday, October 04, 2017 12:30 PM

All replies

  • Hi Dr KP Hussain,

    We are currently looking into this issue and will give you an update as soon as possible.

    Thank you for your understanding and support.

    Regards,
    Lin

    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.

    Friday, October 06, 2017 7:30 AM
    Moderator
  • I'm having the same problem....what is going on?

    Snapshot replication Agent Status said

    Value cannot be null

    Parameter name:strObjectName

    Friday, October 06, 2017 11:42 AM
  • HI, Did you resolve this issue?
    Friday, October 06, 2017 12:52 PM
  • Hi Nelson,

    Not Yet. Awaiting replies. Hopefully it gets resolved soon as we are currently on a schedule. :)

    Saturday, October 07, 2017 5:04 AM
  • I am not running into this problem. Can you do the following.

    Do this

    select @@Version and paste the results back here.

    Monday, October 09, 2017 3:13 PM
    Moderator
  • Hi Hilary,

    Microsoft SQL Server 2014 - 12.0.4100.1 (X64) 
    Apr 20 2015 17:29:27 
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

    Thanks !! 

    Tuesday, October 10, 2017 4:12 AM
  • my version is : Microsoft SQL Server 2014 (SP2-CU6) (KB4019094) - 12.0.5553.0 (X64)   Jun 28 2017 16:26:18   Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

    Wednesday, October 11, 2017 3:48 PM
  • Any news on this error?
    Thursday, October 19, 2017 4:47 PM
  • Is it possible to script out your publication/subscription and post it here?

    Also can you determine if this is related to a single table? For example - can you publish even a single table?

    If this works can you do a binary process to determine if it is a problem with one table or multiple ones?

    Friday, October 20, 2017 1:45 PM
    Moderator