Selecting isolation levels

By selecting a transaction isolation level, you can control the degree to which data can be accessed by other users during a transaction. The ANSI SQL standard defines four levels of isolation for transactions. Each isolation level specifies the kinds of actions that are not permitted while concurrent transactions are processing. Higher levels include the restrictions imposed by lower levels. For more information about isolation levels, see the Adaptive Server Enterprise Transact-SQL Guide.

NoteReplication Server supports not just the ANSI standard values, but all values needed to replicate to any supported data servers.

You can set the isolation level using create connection or configure connection with the dsi_isolation_level option. For example, to change the isolation level to 3 for the connection to the pubs2 database on the SYDNEY_DS data server, enter:

alter connection to SYDNEY_DS.pubs2
	set dsi_isolation_level to ’3’

NoteIsolation levels may vary depending on the replicate data server. The rs_set_isolation_level function string must be edited for non-Sybase replicate data servers, and include the rs_isolation_level system-defined variable. See the Replication Server Reference Manual for more information about rs_set_isolation_level.

Replication Server sets the isolation-level value to the rs_set_isolation_level function string using the rs_isolation_level system variable. rs_set_isolation_level executes when Replication Server establishes the connection with the replicate data server. If no value has been set, Replication Server does not execute rs_dsi_isolation_level, and instead uses the isolation level of the data server. The default isolation level for Adaptive Server is 1.

If you are using a data server other than Adaptive Server, make sure you include the rs_isolation_level variable when you modify the rs_set_isolation_level function string for your data server.