Controls whether snapshot isolation is enabled or disabled.
On, Off
Off
PUBLIC role | For current user | For other users | |
---|---|---|---|
Allowed to set permanently? | Yes, with SET ANY SYSTEM OPTION | No | No |
Allowed to set temporarily? | Yes, with SET ANY SYSTEM OPTION | No | No |
This option controls whether snapshot isolation is enabled for the database. Once this option is set to On, the database server starts recording the original versions of updated rows in the temporary file if a transaction uses snapshot isolation.
If there are transactions in progress when the setting of the allow_snapshot_isolation option is changed, then the change does not take effect immediately. Any transactions that are running when the option setting is changed from Off to On must complete before snapshots can be used. When the setting of the option is changed from On to Off, any outstanding snapshots are allowed to complete before the database server stops collecting version information, and new snapshots are not initiated.
You can view the current snapshot isolation setting for a database by querying the value of the SnapshotIsolationState database property:
SELECT DB_PROPERTY ( 'SnapshotIsolationState' );
The following statement enables snapshot isolation for a database:
SET OPTION PUBLIC.allow_snapshot_isolation = 'On';