sql - Transactional replication using articles filters and delete operations -


i have problem transactional replication when use articles filters , delete operation. when insert new data publisher data meet specified filter inserted subscriber - works fine. when delete data publisher not data meet specified filter deleted subscriber , don't know why.

i have 3 servers: – publisher (microsoft sql server 2012), b – distributor (microsoft sql server 2012), c – subscriber (microsoft sql server 2012).

there 6 tables in publisher database. each table has primary key , of them have foreign key shown in attached picture:

database diagram

only first manufacturer (manufacturer id=1) data want replicate publisher subscriber, use these filters:

select <published_columns> [dbo].[manufacturer] [dbo].[manufacturer].id in (select m.id [dbo].[manufacturer] m m.id = 1)  select <published_columns> [dbo].[catalog] [dbo].[catalog].id in (select c.id [dbo].[catalog] c inner join [dbo].[manufacturer] m on m.id = c.mid m.id = 1)  select <published_columns> [dbo].[cars] id in (select ca.id [dbo].[cars] ca inner join [dbo].[catalog] c on c.id = ca.cid inner join [dbo].[manufacturer] m on m.id = c.mid m.id = 1)  select <published_columns> [dbo].[carparts] id in (select cp.id [dbo].[carparts] cp inner join [dbo].[cars] ca on ca.id = cp.carid inner join [dbo].[catalog] c on c.id = ca.cid inner join [dbo].[manufacturer] m on m.id = c.mid m.id = 1)  select <published_columns> [dbo].[parts] id in (select p.id [dbo].[parts] p inner join [dbo].[carparts] cp on cp.pid = p.id inner join [dbo].[cars] ca on ca.id = cp.carid inner join [dbo].[catalog] c on c.id = ca.cid inner join [dbo].[manufacturer] m on m.id = c.mid m.id = 1)  select <published_columns> [dbo].[partdetails] id in (select pd.id [dbo].[partdetails] pd inner join [dbo].[parts] p on p.id = pd.partid inner join [dbo].[carparts] cp on cp.pid = p.id inner join [dbo].[cars] ca on ca.id = cp.carid inner join [dbo].[catalog] c on c.id = ca.cid inner join [dbo].[manufacturer] m on m.id = c.mid m.id = 1) 

when insert new data publisher carparts table, parts table or partdetails table data meet specified filter (manufacturer id=1) inserted subscriber.

when delete data publisher carparts table, parts table or partdetails table not data meet specified filter (manufacturer id=1) deleted subscriber - deletes data carparts table, not parts table , partdetails table.

the same filter used insert , delete operations. problem? maybe microsoft sql server 2012 bug?

the problem delete operations sequence.

problem solved.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -