Isolation Levels

isolation level

Setting a transaction's isolation level helps avoid various data anomalies. InfoSphere® DataStage® BASIC lets you set different isolation levels depending on which data anomalies you want to avoid. Your transaction runs at the specified isolation level because the transaction subsystem verifies that you have acquired the required locks for that isolation level. If you have not done so, the program fails.

You can specify isolation levels with the following BASIC statements:

You can use the LOGIN entry in the VOC file to set the isolation level for a session. Do this by including a SET.SQL command that sets the isolation level. This sets the default isolation level for all transactions that occur during that session, including InfoSphere DataStage commands and SQL statements. For example, the program might include the statement SET.SQL ISOLATION 2 to set the isolation level to 2 each time a user logs in to the account. This affects all SQL statements and BASIC transactions that occur during this session.