Showing posts with label replication. Show all posts
Showing posts with label replication. Show all posts

Friday, March 30, 2012

More on merge replication an FK constraints

So, let me relate to my earlier post in this group about merge replication
and foreign keys.
As I've mentioned, I have one publication that pushes 'customers' table to
the subscribers.
I have another publication that pushes 'invoices' and 'invoices_det' tables
to the subscribers. In table invoices there is cust_id field wich is foreign
key to the customers table primary key 'cust_id'. I have created all
publications like so that first table is DROPed and then recreated. I have
'checked' options for creating primary keys and referential integrity.
FIrst I push CUSTOMERS publication to the subsrciber, it's ok. customer
table is created on the subscriber, primary key is set, everything is ok.
Then I push INVOICES publication to the subscriber. That's not ok. I don't
have foreign key to customers table in the table invoices.
Enterprise manage wizzard suggests that I include customers table in
INVOICES publication to avoid things like mentioned above. But, I have
problem with that approach. That would mean that I'd have only as many
publications as I have subscribers (one subscriber - one publication). That
means that I'd have to have, for instance, table 'customers' published dozen
times, if I have dozen subscribers.
How do I solve this one?
As far as I see it, i could:
1) drop the foreign key constraints
- I'd hate to do this!
2) set up publication snapshot so it 'delete the data on the subscriber':
This seems ok, but! If I, for any reason, need to break replication,
when setting it back agan, I'll still have data on the subscriber. I then
push CUSTOMERS publication, the snapshot tries to DELETE data from
'customers' table, but, since it's FKeyd to 'invoices' table, it will bring
up an error.
3) set up publication snapshot so it 'leaves the existing table unchanged'.
This is the best bet I could have, as far as I see. I only need to
make sure that the database on the remote is 'fresh and clear'. Wich means,
do the script to do the DDL on the subscriber (with all the constraints!),
and then push the snapshot in 'right' order (meaning, first the customers,
then the invoices, in the above example).
Any help here would be much appreciated.
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hr
For foreign keys can you not set them all to "Not for replication", combine
CUSTOMERS, INVOICES and INVOICES_DET in one publication?
Jim.
"Mario Splivalo" wrote:

> So, let me relate to my earlier post in this group about merge replication
> and foreign keys.
> As I've mentioned, I have one publication that pushes 'customers' table to
> the subscribers.
> I have another publication that pushes 'invoices' and 'invoices_det' tables
> to the subscribers. In table invoices there is cust_id field wich is foreign
> key to the customers table primary key 'cust_id'. I have created all
> publications like so that first table is DROPed and then recreated. I have
> 'checked' options for creating primary keys and referential integrity.
> FIrst I push CUSTOMERS publication to the subsrciber, it's ok. customer
> table is created on the subscriber, primary key is set, everything is ok.
> Then I push INVOICES publication to the subscriber. That's not ok. I don't
> have foreign key to customers table in the table invoices.
> Enterprise manage wizzard suggests that I include customers table in
> INVOICES publication to avoid things like mentioned above. But, I have
> problem with that approach. That would mean that I'd have only as many
> publications as I have subscribers (one subscriber - one publication). That
> means that I'd have to have, for instance, table 'customers' published dozen
> times, if I have dozen subscribers.
> How do I solve this one?
> As far as I see it, i could:
> 1) drop the foreign key constraints
> - I'd hate to do this!
> 2) set up publication snapshot so it 'delete the data on the subscriber':
> This seems ok, but! If I, for any reason, need to break replication,
> when setting it back agan, I'll still have data on the subscriber. I then
> push CUSTOMERS publication, the snapshot tries to DELETE data from
> 'customers' table, but, since it's FKeyd to 'invoices' table, it will bring
> up an error.
> 3) set up publication snapshot so it 'leaves the existing table unchanged'.
> This is the best bet I could have, as far as I see. I only need to
> make sure that the database on the remote is 'fresh and clear'. Wich means,
> do the script to do the DDL on the subscriber (with all the constraints!),
> and then push the snapshot in 'right' order (meaning, first the customers,
> then the invoices, in the above example).
> Any help here would be much appreciated.
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr
>
|||On 2004-12-06, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> For foreign keys can you not set them all to "Not for replication", combine
> CUSTOMERS, INVOICES and INVOICES_DET in one publication?
I use 'NOT FOR REPLICATION' for foreign keys.
Combining all those into one publication now seems like a good thing. But, I
have dozen of publication of wich 8 are non-filtered publications. Customers
is an example of such publication. I have 30 stores around the country, and
I need to be able for all the stores to enter new customers, and that new
customer should be visible in all locations. Invoices, for instance, is
exmaple of filtered publication (i have 4 like those), only the cetnral
database (the publisher) needs to see all the invoices (for the reporting
purposes, and financial stuff). Other subscribers don't see other invoices.
Same goes for inventory lists, some other financial stuff I don't know
english names, and so on.
So, your approach leaves me with ONE publication for each subscriber! I
don't like that approach, it just creates mess. I'd like if someone could
tell me now 'stop, you're wrong here'.
My database well normalized (is that the term when you reference data trough
foreign keys?), for instance, in invoices I have payement methods (cash,
credit card,...) wich is FK to the table wich holds payement methods. That
table is updated ONLY at the publisher. Another example is stocks. Each
invoice holds stock_id, wich is foreign key to table l_stocks. Then users.
Then tax rates. Then a lot of other things. All those tables are updated at
the publisher only, so I created snapshot replication to push that data to
subscribers. You suggest I put all that tables into merge publication, just
because they're referenced by FK from tables invoices and such? What is
wrong with my understanding of replication if I belive that is not the way?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hr
|||If you have a set of tables that rely on each other using foreign keys and
they are likely to be updated together then they should all be in the same
publication.
As I understand it, you have them separated and are getting foreign key
errors because items are not present when you need them.
You may have very good reasons for splitting them that I am not aware of but
I see no other solution to your problem.
Jim.
"Mario Splivalo" wrote:

> On 2004-12-06, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> I use 'NOT FOR REPLICATION' for foreign keys.
> Combining all those into one publication now seems like a good thing. But, I
> have dozen of publication of wich 8 are non-filtered publications. Customers
> is an example of such publication. I have 30 stores around the country, and
> I need to be able for all the stores to enter new customers, and that new
> customer should be visible in all locations. Invoices, for instance, is
> exmaple of filtered publication (i have 4 like those), only the cetnral
> database (the publisher) needs to see all the invoices (for the reporting
> purposes, and financial stuff). Other subscribers don't see other invoices.
> Same goes for inventory lists, some other financial stuff I don't know
> english names, and so on.
> So, your approach leaves me with ONE publication for each subscriber! I
> don't like that approach, it just creates mess. I'd like if someone could
> tell me now 'stop, you're wrong here'.
> My database well normalized (is that the term when you reference data trough
> foreign keys?), for instance, in invoices I have payement methods (cash,
> credit card,...) wich is FK to the table wich holds payement methods. That
> table is updated ONLY at the publisher. Another example is stocks. Each
> invoice holds stock_id, wich is foreign key to table l_stocks. Then users.
> Then tax rates. Then a lot of other things. All those tables are updated at
> the publisher only, so I created snapshot replication to push that data to
> subscribers. You suggest I put all that tables into merge publication, just
> because they're referenced by FK from tables invoices and such? What is
> wrong with my understanding of replication if I belive that is not the way?
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr
>
|||On 2004-12-07, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> If you have a set of tables that rely on each other using foreign keys and
> they are likely to be updated together then they should all be in the same
> publication.
Yes. That goes for master/detail tables. But, what if I have a table with,
let's say, tax rates, and in invocie table I have reference via foreign key
to the tax rates table? I'm publishing tax rates table (along with others)
via snapshot publication. So, why would I include those in merge
publication? And tables in merge publication still reference those fields in
tax rates table. So, when deploying initial snapshot the invoices table
WON'T have FK constraint to tax rates table. How do I deal with that?

> As I understand it, you have them separated and are getting foreign key
> errors because items are not present when you need them.
Initial snapshot won't create foreign key constraints for tables that are
not in that publication. That is my problem.

> You may have very good reasons for splitting them that I am not aware of but
> I see no other solution to your problem.
Do you have any reference on the web where I could read more about this? I
see no point in puting all the database tables in one publication just
because almost all tables are FKey with each other. Or, to put it more
simple, how do I establish snapshot and merge publication so that tables in
merge publication have foreign keys to tables in snapshot publication?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hr
|||Yes, what you are doing is logical ok - I just don't know of a way to prevent
FK errors when you split things like that.
For me, even if the table rarely changes, I include everything in a
publication. The only price I pay for that is a larger initial snapshot.
The benefit I get is simplicity and easier administration.
|||On 2004-12-07, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> Yes, what you are doing is logical ok - I just don't know of a way to prevent
> FK errors when you split things like that.
> For me, even if the table rarely changes, I include everything in a
> publication. The only price I pay for that is a larger initial snapshot.
> The benefit I get is simplicity and easier administration.
So, you'd generaly be ok with this: put rarely changed tables as articles
into many publications, although you could have only one snapshot
publication for those?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hr
|||I try to keep it one publication, one snapshot. I then have many subscribers
- it is very easy to administer.
"Mario Splivalo" wrote:

> On 2004-12-07, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> So, you'd generaly be ok with this: put rarely changed tables as articles
> into many publications, although you could have only one snapshot
> publication for those?
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr
>
|||On 2004-12-08, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> I try to keep it one publication, one snapshot. I then have many subscribers
> - it is very easy to administer.
>
Thnx. I'll see with what i'll come up at the end, and post here...
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hr
|||Mario,
I'm looking for the same answer as you, I have basically the same problem
with inicial snapshot with transactional replication, as you, I have also
Unchecked the enforce for replication in the relationship's dialog for the
foreign keys.
If I have some answers or more info I will post it here...
Adrian Parra.
"Mario Splivalo" wrote:

> On 2004-12-06, Jim Breffni <JimBreffni@.discussions.microsoft.com> wrote:
> I use 'NOT FOR REPLICATION' for foreign keys.
> Combining all those into one publication now seems like a good thing. But, I
> have dozen of publication of wich 8 are non-filtered publications. Customers
> is an example of such publication. I have 30 stores around the country, and
> I need to be able for all the stores to enter new customers, and that new
> customer should be visible in all locations. Invoices, for instance, is
> exmaple of filtered publication (i have 4 like those), only the cetnral
> database (the publisher) needs to see all the invoices (for the reporting
> purposes, and financial stuff). Other subscribers don't see other invoices.
> Same goes for inventory lists, some other financial stuff I don't know
> english names, and so on.
> So, your approach leaves me with ONE publication for each subscriber! I
> don't like that approach, it just creates mess. I'd like if someone could
> tell me now 'stop, you're wrong here'.
> My database well normalized (is that the term when you reference data trough
> foreign keys?), for instance, in invoices I have payement methods (cash,
> credit card,...) wich is FK to the table wich holds payement methods. That
> table is updated ONLY at the publisher. Another example is stocks. Each
> invoice holds stock_id, wich is foreign key to table l_stocks. Then users.
> Then tax rates. Then a lot of other things. All those tables are updated at
> the publisher only, so I created snapshot replication to push that data to
> subscribers. You suggest I put all that tables into merge publication, just
> because they're referenced by FK from tables invoices and such? What is
> wrong with my understanding of replication if I belive that is not the way?
> Mike
> --
> "I can do it quick. I can do it cheap. I can do it well. Pick any two."
> Mario Splivalo
> msplival@.jagor.srce.hr
>

Wednesday, March 28, 2012

More Info:

We have setup a replication in SQL2000:

We have DTS package automatically pouring data into the publishing database(source tables). During this process, we want to temporary disable certain triggers. However, the command

Alter table 'tbl' disable trigger 'abc' errored out. The error message said:

''Cannot alter the table 'tbl' because it is being published for replication."

I've digged more into this and found although it's not allowed to disable a triggers,

the SQLServer do allow delete the trigger and recreate them.

Is there any way to disable the trigger directly?

Thanks in advance,

Don

BTW:

I've used the following sql directly, however the trigger still fires.

UPDATE
sysobjects
SET
status = status|2048
WHERE
type = 'TR'
AND
parent_obj = OBJECT_ID (@.table_name)

The only other way around now is to create stored procedures that dynamically create the trigger. Because our trigger is normmally larger than 8000 bytes. We have to create one stored procedure per trigger. This option is not acceptable because not only it takes quite a time, but also a maintainance nightmare.

More Info: We are using transactional publication.

And trying the sql command in query analyzer quickly give us an error on published article table.

alter table tbl disable trigger abc

|||have you tried adding NOT FOR REPLICATION in your trigger?|||

We did try added not for replication in my trigger. and it does not work.

This issue is for loading data for the master table.

Besides, we did not publish triggers.

|||Disabling the trigger is not the issue. An ALTER TABLE command of ANY kind is not supported in 2000 against a replicated table. The only option in this case is to drop the trigger and recreate it, which is allowed in 2000 against a replicated table.|||

We kown this and we've found a better way to create the triggers. Nobody like this approach through.

If dropping trigger is allowed, there's no reason to not allow disable trigger.

It looks to me it's kind of lack of insight of microsoft. they have sp_repladdcolumn...

they should have a sp_replenabletrigger...

If you look at me post, I tried to modify sysobject tables trigger flag to change it directly.

However, it does not work so my guesses microsoft have more tables involved in this.

I was expecting somebody from microsoft could give me a hint or give me a sp_replenabletrigger.

|||

sp_repladdcolumn and sp_repldropcolumn were added as very specific patches to very specific problems. The issue was quite simply not having enough time to redesign a major portion of the replication engine to allow an ALTER TABLE statement. There are no hints, no work arounds, and no bypasses. There isn't any code like you're looking for either. The reason for that is quite simple. For the last 6 or so years, all development efforts were focused on SQL Server 2005, so if SQL Server 2005 already had a feature that would address and eliminate this entire issue, why waste the time and resources to graft this into SQL Server 2000?

I saw the message in the post. You are more than welcome to hack the system tables if you choose to. I'm certainly not going to hand anyone code to do so. Hacking the system tables is completely unsupported. If you blow up the system, you will not get any support from Microsoft in fixing it.

You have exactly two options:

1. Stay with SQL Server 2000 and write the code as a drop/create trigger

2. Upgrade to SQL Server 2005 and use an ALTER TABLE to disable the trigger

|||

Thanks, Michael.

That's a clear message.

We do encounter other problems with recreating triggers. if we using cmdshell to create the trigger though.

For example, sp-a is the one to create the trigger.

if sp-b calls sp-a,

sp-b do this:

Begin transaction

exec sp-a

Commit Transaction

calling sp-b will stuck inthe command shell out.That's another unpleasant finding yesterday.

Every developer want to upgrade to sql2005. Unfortunately upgrade to sql2005 require massive re-testing of all existing applciations,

This could be a valid reason but it's not enough for the move to sql2005.

I have to considering other solution other than replication now since we are also tight on schedule.

Thanks again for the response.

Don

sql

Monday, March 26, 2012

More confusion - tran and snapshot repl

When I look at my publisher and the publications in EM, they say they are
transaction replication.
HOWEVER, when I run sp_helppullsubscription on both of the subscriber DBs,
they return a publication_type of 1 (well except for one of them which
returns a 0 and is the one causing me high latency issues.) BOL says 1 =
snapshot and 0 = transactional replication.
Can someone please explain what in the heck is going on? My brain is about
to explode.
Thx,
Kristy
That's strange. I just deployed a transactional and snapshot publication and
verified that BOL is accurate here.
can you review the descriptions to make sure that they are referring to
current productions, sometimes data from old publications remain.
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
"Kristy" <pleasereplyby@.posting.com> wrote in message
news:u8Cc2lEVGHA.4248@.TK2MSFTNGP10.phx.gbl...
> When I look at my publisher and the publications in EM, they say they are
> transaction replication.
> HOWEVER, when I run sp_helppullsubscription on both of the subscriber DBs,
> they return a publication_type of 1 (well except for one of them which
> returns a 0 and is the one causing me high latency issues.) BOL says 1 =
> snapshot and 0 = transactional replication.
> Can someone please explain what in the heck is going on? My brain is about
> to explode.
> Thx,
> Kristy
>
|||Not exactely sure what you mean by "review the descriptions". There is another thread on this that gives a little more info. It's called "Confused about snapshot repl". It has the scripted versions of the subscriptions. Let me know if you need anything else.
Thanks,
--Kristy
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message news:uvuc5PXWGHA.2376@.TK2MSFTNGP03.phx.gbl...
> That's strange. I just deployed a transactional and snapshot publication and
> verified that BOL is accurate here.
> can you review the descriptions to make sure that they are referring to
> current productions, sometimes data from old publications remain.
> --
> 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
>
> "Kristy" <pleasereplyby@.posting.com> wrote in message
> news:u8Cc2lEVGHA.4248@.TK2MSFTNGP10.phx.gbl...
>

Wednesday, March 21, 2012

Monster Replication

I'm trying to replicate databases from 7 serves into one main one. For example say data from servers A, B, C, D, E, F, G go into one main server, say, server Z. I'm using snapshot replication method. The final outcome of this replication should be as follows: Each server has tables in it, when these tables are replicated into Server Z, I want to add extra field in the table (on Server Z). This field will represent where the record came from, ie, either Server A,B.. etc. I cant add the extra column in the Publisher server tables (Server A,B..etc). The column MUST be added in the final replicated table on server Z.

Has ne one out there done sumthing similar to this? If so please help me out with. I've been struggling with this for a while now. So any kind of help will be appreciated.

Thanks in advance.can you use a separate non-replicated table on server z to perform the final insert from 7 tables using a union and adding this addition field at the time of select for each section of the union?|||You could use merge replication with horizontal filters. Add field hostname and use function host_name() for filtering on publisher.
Your main db will be publisher - another dbs - pull subscribers. Use guid (uniqueidentifier ) as id for all tables. This schema is working fine in one of my projects.|||but my understanding was that it's a reverse, - there are 7 publishers and 1 subscriber. plus, i don't think he is considering total system overhaul (changing structures, guids, etc.)|||Originally posted by snail
You could use merge replication with horizontal filters. Add field hostname and use function host_name() for filtering on publisher.
Your main db will be publisher - another dbs - pull subscribers. Use guid (uniqueidentifier ) as id for all tables. This schema is working fine in one of my projects.

So this idea has already been tested?... Newayz, the guid (uniqueidentifier) column would be default as newid() rite? Well I want a certain value to go in the column depending on the server the record came from.

Since you have done this kinda thing b4, i'd be askin alot of questions ... =)

Thanks in advance.

Monitoring Transactional Replication (with pull subscribers) ! he

Have a look at the Replication Alerts for some of this -
specifically the Replication: agent failure alert.
To help troubleshoot errors, the replication history
tables (MSsnapshot_history, MSlogreader_history etc) are
used, either directly or through the GUI. Also, setting
the agents to log history to a text file can be extremely
useful and give a more granular type of error handling
capability (see http://support.microsoft.com/?id=312292).
To backup the log just do a normal backup. The log won't
be truncated of this work until the transaction has
finished and the log-reader has read the whole
transaction.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
also have a look at the msrepl_errors table in the distribution database.
Errors are logged here.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:3ce301c4e287$c466a4a0$a301280a@.phx.gbl...
> Have a look at the Replication Alerts for some of this -
> specifically the Replication: agent failure alert.
> To help troubleshoot errors, the replication history
> tables (MSsnapshot_history, MSlogreader_history etc) are
> used, either directly or through the GUI. Also, setting
> the agents to log history to a text file can be extremely
> useful and give a more granular type of error handling
> capability (see http://support.microsoft.com/?id=312292).
> To backup the log just do a normal backup. The log won't
> be truncated of this work until the transaction has
> finished and the log-reader has read the whole
> transaction.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

Monday, March 19, 2012

Monitoring Replication Status/Restarting

Occasionally, our replication between our offices stops, almost always due
to a general network failure/pesky WAN link.
Is there a table or sp that I can periodically query to detect if
replication is still running, or if replication has stopped and why?
I would ideally like to call this every 1, 5, 10 minutes directly from our
front-end program, so I can display an error/attention indicator if it has
stopped.
Part two, is if it has failed, and I am able to tell that it is a General
Network failure type error, can I exec something to jump start it?
Sorry if this is a FAQ. I looked around a bit but didn't find anything...
You could use tis type of code to see if the merge agent is running:
http://www.replicationanswers.com/Do...unningJobs.txt
As a simple solution to your problem, you could schedule the merge agent to
run every 1 minute rather than continuously.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Query distribution.dbo.MSdistribution_agents.
You can also use the replication alerts to notify you on failure.
You can't do much about general network failures programmatically. Generally
these are transient, when they last longer you have to run tracert to find
out exactly where the network failure is and hunt down your network admins
or call your ISP, or their ISP.
I normally take my 3rd job step and loop it around to the first job step on
failure or have the jobs restart every 5 minutes and run them continuously,.
Hilary Cotter
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
"Art Vandelay" <artvandelay92k@.hotmail.com> wrote in message
news:11ph8lnhs9dpg6a@.corp.supernews.com...
> Occasionally, our replication between our offices stops, almost always due
> to a general network failure/pesky WAN link.
> Is there a table or sp that I can periodically query to detect if
> replication is still running, or if replication has stopped and why?
> I would ideally like to call this every 1, 5, 10 minutes directly from our
> front-end program, so I can display an error/attention indicator if it has
> stopped.
> Part two, is if it has failed, and I am able to tell that it is a General
> Network failure type error, can I exec something to jump start it?
> Sorry if this is a FAQ. I looked around a bit but didn't find anything...
>
|||Thanks.
To set it up to loop back to step 1, do I just edit the Agent properties,
then edit the Job Step "On Failure Action" to Goto Step:1?
Or, just go to the Schedules tab and add another Schedule to just restart
every 5 minutes.
Is one way better than another? I kind of like the delay in there, so it
will wait a bit to restart if down, so hopefully the network has fixed
itself by the next time it retries.
Any downsides? Does it mess anything to keep restarting, say even if the
service is already up, or in the middle of a replication, to have it just
start up again? I would assume it would not, but I am just maybe being
overparaoid here...
Thanks.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:unY4anM$FHA.140@.TK2MSFTNGP12.phx.gbl...
> Query distribution.dbo.MSdistribution_agents.
> You can also use the replication alerts to notify you on failure.
> You can't do much about general network failures programmatically.
> Generally these are transient, when they last longer you have to run
> tracert to find out exactly where the network failure is and hunt down
> your network admins or call your ISP, or their ISP.
> I normally take my 3rd job step and loop it around to the first job step
> on failure or have the jobs restart every 5 minutes and run them
> continuously,.
> --
> Hilary Cotter
> 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
> "Art Vandelay" <artvandelay92k@.hotmail.com> wrote in message
> news:11ph8lnhs9dpg6a@.corp.supernews.com...
>
|||The overhead with having it loop is negligible. I prefer to schedule it as
typically I have many subscribers and I want to avoid having too many agents
running concurrently.
Hilary Cotter
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
"Art Vandelay" <artvandelay92k@.hotmail.com> wrote in message
news:11s8mvrf7e6rq82@.corp.supernews.com...
> Thanks.
> To set it up to loop back to step 1, do I just edit the Agent properties,
> then edit the Job Step "On Failure Action" to Goto Step:1?
> Or, just go to the Schedules tab and add another Schedule to just restart
> every 5 minutes.
> Is one way better than another? I kind of like the delay in there, so it
> will wait a bit to restart if down, so hopefully the network has fixed
> itself by the next time it retries.
> Any downsides? Does it mess anything to keep restarting, say even if the
> service is already up, or in the middle of a replication, to have it just
> start up again? I would assume it would not, but I am just maybe being
> overparaoid here...
> Thanks.
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:unY4anM$FHA.140@.TK2MSFTNGP12.phx.gbl...
>

Monitoring replication status via SNMP

I'm trying to find an SNMP MIB that will let me monitor the replication status of a Microsoft SQL2K database. I know you can send Email alerts from MSSQL, as long as the DB is running under a domain account, but in case that is not an option. Any help w
ould be GREATLY appreciated.
You can configure alerts to execute jobs. Use these jobs to raise SNMP alerts.
AFAIK there are no replication specific MIBs but there is a SQL Server specific one.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Derek Small" wrote:

> I'm trying to find an SNMP MIB that will let me monitor the replication status of a Microsoft SQL2K database. I know you can send Email alerts from MSSQL, as long as the DB is running under a domain account, but in case that is not an option. Any help
would be GREATLY appreciated.
>

Monitoring replication from subscriber

Hi,
I have a replication scenario where multiple laptops merge replicate with a
central server. The subscriptions are set up as push subscriptions on the
distributor. My users want a tool to tell when they last replicated, and if
possible, how many records are waiting to be replicated. They need this
while disconnected from the server. Is there a way to get this information,
without having access to the publisher/distributor?
Thanks,
John Loveland
John,
have a look on my site for a script to find pending merge changes. There is
some discussion about the reliability of the data in it, but I've found it a
useful bit of data to use.
For the last time merged using a push, perhaps look at
sysmergesubscriptions.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thanks. That looks like exactly what I need.
John Loveland
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23A7Ma05FGHA.2568@.TK2MSFTNGP10.phx.gbl...
> John,
> have a look on my site for a script to find pending merge changes. There
> is some discussion about the reliability of the data in it, but I've found
> it a useful bit of data to use.
> For the last time merged using a push, perhaps look at
> sysmergesubscriptions.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

Monday, March 12, 2012

Monitoring of Replication using dev tools

What are the methods by which I can monitor replication/data row changes
programmatically?
I have looked at the Mergexlib but perhaps I've missed something but that
*appears* to be for setting up and then monitoring (which is "ok" except how
do I monitor previously configured subscribers? I cant see how I can set my
mergeobj to an existing subscription as the DMO/MergeLib appear to be very
different...). Will RMO in SQL2005 solve this and if so how?
Is there something I can do with the notifications services when rows are
inserted/updated/deleted?
I'm looking at SQL2000 (and will be moving to SQL2005) and using the .net
environment and looking for an event based solution - I am not interested in
polling tables and running arcane sp's.
tiaYou could modify the merge replication triggers to write to an audit table,
or simple use new triggers which will write to an audit table.
Another option is to query msmerge_contents and msmerge_tombstone.
--
Hilary Cotter
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
"Nigel" <nige66_spam_free@.hotmail.com> wrote in message
news:ecYkuTrYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> What are the methods by which I can monitor replication/data row changes
> programmatically?
> I have looked at the Mergexlib but perhaps I've missed something but that
> *appears* to be for setting up and then monitoring (which is "ok" except
> how do I monitor previously configured subscribers? I cant see how I can
> set my mergeobj to an existing subscription as the DMO/MergeLib appear to
> be very different...). Will RMO in SQL2005 solve this and if so how?
> Is there something I can do with the notifications services when rows are
> inserted/updated/deleted?
> I'm looking at SQL2000 (and will be moving to SQL2005) and using the .net
> environment and looking for an event based solution - I am not interested
> in polling tables and running arcane sp's.
> tia
>|||Thanks but I do not see how that meets the requirements as I *still*
have to poll tables (although they are now tables that I create rather than
using system tables in the case of msmerge_contents which is a no no).
I did look at triggers but the problem is *how* to get the trigger to fire
an event on an application outside of SQL. I know the CLR support in SQL2005
lets me use the SQLpipe to send data back upto the server, but how about
raising events on other applications'
(Note that I'm *not* interested in yuckky solutions with triggers writing
marker
files/event logs with .Net doing file or event log watching).
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:u6KR%23xRZFHA.1040@.TK2MSFTNGP10.phx.gbl...
> You could modify the merge replication triggers to write to an audit
> table, or simple use new triggers which will write to an audit table.
> Another option is to query msmerge_contents and msmerge_tombstone.
> --
> Hilary Cotter
> 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
> "Nigel" <nige66_spam_free@.hotmail.com> wrote in message
> news:ecYkuTrYFHA.3132@.TK2MSFTNGP09.phx.gbl...
>|||Nigel -
SQLNS provides a couple of functionalities that may do what you're
sing.
First the built-in SQL Server Event Provider periodically checks a
table to see if there have been any changes to the rows. (Yes, it's
technically polling but you don't have to worry with the interval,
etc, SQLNS handles it for you.) Using T-SQL you as the developer
determine how those changes are to be recognized. The second way
involves using some SQLNS provided procedures in a trigger for the
data table.
Either way, events are raised in the SQLNS application and subscribers
can be notified via the built-in SMTP protocol or a custom protocol
that you develop (i.e. a protocol that would communicate some
application).
HTH...
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/t...il/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)
On Tue, 31 May 2005 16:42:34 +0100, "Nigel"
<nige66_spam_free@.hotmail.com> wrote:

>Thanks but I do not see how that meets the requirements as I *still*
>have to poll tables (although they are now tables that I create rather than
>using system tables in the case of msmerge_contents which is a no no).
>I did look at triggers but the problem is *how* to get the trigger to fire
>an event on an application outside of SQL. I know the CLR support in SQL200
5
>lets me use the SQLpipe to send data back upto the server, but how about
>raising events on other applications'
>(Note that I'm *not* interested in yuckky solutions with triggers writing
>marker
>files/event logs with .Net doing file or event log watching).
>
>"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
>news:u6KR%23xRZFHA.1040@.TK2MSFTNGP10.phx.gbl...
>

Monitoring of Replication using dev tools

What are the methods by which I can monitor replication/data row changes
programmatically?
I have looked at the Mergexlib but perhaps I've missed something but that
*appears* to be for setting up and then monitoring (which is "ok" except how
do I monitor previously configured subscribers? I cant see how I can set my
mergeobj to an existing subscription as the DMO/MergeLib appear to be very
different...). Will RMO in SQL2005 solve this and if so how?
Is there something I can do with the notifications services when rows are
inserted/updated/deleted?
I'm looking at SQL2000 (and will be moving to SQL2005) and using the .net
environment and looking for an event based solution - I am not interested in
polling tables and running arcane sp's.
tia
You could modify the merge replication triggers to write to an audit table,
or simple use new triggers which will write to an audit table.
Another option is to query msmerge_contents and msmerge_tombstone.
Hilary Cotter
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
"Nigel" <nige66_spam_free@.hotmail.com> wrote in message
news:ecYkuTrYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> What are the methods by which I can monitor replication/data row changes
> programmatically?
> I have looked at the Mergexlib but perhaps I've missed something but that
> *appears* to be for setting up and then monitoring (which is "ok" except
> how do I monitor previously configured subscribers? I cant see how I can
> set my mergeobj to an existing subscription as the DMO/MergeLib appear to
> be very different...). Will RMO in SQL2005 solve this and if so how?
> Is there something I can do with the notifications services when rows are
> inserted/updated/deleted?
> I'm looking at SQL2000 (and will be moving to SQL2005) and using the .net
> environment and looking for an event based solution - I am not interested
> in polling tables and running arcane sp's.
> tia
>
|||Thanks but I do not see how that meets the requirements as I *still*
have to poll tables (although they are now tables that I create rather than
using system tables in the case of msmerge_contents which is a no no).
I did look at triggers but the problem is *how* to get the trigger to fire
an event on an application outside of SQL. I know the CLR support in SQL2005
lets me use the SQLpipe to send data back upto the server, but how about
raising events on other applications?
(Note that I'm *not* interested in yuckky solutions with triggers writing
marker
files/event logs with .Net doing file or event log watching).
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:u6KR%23xRZFHA.1040@.TK2MSFTNGP10.phx.gbl...
> You could modify the merge replication triggers to write to an audit
> table, or simple use new triggers which will write to an audit table.
> Another option is to query msmerge_contents and msmerge_tombstone.
> --
> Hilary Cotter
> 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
> "Nigel" <nige66_spam_free@.hotmail.com> wrote in message
> news:ecYkuTrYFHA.3132@.TK2MSFTNGP09.phx.gbl...
>
|||Nigel -
SQLNS provides a couple of functionalities that may do what you're
seeking.
First the built-in SQL Server Event Provider periodically checks a
table to see if there have been any changes to the rows. (Yes, it's
technically polling but you don't have to worry with the interval,
etc, SQLNS handles it for you.) Using T-SQL you as the developer
determine how those changes are to be recognized. The second way
involves using some SQLNS provided procedures in a trigger for the
data table.
Either way, events are raised in the SQLNS application and subscribers
can be notified via the built-in SMTP protocol or a custom protocol
that you develop (i.e. a protocol that would communicate some
application).
HTH...
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg...l/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)
On Tue, 31 May 2005 16:42:34 +0100, "Nigel"
<nige66_spam_free@.hotmail.com> wrote:

>Thanks but I do not see how that meets the requirements as I *still*
>have to poll tables (although they are now tables that I create rather than
>using system tables in the case of msmerge_contents which is a no no).
>I did look at triggers but the problem is *how* to get the trigger to fire
>an event on an application outside of SQL. I know the CLR support in SQL2005
>lets me use the SQLpipe to send data back upto the server, but how about
>raising events on other applications?
>(Note that I'm *not* interested in yuckky solutions with triggers writing
>marker
>files/event logs with .Net doing file or event log watching).
>
>"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
>news:u6KR%23xRZFHA.1040@.TK2MSFTNGP10.phx.gbl...
>
|||Thanks Joe, I'm looking at your proposed method at the moment.
(In further digging I have come across custom resolvers using the
replrec.dll but seem to have hit a wall on that because theres so little
information about it, especially to develop for it in a .Net way. If anyone
has any experience good or bad......)
"Joe Webb" <joew@.webbtechsolutions.com> wrote in message
news:7suaa15nj9qa8bpgu4ooeok9riei1530r7@.4ax.com...
> Nigel -
> SQLNS provides a couple of functionalities that may do what you're
> seeking.
> First the built-in SQL Server Event Provider periodically checks a
> table to see if there have been any changes to the rows. (Yes, it's
> technically polling but you don't have to worry with the interval,
> etc, SQLNS handles it for you.) Using T-SQL you as the developer
> determine how those changes are to be recognized. The second way
> involves using some SQLNS provided procedures in a trigger for the
> data table.
> Either way, events are raised in the SQLNS application and subscribers
> can be notified via the built-in SMTP protocol or a custom protocol
> that you develop (i.e. a protocol that would communicate some
> application).
> HTH...
> --
> Joe Webb
> SQL Server MVP
>
> ~~~
> Get up to speed quickly with SQLNS
> http://www.amazon.com/exec/obidos/tg...l/-/0972688811
> I support PASS, the Professional Association for SQL Server.
> (www.sqlpass.org)
>
> On Tue, 31 May 2005 16:42:34 +0100, "Nigel"
> <nige66_spam_free@.hotmail.com> wrote:
>

Friday, March 9, 2012

Monitoring agent status

All -
I'm trying to setup a way to monitor the agent status for replication. I
tried using the built in "Alerts" and they are not working. I made sure that
they are enabled, but after enabling the Alerts, it does not show that the
event had ever happened when I check the history. I've made sure that the
alerts are enabled on the distributor and no where else.
So my next question would be is there a way programatically monitor agents?
I see the system view sys.dm_qn_subscriptions, but when I select * from it,
nothing is returned.
I am trying to monitor the failures and retries.
"Paul Ibison" wrote:

> Which event re you monitoring. I recall from another poster that we couldn't
> get the on success alert running as the event couldn't get raised to the
> windows log (couldn't change the message attributes, unlike in SQL 2000) ,
> but I am not aware of any others.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>
|||This should be ok. Are you using SQL 2000 or 2005? I'd l'll take a look later
on, but for now as a stop-gap you could use a notification on the job itself.
Cheers,
Paul
|||We are using 2005. I'll try and give the notification on the specific job a
try and see if that works.
"Paul Ibison" wrote:

> This should be ok. Are you using SQL 2000 or 2005? I'd l'll take a look later
> on, but for now as a stop-gap you could use a notification on the job itself.
> Cheers,
> Paul
>

Monitor transactional replication.

Hi,
I want via email to monitor transactional replication status such as still
running, have some problem during retry, or re-initialize, etc. instead of
login to Microsoft SQL Server Management Studio in SQL Server 2005 (SP1). I
think those information should get from msdb, does anyone done that before?
Regards,
Chen
Hi Paul,
Thanks a lot for reply.
Can you take about details how to do those alerts?
Regards,
Chen
"Paul Ibison" wrote:

> Shouldn't have to do anything unusual here - you can use the replication
> alerts for this:
> a.. Replication: agent success
> a.. Replication: agent failure
> a.. Replication: agent retry
> and have them send emails.
> HTH,
> Paul Ibison
>
>

Wednesday, March 7, 2012

Monitor show distribution agent that was removed.

While setting up transaction replication from 7 to 2000 I generate a push
subscription that failed to copy the initial schema over. I deleted the
subscription that had caused the problem and started another, that finished
okay and is replicating now. However in the Replication
Monitor-Publishers-servername-publicationname I have the failed agent from
the initial subscription and can not remove it. The same thing applies to
the Replication Monitor-Agents-Distribution Agents. It just won't go away.
SQL7 is the publisher and distributor as well as pushing a subscription to
the SQL2000 box.
Ant help would be appreciated.
Hi Charles,
From your descriptions, I understood that you would like to delete failed
agent but failed to do so. Have I understood you? If there is anything I
misunderstood, please feel free to let me know
Based on my knowledge, when you try to delete them, what's the error
message that shows you are denied to do so? More detailed information will
get us closer to the resolutions.
Secondly, I would like to strongly recommand you the following document,
which show you how to remove a replication manually
How to manually remove a replication in SQL Server 2000
http://support.microsoft.com/?id=324401
Hope this helps, if you have any questions or concerns, don't hesitate to
let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Microsoft Online Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
|||Mingqing,
I can't delete the failed subscription because it does not appear in the
list when I look in the list of subscriptions, the only place that it
appears is in the Monitor. There no way to delete it as far as I know other
than from with in the Publication Properties-Subscriptions and it does not
appear there. The current work subscription is there.
Charlie
""Mingqing Cheng [MSFT]"" <v-mingqc@.online.microsoft.com> wrote in message
news:uLj4km2TEHA.2436@.cpmsftngxa10.phx.gbl...
> Hi Charles,
> From your descriptions, I understood that you would like to delete failed
> agent but failed to do so. Have I understood you? If there is anything I
> misunderstood, please feel free to let me know
> Based on my knowledge, when you try to delete them, what's the error
> message that shows you are denied to do so? More detailed information will
> get us closer to the resolutions.
> Secondly, I would like to strongly recommand you the following document,
> which show you how to remove a replication manually
> How to manually remove a replication in SQL Server 2000
> http://support.microsoft.com/?id=324401
> Hope this helps, if you have any questions or concerns, don't hesitate to
> let me know. We are here to be of assistance!
> Sincerely yours,
> Mingqing Cheng
> Microsoft Online Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
>
>
|||Hi Charlie,
Thanks for your prompt updates!
Based on my knowledge, the list of Agents being displayed in Replication
Monitor are stored in the Tempdb database in the MSreplication_agent_status
table. You could removing a "left over" agent from this table will delete
it from Replication Monitor listing. You can delete any Agent from this
table without causing problems to Replication.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Microsoft Developer Community Support
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
|||Mingqing,
Thanks for your reply. But it looks like it cleared it's self up over the
weekend.
Charles Deaton
""Mingqing Cheng [MSFT]"" <v-mingqc@.online.microsoft.com> wrote in message
news:W%2345a5fUEHA.432@.cpmsftngxa10.phx.gbl...
> Hi Charlie,
> Thanks for your prompt updates!
> Based on my knowledge, the list of Agents being displayed in Replication
> Monitor are stored in the Tempdb database in the
MSreplication_agent_status
> table. You could removing a "left over" agent from this table will delete
> it from Replication Monitor listing. You can delete any Agent from this
> table without causing problems to Replication.
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Microsoft Developer Community Support
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
>

Monitor Replication with vb code

I have to write a little vb6 app to monitor sql 2000 replication. The app must run on the same desktop as the subscriber.

I've tried the samples that comes with sql (replsampl) but that is to do the replication, I need to just monitor replication that was set up in sql 2000.

With monitor I mean to show a red light when replication is busy, so that the user doesn't disconnect from the network while replication is in progress.

Any ideas?Are there at least some sql 2000 command line statements that I can use to do this?

monitor replication

Hi,
How do I automate the successful / error working of
replication - both transactional as well as merge. Is
there any system tables based on which i can do a join?
Appreciate if someone can provide a query...
regards.
bharathIf you want to monitor replication you need to query information from the
table
sysjobs and sysjobhistory table in MSDB database.
In sysjobs the name of the job would be like this
<Remote Server Name>-<Publication name>-<Publication database>-<Local sql
server name>-<Database name>- 0
For this particular job name find the job_id and using it query the table
sysjobhistory. Watch for the columns step_name and message.
Regards,
Jagan Mohan
MCP
"bharath" <barathsing@.hotmail.com> wrote in message
news:051401c3b7e0$b3f08eb0$a401280a@.phx.gbl...
> Hi,
> How do I automate the successful / error working of
> replication - both transactional as well as merge. Is
> there any system tables based on which i can do a join?
> Appreciate if someone can provide a query...
> regards.
> bharath
>
>|||One method I have always been using and have found to be very effective and
simple is to create an end-to-end trace myself and then monitor the trace
for the end-to-end transactional replication deplay.
To create such a trace, I include a dummy table in every publication. The
dummy table has a datetime column and I schedule a job to update the dummy
table at a regular interval. Then, when the change in the dummy table has
reached the subscriber via replication, I compare the the time the datetime
is updated at the publisher and the time the same row is updated at the
subscriber. The time difference gives me the end-to-end replication deplay.
I can then send alerts if the deplay is longer than a certain threshold.
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"bharath" <barathsing@.hotmail.com> wrote in message
news:051401c3b7e0$b3f08eb0$a401280a@.phx.gbl...
> Hi,
> How do I automate the successful / error working of
> replication - both transactional as well as merge. Is
> there any system tables based on which i can do a join?
> Appreciate if someone can provide a query...
> regards.
> bharath
>
>

Saturday, February 25, 2012

monitor data change of merge replication

Nathan,
you can take advantage of the history table:
select publisher_insertcount, publisher_updatecount,
publisher_deletecount,
subscriber_insertcount, subscriber_updatecount,
subscriber_deletecount from
dbo.MSmerge_history
Also, you can use performance monitor for a less granular
approach:
SQL Server:Replication Merge - Downloaded Changes
SQL Server:Replication Merge - Uploaded Changes
SQL Server:Replication Merge - Conflicts
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Thanks Paul.
Is it possible that I can trace which record and what data is changed?
Thanks
Nathan
"Paul Ibison" wrote:

> Nathan,
> you can take advantage of the history table:
> select publisher_insertcount, publisher_updatecount,
> publisher_deletecount,
> subscriber_insertcount, subscriber_updatecount,
> subscriber_deletecount from
> dbo.MSmerge_history
> Also, you can use performance monitor for a less granular
> approach:
> SQL Server:Replication Merge - Downloaded Changes
> SQL Server:Replication Merge - Uploaded Changes
> SQL Server:Replication Merge - Conflicts
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Not really. On a particular computer you could look at
the MSmerge_contents and MSmerge_tombstone tables and map
back the GUIDS. But to sit on a particular computer and
to determine if a row has been updated/inserted from the
last merge synchronization process is not possible,
AFAIK. I suppose if you really wanted this functionality,
you could use triggers to make your own audit table.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)