Having your application behave as replication

What if you want your application to behave just like replication? With behave just like replication I mean: Ignore foreign key constraints and triggers which have NOT FOR REPLICATION set.

This behavior can be activated using the a connection string property:

OleDB:

Replication server name connect option=_

More information: http://msdn.microsoft.com/en-us/library/ee224228(v=sql.105).aspx

In my experiment the value didn’t matter.

 

.Net:

Replication=True

More information: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx

Just as simple as that.

Advertisements

About sqlsmurf
MS SQL Administrator

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: