Using table-valued parameters over linked servers
One of the biggest challenges that I had to solve is how to call stored procedures over linked servers using TVPs. In an earlier article I explained how we could offload traffic to secondary readable servers by using linked servers. However, when we deal with stored procedures using TVPs, things get a little bit more complicated. Table-valued parameters are not supported over linked servers. This is a constraint coming with SQL Server. To solve it, we need to recreate the…