Created
February 28, 2013 20:36
-
-
Save jarek-przygodzki/5059897 to your computer and use it in GitHub Desktop.
Finding UDT Dependencies http://msdn.microsoft.com/en-us/library/ms345103.aspx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://msdn.microsoft.com/en-us/library/ms345103.aspx | |
SELECT o.name AS major_name, o.type_desc AS major_type_desc | |
, c.name AS minor_name, c.type_desc AS minor_type_desc | |
, at.assembly_class | |
FROM ( | |
SELECT object_id, name, user_type_id, 'SQL_COLUMN' AS type_desc | |
FROM sys.columns | |
UNION ALL | |
SELECT object_id, name, user_type_id, 'SQL_PROCEDURE_PARAMETER' | |
FROM sys.parameters | |
) AS c | |
JOIN sys.objects AS o | |
ON o.object_id = c.object_id | |
JOIN sys.assembly_types AS at | |
ON at.user_type_id = c.user_type_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment