Menu

#42 Select Query error while fetching 5M records using cursor size=1000

0.39
open
nobody
None
5
2013-08-27
2013-08-27
No

I am getting following error while retrieving 5M records using cursor size=1000.
module: python_sybase-0.40
OS: redhat 5 64bit
sybase server version: 15.2
python version: 2.7.2

Traceback (most recent call last):
File "gen_data.py", line 99, in <module>
for entry in connObj.result_iterator():
File "gen_data.py", line 65, in result_iterator
results = self.cursor.fetchmany(arraysize)
File "<USER HOME="">/python/lib/python2.7/site-packages/python_sybase-0.40-py2.7-linux-x86_64.egg/Sybase.py", line 783, in fetchmany
self._row_result()
File "<USER HOME="">/python/lib/python2.7/site-packages/python_sybase-0.40-py2.7-linux-x86_64.egg/Sybase.py", line 952, in _row_result
count = self._fetch_rows(self._bufs, logical_result)
File "<USER HOME="">/python/lib/python2.7/site-packages/python_sybase-0.40-py2.7-linux-x86_64.egg/Sybase.py", line 858, in _fetch_rows
status, rows_read = self._cmd.ct_fetch()
File "<USER HOME="">/python/lib/python2.7/site-packages/python_sybase-0.40-py2.7-linux-x86_64.egg/Sybase.py", line 265, in _clientmsg_cb
raise DatabaseError(msg)
Sybase.DatabaseError: Layer: 5, Origin: 3
ct_fetch(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect
Exception Sybase.DatabaseError: DatabaseError('Layer: 1, Origin: 1\nct_cursor(): user api layer: external error: This routine cannot be called because the command structure is in an undefined state.',) in <bound method="" Cursor.__del__="" of="" Cursor(47280581356144)=""> ignored
Exception Sybase.DatabaseError: DatabaseError('Layer: 5, Origin: 3\nct_cancel(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect',) in <bound method="" Connection.__del__="" of="" Connection(47280581355928)=""> ignored

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.