April 10, 2012 at 12:36 pm
We are using 2008 R2 and have transaction replication setup to run every 15 minutes. I've been told that in the subscriber database, some of the tables are being truncated and then re-populated from the publisher (haven't been able to verify this). We also have a process that runs and looks into one of these tables to see if there are valid phone numbers in it. If not, then it will mark the phone numbers as inactive.
The problem is when they both are running at the same time. All phone numbers are marked as inactive. I'm wondering if there is a way to query the system tables to see if replication is running. If so, then I can modify the second process to not mark everything invalid, but wait until replication is done and then continue on.
Thanks for any help.
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 10, 2012 at 1:14 pm
Are you running a push or pull subscription? If it's pull, you should be able to query the jobs to see if they are in running status.
April 10, 2012 at 1:32 pm
unfortunately it's a push subscription
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 11, 2012 at 2:44 pm
Mike01 (4/10/2012)
unfortunately it's a push subscription
Even if it is a push subscription, you still can query the job history on Distributor, like,
SELECT a.*
FROM msdb.dbo.sysjobhistory a
INNER JOIN msdb.dbo.sysjobs b ON a.job_id = b.job_id
INNER JOIN distribution.dbo.MSdistribution_agents c ON b.name = c.name
April 12, 2012 at 6:44 am
Thanks, I'll give it a try and let you know how it works out
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply