Reputation: 119
I'm using since SQL Server 2012 that support CLR Assembly trigger (coded with C#).
But I'm now finding possibility to move Azure SQL but it says CLR Assembly is not supported.
Is it sure that Azure SQL doesn't support CLR Assembly and no way to do it?
Msg 10341, Level 16, State 100, Line 5
Assembly 'MyProject.SQLCLR' cannot be loaded because Azure SQL Database does not support user-defined assemblies. Contact Azure Technical Support if you have questions.
I also found this article but unclear for me.
Does or does not SQL Azure support CLR assemblies?
Upvotes: 1
Views: 2850
Reputation: 74605
The fine manual indicates that an sql like:
CREATE ASSEMBLY SomeName
FROM 0x...
WITH PERMISSION_SET = SAFE;
will work; all you have to do is turn your dll into a string of hexadecimal number pairs representing the bytes and put them in where the ... are. The example is at the very bottom of the MSDN doc. It would be important to note though that that doc explicitly states its advice is applicable to Azure SQL Managed Instance which is a relatively recent provision; ensure that is what you have deployed. See this blog for a more in depth discussion
Upvotes: 2