SAP Knowledge Base Article - Preview

2935261 - Reverse error "Unable to list tables" when the database name has space chars - SAP PD


  • Error displayed when trying to reverse a SQL Server 2016 database using an ODBC data source:

Unable to list tables.
[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.

  • Database qualifier has at least one space character.
  • The ODBC TRACE reports:

"select\ d\ a,\ d\ a,\ d\ a case (o.type) when 'S' then 'SYSTEM TABLE' else 'TABLE' end,\ d\ a convert(varchar(8000), p.value)\ d\ afrom\ d\ a Test Database.sys.sysobjects o\ d\ a join Test Database.sys.schemas u on (u.schema_id = o.uid)\ d\ aleft outer join Test Database.sys.extended_properties p on (p.major_id = and p.minor_id = 0 and = 'MS_Description')\ d\ awhere\ d\ a o.type in ('U', 'S')\ d\ a\ d\ aorder by 1, 2\ 0"

DIAG [37000] [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'Database'. (102)

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."



  • SAP PowerDesigner (PD) 16.6
  • SAP PowerDesigner (PD) 16.7
  • Microsoft SQL Server


SAP PowerDesigner 16.6 ; SAP PowerDesigner 16.7


re, double, quotes, 821930, CR821930, CR#821930 , KBA , BC-SYB-PD , PowerDesigner , Bug Filed

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.