0

I've installed SQL Server Developer Edition on Linux Docker

When running this

DECLARE @win int
DECLARE @hr  int
EXEC @hr=sys.sp_OACreate 'WinHttp.WinHttpRequest.5.1',@win OUT

I get error:

Msg 17750, Level 16, State 0, Procedure sys.sp_OACreate, Line 1 Could not load the DLL odsole70.dll, or one of the DLLs it references. Reason: 2(The system cannot find the file specified.).

Googling didn't help either

Elnur
  • 111
  • 1
  • 8
  • 3
    This is a stab in the dark, but that object is called `WinHttp`; as in "Windows HTTP". Linux and Windows are different operating systems. I doubt that DLL exists on Linux, as it's a Windows utility. – Thom A Aug 03 '18 at 12:48
  • 2
    To add on to the comment by @Larnu, OLE automation (COM) is a Windows technology that's not available on Lunux. – Dan Guzman Aug 03 '18 at 12:51
  • @DanGuzman Is there any workaround? – Elnur Aug 04 '18 at 07:43
  • @Elnur, unfortunately, no workaround that I know of. A better method would be SQLCLR but SQL Server on Linux doesn't allow `EXTERNAL_ACCESS` or `UNSAFE` assemblies. Refactoring to move HTTP access from T-SQL to the app layer would be the best long-term solution. IMHO, this sort of task is better done in app code rather than the database to avoid tight coupling and external dependencies. – Dan Guzman Aug 04 '18 at 10:25

0 Answers0