2

I have a simple Perl script that connects to a MS SQL Server 10.50 via freetds. It runs a single query, something like SELECT name FROM table. The table has about 15000 records. I do prepare-execute(no binds)-fetch(in a while loop). Prepare, execute passes OK, fetch loops over about 300 records then hangs and eventually comes back with the "Read from the server failed". In details:

DBD::Sybase::st fetchrow_array failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (36)
Server ....., database ...
Message String: Read from the server failed

The freetds.conf has "tds version" set to 4.2. When I try using 7.0, 7.1 or 7.2, the script doesn't even get past "execute" step.

If I change query to limit results like SELECT TOP 200 name FROM table, it finishes just fine.

Has anyone seen anything like it?

4

0 回答 0