Sample Header Ad - 728x90

ODBC select * skips columns reading from sqlServer

0 votes
0 answers
48 views
I'm missing knowledge, I only know ORACLE. The Situation : Oracle 12.1 (linux) connects to SQL Server (Win) using dg4odbc and MS-SQLServer ODBC driver for linux. Reading from SQLServer via select * from schema.table@dblink works, basically. The Problem: Every column that has a **non-null entry in column "domain_catalog"** in INFORMATION_SCHEMA.columns is missing! e.g. select * from INFORMATION_SCHEMA.columns where table_name = 'X' yields all 242 Columns. While select * from X delivers only ~64 columns. There seems to be no scheme to this, there are bigint columns with domain_catalog and bigint w/o values in domain_catalog Now it could be the ORACLE ODBC interface, I know. So I experimented with Microsofts sqlcmd on linux, version 11 and version 18, with its respective ODBC driver, of course. And for example exec sp_columns BUV_BUCHUNGSVARIANTE yields two(!) rows only, while select * from BUV_BUCHUNGSVARIANTE displays all 10 columns. Just MS-tools + MS-ODBC involvend, no ORACLE. What I need to know: 1. Why are columns with domain_catalog not null missing from select * ? 2. What is the meaning of "domain_catalog" on a column level ? 3. Why would a developer design columns with and without domain_catalog entry? 4. **What privilege(s) does the connecting SQLServer account need to access all columns of a table**? tia peter
Asked by dipr (1 rep)
Apr 5, 2025, 07:57 PM