Permissions using a TYPE as a Table Valued Parameter
Where can I find information about the necessary permissions to use a TYPE as a parameter?


I've submitted a PR against the doc page to get the requirements documented.

https://github.com/MicrosoftDocs/sql-docs/pull/3351

Here's a simple repro:

create type dbo.tt as table(id int)

go

create procedure dbo.ptt @tt tt readonly
as
select * from @tt

go

create user joe without login



grant references on type::dbo.tt to joe
grant execute on dbo.ptt to joe

go

execute as user='joe'

  declare @t tt
  exec ptt @t 
  --The EXECUTE permission was denied on the object 'tt', database 'a', schema 'dbo'.

revert

go

grant execute on type::dbo.tt to joe

go

execute as user='joe'

  declare @t tt
  exec ptt @t 
  --no error

revert