USE Snow
GO
select * from sys.configurations where name='clr enabled';
GO
sp_configure 'show advanced options',1
GO
RECONFIGURE
GO
sp_configure 'clr enabled',1
GO
RECONFIGURE
GO
alter database Snow set trustworthy on
exec sp_changedbowner 'sa'
/****** Object: SqlAssembly [CLR] Script Date: 2023/7/26 14:32:35 ******/
CREATE ASSEMBLY [CLR]
FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A240000000000000050450000648602006B77BF640000000000000000F00022200B0230000012000000040000000000000000000000200000000000800100000000200000000200000400000000000000060000000000000000600000000200000000000003006085000040000000000000400000000000000000100000000000002000000000000000000000100000000000000000000000000000000000000000400000900200000000000000000000000000000000000000000000000000002C3000001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000004800000000000000000000002E7465787400000064110000002000000012000000020000000000000000000000000000200000602E727372630000009002000000400000000400000014000000000000000000000000000040000040000000000000000000000000000000000000000000000000000000000000000000000000000000004800000002000500E8230000440C00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000133005008500000001000011000F00280700000A0C1202280800000A72010000700F01280700000A0C1202280800000A280900000A0A7E01000004066F0A00000A16FE010D092C25007E01000004060F00280700000A6A0F01280700000A6A166A730C0000066F0B00000A00007E01000004066F0C00000A6F0D0000060B1201280D00000A730E00000A13042B0011042A2202280F00000A002A2E731000000A80010000042A000013300200230000000200001102280F00000A00000314FE010A062C0B7205000070731100000A7A02037D020000042A3A00027B020000046F1200000A002A1E027B0F0000042A2202037D0F0000042A1E027B100000042A2202037D100000042A133001000C0000000300001100027B0D0000040A2B00062A260002037D0D0000042A000013300200910000000400001102166A7D0D00000402156A7D0E00000402730F00000A7D1100000402280F00000A0000031F1F6A300703166AFE042B01170A062C190072130000701F1F6A8C13000001281300000A731400000A7A041F1F6A300704166AFE042B01170B072C1900725F0000701F1F6A8C13000001281300000A731400000A7A0203280700000600020428090000060002057D0D0000042A0000001B300300DA0000000500001100027B110000040A160B061201281500000A0000026F0F0000060C08027B0E000004FE040D092C1E0072AB000070027B0E00000408598C13000001281300000A731600000A7A027B0E00000408FE01130411042C390002027B0D000004176A5820FF0F00006A5F7D0D000004027B0D000004166AFE01130511052C0F0002027B0E0000046F0E0000060C00002B0A0002166A7D0D0000040002087D0E0000040821C1038D142C010000591F16620228080000061F1162600228060000061F0C6260027B0D000004601306DE0B072C0706281700000A00DC11062A00000110000002000A00C2CC000B0000000013300200240000000600001100026F0F0000060A2B0900026F0F0000060A000603FE0216FE010B072DEC060C2B00082A133008002C0000000700001100120020B2070000171716161617281800000A281900000A06281A00000A0B1201281B00000A6A0C2B00082A133004001E0000000800001102280F00000A0000160A160B02066A076A166A730C0000067D130000042A0000133001000C0000000900001100027B130000040A2B00062A133001001500000003000011007E120000046F110000066F0D0000060A2B00062A2E731000000680120000042A00000042534A4201000100000000000C00000076342E302E33303331390000000005006C000000C4040000237E0000300500008C04000023537472696E677300000000BC090000F000000023555300AC0A0000100000002347554944000000BC0A00008801000023426C6F620000000000000002000001571FA2090900000000FA01330016000001000000180000000500000013000000130000000A000000010000001B0000000B0000000C00000009000000020000000400000007000000010000000100000002000000000096020100000000000600090290030600290290030600C50167030F00B003000006003604A70206000A0053000A00F40137030A006802BF030A000100BF0306007601A7020600C902A7020600AA0190030600930167030600D901670306008201A7020600AE02A70206000400A70206007402A70206001700A7020600E702A7020600FD02A70206005F03570206000503A70206002801A702000000001D00000000000100010001001000E803000015000100010001001000BF020000150002000400010010002803000015000300060001001000E70000001500120010003100E203F0002100D002F90056807B02FD005180FD03000151800A04000151801B04000151808800FD005180BF00FD0051808902FD0051803D04000151804B04000156805D04000101005B01FD0001001903FD000100F000FD0001000A01FD0021008302030131000F030601010065010A01482000000000960030000E010100D920000000008618520306000300E220000000009118580317010300F02000000000861852031B0103001F2100000000E6018B01060004002E210000000086086E002101040036210000000084087B00250104003F210000000086089D00210105004721000000008408AE0025010500502100000000860841012101060068210000000083084E0125010600742100000000861852032A010700142200000000C601DC0021010A000C2300000000C401D40331010A003C2300000000C401B70221010B007423000000008118520306000B00A023000000008100350136010B00B82300000000960826003B010B00D923000000009118580317010B0000000100940000000200CF0000000100E00200000100510200000100510200000100510200000100940000000200CF00101003005C01000001001A0303002900090052030100110052030600190052030A00390052030600610052030600710052031000490047021F008900720223009100280427000C00800436000C00E3003C000C009E024400990072022300410052034B002900520306000C0052030600A10052034B0059006F01060091002F045D00A90052034B00B10031036D00B90052034B00B100700474007900520387007900750493007900D802980081007A03A1000A000C00B80008001000C10008001400C10008001800C6000A001C00CB000A002000CB000A002400D4000A002500E70008002800C60008002C00DD0008003000E2002000230078012E000B0047012E00130050012E001B006F01C0002B007801E0002B00780100012B00780120012B007801E1012B007801E10133007D0101022B007801010233007D011600500054005800630079007F00A500AA00040001000500040000008B003F010000C2003F01000052013F0100002A00430102000600030001000700030002000800050001000900050002000A00070001000B0007000200120009002E000480000000000000000000000000000000003A000000040000000000000000000000AF004A0000000000040000000000000000000000AF003E0000000000000000000053716C496E7433320044696374696F6E617279603200496E743634003C4D6F64756C653E006765745F4E6577494400676574536E6F77494400434C520053797374656D2E44617461006D73636F726C69620053797374656D2E436F6C6C656374696F6E732E47656E65726963006765745F576F726B65724964007365745F576F726B65724964004D6178576F726B6572496400776F726B65724964006765745F4461746163656E7465724964007365745F4461746163656E7465724964004D61784461746163656E7465724964006461746163656E7465724964004E65787449640041646400536E6F7753656564003C576F726B657249643E6B5F5F4261636B696E674669656C64003C4461746163656E74657249643E6B5F5F4261636B696E674669656C64004461746554696D654B696E6400676574496E7374616E6365006765745F53657175656E6365007365745F53657175656E6365005F73657175656E636500736E6F77466C616B6500496E766F6B650049446973706F7361626C65004461746554696D6500446973706F736500446562756767657242726F777361626C65537461746500436F6D70696C657247656E6572617465644174747269627574650044656275676761626C6541747472696275746500446562756767657242726F777361626C654174747269627574650053716C46756E6374696F6E41747472696275746500436F6D70696C6174696F6E52656C61786174696F6E734174747269627574650052756E74696D65436F6D7061746962696C697479417474726962757465006765745F56616C75650076616C75650053797374656D2E546872656164696E670053716C537472696E6700546F537472696E6700547765706F6368005F6C6F636B0053657175656E63654D61736B00434C522E646C6C006765745F4974656D0053797374656D0054696D655370616E0054696D6547656E00446973706F7361626C65416374696F6E005F616374696F6E006F705F5375627472616374696F6E00417267756D656E744E756C6C457863657074696F6E00417267756D656E74457863657074696F6E0053696E676C65746F6E005F6C61737454696D657374616D70004964576F726B657200456E746572004D6963726F736F66742E53716C5365727665722E536572766572002E63746F72002E6363746F72004D6F6E69746F720053797374656D2E446961676E6F7374696373006765745F546F74616C4D696C6C697365636F6E64730053797374656D2E52756E74696D652E436F6D70696C6572536572766963657300446562756767696E674D6F6465730053797374656D2E446174612E53716C
没有合适的资源?快使用搜索试试~ 我知道了~
sqlserver snowflake 函数
共3个文件
cs:2个
sql:1个
需积分: 5 0 下载量 194 浏览量
2023-07-26
15:53:44
上传
评论
收藏 8KB 7Z 举报
温馨提示
使用c# 编写的 sqlserver udf 雪花函数 编译环境为 .net framework 4.5 目标数据库为 sqlserver2012 实际可以在 sqlserver2012-2019 上发布使用 注: 1. 需要开启多个实例权限 2. 需要开启单数据库信任 3. 该程序集安全性为UNSAFE(由于雪花机制必须增加lock关键字所以整体安全性降级为不安全, 并不是内部有花里胡哨的web操作所以需要UNSAFE) 4. 建议该函数仅在需要批量向数据库录入数据时使用, 并不建议以主键默认值配置 5. 对应算法也有 C# 可以直接在应用代码层调用 对应算法
资源推荐
资源详情
资源评论
收起资源包目录
sqlserverclr雪花函数.7z (3个子文件)
sqlserver雪花函数.sql 52KB
ClassFiles.cs 4KB
getSnowID.cs 756B
共 3 条
- 1
资源评论
研小艾
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功