I’m trying to create an assembly but my remote sql server cannot access my .dll file.
create assembly BarcodeSql
from 'X:\test.dll'
WITH PERMISSION_SET = SAFE
I don’t know how to put test.dll on my sql server, but I know I can send a serialized dll instead of the path to the dll. How can I serialize the dll? I can’t seem to figure it out.
That’s because it is looking for
X:\on the server where the SQL instance is running, not from where the SQL is being run from.You can specify a network path in CREATE ASSEMBLY:
Or, you really could serialize it. Using PowerShell:
Which will print out some large hex value. You can then use a VARBINARY literal when creating the assembly:
Where 0x123456789 is the output of the powershell script.