Avatar of skyjumperdude
skyjumperdude
 asked on

SQL DB index replication

Hi All,

We have a database on SQL server 2008 R2 which gets replicated to another database on different server. The replication is one way from Server A to server B. On Server A we delete an index, after 5 minutes it comes back.

What could it be that is cause this?

Thanks,
Microsoft SQL Server 2008Microsoft SQL Server

Avatar of undefined
Last Comment
Ryan McCauley

8/22/2022 - Mon
DcpKing

Sounds strange, but ... read here:

"Index changes are not propagated to Subscribers: if you drop a column at the Publisher and a dependent index is dropped, the index drop is not replicated. You should drop the index at the Subscriber before dropping the column at the Publisher, so that the column drop succeeds when it is replicated from the Publisher to the Subscriber. If synchronization fails because of an index at the Subscriber, manually drop the index and then rerun the Merge Agent."

You may have dropped an index (among other things) successfully at the publisher but it can't drop at the subscriber. Quite why it cames back on the publisher I don't know: are there any log events?

hth

Mike
ASKER CERTIFIED SOLUTION
Vitor Montalvão

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
EugeneZ

what type of replication do you have?
..you may need to drop index on all "partners" DBs
Ryan McCauley

Does this happen to a specific index, or to any index you drop on the source database? Can you use SQL Profiler to watch the instance and see when the index is recreated? You can filter the monitoring for just statements containing INDEX, so you'll get a timestamp when it happens - from there (and the details like workstation and login), you'll get some details about where it came from.

I'd suspect it's not related to replication at all, but that's a distraction - there's no reason I can think of why replication would alter the publishing database, and I'd look instead for a scheduled job of some kind that's recreating it.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23