-3

How to ignore SSL error (0x80072F7D) in SQL WinHttp.WinHttpRequest HTTPS request?

EXEC @hr = sp_OASetProperty @win, 'Option' , '&H3300','4'
EXEC @hr = sp_OASetProperty @win, 'Option' , 13056,4

Still the same error 0x80072F7D

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • 3
    If you stop using sp_OA* (OLE Automation) methods you can ignore it. Those methods lead to resource leaks and server instability, so the sooner you can stop using them the better. Consider instead doing your HTTPS operations from external processes, such as PowerShell or Python scripts, etc., that query/update the database with the information exchanges you need. – AlwaysLearning Mar 03 '23 at 10:49
  • 1
    Also, if you need help, you should post the whole thing, not just a snippet. What obj, method etc are you calling – siggemannen Mar 03 '23 at 10:57
  • I concur, using `sp_OA` is fraught with difficulty, and requires a lot of boiler-plate error handling to do correctly. Do not use T-SQL as a generalized scripting language, it isn't one. Use Powershell, C# or Python etc. – Charlieface Mar 03 '23 at 13:09

1 Answers1

0

The solution is to declare a proper SSL protocol. 2048 is TLS 1.2.

EXEC @hr=sp_OASetProperty @win, 'Option', 2048, 9

...and/or install Microsoft SQL Server TLS 1.2 update KB3135244.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77