title: MS SQL Server check existence of registered Assembly
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>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.</p>
  
  <p>Anyone know if this is possible?</p>