HostName Property
Collapse the table of content
Expand the table of content

MergeSynchronizationAgent::HostName Property


Gets or sets the value used by the Merge Agent when it evaluates a parameterized filter that uses the HOST_NAME function.

Namespace:   Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)

property String^ HostName {
	virtual String^ get();
	virtual void set(String^ value);

Property Value

Type: System::String^

The value used by the Merge Agent.

Use the HostName property to have the Merge Agent override the value typically returned by the HOST_NAME function when this function is used to define a parameterized filter. For example, if you use the parameterized filter clause LoginID = HOST_NAME() to define horizontal filtering for an article, and if you set the HostName property to "adventure-works\david8" before calling the Synchronize method, the Merge Agent will synchronize data for the partition defined by "adventure-works\david8".

The case of the HostName property is ignored only when both the Publisher and the publication database are configured as case-insensitive.

No code example is currently available or this language may not be supported.
Return to top
© 2015 Microsoft