Quantcast
Viewing latest article 10
Browse Latest Browse All 4054

Computed Column at publisher end not replicating at subscriber end

Hi I do have Publisher Tableand Subscriber Table, both has same schema, Difference is publisher table has one computed column which return varchar Like Sample Below:

CREATEFUNCTION[cimfn_FormPartition](@pKeyVal BIGINT) RETURNS VARCHAR(100)WITH SCHEMABINDINGASBEGIN[LOGIC]RETURN@OutputEND GO**Publisher End:**createtable table1([pKey][bigint]IDENTITY(1,1)NOTNULL,[cKey]AS dbo.cimfn_FormPartition(pKey) PERSISTED,[id][varchar](20)NULL,[refId][varchar](20)NULL,constraint[pKey]PRIMARYKEYNONCLUSTERED( pKey ASC))ALTERTABLE[table1]ADDCONSTRAINT[CI_Items]UNIQUECLUSTERED([cKey])ON[PRIMARY]**Subscriber End:**createtable table1([pKey][bigint]NOTNULL,[cKey][varchar](100)NULL,[id][varchar](20)NULL,[refId][varchar](20)NULL,constraint[pKey]PRIMARYKEYNONCLUSTERED( pKey ASC))ALTERTABLE[table1]ADDCONSTRAINT[CI_Items]UNIQUECLUSTERED([cKey])ON[PRIMARY]

In the Article Properties of publisher tableAll things I have setto false ,andset ACTION IF NAME ISINUSE: Keep existing object unchangedWhen I insert data into publisher tablethenin subscriber tabel I am getting below output :**pKey cKey id	 refId1NULL  Item1	i1**
I Have addedd Article Proper and Even though subscription tableis  getting null value in cKey ,andall other column has correct value.
I have checkreplication monitor as well , No error is showing there.
I more drilled down with the store procedure**(sp_browsereplcmds)**and found out the insert command does not have computed column value with this. So now again question is why Distributor isnot picking computed columnfrom publisher?


Viewing latest article 10
Browse Latest Browse All 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>