sqlserver 中调用 DLL
1. 开启数据允许clr
EXEC sp_configure 'clr enabled' , '1'; --0代表不允许,1代表运行 RECONFIGURE;
2,创建clr
CREATE ASSEMBLY HashCodeDLL FROM 'D:\solf\Dll\UrlCode.dll'
3.创建函数
create FUNCTION [dbo].[HashCode](@InputString [nvarchar](50)) RETURNS [bigint] WITH EXECUTE AS CALLER AS EXTERNAL NAME [HashCodeDLL].[UrlCode.Utils].[Hash]