ODBC drivers in Polybase: Object reference error occurring when creating external table

  • 14 August 2023
  • 0 replies

Userlevel 2

Error: “Object reference not set to an instance of an object.” 

Cause will depend on situation, check driver any polybase logs. 

Some possible causes include: 

  • A User DSN was specified within the CONNECTION_OPTIONS of the external data source you tried to use for an external table, instead of a System DSN. The Network Service user that runs the Polybase services will not have visibility of the User DSNs defined by your standard Windows user. System DSNs, on the other hand, are visible to all users on the machine. 

  • If you installed CU19 of SQL Server 2019 or CU2 of SQL Server 2022, then you may be affected by a Polybase bug where it is not able to detect the Driver value from the provided DSN alone. This also applies to subsequent cumulative updates for these SQL Server versions.  

Fixes include: 

  • Updating SQL server version to the latest version 

  • Reconfirm connection string is correct. 

  • Provide a corresponding value for Driver in your CONNECTION_OPTIONS alongside the DSN when creating the external data source. (ex: CONNECTION_OPTIONS = 'DSN=CData XYZ Sys;Driver={CData ODBC Driver for XYZ}') 


This topic has been closed for comments