Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Sunday, March 25, 2012

Combining multiple columns into one column.

Dear all,
I am having a problem on how to merge 3 columns into one column. I have a
columns named [LastName], [FirstName] and [MiddleName], I want those columns
to be as one and name it as [Name]. How will I do that? I already tried the
trick like what I did in Access but it does'nt work in SQL. Please help me
with this. Any suggestions will be much appreciated.
Thanks in advance,
Jir
Try:
alter table dbo.MyTable
add
MyComputedCOlumn as LastName + ', ' + FirstName + ' ' + MiddleName
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
"Jir" <Jir@.discussions.microsoft.com> wrote in message
news:F64E0FD3-3E0E-4B9A-AB49-0CFFE29B5D8F@.microsoft.com...
Dear all,
I am having a problem on how to merge 3 columns into one column. I have a
columns named [LastName], [FirstName] and [MiddleName], I want those columns
to be as one and name it as [Name]. How will I do that? I already tried the
trick like what I did in Access but it does'nt work in SQL. Please help me
with this. Any suggestions will be much appreciated.
Thanks in advance,
Jir

Thursday, March 22, 2012

combined merge + custom conflict resolution

I have what seems to be a unique case, but logically, would think that
someone out there is already doing this. I have the following configuration:
- merge replication
- column level tracking
- single pub./dist. server replicating with a single subscriber
- SQL Server 2000 Ent. on Windows 2000 Adv. Server
I have succesfully implemented replication, and data is merged properly in
both directions. However, when confilcts occurr, I want the ability to allow
those records that would merge accordingly (not in conflict), but for those
columns in conflict, I want the ability to run a stored procedure with my
proper business logic. Is there a way to do this? When using a stored proc
for conflict resolution, you are forced to return the "winning values" for
all the fields. This is where I lose the data that would have normally
replicated that was not in conflict. In my stored proc, I wish I had the
ability to see or read from a table the data values that would normally be
merged that were not in conflict, so I could supply them in my returned
recordset. I have the logic of reading both Subscriber and Publisher field
values for the current rowguid, but I don't know which of the two values (sub
or pub) has been edited so that it can merge.
Am I explaining this properly? I currently have an open instance with
Microsoft tech support ($250 !!), but they have yet to come back with a
solution. They have had the specs to my issue for a week now, and they have
not been able to resolve it. Maybe someone out there has done this. Thanks
in advance for all the help!
This type of logic is possible using merge replication, but you will have to
hack into the stored procedures that the merge agent uses to apply the
changes to the subscriber and publisher.
However, I think bi-directional transactional replication is a better choice
for implementing this form of custom business logic. When you use XCALL the
before and after images of the data will flow from the Publisher to the
Subscriber and you can incorporate logic to handle your conflicts this way.
So lets consider what a conflict is. A conflict is
1) a pk violation, trying to insert a PK value where a row with that PK
value already exists on the subscriber
2) trying to update a row on the Subscriber and instead of updating a single
row you update 0 or more than one rows.
3) trying to delete a row on the Subscriber and instead of deleting a single
row you delete 0 or more than one rows.
So, before your insert proc fires it will do an existence check. If the row
exists, it can instead do an update which will incorporate your custom
business logic. If the update ends up updating more than one row you have to
consider what is going on. This probably violates your database integrity,
but may not depending on how your database is set up or what you are trying
to accomplish. For instance consider you are replicating to audit table. A
row with a PK value of 1 may be inserted at the publisher and replicated to
the Subscriber. Then this row is deleted at the publisher, but this delete
is not replicated to the subscriber (remember the subscriber is an audit
table, so we need a record of that row). Then this row is readded with the
same PK (1) and replicate to the subscriber. If you haven't handled the
possibility of duplicate PK's you will have a problem.
Updates and deletes are simple as long as you can preserve the one to one
mapping of rows on the Publisher to the Subsriber. If you are doing a one to
many from the Publisher to the Subscriber it gets more complex, but it is
not impossible.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"deanc24" <deanc24athotmaildotcom> wrote in message
news:696CC504-19A5-4217-B12E-EEF9D181E842@.microsoft.com...
> I have what seems to be a unique case, but logically, would think that
> someone out there is already doing this. I have the following
configuration:
> - merge replication
> - column level tracking
> - single pub./dist. server replicating with a single subscriber
> - SQL Server 2000 Ent. on Windows 2000 Adv. Server
> I have succesfully implemented replication, and data is merged properly in
> both directions. However, when confilcts occurr, I want the ability to
allow
> those records that would merge accordingly (not in conflict), but for
those
> columns in conflict, I want the ability to run a stored procedure with my
> proper business logic. Is there a way to do this? When using a stored
proc
> for conflict resolution, you are forced to return the "winning values" for
> all the fields. This is where I lose the data that would have normally
> replicated that was not in conflict. In my stored proc, I wish I had the
> ability to see or read from a table the data values that would normally be
> merged that were not in conflict, so I could supply them in my returned
> recordset. I have the logic of reading both Subscriber and Publisher
field
> values for the current rowguid, but I don't know which of the two values
(sub
> or pub) has been edited so that it can merge.
> Am I explaining this properly? I currently have an open instance with
> Microsoft tech support ($250 !!), but they have yet to come back with a
> solution. They have had the specs to my issue for a week now, and they
have
> not been able to resolve it. Maybe someone out there has done this.
Thanks
> in advance for all the help!
>
|||being that I am only capable to connect at night, I was under the impression
that Merge Replication was my only option. Transaction Replication os for
constant connection, right? If I am wrong, please advise. As for the
remainder of your comments, I am not that familiar with Replication, to
understand everything you are referring to. If you know of any publications
or web sites that can help educate me, that would be great. So far, the web
has seemed to be kinda light on info that deals with the deep intricate
details regarding replication. It brushes lightly on the topic, but thats
it. Thanks so much for your assistance. I have been stuck with this for a
week now. Its frustrating.
"Hilary Cotter" wrote:

> This type of logic is possible using merge replication, but you will have to
> hack into the stored procedures that the merge agent uses to apply the
> changes to the subscriber and publisher.
> However, I think bi-directional transactional replication is a better choice
> for implementing this form of custom business logic. When you use XCALL the
> before and after images of the data will flow from the Publisher to the
> Subscriber and you can incorporate logic to handle your conflicts this way.
> So lets consider what a conflict is. A conflict is
> 1) a pk violation, trying to insert a PK value where a row with that PK
> value already exists on the subscriber
> 2) trying to update a row on the Subscriber and instead of updating a single
> row you update 0 or more than one rows.
> 3) trying to delete a row on the Subscriber and instead of deleting a single
> row you delete 0 or more than one rows.
> So, before your insert proc fires it will do an existence check. If the row
> exists, it can instead do an update which will incorporate your custom
> business logic. If the update ends up updating more than one row you have to
> consider what is going on. This probably violates your database integrity,
> but may not depending on how your database is set up or what you are trying
> to accomplish. For instance consider you are replicating to audit table. A
> row with a PK value of 1 may be inserted at the publisher and replicated to
> the Subscriber. Then this row is deleted at the publisher, but this delete
> is not replicated to the subscriber (remember the subscriber is an audit
> table, so we need a record of that row). Then this row is readded with the
> same PK (1) and replicate to the subscriber. If you haven't handled the
> possibility of duplicate PK's you will have a problem.
> Updates and deletes are simple as long as you can preserve the one to one
> mapping of rows on the Publisher to the Subsriber. If you are doing a one to
> many from the Publisher to the Subscriber it gets more complex, but it is
> not impossible.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "deanc24" <deanc24athotmaildotcom> wrote in message
> news:696CC504-19A5-4217-B12E-EEF9D181E842@.microsoft.com...
> configuration:
> allow
> those
> proc
> field
> (sub
> have
> Thanks
>
>
|||While you can use bi-directional transactional replication in a disconnected
manner it is not really advisable to do so, as the conflict tracking and
resolving mechanisms are essentially non-existent.
If you get a conflict your distribution agent will fail and you will have to
resolve the conflict and restart the agent. If you have many conflicts this
is not acceptable, but if you have few conflicts or you can design your
replication solution to minimize conflicts this might be a solution for you.
Again, I don't know your data, data flow, or topology so I can't really
advise you on it. You know it more intimately than I so you should make the
decision on this.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"deanc24" <deanc24athotmaildotcom> wrote in message
news:C223CB8B-F458-4612-9531-398B4D42D8FA@.microsoft.com...
> being that I am only capable to connect at night, I was under the
impression
> that Merge Replication was my only option. Transaction Replication os for
> constant connection, right? If I am wrong, please advise. As for the
> remainder of your comments, I am not that familiar with Replication, to
> understand everything you are referring to. If you know of any
publications
> or web sites that can help educate me, that would be great. So far, the
web
> has seemed to be kinda light on info that deals with the deep intricate
> details regarding replication. It brushes lightly on the topic, but thats
> it. Thanks so much for your assistance. I have been stuck with this for
a[vbcol=seagreen]
> week now. Its frustrating.
> "Hilary Cotter" wrote:
have to[vbcol=seagreen]
choice[vbcol=seagreen]
the[vbcol=seagreen]
way.[vbcol=seagreen]
single[vbcol=seagreen]
single[vbcol=seagreen]
row[vbcol=seagreen]
have to[vbcol=seagreen]
integrity,[vbcol=seagreen]
trying[vbcol=seagreen]
A[vbcol=seagreen]
to[vbcol=seagreen]
delete[vbcol=seagreen]
the[vbcol=seagreen]
one[vbcol=seagreen]
one to[vbcol=seagreen]
is[vbcol=seagreen]
properly in[vbcol=seagreen]
to[vbcol=seagreen]
my[vbcol=seagreen]
stored[vbcol=seagreen]
for[vbcol=seagreen]
normally[vbcol=seagreen]
the[vbcol=seagreen]
normally be[vbcol=seagreen]
returned[vbcol=seagreen]
values[vbcol=seagreen]
a[vbcol=seagreen]
they[vbcol=seagreen]
|||I appreciate your feedback Hilary. I do think that bi-directional
transactional replication is not an option for me, due to the number of
conflicts anticipated. I hope that Microsoft's support people will help me
find the right answer. Its costing me $250, so they better! :-)
Thanks again. I enjoy your particiapation on this discussion board. Its a
great educational tool!
"Hilary Cotter" wrote:

> While you can use bi-directional transactional replication in a disconnected
> manner it is not really advisable to do so, as the conflict tracking and
> resolving mechanisms are essentially non-existent.
> If you get a conflict your distribution agent will fail and you will have to
> resolve the conflict and restart the agent. If you have many conflicts this
> is not acceptable, but if you have few conflicts or you can design your
> replication solution to minimize conflicts this might be a solution for you.
> Again, I don't know your data, data flow, or topology so I can't really
> advise you on it. You know it more intimately than I so you should make the
> decision on this.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "deanc24" <deanc24athotmaildotcom> wrote in message
> news:C223CB8B-F458-4612-9531-398B4D42D8FA@.microsoft.com...
> impression
> publications
> web
> a
> have to
> choice
> the
> way.
> single
> single
> row
> have to
> integrity,
> trying
> A
> to
> delete
> the
> one
> one to
> is
> properly in
> to
> my
> stored
> for
> normally
> the
> normally be
> returned
> values
> a
> they
>
>

Tuesday, March 20, 2012

Combine raw files using range

HI, I have a dataflow that has two raw files as source and I would like to merge them upon a range condition:

RawFile1.Date <= RawFile2.Date

Usually, using tables, I would have used a lookup with partial cache to achieve it. Now, since we cannot use lookup transform with raw files, I was wondering how I could achieve this using raw files as source. Is it possible to merge raw files using merge or merge join?

Thank you,

Ccote

Sure, you can merge two raw files. You can merge any two data flow streams. The data just has to be sorted first.

You could load a staging table for each raw file, though, and write a SQL join against them to get your results as well...|||

ccote wrote:

HI, I have a dataflow that has two raw files as source and I would like to merge them upon a range condition:

RawFile1.Date <= RawFile2.Date

Usually, using tables, I would have used a lookup with partial cache to achieve it. Now, since we cannot use lookup transform with raw files, I was wondering how I could achieve this using raw files as source. Is it possible to merge raw files using merge or merge join?

Thank you,

Ccote

This appears to be a problem that requires SQL, meaning that both data sets need to be stored in tables. As suggested previously, the data sets can then be joined to yield the desired result set.

I hope this helps.

|||

Thank you both for your inputs. I will have to revise the design of this package. I wanted to get rid of the table solution since SSIS is installed on an application server (different than SQL server). By using raw files, I would be able to do all the work locally and at the end send the result to SQL server target table in one pass. I guess merge join are not flexible enough for now, maybe MS will had non equijoin fucntionnality in future version.

Thank you,
Ccote

|||

ccote wrote:

I guess merge join are not flexible enough for now, maybe MS will had non equijoin fucntionnality in future version.

New feature requests may be submitted here: SQL Server Feedback|||Can you explain what you mean to accomplish by "merge them upon a range condition"?|||

ccote wrote:

Thank you both for your inputs. I will have to revise the design of this package. I wanted to get rid of the table solution since SSIS is installed on an application server (different than SQL server). By using raw files, I would be able to do all the work locally and at the end send the result to SQL server target table in one pass. I guess merge join are not flexible enough for now, maybe MS will had non equijoin fucntionnality in future version.

Thank you,
Ccote

Yes. The lack of non-equi-join functionality really annoys me. I once enquired why it was not there and was told "nobody has asked for it". Well...it seems people are now asking for it.

A connect submission for this already exists: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126376 so please please please click-through, vote and ADD A COMMENT (just voting is next to useless - they need to see real reasons why this needs to be implemented). You can link back to this thread as well.

-Jamie

|||

HI, I would like to be able to do basically the same thing as I can do when I join tables: Be able to join on col1 <= col2. One way to achieve this would be being able to to <= (or <>, <, >, etc.) when I use merge join transform. Or,by being able to lookup against raw files, currently, we can only use lookups transforms against reelational tables. If we could be able to do lookups against raw files, it would be perferct since lookups can have parameters and we can specify the query by using ranges.

Ccote

Combine raw files using range

HI, I have a dataflow that has two raw files as source and I would like to merge them upon a range condition:

RawFile1.Date <= RawFile2.Date

Usually, using tables, I would have used a lookup with partial cache to achieve it. Now, since we cannot use lookup transform with raw files, I was wondering how I could achieve this using raw files as source. Is it possible to merge raw files using merge or merge join?

Thank you,

Ccote

Sure, you can merge two raw files. You can merge any two data flow streams. The data just has to be sorted first.

You could load a staging table for each raw file, though, and write a SQL join against them to get your results as well...|||

ccote wrote:

HI, I have a dataflow that has two raw files as source and I would like to merge them upon a range condition:

RawFile1.Date <= RawFile2.Date

Usually, using tables, I would have used a lookup with partial cache to achieve it. Now, since we cannot use lookup transform with raw files, I was wondering how I could achieve this using raw files as source. Is it possible to merge raw files using merge or merge join?

Thank you,

Ccote

This appears to be a problem that requires SQL, meaning that both data sets need to be stored in tables. As suggested previously, the data sets can then be joined to yield the desired result set.

I hope this helps.

|||

Thank you both for your inputs. I will have to revise the design of this package. I wanted to get rid of the table solution since SSIS is installed on an application server (different than SQL server). By using raw files, I would be able to do all the work locally and at the end send the result to SQL server target table in one pass. I guess merge join are not flexible enough for now, maybe MS will had non equijoin fucntionnality in future version.

Thank you,
Ccote

|||

ccote wrote:

I guess merge join are not flexible enough for now, maybe MS will had non equijoin fucntionnality in future version.

New feature requests may be submitted here: SQL Server Feedback|||Can you explain what you mean to accomplish by "merge them upon a range condition"?|||

ccote wrote:

Thank you both for your inputs. I will have to revise the design of this package. I wanted to get rid of the table solution since SSIS is installed on an application server (different than SQL server). By using raw files, I would be able to do all the work locally and at the end send the result to SQL server target table in one pass. I guess merge join are not flexible enough for now, maybe MS will had non equijoin fucntionnality in future version.

Thank you,
Ccote

Yes. The lack of non-equi-join functionality really annoys me. I once enquired why it was not there and was told "nobody has asked for it". Well...it seems people are now asking for it.

A connect submission for this already exists: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126376 so please please please click-through, vote and ADD A COMMENT (just voting is next to useless - they need to see real reasons why this needs to be implemented). You can link back to this thread as well.

-Jamie

|||

HI, I would like to be able to do basically the same thing as I can do when I join tables: Be able to join on col1 <= col2. One way to achieve this would be being able to to <= (or <>, <, >, etc.) when I use merge join transform. Or,by being able to lookup against raw files, currently, we can only use lookups transforms against reelational tables. If we could be able to do lookups against raw files, it would be perferct since lookups can have parameters and we can specify the query by using ranges.

Ccote

Sunday, February 19, 2012

column filter problem

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
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
>
>
>