select on oracle table via unixODBC only returns partial result

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

select on oracle table via unixODBC only returns partial result

Stefan.Immel
Hi

I have a hugh problem regarding connect via unixODBC to an oracle DB.
when I try to select all records from a rather large table I only get very few as a result.

"select * from schema.table "
returns

>SQLRowCount returns -1
>162 rows fetched

whereas

"select count(*) from schema.table "

returns
+-----------------------------------------+
| COUNT(*)                                |
+-----------------------------------------+
| 121116                                  |
+-----------------------------------------+
SQLRowCount returns -1
1 rows fetched


any idea what is causing this and how I can further debug it?


regards
Stefan Immel
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: select on oracle table via unixODBC only returns partial result

Nick Gorham-2
On 10/10/14 15:45, [hidden email] wrote:
Hi

I have a hugh problem regarding connect via unixODBC to an oracle DB.
when I try to select all records from a rather large table I only get very few as a result.

"select * from schema.table "
returns

>SQLRowCount returns -1
>162 rows fetched

whereas

"select count(*) from schema.table "

returns
+-----------------------------------------+
| COUNT(*)                                |
+-----------------------------------------+
| 121116                                  |
+-----------------------------------------+
SQLRowCount returns -1
1 rows fetched


any idea what is causing this and how I can further debug it?

Well, you can turn on odbc tracing in odbcinst.ini

[ODBC]
Trace=Yes
TraceFile=/tmp/sql.log

That may show a SQLFetch returning a unexpected error. I do very much doubt its down to unixODBC though, I would think its driver related.

--
nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support