mklog - Making a Raw Log
Creates and configures a raw log for Transaction Processing and Rapid Recovery.
Syntax
On UNIX
mklog -r {-o} {-e} {-s size}{-b size}{-t} {-S} {-v} partition {bin-path}
On Windows
mklog -r {-o} {-e} {-s size}{-b size} {-S} {-v} file
Options
-bsize Specifies the size, in bytes, of the memory buffer used by Transaction Processing. Without this option, the default is 128 Kbyte. The upper limit is 256 Mbyte.
-e Empties the raw log.
-o Enables any existing link to the raw log in $REALROOT/bin to be overwritten with a new raw partition link. Use this option when creating a new raw log to replace an existing one.
-r Specifies that a raw log is to be created. If you have previously saved header information using the -S option, you are asked if you wish to use that header.
-ssize Specifies the size of the raw log. If size is less than 512000, it is assumed to be in Mbytes; otherwise, it is assumed to be in bytes. The maximum size of the raw log is dependent on whether or not the native operating system supports large files (so, on Solaris and Windows it is unlimited; on AIX and Linux it is 2 Gbytes).
This option allows you to create a raw log smaller than the specified raw log partition. The default is the size, in bytes, of the partition.
-t On UNIX, specifies that the raw log is held in a file rather than a partition.
-S Saves the header of an existing raw log, effectively allowing you to move the raw log to a new location.
-v Upgrades an existing raw log to the latest version of Reality.
Parameters
partition The full UNIX path name of the raw log.
bin-path The full UNIX path name of Reality binaries. The default is $REALROOT/bin.
file The full Windows path name of the raw log file.
Restrictions
mklog –r must be run by the super user (root).
Before creating a raw log, you must shut down Reality:
- On UNIX, use killreal to shut down Reality and realstart to restart it after creating the raw log.
- On Windows, use realserv with the appropriate option to shut down and restart Reality.
Comments
The raw log acts as a central repository for all transactions and updates saved by the Transaction Processing and Rapid Recovery software. Transaction Processing comprises two features: Transaction Handling and Transaction Logging.
Transaction Handling is a prerequisite for Transaction Logging and for Rapid Recovery. To configure Transaction Handling on your system, you must run mklog. The exact procedure will depend on your host system. Contact your NEC Software Solutions representative for details.
The raw log has a queuing structure that ensures efficient and secure storage of all active and recently completed transactions and updates. It is used to roll back incomplete transactions and restore the databases to their pre-transaction state in the event of a transaction abort or process failure. It buffers updates logged by Transaction Logging software before they are permanently logged on disk (in 'clean logs').
The raw log also buffers structural database changes logged by Rapid Recovery software. Following a system or application failure, recent changes are rolled back to restore the database to a consistent structure.
Creating the Raw Log
- On UNIX, the raw log should be created in a raw disk partition.
-
Linux does not support raw disk access. For the raw log, use a block mode partition or a file instead. The -t option allows you to create a raw log in a file.
Caution
Ensure that you identify the correct partition; otherwise a valid file system may be corrupted.
- On Windows, the raw log is a standard Windows file, which, for optimum performance, should be located on a different spindle from the database.
Once the raw log has been created, Reality must be stopped and restarted. It is recommended that you stop Reality before creating the raw log.
Once the raw log has been created, you can restart Reality:
Example on UNIX
killreal
mklog -r /dev/rdsk/0s4 $REALROOT/bin
realstart
This initialises the raw log, where 0s4 is the allocated raw partition. This will fail if the raw log already exists.
If a raw log already exists, but you are certain you want to re-create it, (for example, it is to be allocated to a different raw partition, 0s3), use the -o option, as follows:
killreal
mklog -or /dev/rdsk/0s3 $REALROOT/bin
realstart
The -o option re-initialises the raw log with the new raw partition path and re-defines the current reference in $REALROOT/bin.
Partition names will vary according to the system being configured.
Example on Windows
realserv -e
mklog -rs 100 e:\logs\rawlog
realserv -s
This initialises a 100Mbyte raw log (the recommended size). This will fail if the raw log already exists.
If a raw log already exists, but you are certain you want to re-create it, (for example, it is to be allocated to a different partition), use the -o option, as follows:
realserv -e
mklog -ors 100000000 e:\logs\rawlog
realserv -s
The -o option re-initialises the raw log with the new file path and re-defines the current reference in %REALROOT%\bin.