Monday, March 26, 2012

merge agent running a job on a different server.

I have a database working with Merge replication, there could possibly be a
audit database associated with this replicated database. After talking about
it we decided it would be better to have each subscriber database have a copy
of both the replication database and the audit database without setting up
the audit database for replication.
I’m trying to accomplish the following tasks.
1)After merging the data from the subscriber to the publisher the merge
agent would kick off a job to run a BCP command moving the audit data to txt
file. The audit triggers will have the not for replication attribute to
prevent firing these triggers when data is merged.
2)Truncate the subscriber’s server audit data.
3)Do a bulk insert onto the publisher servers audit database.
How can I kick off a job on the subscriber’s server when the merge agent
resides on the publisher’s server? I would really like this to all work off
of one job; I don’t want to create a scheduled job to run on each subscriber
to move this data. Any suggestions?
I’m also trying not to replicate this database, this is a heavily
distributed app and I’m trying to limit the amount of potential issues.
Thank you in advance.
Pauly C
Pauly,
why not use snapshot replication for this - it would seem to do exactly what
you reauire, and synchronization could be initiated at the publisher
immediately after the merge synchronization.
If you really don't want to use replication, then I'd still control the
system from the publisher. Using linked servers you could truncate the audit
table and transfer the table on each subscriber.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thank you once again for you help, I will check out both options.
Thank you,
Pauly C
"Paul Ibison" wrote:

> Pauly,
> why not use snapshot replication for this - it would seem to do exactly what
> you reauire, and synchronization could be initiated at the publisher
> immediately after the merge synchronization.
> If you really don't want to use replication, then I'd still control the
> system from the publisher. Using linked servers you could truncate the audit
> table and transfer the table on each subscriber.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>

1 comment:

stealthbits said...

Hi all,

Database auditing involves observing a database so as to be aware of the actions of database users. The following general principles for developing an audit strategy, auditing suspicious database activity and auditing normal database activity can guide the auditor throughout the audit. Thanks a lot......

Public Folders

Post a Comment