Configuration: Freetds 0.60 (tried 4.2,7.0 protocols), MSSQL 7.0 server. The following query give away "Unknown marker: 165!!" message: DECLARE test_cursor CURSOR GLOBAL STATIC FOR SELECT * FROM testtable OPEN test_cursor FETCH NEXT FROM test_cursor To be more exact: fetch command gives error, cursor declaration and opening works ok.