question

MatthewLau-5543 avatar image
0 Votes"
MatthewLau-5543 asked Cathyji-msft commented

Out of memory error when creating External Table with Polybase

Hi there,

We recently upgraded SQL Server to 2019 CU11 and have been using Polybase to try connecting to DB2 using IBM DB2 ODBC driver, but we keep running into this error allocation failed, out of memory when we attempt to create an external table. We have 32GB of memory on the server with 50% of it being used most of the time, even while creating the external table the memory doesn't spike so we are at a lost as to why it's returning this error.

Much appreciate any help we can get on this error we are getting.

Here is the code used to create the data source.

 CREATE EXTERNAL DATA SOURCE DB2
 WITH
 (
 LOCATION = 'odbc://ipAddress:port',
 CONNECTION_OPTIONS = 'Database=dbname;Driver={driver name}; DSN=dsn-64bit',
 CREDENTIAL = usercred,
 PUSHDOWN = ON
 )
 ;
 GO

Here is the code to create the external table.

 CREATE EXTERNAL TABLE DB2_TABLE
 (
     [ROW_ID] [int] NOT NULL
 )
 WITH 
 (
 LOCATION = 'DB2_TABLE',
 DATA_SOURCE = DB2
 )
 ;

The error we are getting.

105082;Generic ODBC error: OdbcUtil.GetSupportedTableTypes, error in OdbcGetTables: SqlState: , NativeError: 111234, 'NativeOdbcUtil::CopyBoundStringColumn, allocation failed, out of memory | Error calling: CopyBoundStringColumn(odbcConnection, catalogNameBindingLength, catalogNameBinding.get(), &((*catalogNames)[*numObjects])) | Error calling: NativeOdbcUtil::GetTables(pConnection, catalogName, schemaName, tableName, tableType, searchPatternEscape, catalogNames, schemaNames, tableNames, tableTypes, numObjects) | state: FFFF, number: 103, active connections: 1', Connection String: Dsn={dsn-64bit};Driver={driver name};database=dbname;uid=user;server=ipAddress;port=port.






sql-server-generalsql-server-transact-sql
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MatthewLau-5543,

Did you check the SQL server error log or polybase log to find if any more useful related message? Polybase log location refer to Log file locations.

If you have further information, please share us the information for us.


0 Votes 0 ·

1 Answer

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

My gut feeling is that the best way to get this resolved is to open a support case. It could be a regression bug, in which case you should be funded of any charges you have to pay initially.

I think the issue is too specialised for there being chances for a good answer in this forum. For instance, I don't have DB2 or IBM drivers to play with, so I cannot try to repro the problem.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.