kbhanu15 (8/25/2014)
Hi All,can you please provide the T-SQL script for the following request ?
Generate script for view dependencies of user defined table types ?
Quick solution, searches sys.parameters for the user type
😎
DECLARE @USER_TYPE_NAME NVARCHAR(128) = N'MyUserTypeName'
SELECT
OBJECT_NAME(SP.object_id) AS OBJECT_THAT_USES_MY_TYPE
FROM sys.parameters SP
INNER JOIN sys.types ST
ON SP.user_type_id = ST.user_type_id
WHERE ST.name = @USER_TYPE_NAME