MS SQL Server check existence of registered Assembly

In a database I generally use a XML based version of a split function. Later on with some research I created a Assembly CLR version of the split function.

In a database update process (patch) I remove all user functions, patch the database and then create the user functions again. Due the patch process it will restore the XML version of the split function again.

  • FIRST aggregate function which I can use with HAVING clause
  • How to store and search for an IP Address
  • Violation of Primary Key Constraint Query
  • Connecting PHP to MS SQL Server
  • ADO Parameter Error in VBScript
  • Update column from inner join
  • I checked MSDN so far, but I wasn’t able to find any hint for:
    How can I check if a DLL is registered as an assembly inside the database?

    In Management Studio I can open the database -> Program ability -> Assembly and can see the DLL, if it is registered. But I want to do this programmatically and use the CLR version on CREATE FUNCTION if the DLL is available, else I want to use the XML version to make sure that the split function is available in any case.

    Anyone know if this is possible?

  • SQL SMO DLL References v12 / v11 could not load
  • SQL Server can't find my function in my DLL / Assembly
  • Getting error on executing CLR procedure in sql server
  • Is it possible to create an asymmetric key for a .NET framework assembly in SQL Server 2014?
  • Could not load file or assembly microsoft.sqlserver.sqlclrprovider
  • SQLCLR custom aggregate with multiple sql_variant parameters
  • One Solution collect form web for “MS SQL Server check existence of registered Assembly”

    Try this. There are more sys.%assembly% views, check them out, too.

    from sys.assembly_files f
    full outer join  sys.assemblies a
        on f.assembly_id=a.assembly_id
    full outer join  sys.assembly_modules m
        on a.assembly_id=m.assembly_id
    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.