Thursday, March 29, 2012
Combining transactional and snapshot replication
I am in the process of setting up replication between two SQL boxes - the first being the production SQL Server and the second being a secondary server which is to be used as part of a web portal solution. (In fact there are two pairs of SQL boxes - SQL 7 and SQL 2k, one of each on the LAN and one of each at the hosting site.)
We need to have near realtime replication, so transactional replication is the desired mechanism. The trouble is that not all tables have primary keys defined. Oh yes, and the main database is 20G in size and has >900 user tables! :-0 (The other databases are much better behaved!)
When I set up transactional replication, I am allowed only to include tables which have PKs defined. AFAIK, the initial transactional replication snapshot will also only include these same tables.
If I set up snapshot replication (separately), I can include all the tables in the database. However, I cannot then replicate in real time.
Can I combine the two replication schemes to deliver updates to the same target database:
- transactional replication delivering realtime updates to the tables with PKs during the day and
- snapshot replication updating all the tables once per 24hrs at night?
Or is there a better way of doing this?
I am not sure whether I can modify the existing schemas, as some of the databases are 'maintained' by an external provider. Even if I could, if I had to add a column to have a PK, I would potentially be adding to my diskspace requirement rather significantly...
TIACertainly, you can setup two publication - one for those tables with no PK and one for those tables with PK. They will have the same subscriber and destination but the one will be snapshot and one will be transactional. The other option you have is to create a surrogate key for each table without PK. I don't know how feasible it is since your database schema is controlled by the person other than you. You can also consider Log Shipping if the function of the subscriber is read-only.|||Thank you for your quick response. I'll set up two publications as you suggest. For some reason I was hung up on including the PK tables in both publications and I was wondering why I was getting errors... <doh!>
Regarding log shipping, I've had a quick look around for info. It seems that it is not as easy as "standard" replication to set up and keep tabs on. Also, in my environment, although the replicated database will be read only on the target, one of the target SQL boxes will have a database which will capture input from web-connected users. Will this make a difference? Do you think that log shipping will be the better solution for me?
I appreciate your help
Tuesday, March 27, 2012
Combining Peer-to-Peer Transactional Replication with Standard Transactional Replication
I'm interested in combining the Peer-to-Peer Transactional Replication and Standard Transactional Replication to provide a scale out solution of SQL Server 2005. The condition is as follows:
We may have 10 SQL Server 2005 (1 Publisher + 9 Subscriber) running transactional replication in the production environment and allow updates in subscribers. To offload the loading of the publisher, we plan to have 2 Publisher (PubNode1 and PubNode2) using Peer-to-Peer Transaction Replication and the rest 8 subscribers will be divided into 2 groups. The subscribers 1-4 (SubNode1, SubNode2, SubNode3, and SubNode4) will be set to be standard transactional replication subscribers of PubNode1, and the rest 4 subscribers (SubNode5, ..., SubNode8) will be set to be standard transactional replication subscribers of PubNode2.
Is it possible to setup above 2 Publisher + 8 Subscriber topology?
Also, could we set the 8 subscribers with updatable subscriptions to achieve each node is updatable?
We do not plan to set all the 10 nodes using Peer-to-Peer Transactional Replication as it is necessary to make sure n*(n-1)/2 (i.e. 45) peer-to-peer connections is reliable. It seems that the maintenance cost is high if the servers are not in a LAN and the topology is very high coupling. So we prefer to divide the 10 nodes into 2 groups and reduce the cost of each node to maintain the connections to all other sites.
That's the scenario.
Any feedback is welcome and appreciated.
Thanks,
Terence
Peer-to-peer would be ideal for your scenario if all your subscribers work primarily on partition data, meaning the chance of two subscribers access the same piece of data is usually pretty low and stable network connection.
If you foresee lots of coflicts situation where different subscribers will access the same data, then you may want to consider merge replication. Merge replication handles conflicts better and does not require dedicated live connection from node to node.
Gary
|||If our network is not stable, we would prefer to use Merge Replication.However, if there are at least 10 sites for replication, then is each site need to have 9 connections to the other sites?
That's our main concern.
Thanks a lot.|||
I believe the changes are replicated to publisher first then to other subscribers.
http://msdn2.microsoft.com/en-us/library/ms152746.aspx
Therefore, each site only needs to maintain one connection (to the publisher).
Gary
Combining Peer-to-Peer Transactional Replication with Standard Transactional Replication
I'm interested in combining the Peer-to-Peer Transactional Replication and Standard Transactional Replication to provide a scale out solution of SQL Server 2005. The condition is as follows:
We may have 10 SQL Server 2005 (1 Publisher + 9 Subscriber) running transactional replication in the production environment and allow updates in subscribers. To offload the loading of the publisher, we plan to have 2 Publisher (PubNode1 and PubNode2) using Peer-to-Peer Transaction Replication and the rest 8 subscribers will be divided into 2 groups. The subscribers 1-4 (SubNode1, SubNode2, SubNode3, and SubNode4) will be set to be standard transactional replication subscribers of PubNode1, and the rest 4 subscribers (SubNode5, ..., SubNode8) will be set to be standard transactional replication subscribers of PubNode2.
Is it possible to setup above 2 Publisher + 8 Subscriber topology?
Also, could we set the 8 subscribers with updatable subscriptions to achieve each node is updatable?
We do not plan to set all the 10 nodes using Peer-to-Peer Transactional Replication as it is necessary to make sure n*(n-1)/2 (i.e. 45) peer-to-peer connections is reliable. It seems that the maintenance cost is high if the servers are not in a LAN and the topology is very high coupling. So we prefer to divide the 10 nodes into 2 groups and reduce the cost of each node to maintain the connections to all other sites.
That's the scenario.
Any feedback is welcome and appreciated.
Thanks,
Terence
Peer-to-peer would be ideal for your scenario if all your subscribers work primarily on partition data, meaning the chance of two subscribers access the same piece of data is usually pretty low and stable network connection.
If you foresee lots of coflicts situation where different subscribers will access the same data, then you may want to consider merge replication. Merge replication handles conflicts better and does not require dedicated live connection from node to node.
Gary
|||If our network is not stable, we would prefer to use Merge Replication.However, if there are at least 10 sites for replication, then is each site need to have 9 connections to the other sites?
That's our main concern.
Thanks a lot.|||
I believe the changes are replicated to publisher first then to other subscribers.
http://msdn2.microsoft.com/en-us/library/ms152746.aspx
Therefore, each site only needs to maintain one connection (to the publisher).
Gary
Sunday, March 11, 2012
Columns/tables not under Replication
Can i find out the tables and columns which are not part of replication? is
there any Built in SP for this?
Thanks,
V.Boomessh
Hai,
there aren't any built-in sps for this. The tables you want to be concerned
with are sysobjects, sysarticles, sysmergearticles.
Something like this should do for the articles:
select table_name from information_schema.tables
where table_type = 'BASE TABLE'
and table_name not like 'sys%'
and table_name not like 'conflict_%'
and table_name not like 'msmerge_%'
and table_name not like 'mspub_%'
and table_name not like 'msdynamic_%'
and table_name not like 'msrep_%'
and table_name <> 'dtproperties'
and table_name not in (select name from sysmergearticles)
and table_name not in (select name from sysarticles)
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hai ,
Thanks for your reply.
[FYI: I am totally new to the replication].
Suppose if I add a table under replication and then add new columns to the
table, will these new column be a part of replication?
Also can u give me some good sites wherein i can get some basic stuff for
Replication.
Thanks,
V.Boomessh
"Paul Ibison" wrote:
> Hai,
> there aren't any built-in sps for this. The tables you want to be concerned
> with are sysobjects, sysarticles, sysmergearticles.
> Something like this should do for the articles:
> select table_name from information_schema.tables
> where table_type = 'BASE TABLE'
> and table_name not like 'sys%'
> and table_name not like 'conflict_%'
> and table_name not like 'msmerge_%'
> and table_name not like 'mspub_%'
> and table_name not like 'msdynamic_%'
> and table_name not like 'msrep_%'
> and table_name <> 'dtproperties'
> and table_name not in (select name from sysmergearticles)
> and table_name not in (select name from sysarticles)
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||To add a new column, have a look at sp_repladdcolumn in BOL, or it can be
done through the GUI. For a completely unbiased view of an excellent site,
have a look at www.replicationanswers.com
all the ins-and-outs of replication, more a covering of the exceptions and
articles mostly based on what is found to be difficult setups. If you want a
comprehensive coverage of replication, buy Hilary's book - details below.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Saturday, February 25, 2012
Column name or number of supplied values...
Appologies in advance as this is a bit of a newbie question as I have just
started playing with 2005 replication.
I am getting the error
Column name or number of supplied values does not match table definition.
I began ok by setting up replication between 2 servers on the same network.
It replicated some data across ok but I noticed that some tables did not
replicate. When I looked deeper at the articles it said that they can't
replicate because they didn't have a primary key. Ok so I modified the table
in the GUI and added the primary key (it is an identity column) and then the
replication error appeared for the stored procedure that adds entries to
that table.
I then did some looking around and found others had had similar problems. It
looks like I went about it the wrong way (newbie.newbie), so I thought, ok
I'll make sure all the primary keys are there first and then replicate. I
did this by deleting the subscriptions and disabling Pub&Dist, added the PK
and setup replication again. Error appears again.
I have tried numerous ways to "clean up" the Publisher/Distributor data and
remove the replication. While it all looks like it has been removed, if I
setup the replication again it seems to "know" about the previous problem
and my error message keeps appearing. I have even completely removed the
database I am replicating from the publisher and subscriber machines, have
used the procedure in the BOL to disable Pub & Dist
(sp_removedbreplication,sp_dropdistpublisher,sp_dr opdistributiondb,sp_dropdistributor),
and done a full restore of the offending database, however next time I setup
the replication I get the same error.
I maybe off track and identity columns are a no-no?
Anyway sorry for the long winded story. Any help would be creatly
appreciated. I am thinking of doing a compete SQL Server reload as it is
only a test system, but if I don't have to....
Cheers
Peter Lock
PalaceSoftware, Canberra OZ
I think you need to either update your replication stored procedures for the
newly added pk, or update the tables at the subscriber. I think the best
thing to do would be to generate a new snapshot and redistribute it.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Peter" <palace@.internode.on.net> wrote in message
news:uFcN5QM7GHA.1252@.TK2MSFTNGP04.phx.gbl...
> Greetings
> Appologies in advance as this is a bit of a newbie question as I have just
> started playing with 2005 replication.
> I am getting the error
> Column name or number of supplied values does not match table definition.
> I began ok by setting up replication between 2 servers on the same
> network. It replicated some data across ok but I noticed that some tables
> did not replicate. When I looked deeper at the articles it said that they
> can't replicate because they didn't have a primary key. Ok so I modified
> the table in the GUI and added the primary key (it is an identity column)
> and then the replication error appeared for the stored procedure that adds
> entries to that table.
> I then did some looking around and found others had had similar problems.
> It looks like I went about it the wrong way (newbie.newbie), so I thought,
> ok I'll make sure all the primary keys are there first and then replicate.
> I did this by deleting the subscriptions and disabling Pub&Dist, added the
> PK and setup replication again. Error appears again.
> I have tried numerous ways to "clean up" the Publisher/Distributor data
> and remove the replication. While it all looks like it has been removed,
> if I setup the replication again it seems to "know" about the previous
> problem and my error message keeps appearing. I have even completely
> removed the database I am replicating from the publisher and subscriber
> machines, have used the procedure in the BOL to disable Pub & Dist
> (sp_removedbreplication,sp_dropdistpublisher,sp_dr opdistributiondb,sp_dropdistributor),
> and done a full restore of the offending database, however next time I
> setup the replication I get the same error.
> I maybe off track and identity columns are a no-no?
> Anyway sorry for the long winded story. Any help would be creatly
> appreciated. I am thinking of doing a compete SQL Server reload as it is
> only a test system, but if I don't have to....
> Cheers
> Peter Lock
> PalaceSoftware, Canberra OZ
>
|||Hi Hilary
Thank you for the prompt reply. I had already tried numerous new snapshots
and reloads, however I think I have worked out where the problem is (at
least it now replicates all articles without error). It looks like lazy mans
T-SQL is the problem.
I had a table with 2 columns ID (tinyint) as identity and ComputerName as
varchar(50). I set the PK in ID (which I didn't have before because I didn't
need it), and my stored procedure for adding a new entry was
INSERT Computers VALUES (@.ComputerName)
Once I changed my stored procedure to
INSERT Computers (ComputerName) VALUES (@.ComputerName)
the errors disappeared.
I'll give it a good test tonight and see how it goes.
Cheers
Peter Lock
PalaceSoftware, Canberra OZ
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uA%23LjfN7GHA.2288@.TK2MSFTNGP05.phx.gbl...
>I think you need to either update your replication stored procedures for
>the newly added pk, or update the tables at the subscriber. I think the
>best thing to do would be to generate a new snapshot and redistribute it.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Peter" <palace@.internode.on.net> wrote in message
> news:uFcN5QM7GHA.1252@.TK2MSFTNGP04.phx.gbl...
>
|||OK, I take it the errors were occurring on the publisher side, and in this
case were probably not replication related.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Peter" <palace@.internode.on.net> wrote in message
news:ugK3chP7GHA.3452@.TK2MSFTNGP05.phx.gbl...
> Hi Hilary
> Thank you for the prompt reply. I had already tried numerous new snapshots
> and reloads, however I think I have worked out where the problem is (at
> least it now replicates all articles without error). It looks like lazy
> mans T-SQL is the problem.
> I had a table with 2 columns ID (tinyint) as identity and ComputerName as
> varchar(50). I set the PK in ID (which I didn't have before because I
> didn't need it), and my stored procedure for adding a new entry was
> INSERT Computers VALUES (@.ComputerName)
> Once I changed my stored procedure to
> INSERT Computers (ComputerName) VALUES (@.ComputerName)
> the errors disappeared.
> I'll give it a good test tonight and see how it goes.
> Cheers
> Peter Lock
> PalaceSoftware, Canberra OZ
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uA%23LjfN7GHA.2288@.TK2MSFTNGP05.phx.gbl...
>
Friday, February 24, 2012
Column limit in Sql Server 2000 replication?
Ok guys, I found my answer in BOL!
"Be aware of maximum column and row sizes. A table used in snapshot replication or transactional replication can have a maximum of 255 columns and a maximum row size of 8,000 bytes."
It appears that Replication uses syscolumns.colid as the number of columns in a table, even if, as in my case, there are only 152 columns. This is the kind of arbitrary "gotcha" that makes a person sick. Our developers ignore these kinds of limitations and expect someone else to correct the problem.
|||As a follow-on, it is a good idea to have a job which checks the max(colid) on syscolumns if you add columns to your replicated tables.Sunday, February 19, 2012
column filter problem
I use merge replication in SQL server with column filter and row
filter , it works fine. so that i generate a script.
when i tried to run this script on another computer , i got warning
as below:
Warning: only Subscribers running SQL Server 2000 can synchronize with
publication 'eBreathe_Publication' because vertical filters are being used.
and say some tables doex not exist. i check all tables does exist
i just so confused , anyone know how to work it out?
Cheers
nick
Completed script as below:
-- Enabling the replication database
use master
GO
exec sp_replicationdboption @.dbname = N'eBreathe', @.optname = N'merge
publish', @.value = N'true'
GO
use [eBreathe]
GO
-- Adding the merge publication
exec sp_addmergepublication @.publication = N'eBreathe_Publication',
@.description = N'Merge publication of eBreathe database from Publisher
NICK.', @.retention = 30, @.sync_mode = N'character', @.allow_push = N'true',
@.allow_pull = N'true', @.allow_anonymous = N'true', @.enabled_for_internet =
N'false', @.centralized_conflicts = N'true', @.dynamic_filters = N'true',
@.snapshot_in_defaultfolder = N'true', @.compress_snapshot = N'false',
@.ftp_port = 21, @.ftp_login = N'anonymous', @.conflict_retention = 14,
@.keep_partition_changes = N'true', @.allow_subscription_copy = N'false',
@.allow_synctoalternate = N'false', @.validate_subscriber_info =
N'HOST_NAME()', @.add_to_active_directory = N'false', @.max_concurrent_merge =
0, @.max_concurrent_dynamic_snapshots = 0
exec sp_addpublication_snapshot @.publication =
N'eBreathe_Publication',@.frequency_type = 4, @.frequency_interval = 1,
@.frequency_relative_interval = 1, @.frequency_recurrence_factor = 0,
@.frequency_subday = 1, @.frequency_subday_interval = 5, @.active_start_date =
0, @.active_end_date = 0, @.active_start_time_of_day = 500,
@.active_end_time_of_day = 235959, @.snapshot_job_name =
N'NICK-eBreathe-eBreathe_Publication-1'
GO
exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
@.login = N'BUILTIN\Administrators'
GO
exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
@.login = N'distributor_admin'
GO
exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
@.login = N'NICK\IUSR_NICK'
GO
exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
@.login = N'sa'
GO
-- Adding the merge articles
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'Customers', @.source_owner = N'dbo', @.source_object = N'Customers', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = N'SalesRepCode =
HOST_NAME()', @.vertical_partition = N'true', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerGroupCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerName', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerAddress1', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerAddress2', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerAddress3', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerPostCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'StateCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'CustomerCountry', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'SalesRepCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Customers', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'CustomerContact', @.source_owner = N'dbo', @.source_object =
N'CustomerContact', @.type = N'table', @.description = null, @.column_tracking
= N'true', @.pre_creation_cmd = N'drop', @.creation_script = null,
@.schema_option = 0x000000000000CFF1, @.article_resolver = null,
@.subset_filterclause = null, @.vertical_partition = N'true',
@.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CustomerContact', @.column = N'CustomerContactCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CustomerContact', @.column = N'CustomerCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CustomerContact', @.column = N'CustomerContactName', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CustomerContact', @.column = N'CustomerContactPosition', @.operation =
N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CustomerContact', @.column = N'CustomerContactMobilePhone', @.operation =
N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'CallStatus', @.source_owner = N'dbo', @.source_object = N'CallStatus', @.type
= N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'false', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'CallObjectiveStatus', @.source_owner = N'dbo', @.source_object =
N'CallObjectiveStatus', @.type = N'table', @.description = null,
@.column_tracking = N'true', @.pre_creation_cmd = N'drop', @.creation_script =
null, @.schema_option = 0x000000000000CFF1, @.article_resolver = null,
@.subset_filterclause = null, @.vertical_partition = N'false',
@.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'CallObjective', @.source_owner = N'dbo', @.source_object = N'CallObjective',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause =
N'(CallObjective.IsDeleted = 0)', @.vertical_partition = N'true',
@.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CallObjective', @.column = N'CallObjectiveID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CallObjective', @.column = N'CallID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CallObjective', @.column = N'Description', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CallObjective', @.column = N'CallObjectiveStatusID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CallObjective', @.column = N'IsDeleted', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'CallObjective', @.column = N'LastModifiedBy', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'Call', @.source_owner = N'dbo', @.source_object = N'Call', @.type = N'table',
@.description = null, @.column_tracking = N'true', @.pre_creation_cmd =
N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = N'(Call.IsDeleted = 0)',
@.vertical_partition = N'true', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'CallID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'CustomerCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'ScheduleStarted', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'ScheduleEnded', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'ActualStarted', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'ActualEnded', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'CallStatusID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Call', @.column = N'IsDeleted', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'Users', @.source_owner = N'dbo', @.source_object = N'Users', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = N'SalesRepCode =
HOST_NAME() AND (IsDisabled = 0)', @.vertical_partition = N'false',
@.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'TemplateLine', @.source_owner = N'dbo', @.source_object = N'TemplateLine',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'false', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'Template', @.source_owner = N'dbo', @.source_object = N'Template', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = null, @.vertical_partition =
N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Template', @.column = N'TemplateID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Template', @.column = N'Description', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Template', @.column = N'CreationDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Template', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'SalesRep', @.source_owner = N'dbo', @.source_object = N'SalesRep', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = N'SalesRepCode =
HOST_NAME()', @.vertical_partition = N'true', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'SalesRepCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'SalesRepName', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'CompanyCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'SalesRepAddress', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'SalesRepCity', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'SalesRepPhone', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'SalesRepFax', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'NextOrderRef', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'SalesRep', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'ItemSubClass', @.source_owner = N'dbo', @.source_object = N'ItemSubClass',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'true', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemSubClass', @.column = N'ItemSubClassCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemSubClass', @.column = N'ItemSubClassDescription', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemSubClass', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'Items', @.source_owner = N'dbo', @.source_object = N'Items', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = null, @.vertical_partition =
N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemSubClassCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemGroupCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemClassCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemName', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemMeasureUnit', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'ItemUnitPrice', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'Items', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'ItemGroup', @.source_owner = N'dbo', @.source_object = N'ItemGroup', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = null, @.vertical_partition =
N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemGroup', @.column = N'ItemGroupCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemGroup', @.column = N'ItemGroupDescription', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemGroup', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'ItemClass', @.source_owner = N'dbo', @.source_object = N'ItemClass', @.type =
N'table', @.description = null, @.column_tracking = N'true', @.pre_creation_cmd
= N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
@.article_resolver = null, @.subset_filterclause = null, @.vertical_partition =
N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemClass', @.column = N'ItemClassCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemClass', @.column = N'ItemClassDescription', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'ItemClass', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'InvoiceLine', @.source_owner = N'dbo', @.source_object = N'InvoiceLine',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'true', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'InvoiceLineID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'InvoiceID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'LineID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'InvoiceItemID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'AppliedDocDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'AppliedAmount', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'CreationDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'EffectiveDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'ExpiryDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceLine', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'InvoiceHeader', @.source_owner = N'dbo', @.source_object = N'InvoiceHeader',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'true', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article's partition column(s)
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'InvoiceID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'InvoiceType', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'CustomerCode', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'ARDocDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'LinkTxnID', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'OriginalAmount', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'BalanceAmount', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'EffectiveDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'ExpiryDate', @.operation = N'add'
GO
exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication', @.article
= N'InvoiceHeader', @.column = N'rowguid', @.operation = N'add'
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'CustomerGroups', @.source_owner = N'dbo', @.source_object =
N'CustomerGroups', @.type = N'table', @.description = null, @.column_tracking =
N'true', @.pre_creation_cmd = N'drop', @.creation_script = null,
@.schema_option = 0x000000000000CFF1, @.article_resolver = null,
@.subset_filterclause = null, @.vertical_partition = N'false',
@.destination_owner = N'dbo', @.auto_identity_range = N'false',
@.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
N'BE_ItemCode', @.source_owner = N'dbo', @.source_object = N'BE_ItemCode',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'false', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
-- Adding the article subset filter
exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
N'CustomerContact', @.filtername = N'CustomerContact_Customers',
@.join_articlename = N'Customers', @.join_filterclause =
N'CustomerContact.CustomerCode = Customers.CustomerCode', @.join_unique_key =
0
GO
-- Adding the article subset filter
exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
N'CallObjective', @.filtername = N'CallObjective_Call', @.join_articlename =
N'Call', @.join_filterclause = N'CallObjective.CallID = Call.CallID',
@.join_unique_key = 0
GO
-- Adding the article subset filter
exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
N'Call', @.filtername = N'Call_Customers', @.join_articlename = N'Customers',
@.join_filterclause = N'Call.CustomerCode = Customers.CustomerCode',
@.join_unique_key = 0
GO
-- Adding the article subset filter
exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
N'InvoiceLine', @.filtername = N'InvoiceLine_InvoiceHeader',
@.join_articlename = N'InvoiceHeader', @.join_filterclause =
N'InvoiceHeader.InvoiceID = InvoiceLine.InvoiceID', @.join_unique_key = 0
GO
-- Adding the article subset filter
exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
N'InvoiceHeader', @.filtername = N'InvoiceHeader_Customers',
@.join_articlename = N'Customers', @.join_filterclause =
N'Customers.CustomerCode = InvoiceHeader.CustomerCode', @.join_unique_key = 0
GO
when we using column filter on certain tables that do not all primary key be
rowguid, is that this caused my problem?
because three tables cause error , which have one primary key as
uniqueidentifier and isRowGuid enable,
Cheers
nick
"Nick" <fsheng@.ebreathe.co.nz> wrote in message
news:OrEvGs$CFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Hi All:
> I use merge replication in SQL server with column filter and row
> filter , it works fine. so that i generate a script.
> when i tried to run this script on another computer , i got warning
> as below:
> Warning: only Subscribers running SQL Server 2000 can synchronize with
> publication 'eBreathe_Publication' because vertical filters are being
used.
> and say some tables doex not exist. i check all tables does exist
> i just so confused , anyone know how to work it out?
> Cheers
> nick
> Completed script as below:
> -- Enabling the replication database
> use master
> GO
> exec sp_replicationdboption @.dbname = N'eBreathe', @.optname = N'merge
> publish', @.value = N'true'
> GO
> use [eBreathe]
> GO
> -- Adding the merge publication
> exec sp_addmergepublication @.publication = N'eBreathe_Publication',
> @.description = N'Merge publication of eBreathe database from Publisher
> NICK.', @.retention = 30, @.sync_mode = N'character', @.allow_push = N'true',
> @.allow_pull = N'true', @.allow_anonymous = N'true', @.enabled_for_internet =
> N'false', @.centralized_conflicts = N'true', @.dynamic_filters = N'true',
> @.snapshot_in_defaultfolder = N'true', @.compress_snapshot = N'false',
> @.ftp_port = 21, @.ftp_login = N'anonymous', @.conflict_retention = 14,
> @.keep_partition_changes = N'true', @.allow_subscription_copy = N'false',
> @.allow_synctoalternate = N'false', @.validate_subscriber_info =
> N'HOST_NAME()', @.add_to_active_directory = N'false', @.max_concurrent_merge
=
> 0, @.max_concurrent_dynamic_snapshots = 0
> exec sp_addpublication_snapshot @.publication =
> N'eBreathe_Publication',@.frequency_type = 4, @.frequency_interval = 1,
> @.frequency_relative_interval = 1, @.frequency_recurrence_factor = 0,
> @.frequency_subday = 1, @.frequency_subday_interval = 5, @.active_start_date
=
> 0, @.active_end_date = 0, @.active_start_time_of_day = 500,
> @.active_end_time_of_day = 235959, @.snapshot_job_name =
> N'NICK-eBreathe-eBreathe_Publication-1'
> GO
> exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
> @.login = N'BUILTIN\Administrators'
> GO
> exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
> @.login = N'distributor_admin'
> GO
> exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
> @.login = N'NICK\IUSR_NICK'
> GO
> exec sp_grant_publication_access @.publication = N'eBreathe_Publication',
> @.login = N'sa'
> GO
> -- Adding the merge articles
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'Customers', @.source_owner = N'dbo', @.source_object = N'Customers', @.type
=
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = N'SalesRepCode =
> HOST_NAME()', @.vertical_partition = N'true', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerGroupCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerName', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerAddress1', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerAddress2', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerAddress3', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerPostCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'StateCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'CustomerCountry', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'SalesRepCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Customers', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'CustomerContact', @.source_owner = N'dbo', @.source_object =
> N'CustomerContact', @.type = N'table', @.description = null,
@.column_tracking
> = N'true', @.pre_creation_cmd = N'drop', @.creation_script = null,
> @.schema_option = 0x000000000000CFF1, @.article_resolver = null,
> @.subset_filterclause = null, @.vertical_partition = N'true',
> @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CustomerContact', @.column = N'CustomerContactCode', @.operation =
N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CustomerContact', @.column = N'CustomerCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CustomerContact', @.column = N'CustomerContactName', @.operation =
N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CustomerContact', @.column = N'CustomerContactPosition', @.operation =
> N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CustomerContact', @.column = N'CustomerContactMobilePhone', @.operation
=
> N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'CallStatus', @.source_owner = N'dbo', @.source_object = N'CallStatus',
@.type
> = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
> @.vertical_partition = N'false', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'CallObjectiveStatus', @.source_owner = N'dbo', @.source_object =
> N'CallObjectiveStatus', @.type = N'table', @.description = null,
> @.column_tracking = N'true', @.pre_creation_cmd = N'drop', @.creation_script
=
> null, @.schema_option = 0x000000000000CFF1, @.article_resolver = null,
> @.subset_filterclause = null, @.vertical_partition = N'false',
> @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'CallObjective', @.source_owner = N'dbo', @.source_object =
N'CallObjective',
> @.type = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause =
> N'(CallObjective.IsDeleted = 0)', @.vertical_partition = N'true',
> @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CallObjective', @.column = N'CallObjectiveID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CallObjective', @.column = N'CallID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CallObjective', @.column = N'Description', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CallObjective', @.column = N'CallObjectiveStatusID', @.operation =
N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CallObjective', @.column = N'IsDeleted', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'CallObjective', @.column = N'LastModifiedBy', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'Call', @.source_owner = N'dbo', @.source_object = N'Call', @.type =
N'table',
> @.description = null, @.column_tracking = N'true', @.pre_creation_cmd =
> N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = N'(Call.IsDeleted = 0)',
> @.vertical_partition = N'true', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'CallID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'CustomerCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'ScheduleStarted', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'ScheduleEnded', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'ActualStarted', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'ActualEnded', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'CallStatusID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Call', @.column = N'IsDeleted', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'Users', @.source_owner = N'dbo', @.source_object = N'Users', @.type =
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = N'SalesRepCode =
> HOST_NAME() AND (IsDisabled = 0)', @.vertical_partition = N'false',
> @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'TemplateLine', @.source_owner = N'dbo', @.source_object = N'TemplateLine',
> @.type = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
> @.vertical_partition = N'false', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'Template', @.source_owner = N'dbo', @.source_object = N'Template', @.type =
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = null, @.vertical_partition
=
> N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Template', @.column = N'TemplateID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Template', @.column = N'Description', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Template', @.column = N'CreationDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Template', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'SalesRep', @.source_owner = N'dbo', @.source_object = N'SalesRep', @.type =
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = N'SalesRepCode =
> HOST_NAME()', @.vertical_partition = N'true', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'SalesRepCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'SalesRepName', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'CompanyCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'SalesRepAddress', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'SalesRepCity', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'SalesRepPhone', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'SalesRepFax', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'NextOrderRef', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'SalesRep', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'ItemSubClass', @.source_owner = N'dbo', @.source_object = N'ItemSubClass',
> @.type = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
> @.vertical_partition = N'true', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemSubClass', @.column = N'ItemSubClassCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemSubClass', @.column = N'ItemSubClassDescription', @.operation =
N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemSubClass', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'Items', @.source_owner = N'dbo', @.source_object = N'Items', @.type =
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = null, @.vertical_partition
=
> N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemSubClassCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemGroupCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemClassCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemName', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemMeasureUnit', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'ItemUnitPrice', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'Items', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'ItemGroup', @.source_owner = N'dbo', @.source_object = N'ItemGroup', @.type
=
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = null, @.vertical_partition
=
> N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemGroup', @.column = N'ItemGroupCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemGroup', @.column = N'ItemGroupDescription', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemGroup', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'ItemClass', @.source_owner = N'dbo', @.source_object = N'ItemClass', @.type
=
> N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd
> = N'drop', @.creation_script = null, @.schema_option = 0x000000000000CFF1,
> @.article_resolver = null, @.subset_filterclause = null, @.vertical_partition
=
> N'true', @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemClass', @.column = N'ItemClassCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemClass', @.column = N'ItemClassDescription', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'ItemClass', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'InvoiceLine', @.source_owner = N'dbo', @.source_object = N'InvoiceLine',
> @.type = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
> @.vertical_partition = N'true', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'InvoiceLineID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'InvoiceID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'LineID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'InvoiceItemID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'AppliedDocDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'AppliedAmount', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'CreationDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'EffectiveDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'ExpiryDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceLine', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'InvoiceHeader', @.source_owner = N'dbo', @.source_object =
N'InvoiceHeader',
> @.type = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
> @.vertical_partition = N'true', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article's partition column(s)
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'InvoiceID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'InvoiceType', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'CustomerCode', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'ARDocDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'LinkTxnID', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'OriginalAmount', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'BalanceAmount', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'EffectiveDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'ExpiryDate', @.operation = N'add'
> GO
> exec sp_mergearticlecolumn @.publication = N'eBreathe_Publication',
@.article
> = N'InvoiceHeader', @.column = N'rowguid', @.operation = N'add'
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'CustomerGroups', @.source_owner = N'dbo', @.source_object =
> N'CustomerGroups', @.type = N'table', @.description = null, @.column_tracking
=
> N'true', @.pre_creation_cmd = N'drop', @.creation_script = null,
> @.schema_option = 0x000000000000CFF1, @.article_resolver = null,
> @.subset_filterclause = null, @.vertical_partition = N'false',
> @.destination_owner = N'dbo', @.auto_identity_range = N'false',
> @.verify_resolver_signature = 0, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> exec sp_addmergearticle @.publication = N'eBreathe_Publication', @.article =
> N'BE_ItemCode', @.source_owner = N'dbo', @.source_object = N'BE_ItemCode',
> @.type = N'table', @.description = null, @.column_tracking = N'true',
> @.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
> 0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
> @.vertical_partition = N'false', @.destination_owner = N'dbo',
> @.auto_identity_range = N'false', @.verify_resolver_signature = 0,
> @.allow_interactive_resolver = N'false', @.fast_multicol_updateproc =
N'true',
> @.check_permissions = 0
> GO
> -- Adding the article subset filter
> exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
> N'CustomerContact', @.filtername = N'CustomerContact_Customers',
> @.join_articlename = N'Customers', @.join_filterclause =
> N'CustomerContact.CustomerCode = Customers.CustomerCode', @.join_unique_key
=
> 0
> GO
> -- Adding the article subset filter
> exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
> N'CallObjective', @.filtername = N'CallObjective_Call', @.join_articlename =
> N'Call', @.join_filterclause = N'CallObjective.CallID = Call.CallID',
> @.join_unique_key = 0
> GO
> -- Adding the article subset filter
> exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
> N'Call', @.filtername = N'Call_Customers', @.join_articlename =
N'Customers',
> @.join_filterclause = N'Call.CustomerCode = Customers.CustomerCode',
> @.join_unique_key = 0
> GO
> -- Adding the article subset filter
> exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
> N'InvoiceLine', @.filtername = N'InvoiceLine_InvoiceHeader',
> @.join_articlename = N'InvoiceHeader', @.join_filterclause =
> N'InvoiceHeader.InvoiceID = InvoiceLine.InvoiceID', @.join_unique_key = 0
> GO
> -- Adding the article subset filter
> exec sp_addmergefilter @.publication = N'eBreathe_Publication', @.article =
> N'InvoiceHeader', @.filtername = N'InvoiceHeader_Customers',
> @.join_articlename = N'Customers', @.join_filterclause =
> N'Customers.CustomerCode = InvoiceHeader.CustomerCode', @.join_unique_key =
0
> GO
>
>
>
Thursday, February 16, 2012
Column count max for Merge replication still 246?
Is the maximum number columns per table still 246 for a Merge replication in SQL Server 2005?
yes its still 246 coulumns in SQL Server 2005 Merge replication
see this link
http://msdn2.microsoft.com/en-us/library/ms143432.aspx
Madhu
|||Madhu,
Can I replicate a table more than 264 columns in Transactional replication.?
During my initial setup, the publisher did not allow me to publisher a table with more than 246 columns.?
Thank you.
Edwin
|||Transactional allows upto 1024 columns.