0

According to the Sybase Documentation (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sqlanywhere.12.0.1/dbusage/udtisol.html) there is one paragraph:

[...] The default isolation level is 0, except for [...] and TDS connections, which have a default isolation level of 1. [...]

Im connecting to that server using FreeTDS on Unix. Till now I haven't found a solution to change the Isolation-Level to 0 (Read-Uncommitted) (maybe using /etc/freetds.conf but here I also haven't found anything). For me its not possible to modify SQL-Statements so I'm looking for a config-option.

Anyone an idea?

Max
  • 33
  • 6

2 Answers2

0

You can set the isolation level for the connection using :

SET TEMPORARY OPTION isolation_level = 0;

If you need more details check the documentation.

You can see the current isolation level with:

SELECT CONNECTION_PROPERTY('isolation_level');
Boggio
  • 1,128
  • 11
  • 16
  • Doesn't seems to be working. "SET ..." runs without any errors but "SELECT CONNECTION_PROPERTY..." runs into an error stating something like table databaseName.connection_property not found. After running some other select statements on existing tables (using the same connection) I got same row locked error. – Max Nov 07 '13 at 15:30
  • Are you sure you are running Sybase SQL Anywhere 12? – Boggio Nov 07 '13 at 19:15
  • Yes. Your solution works for tSQL, but not using DBI/FreeTDS on unix :/ – Max Nov 07 '13 at 21:43
  • I am not sure but, maybe it's a drivers issue. Doesn't freeTDS use the Sybase ASE driver? Try using Jconnect to connect to Sybase SQL Anywhere – Boggio Nov 08 '13 at 08:44
  • Please correct me if i'm wrong, but Jconnect is only for Java isn't it? I'm on Perl. – Max Nov 11 '13 at 12:43
0

That does the trick:

set TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
Max
  • 33
  • 6