title: Is it ok to load .net dlls into SQL Server as UNSAFE?
body: <p>When creating a SQL Server CLR stored procedure, I noticed that I couldn't reference anything in the .net framework as I would normally.  After some reading around, I realised that assemblies needed to be loaded into the database first.  </p>
  
  <p>Therefore, I loaded in the ones I need but due to P/Invoke had to use the UNSAFE permission set.  I can now reference them in my stored procedure code and everything works fine.</p>
  
  <p>However, I'm a little concerned about having to set them to UNSAFE when I don't really know what they are doing.  So my question is this:</p>
  
  <p>Is it ok to load the .net framework in as UNSAFE without exactly what it's doing?
  And how would doing so compromise security/robustness/scalability of sql server (as microsoft warn it could)?</p>
  
  <p>Many thanks.</p>