Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ValidationOption Enumeration


Applies To: SQL Server 2016 Preview

Enumerates the types of data validation supported by replication.

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

public enum ValidationOption

Member nameDescription

Performs a checksum operation. This option is only supported for Microsoft SQL Server 7.0 Subscribers.


Performs a binary checksum operation.


Performs a rowcount operation.

Legacy Code Example

			// Define the server, database, and publication names
			string publisherName = publisherInstance;
			string publicationName = "AdvWorksProductTran";
			string publicationDbName = "AdventureWorks2012";

			TransPublication publication;

			// Create a connection to the Publisher.
			ServerConnection conn = new ServerConnection(publisherName);

				// Connect to the Publisher.

				// Set the required properties for the publication.
				publication = new TransPublication();
				publication.ConnectionContext = conn;
				publication.Name = publicationName;
				publication.DatabaseName = publicationDbName;

				// If we can't get the properties for this publication, 
				// throw an application exception.
				if (publication.LoadProperties())
					// Initiate validataion for all subscriptions to this publication.
						ValidationMethod.ConditionalFast, false);

					// If not already running, start the Distribution Agent at each 
					// Subscriber to synchronize and validate the subscriptions.
					throw new ApplicationException(String.Format(
						"Settings could not be retrieved for the publication. " +
						"Ensure that the publication {0} exists on {1}.",
						publicationName, publisherName));
			catch (Exception ex)
				// Do error handling here.
				throw new ApplicationException(
					"Subscription validation could not be initiated.", ex);
Return to top

Community Additions

© 2015 Microsoft