question

YashwantVishwakarma-9317 avatar image
0 Votes"
YashwantVishwakarma-9317 asked ErlandSommarskog answered

Error: 10314, Severity: 16, State: 11 while someone trying to execute report from application end

Hi Folks,

I am getting below error when someone trying to execute report from application end
Error: 10314, Severity: 16, State: 11

Message
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65541. 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 'updatexmlproperties, 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 checked below things:

  1. Trustworthy is on for respective database

  2. CLR is enabled

  3. Assembly for that database has unrestricted

  4. database has sa permissions

Can anyone suggest what I can do more to resolve this issue.
and above things are mentioned as solution but still I am getting this error, not able to fix issue

sql-server-general
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Error 10314 comes from the database engine, indeed.
What's is that a CLR assembly for and what it is doing?

0 Votes 0 ·

Hi Olaf,

I am not sure about what it is doing what is that for,
may be application team can tell us,
is there any way to check these question inside SQL machine
I can see below two assemblies in old prods for specific DB which is still running fine but on newly created SQL Server it is complaining 10314

[XYZ_Element_UpdateXMLProperties]
[Microsoft.SqlServer.Types]

0 Votes 0 ·
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft commented

Hi @YashwantVishwakarma-9317,

Please change the respective database owner to ‘sa’

 USE [DatabaseName]
 GO
     
 EXEC sp_changedbowner 'sa'
 GO

Quote from this MS document.


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Cathyji

It is already sa

0 Votes 0 ·
Cathyji-msft avatar image Cathyji-msft YashwantVishwakarma-9317 ·

Hi @YashwantVishwakarma-9317,

Did the respective database is restored from another server? Did you read the MS document that I offered?

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

I hope that you are aware of that setting a database owned by sa as TRUSTWORTHY can be a security risk. A user in that database with sufficient permissions can exploit that to become sysadmin.

Which is the permission set for this assembly?

What is the output of "SELECT @@version"?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.