title: Executing remote procedure with user-defined table type variable parameter
body: <p>I'm trying to call a remote stored procedure over a linked server. The problem is, one of the required parameters is a user-defined table types.</p>
  <p>I can't seem to figure out how to declare a local variable as a user-defined table type from a remote server.</p>
  <p>This is what I'm trying so far, but it doesn't work:</p>
  <pre><code>DECLARE @tblVar [REMOTESERVER].REMOTEDB.dbo.user_defined_table_type
  
  EXEC [REMOTESERVER].REMOTEDB.dbo.procedure_name (@param1 = @tblVar)
  </code></pre>
  <p>However the error I'm getting is:</p>
  <blockquote>
  <p>The type name 'REMOTESERVER.REMOTEDB.dbo' contains more than the maximum number of prefixes. The maximum is 1.</p>
  <p>Must declare the scalar variable &quot;@tblVar&quot;</p>
  </blockquote>