Referential integrity  Using the sample databases

Chapter 7: Adding, Changing, and Deleting Data

Transactions

A copy of the old and new state of each row affected by each data modification statement is written to the transaction log. This means that if you begin a transaction by issuing the begin transaction command, realize you have made a mistake, and roll the transaction back, the database is restored to its previous condition.

NoteYou cannot roll back changes made on a remote Adaptive Server by means of a remote procedure call (RPC).

An exception is writetext, when the select/into bulkcopy database option is set to false.

The default mode of operation for writetext does not log the transactions. This avoids filling up the transaction log with the extremely long blocks of data that text, unitext, and image fields may contain. The with log option to the writetext command must be used to log changes made with this command.

A more complete discussion of transactions appears in Chapter 20, “Transactions: Maintaining Data Consistency and Recovery.”





Copyright © 2005. Sybase Inc. All rights reserved. Using the sample databases

View this book as PDF