question

nikz2246 avatar image
0 Votes"
nikz2246 asked GerardoAlvarez-0833 commented

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536

We have moved our SQL Database to SQL Server on Azure VM.

I have already ran these

USE SSISDB
GO
EXEC sp_changedbowner 'sa'

Alter database SSISDB SET Trustworthy ON

I am trying to deploy the package and create a folder but I still gettign this error:

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. 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 'microsoft.sqlserver.integrationservices.server, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 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)
(Microsoft SQL Server, Error: 10314)

sql-server-integration-services
· 1
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.

I restored SSIS DB from one server to another and I was getting errors when was deploying SSIS packages.

https://sqlwithmanoj.com/2016/06/22/sql-error-the-server-may-be-running-out-of-resources-or-the-assembly-may-not-be-trusted-with-permission_set-external_access-or-unsafe/

https://blog.pythian.com/how-to-fix-ssis-deployment-error-please-create-a-master-key/

Luckily I had the password so fixed it using the below qurery.
open master key decryption by password = ‘P@ssword!’
Alter Master Key Add encryption by Service Master Key

0 Votes 0 ·
Gregory-Lienard avatar image
5 Votes"
Gregory-Lienard answered GerardoAlvarez-0833 commented

@nikz2246 I had the same problem. It's all about the order of execution:

  1. First make sure that the database is CLR enabled:

    USE [myDB]
    EXEC sp_configure 'clr enabled', 1
    RECONFIGURE

  2. Set it to thrusthworthy:

    ALTER DATABASE myDB SET TRUSTWORTHY ON;

  3. Change owner to SA:


    EXEC sp_changedbowner 'sa'


That should do it.




· 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.

The above worked for me. I can also confirm that the final change of database owner to sa was necessary. Thanks :)

0 Votes 0 ·

Yes I confirm, this solution is correct and worked over the database. Thank you

0 Votes 0 ·
nikz2246 avatar image
0 Votes"
nikz2246 answered Monalv-msft commented

I am not able to redeploy the package.I get this error

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. 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 'microsoft.sqlserver.integrationservices.server, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 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)

· 1
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.

nikz2246 avatar image
0 Votes"
nikz2246 answered Monalv-msft commented

@Monalv-msft My version of SQL server is 15.0.18338.0.

Yes we have SSIS installed and we run packages every week using SSIS. We were trying to create one of these package.

If I try to add any folderor new package under SSISDB, I get this error. I am not able to deploy the package.

Thanks !

· 3
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 @InderjeetKaur-3272,

Please set TargetServerVersion as SQL Server 2019 in SSIS project.

31244-targetserverversion.png

Best Regards,
Mona


0 Votes 0 ·

31246-image.png



Target server version is 2019 only.

0 Votes 0 ·
image.png (43.1 KiB)

Hi @InderjeetKaur-3272 ,

Please redeploy the ssis packages into SSISDB Catalog.

Best Regards,
Mona

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

Hi @InderjeetKaur-3272,

Could you please share the version of your SQL Server?

May I know if you Install Integration Services(SSIS)?

Best Regards,
Mona


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
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 @InderjeetKaur-3272,

May I know if you have anything to update?

Best Regards,
Mona

0 Votes 0 ·