0

Environment

  • SQL Server 2022
  • Microsoft OLE DB Driver 19 for SQL Server

Connection string:

1

When I run the SSIS package from SQL Jobs I get below error even if in connection string I have Use Encryption for Data=Optional.

Note when I run from Visual Studio everything is ok.

Error

Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.

Source: "Microsoft OLE DB Driver 19 for SQL Server"
Hresult: 0x80004005
Description: "Client unable to establish connection. For solutions related to encryption errors, see https://go.microsoft.com/fwlink/?linkid=2227882.". An OLE DB record is available.

Source: "Microsoft OLE DB Driver 19 for SQL Server"
Hresult: 0x80004005
Description: "SSL Provider: The certificate chain was issued by an authority that is not trusted. ".

3
  • 2
    You need to use TrustServerCertificate (without any spaces) in your connection string - not "Trust Server Certificate" (with spaces) ...
    – marc_s
    Commented Apr 24 at 16:33
  • As per the question guide, please do not post images of code, data, error messages, etc. - copy or type the text into the question. Please reserve the use of images for diagrams or demonstrating rendering bugs, things that are impossible to describe accurately via text.
    – Dale K
    Commented Apr 24 at 20:48
  • You can check this link. Maybe this will work: change connection string "Encrypt=true" and "TrustServerCertificate=false"
    – mbielsa
    Commented Apr 26 at 8:49

1 Answer 1

0

Have you tried "TrustServerCertificate=True" in the connection string?

1
  • I tried "TrustServerCertificate=True" still doesn't work. Do you have another idea?
    – dana
    Commented Apr 25 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.