An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issuesPossible solution:
sp_configure 'clr enabled', 1 GO RECONFIGURE GO ALTER DATABASE database_name SET TRUSTWORTHY ON USE database_name GO EXEC sp_changedbowner 'sa'