Compartilhar via


ValidateSubscriberInfo Property

Esse recurso será removido em uma versão futura do Microsoft SQL Server. Evite usar esse recurso em desenvolvimentos novos e planeje modificar os aplicativos que atualmente o utilizam.

The ValidateSubscriberInfo property is a selectable expression containing any dynamic filtering functions, which might have the wrong value if Merge Agent is started with the wrong parameter set.

Sintaxe

object
.ValidateSubscriberInfo [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list

  • value
    A string used to validate Subscriber information in a dynamic filter

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetValidateSubscriberInfo(SQLDMO_LPBSTR pRetVal);
HRESULT SetValidateSubscriberInfo(SQLDMO_LPCSTR NewValue);

Comentários

When a publication uses a function that references Subscriber information in a dynamic filter, SQL Server can validate Subscriber information based on that function before each merge. This ensures that information is partitioned consistently with each merge. For example, when a publication is dynamically filtered using the SUSER_SNAME function, Merge Agent applies the initial snapshot to each Subscriber based on the Subscriber information retrieved by SUSER_SNAME.

When the Subscriber reconnects to the Publisher for synchronization, Merge Agent validates the information at the Subscriber and ensures that the partitions that are synchronized are the same ones that were originally sent. If Merge Agent is unable to validate the same Subscriber information, the merge fails. Because the value of the function used in the dynamic filter has changed at the Subscriber, the subscription at the Subscriber must be reinitialized.

If a dynamic filtering publication uses functions such as host_name(), or suser_sname when filtering data, Merge Agent cannot run if the Subscriber has different parameters. If the publication is created using the @validate_subscriber_info parameter of sp_addmergepublication, a validation expression (for example, host_name() or host_name() + '::' + suser_sname()) can be specified.

The expression is evaluated at the Publisher, and the value is stored at the Subscriber. Each time Merge Agent runs, it validates either that the expression still evaluates to the same value that is stored at the Subscriber, or that the Subscription has been marked for reinitialization. A new value can be stored at the Subscriber by reinitializing the subscription.

ObservaçãoObservação

If an application calls ValidateSubscriberInfoon an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned.