November 26, 2017 at 11:45 pm
I have a very well established merge replication structure of 7 subscribers around a single publisher with many replicated tables. This has been working fine for many years across different SQL Server versions as we upgrade. One table in particular has its Primary Key named alphabetically later than other indexes in the same table and in SQL Server 2016 when that table is liked to Microsoft Access the wrong index is chosen by Access as the Primary Key.
On my DEV non-replicated database if I re-name the Primary Key so that alphabetically it comes first in the list of indexes on the table then it links to Access correctly. This is a simple re-name of the PK with no change to its structure.
My question is does anyone know if i can simply re-name this Primary Key in my replicated databases without crashing replication ?
awelling@paspaley.com.au
November 27, 2017 at 10:52 am
Replication shouldn't need to know the PK name unless there are query hints or you are sending DDL changes through. I haven't tested, but it should work fine. Obviously have a script to rename back if you have issues.
November 27, 2017 at 10:58 am
Alan Welling - Sunday, November 26, 2017 11:45 PMI have a very well established merge replication structure of 7 subscribers around a single publisher with many replicated tables. This has been working fine for many years across different SQL Server versions as we upgrade. One table in particular has its Primary Key named alphabetically later than other indexes in the same table and in SQL Server 2016 when that table is liked to Microsoft Access the wrong index is chosen by Access as the Primary Key.On my DEV non-replicated database if I re-name the Primary Key so that alphabetically it comes first in the list of indexes on the table then it links to Access correctly. This is a simple re-name of the PK with no change to its structure.
My question is does anyone know if i can simply re-name this Primary Key in my replicated databases without crashing replication ?
awelling@paspaley.com.au
As long as you aren't changing the column and only renaming the PK constraint itself, it should be okay. Replication doesn't really care about the name of the PK.
Sue
November 27, 2017 at 2:55 pm
Thanks for the responses guys. I took a deep breath and re-named the PK on the table on the publisher and the next replication set went fine with no schema changes. I then re-named the PK on all the subscribers and all is now fine with replication doing its normal thing. Hope this helps if anyone else has the same problem.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply