Use this statement to start a snapshot at a specified period in time for use with snapshot isolation transactions.
By default, when a transaction begins, the database server defers creating the snapshot until the application causes the first row of a table to be fetched. You can use the BEGIN SNAPSHOT statement to start the snapshot earlier within the transaction. The database server creates a snapshot when the BEGIN SNAPSHOT statement is executed by a snapshot transaction.
The statement fails and returns an error when either of the following conditions is met:
support for snapshots transactions has not been enabled for the database. See allow_snapshot_isolation option [database].
a snapshot has already been started for the current transaction.
This statement is also useful for non-snapshot transactions because it allows them to start a snapshot that can be used later in the transaction for a statement-level snapshot operation.
SQL/2003 Vendor extension.
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|