The database format has changed in Berkeley DB XML release 2.2 and existing containers created in a 2.0- or 2.1-based application must be upgraded. 2.1-based applications do not need to be recompiled in order to work with Berkeley DB XML release 2.2.
It is possible to upgrade containers created with either 2.0 or 2.1.
It is not possible to upgrade containers created with a 1.x release
of BDB XML. Containers can be upgraded in one of two ways. Using the
dbxml
shell facility,
or using the XmlManager::upgradeContainer()
method. The shell
program method is simpler.
Once the installation is built, these steps can be used to perform the upgrade:
Important: Make a backup copy of your container.
Assuming the dbxml program is in your PATH, type
dbxml
.
dbxml> upgradeContainer <pathToContainer>
dbxml> quit
The upgrade may take a few minutes, depending on the size of your
container. You can check to see if the upgrade was successful by
opening the container with the openContainer
sub-command in
dbxml.
In 2.2 the default container type created by the dbxml
shell program is
XmlContainer::NodeContainer
, with nodes indexed.
Previously, the default was
XmlContainer::WholedocContainer
. There is no effect on
existing containers. The only possible effect is on a script that
depends on the default container type created, in which case the
script should be changed to use an explicit type of "d." E.g.
dbxml> createContainer <pathToContainer> d