Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server 2019 Express - don't can load the assembly #19

Closed
chri-p opened this issue Jan 16, 2022 · 7 comments
Closed

SQL Server 2019 Express - don't can load the assembly #19

chri-p opened this issue Jan 16, 2022 · 7 comments
Assignees

Comments

@chri-p
Copy link

chri-p commented Jan 16, 2022

When I call the statement ...where SQLNET::New('Regex.IsMatch(TTel, @"([^0-9\-\+ ()\.\/\[\]\|])")').ValueString('TTel', isnull(M.TTel, '')).EvalBit() = 1 I get the mistake

Msg 10314, Level 16, State 14, Line 6
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65543. The server may be running out of resources, or the assembly may not be trusted. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'z.expressions.sqlserver.eval, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)

I made the installation to the first on an SQL Server 2019 Express. I don't get this mistake by SQL Server 2019 Standard.

How can I correct the mistake?

Best regards

@JonathanMagnan JonathanMagnan self-assigned this Jan 17, 2022
@JonathanMagnan
Copy link
Member

Hello @chri-p ,

Thank you for reporting, we will look at it.

@JonathanMagnan
Copy link
Member

Hello @chri-p ,

Unfortunately, everything works for SQL Express 2019 on our side.

We currently have no idea how to reproduce it. If you have more info, we will be happy to look at it.

Is there something special about your environment?

Best Regards,

Jon

@chri-p
Copy link
Author

chri-p commented Jan 17, 2022 via email

@JonathanMagnan
Copy link
Member

Sure, let us know.

As far as we know, it works in all versions.

However, most cloud databases such as Azure SQL Database do not support SQL CLR. However, if you rent a server and have SQL Server installed, it should be supported

@JonathanMagnan
Copy link
Member

Hello again,

Since our last conversation, we haven't heard from you.

Let me know if you need further assistance.

Best regards,

Jon

@chri-p
Copy link
Author

chri-p commented Jan 25, 2022 via email

@JonathanMagnan
Copy link
Member

Awesome,

Yeah this line is in our install script

EXEC sp_configure 'clr enabled', 1

If you need more help, just let us know

Best Regards,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants