.
contact contact

B.08.40 / Release Notes / Database

Database Changes

 
.
  This document provides an overview on B.08.40 database changes.
  • Database cross platform binary compatibility. The Eloquence database was enhanced to support binary compatibility of database files across platforms. This allows to simply copy binary database volume files and forward log files to a target platform and use use replication for updating without requiring any data conversion. This allows to move functionality between platforms gradually and with little effort and without updating the originating system.

  • The dbvolremove utility allows removing unused database volume files.

  • The new dbvolcreate -b option may be used to specify the byte order for a new volume set.

  • Updated database replication designation.

  • The fwutil library charset configuration allows converting data to the specified character set encoding.

Database cross platform binary compatibility

Eloquence introduces binary compatibility between different platforms, for example from HP-UX to Linux. This allows to simply copy the volume files to the target platform to move data and then also supports replication across platforms boundaries. This should allow to move functionality between platforms gradually and with little effort. As Eloquence B.08.40 is compatible with previous Eloquence versions and no update is necessary for the source system.

The database server and utilities were changed to transparently handle platform, byte order and character set differences. Once a set of volume files gets copied to another platform it can also be a traget of replication or applying forward logs. This is transparent and does not require any configuration.

Instead of the hardware or operating system platform, the database volume set defines the database binary compatibility. The software can operate in big endian or little endian mode.
For a big endian volume set (the default on HP-UX) you can use apply forward log files in big endian format. A database server using a big endian volume set will create forward log files iin big endian mode that are then binary compatible with other environments in big endian mode. The same applies to dbstore archives. A big endian volume set creates and/or applies dbstore archives in big endian format.

Utilities that are independent of a volume set, can handle transparently file formats independently of the volume file. For example a custom application using the fwutil library to access the forard log will have its data converted in the native platform format, regardless how the volume set was set up.

The database server will indicate a volume set configuation on startup if it differes from the platform default. A message like below is output to the eloqdb message log.

Volume byte order is BIG_ENDIAN (4321)
 - or -
Volume byte order is LITTLE_ENDIAN (1234)
Big endian files are the default on HP-UX, little endian files are the default on Linux and Windows. This information is also available in the server http status in the configuration page which also shows the volume byte order and character set.

New dbvolremove utility

The new dbvolremove utility may be used to remove unused database volume files. These are log volumes when the server was shutdown cleanly and data volume files that currently dont hold data. If a volume file is not unused it cannot be removed. Please note that a data volume must be present to verify it is unused. A log volume may be removed when not present.

The dbvolremove utility is an offline utility. The database server may not be active. dbvolremove requires write access to the database volume and the configuration file and must be started as root or the owner of the database files.

The dbvolremove option -c may be used to speciy a server configuration file. Otherwise the default eloqdb.cfg is used.

usage: dbvolremove [options] [ID ...]
options:
 -v        - verbose
 -c cfg    - configuration file name
When run without specifying a volume id the volumes are listed along with an indication if a volume may be removed.
# dbvolremove

ID  Type Path
1   DATA /data/db/db01.vol
2   LOG  /data/db/db02.vol
3   DATA /data/db/db03.vol
4   DATA /data/db/db04.vol
5   DATA /data/db/db05.vol

ID  Type  Removable?    Free    Used
1   DATA          no     0.0  2048.0
2   LOG          YES    61.4     0.1
3   DATA          no     0.0  2048.0
4   DATA          no   303.9  1473.6
5   DATA         YES     2.5     0.0

To remove a volume file the id of the volume is specified on the command line.

# dbvolremove 5

Removing DATA volume file #5:
 /data/db/db05.vol
1 volume file removed.

ID  Type Path
1   DATA /data/db/db01.vol
2   LOG  /data/db/db02.vol
3   DATA /data/db/db03.vol
4   DATA /data/db/db04.vol

ID  Type  Removable?    Free    Used
1   DATA          no     0.0  2048.0
2   LOG          YES    61.4     0.1
3   DATA          no     0.0  2048.0
4   DATA          no   303.9  1473.6
dbvolremove removes the volume file and its reference from the server configuration file. The updated volume status is output.

A volume that is currently in used cannot be removed.

# dbvolremove 4

Cannot remove DATA volume #4, not removable:
 /data/db/db04.vol
Using dbvolremove does not affect backwards compatibility with previous Eloquence versions. Future B.08.30 patches will incorporate a change to improve handling a corner case when a volume file other then the last one was deleted.

New dbvolcreate -b option

As of B.08.40, the dbvolcreate utility has a new -b option to specify the volume byte order for a new volume set that is created. By default the volume set that is created uses the platform conventions.

 -b 0|1    - Byte order 0:LITTLE_ENDIAN 1:BIG_ENDIAN
             Platform default: LITTLE_ENDIAN
  • The option -b 0 will create a little endian volume set. This option also implies to use character set encoding of iso-8859-1. This is the default on Linux and Windows.

  • The option -b 1 will create a big endian volume set. This option implies to use character set encoding of hp-roman8. This is the default on HP-UX.

This option is mostly intended for testing purposes or to allow for backwards compatibility with previous Eloquence releases.

Please notice that the volume set endian setting can only be specified upon create and cannot be changed subsequently.

Updated database replication designation

The designation of replicated servers and roles was updated in the B.08.40 release. A master server is now described as primary server and a former slave server is now described as a secondary server or a replicated server.

This affects any messages and configugation options. Any previous config files are fully compatible.

The follging configuration files were changed to use the new designation.

  • eloqdb.cfg, replication role configuration
  • repl.cfg, address of replicated server configuration

dbrepl messages, eloqdb server messages in the message log and in the dbctl utility were changed accordingly.

fwutil library charset configuration

The fwutil library introduces an option to specify the resulting character set. If set, any database contents are converted as necessary. If not specified the results are returned in the original encoding without any conversion.

The new Fwr_local_charset() function allows to specify the local character set. The character set name is passed as an argument, The function returns the character set name or an empty string if an invalid name was specified.

const char *Fwr_local_charset(const char *cset)
Valid character set names are:
  • iso-8859-1, iso88591
  • hp-roman8, hproman8, roman8
This can be useful to handle big endian or little endian data in the same fwutil custom code or have big endian data converted into the more common iso-8859-1 encoding.

Setting the FWUTIL_CHAR_ENCODING environment variable has the same effect as calling the Fwr_local_charset function. It may specify a character set name that is then passed to the Fwr_local_charset() function.

FWUTIL_CHAR_ENCODING=hp-roman8
If set before starting an fwutil application this will ensure that any data are converted to hp-roman8 encoding before calling the fwutil callback.


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2024-03-20  
  Copyright © 1995-2024 Marxmeier Software AG