Find where Database uses CLR

  • Is it possible to identify all the uses of CLR on a server, if so how ?

  • This is pretty vague but if you want to know all of the CLR objects on your server you can use this query:EXEC sp_MSforeachdb 'USE [?]; SELECT DB_NAME(), * FROM sys.assemblies WHERE is_user_defined = 1 ORDER BY name;'

  • This isn't returning a CLR data type that I know is in the database. Is this query accurate, I want to find all uses of CLR in the database.

  • these two queries seem to return all the objects and all the assemblies:

    EXEC sp_MSforeachdb 'SELECT ''?'' As DBName,

    * FROM [?].sys.objects

    WHERE type_desc

    LIKE ''CLR%'' OR type_desc = ''AGGREGATE_FUNCTION''

    ORDER BY name;'

    EXEC sp_MSforeachdb 'SELECT ''?'' As DBName,

    * FROM [?].sys.assemblies

    WHERE is_user_defined = 1

    ORDER BY name;'

    is that what you where after?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply