Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Transactional replication and user-defined data types and table types

$
0
0

I am new to SQL Server 2012 Transactional Replication. I set up a Publication and a Subscription and selected all tables, views, stored procedures, and user-defined functions. Both the Publisher and the Subscriber are running SQL Server 2012.

The Snapshot Agent worked fine, and the Log Reader is working fine. However, the Distribution Agent job is failing with an error saying "Cannot find data type udt_X", which is a user-defined table type.

I checked the Subscriber database and found that 16 of the 18 user-defined table types had been successfully replicated. What I am trying to understand is why there were two that were not. I have compared them with the ones that were and can find no difference that would seem to account for it.

Both of the missing table types are used by the same, single stored procedure. The error I am getting comes when the Distribution Agent attempts to replicate that stored proc. 

There is also one non-table user-defined data type that did not get replicated. That one I can understand, however, because it is not actually used anywhere.

Why are UDT's not listed in the articles in SSMS, or in sysschemaarticles, or in the script generated by SSMS? If they are not replication articles, why are any of the UDT's being replicated? I assume it is replicating objects that are dependencies for the articles, but if so why would it not replicate these two UDT's when there is a stored proc that definitely has a dependency on them?

Thanks,

Ron Rice

 

Ron Rice




Viewing all articles
Browse latest Browse all 4054

Trending Articles



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