In This Section:
The information in this chapter applies only to block storage databases and is not relevant to aggregate storage databases. Also see Comparison of Aggregate and Block Storage.
When a database is in read/write mode, Essbase considers every update request to the server (such as a data load, a calculation, or a statement in a calculation script) as a transaction. Essbase tracks information about transactions in a transaction control file (dbname.tct).
Isolation levels determine how Essbase commits data to disk. When data is committed, it is taken from server memory and written to the database on disk. Essbase automatically commits data to disk. There are no explicit commands that users perform to commit data blocks. However, setting the isolation level for a database defines how Essbase automatically commits data blocks.
Setting the isolation level to committed access may increase memory and time requirements for database restructure.
Essbase issues write (exclusive) locks for blocks that are created, updated, or deleted, and issues read (shared) locks for blocks that should be accessed but not modified. By issuing the appropriate locks, Essbase ensures that data changed by one operation cannot be corrupted by a concurrent update.
This section discusses locks on data blocks, not locks on database artifacts. For information about locking and unlocking outlines and other artifacts, see Locking and Unlocking Artifacts.
Table 156 explains the lock types:
Table 156. Basic Lock Types
Table 157 shows the locks that Essbase issues for various types of operations.
Table 157. Locking by Higher-Level Functions
Committed access provides a high level of data consistency because only one transaction at a time can update data blocks. Under committed access, Essbase allows transactions to hold read/write locks on all data blocks involved with the transaction until the transaction completes and commits. However, you can still allow read-only access to the last committed data values.
Pre-image access (enabled by default). Pre-image access provides users read-only access to data blocks that are locked for the duration of a concurrent transaction. Users see the last committed data values for the locked data blocks.
A number of seconds that you specify. The transaction waits that number of seconds to acquire a lock on the required locked blocks. If the specified time runs out before the transaction acquires a lock, Essbase displays a lock timeout message, and the transaction aborts.
When pre-image access is enabled, you are not limited to read-only access to data blocks; if you need write access to locked blocks, the transaction waits for write access or times out, depending on the wait or timeout setting. The transaction gets immediate write access to data blocks that are not locked by another transaction.
Models with a large number of blocks may experience memory problems under committed access. Each lock (one lock per block) uses approximately 80 bytes of memory per calculation, and each lock is held in memory until the transaction is complete. There is a limit to the addressable memory space per process, and eventually models with a large number of blocks may hit this limit, causing the transaction to terminate. In such cases, consider using Uncommitted Access.
Table 158 illustrates locking behavior under committed access when multiple transactions are contending for a lock on the same data. In this example, transaction Tx1 is running and transaction Tx2 is requesting access to the same data. (Note that access to locked blocks depends on what options are enabled. For a discussion of options, see Committed Access.)
Table 158. Locking Behavior Under Committed Access
For information on setting concurrency parameters, see Specifying Data Integrity Settings.
For example, if transaction Tx1 needs to update first data block B1 and then data block B2, it first locks B1 and then attempts to lock B2. Meanwhile, if transaction Tx2 needs to update first data block B2 and then block B1, Tx2 first locks B2 and then attempts to lock B1. Tx1 locked B1 and is waiting for B2, and Tx2 locked B2 and is waiting for B1.
For information about how to set concurrency options, see Specifying Data Integrity Settings.
Under committed access, if the server crashes, Essbase rolls back all database updates by transactions that were in progress when the server stopped, ensuring that changes made by the aborted transactions are undone.
With uncommitted access (enabled by default), the Essbase kernel allows transactions to hold read/write locks on a block-by-block basis; Essbase releases a block after it is updated but does not commit blocks until the transaction completes or until a specified limit (a “synchronization point”) has been reached. You can set this limit, as described below.
If either Commit Blocks or Commit Rows has a nonzero value, a synchronization point occurs when the first threshold is reached. For example, if Commit Blocks is 10 but Commit Rows is 0 and you load data, a synchronization point occurs after 10 blocks are updated. If Commit Blocks is 5 and Commit Rows is 5 and you load data, a synchronization point occurs after 5 rows are loaded or 5 blocks are updated, whichever happens first.
If a user-defined threshold is exceeded during an operation, Essbase issues a synchronization point to commit the data processed to that point. Essbase performs as many synchronization points as are necessary to complete the operation.
Essbase analyzes the value of Commit Blocks and Commit Rows during its analysis of feasibility for parallel calculation use. If Essbase finds the values set too low, it automatically increases them.
For information about how to specify synchronization point parameters, see Specifying Data Integrity Settings.
Essbase retains redundant data to enforce transactional semantics. Allow disk space for double the size of the database to accommodate redundant data, particularly if both Commit Blocks and Commit Rows are set to 0.
If your data cache is too small to hold the number of blocks specified in your Commit Blocks and Commit Rows settings, the blocks will be written to disk as soon as the caches become full, which will be before the transaction is committed.
Table 159 illustrates locking behavior under uncommitted access when many transactions contend for a lock on the same data. In this example, transaction Tx1 is running and transaction Tx2 is requesting access to the same data.
Under uncommitted access, if the server crashes, Essbase rolls back all database updates from the point of the last successful commit. Some updates from an aborted transaction may have committed. Whether transactions committed their updates the way users expected depends on the order in which overlapping transactions updated and committed data.
Uncommitted access always yields better database performance than committed access. When using uncommitted access, Essbase does not create locks that are held for the duration of a transaction but commits data based on short-term write locks.
Committed access provides a higher level of data consistency than uncommitted access. Retrievals from a database are more consistent. Also, only one transaction at a time can update data blocks when the isolation level is set to committed access. This factor is important in databases where multiple transactions attempt to update the database simultaneously.
If a server crash or other server interruption occurs during active transactions, the Essbase kernel rolls back the transactions when the server is restarted. With committed access, rollbacks return the database to its state before transactions began. With uncommitted access, rollbacks may result in some data being committed and some data not being committed.
Essbase tracks transactions from start to finish, swapping data blocks in and out of memory as needed and committing data blocks when a transaction completes. The following list describes how Essbase handles a transaction: all list items apply to committed and uncommitted access (see Understanding Isolation Levels).
The transaction ends. If Essbase encounters an error during transaction processing, it aborts the transaction. If no errors are encountered, Essbase commits the transaction. For differences in commit behavior under committed and uncommitted access, see Understanding Isolation Levels.
Under uncommitted access, it is possible to access uncommitted data when multiple transactions are active and are accessing the same data. Transaction results are unpredictable under uncommitted access.
Under uncommitted access, if you have defined a commit threshold, Essbase may need to break down one database operation into multiple synchronization points. See Uncommitted Access for information on commit thresholds.
You can specify isolation level, synchronization point parameters, and concurrency parameters using Administration Services, MaxL, or ESSCMD. Changes to isolation level settings take effect the next time there are no active transactions. For information about deciding which settings to choose, see Committed Access and Uncommitted Access.
To specify data integrity settings, use a tool:
Pre-image access; Y (Yes) or N (No, the default). Pre-image access provides users read-only access to data blocks that are locked for the duration of a transaction. Users see the last committed data values for the locked data blocks.
If you choose 2 (uncommitted access), ESSCMD prompts for the following values. See Uncommitted Access for explanations of these options.
You can also specify isolation level parameters (pre-image access and so on) by specifying parameters 19–22 on SETDBSTATEITEM. Enter SETDBSTATEITEM with no parameters; ESSCMD displays a list that includes each parameter by number, with a description.
SETDBSTATEITEM 18 "SAMPLE" "BASIC" "1" "Y" "-1"
Use the ESSCMD VALIDATE command to check structural and data integrity. See Using VALIDATE to Check Integrity.
The Essbase index contains an entry for every data block. For every read operation, VALIDATE automatically compares the index key in the index page with the index key in the corresponding data block and checks other header information in the block. If it encounters a mismatch, VALIDATE displays an error message and continues processing until it checks the entire database.
As Essbase encounters mismatches, it records error messages in the VALIDATE error log. You can specify a file name for error logging; Essbase prompts you for this information if you do not provide it. The VALIDATE utility runs until it has checked the entire database.
During index free space validation, the VALIDATE command verifies the structural integrity of free space information in the index. If integrity errors exist, Essbase records them in the VALIDATE log. The file that you specified on the VALIDATE command holds the error log.
See Optimizing Database Restructuring and the Oracle Hyperion Enterprise Performance Management System Backup and Recovery Guide.
After a server interruption such as a crash, Essbase recovers a database, rolling back all transactions that were active when the interruption occurred. Recovery time depends on the index size. The larger the index, the longer it takes.
Essbase also recovers and consolidates free fragments (unused addressable units in the data blocks). However, free space recovery is the most time-consuming aspect of database recovery, so it is delayed by default. You must trigger free space recovery explicitly unless you have changed the default setting. See Free Space Recovery for the advantages and disadvantages of delaying free space recovery.
Free space recovery is delayed until you trigger it, unless you have changed the default setting.
The Essbase kernel uses fatal error handling to display appropriate messages and to shut down the server, depending on the error encountered. For an explanation of how fatal error handling works, see Understanding Fatal Error Handling.
For information about how transactions are rolled back after a crash, see Committed Versus Uncommitted Access.
Database recovery occurs when you load an application that has just crashed or terminated abnormally. Essbase does not perform free space recovery automatically, because it is the most expensive part of database recovery. You must either trigger free space recovery explicitly or change the default setting so that Essbase will recover free space automatically.
All database functions run normally whether you recover free space or not. When you recover free space, you can reuse disk space marked as free in the data files. Keep in mind that free space recovery is time-consuming, so you might delay it until a better time.
You should, however, perform free space recovery as soon as possible to take advantage of the free space in the data files and to ensure that the database has not been corrupted. Also, if a database crashes repeatedly, and you do not run free space recovery, data files can become unnecessarily large.
alter database DBS-NAME recover freespace
Free Space is Recoverable : true/false Estimated Bytes of Recoverable Free Space : nnn
Table 160 lists types of Essbase Server interruptions and their results:
Table 160. Essbase Recovery Handling
Table 161 shows what you must do if a server interruption occurs during a transaction. How Essbase recovers from an interruption depends on the transaction isolation level setting (committed or uncommitted access)—see Rollback with Committed Access and Rollback with Uncommitted Access.
If the spreadsheet has been lost or does not exist, and if you are using SSAUDIT spreadsheet logging, reload the dbname.atx file. See How to Use Spreadsheet Update Logging.
Check the server and application logs to see where the calculation left off. See Viewing the Essbase Server and Application Logs. Decide whether to start the calculation over. Repeat the last calculation.
If the database is set to uncommitted access, some of the data loaded, so if you reload all of the data, you receive incorrect results for the data values that loaded twice. Therefore, perform the following actions:
For extra protection against data loss and for spreadsheet audit information, Essbase provides spreadsheet update logging, which you enable by using the SSAUDIT or SSAUDITR parameter in the essbase.cfg file on the server. You can specify SSAUDIT for all databases on the server or for individual databases. See the Oracle Essbase Technical Reference.
Essbase handles recovery under normal situations. However, sometimes you may want to load the spreadsheet update log manually. For example, if you have restored from a recent backup and do not want to lose changes made since the backup or you experience a media failure, you can recover transactions from the update log. To do so, use the Essbase command-line facility, ESSCMD, from the Essbase Server window.
LOGIN hostnode username password SELECT appname dbname LOADDATA 3 filepath:appname.ATX EXIT
To simplify loading the update log, prepare a batch file as described in Using Script and Batch Files for Batch Processing.
The spreadsheet update log can get quite large, even if you are using SSAUDITR, Essbase clears the log only after you back up data. If spreadsheet updates are frequent, consider periodically deleting the log manually.
Starting Spreadsheet Log volumename\app\appname\dbname\dbname.atx for database dbname
Starting Spreadsheet Log Hyperion\products\Essbase\EssbaseServer\app\app1\sample\sample.atx for database Sample
Any operation that causes a restructure. See Optimizing Database Restructuring.
Essbase ensures that if you enable spreadsheet logging, updates cannot take place without being logged. If for any reason Essbase cannot write to the update log, Essbase stops the transaction and issues an error message.
Hybrid Analysis provides a way to integrate a relational database with a multidimensional database so that lower-level members and their associated data remain in the relational database while upper-level members and their associated data reside in the Essbase database. This option presents additional issues regarding data consistency and integrity.
For information about ensuring that the data is correct in all locations, see Managing Data Consistency in Hybrid Analysis.