Home | Previous Page | Next Page   Modifying Data > Interrupted Modifications >

Transaction Logging

The database server can keep a record of each change that it makes to the database during a transaction. If something happens to cancel the transaction, the database server automatically uses the records to reverse the changes. Many things can make a transaction fail. For example, the program that issues the SQL statements can fail or be terminated. As soon as the database server discovers that the transaction failed, which might be only after the computer and the database server are restarted, it uses the records from the transaction to return the database to the same state as before.

The process of keeping records of transactions is called transaction logging or simply logging. The records of the transactions, called log records, are stored in a portion of disk space separate from the database. This space is called the logical log because the log records represent logical units of the transactions.

Dynamic Server

Dynamic Server provides support to:

Dynamic Server supports nonlogging tables for fast loads of very large tables. It is recommended that you do not use nonlogging tables within a transaction. To avoid concurrency problems, use the ALTER TABLE statement to make the table standard (that is, logging) before you use the table in a transaction.

For more information about nonlogging tables for Dynamic Server, see the IBM Informix: Administrator's Guide. For the performance advantages of nonlogging tables, see the IBM Informix: Dynamic Server Performance Guide. For information about the ALTER TABLE statement, see the IBM Informix: Guide to SQL Syntax.

End of Dynamic Server
Extended Parallel Server

Only databases on Extended Parallel Server generate transaction records automatically.

End of Extended Parallel Server

Most Informix databases do not generate transaction records automatically. The DBA decides whether to make a database use transaction logging. Without transaction logging, you cannot roll back transactions.

Transaction Logging for Extended Parallel Server

In addition to logical-log files, Extended Parallel Server allows you to create logslices and alter them to add logical logs at any time. A logslice is a set of log files that occupy a dbslice. These log files are owned by multiple coservers, one log file per dbspace. Logslices simplify the process of adding and deleting log files because a logslice treats a set of log files as a single entity. You create, alter, and delete dbslices using the onutil utility. For more information about logslices, see the IBM Informix: Administrator's Guide.

Databases on Extended Parallel Server must be logged databases and logging cannot be turned off. However, you can specify that individual tables are logging or nonlogging tables. To meet the need for both logging and nonlogging tables, Extended Parallel Server supports the following types of permanent tables and temporary tables:

For more information about the table types that Extended Parallel Server supports, see the IBM Informix: Database Design and Implementation Guide.

Logging and Cascading Deletes

Logging must be turned on in your database for cascading deletes to work because, when you specify a cascading delete, the delete is first performed on the primary key of the parent table. If the system fails after the rows of the primary key of the parent table are performed but before the rows of the foreign key of the child table are deleted, referential integrity is violated. If logging is turned off, even temporarily, deletes do not cascade. After logging is turned back on, however, deletes can cascade again.

Extended Parallel Server

Databases that you create with Extended Parallel Server are always logging databases.

End of Extended Parallel Server
Dynamic Server

Dynamic Server allows you to turn on logging with the WITH LOG clause in the CREATE DATABASE statement.

End of Dynamic Server
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]