2

I'm trying to create an External Data Source for PolyBase via ODBC connectors in SQL Server 2019, but I'm getting the error:

OLE DB provider "MSOLEDBSQL" for linked server "(null)" returned message "Cannot generate SSPI context".

Msg -2146893042, Level 16, State 1, Line 11

SQL Server Network Interfaces: No credentials are available in the security package

I am using SSMS 18.4 and I'm running the following command:

CREATE EXTERNAL DATA SOURCE TEST
WITH (
LOCATION = 'odbc://sap.company.com',
CONNECTION_OPTIONS = 'DSN=SAP',
CREDENTIAL = my_creds
);

I did a fair amount of reading and it seems like the error can be 1 of many things. But I can't really find anything where it relates to External Data Sources.

Any advice or guesses will be appreciated.

  • I'm running SQL 2019 Developer (RTM) 64 bit on Windows 10
  • I have an ODBC entry called SAP that connects succesfully
  • my_creds has been created in SQL with SAP user name and password.
  • My SQL 2019 PolyBase Engine service is running under Network Service (same with the PolyBase Data Movement service).
  • TCP/IP has been enabled on the PolyBase service.
Community
  • 1
  • 1
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
  • you need to define the odbc driver: CONNECTION_OPTIONS = 'DRIVER={ SAP driver name goes here};DSN=....' – lptr Feb 05 '20 at 14:28
  • Thanks. The vendor (CDATA) does not have the driver part in their documentation, but I have tried it based on your recommendation. But still get the same error. I've changed it to: CONNECTION_OPTIONS = 'DRIVER=CData ODBC Driver for SAP ERP;DSN=IDES', – Cameron Castillo Feb 05 '20 at 14:44
  • how did you create the DSN? if you run odbcad32.exe and check the dsn, you'll find the driver name there. The curly brackets {} are needed too: DRIVER={CData ODBC Driver.....} – lptr Feb 05 '20 at 15:07
  • Thanks. When creating the CData ODBC entry (from odbcad32) they have a UI interface for all the settings. I have added the curly's. Sadly same thing happening. – Cameron Castillo Feb 05 '20 at 15:32
  • You'll need to go through the provider docs or contact their support. They seem to have a gateway service which presents a remote odbc source as if it were "SQL Server" / TDS remoting service . If you use the gateway service, then you could try to polybase to a sql server LOCATION = 'sqlserver://remotingservicemachine:port', instead of odbc. – lptr Feb 05 '20 at 15:58

0 Answers0