IBM Support

How to set up and use DBMS_RANDOM (SQL package extension)

Technote (FAQ)


What are the requirements and steps to set up a database to use DBMS_RANDOM functions?


The DBMS_RANDOM package provides a mechanism for generating random numbers. Use the INITIALIZE procedure to set the seed value, which is used by the random number generator to generate the numbers. Periodically, the seed procedure value should be changed, to reduce the possibility of repeating values, especially if a number of repetitions have occurred,



The first step is to register the datablade in your logging database (Logging is required, and it has to be non-ANSI). This is accomplished as follows:

  1. Change directory to $INFORMIXDIR/extend/excompat.1.0
  2. Start the blademanager interface from a command line, using this command sequence:
    • blademgr
      • show databases (select the logged database from the resulting display, which you want to use.. In this example it is stores_demo).
      • list stores_demo (by default, timeseries, ifxrltree, and spatial are already registered for stores_demo. Confirm that excompat.1.0 is not among them.)
      • show modules (this command will list the module names available to be registered. It has to follow the list command.)
      • register excompat.1.0 stores_demo (once it is registered, a success message is returned).
      • quit (this will exit the blademgr interface)


Once the datablade module is registered, five packages are available for use. Of the five packages, the DBMS_RANDOM package provides 4 routines:

Related information

Other Options in the SQL Extension Packages

Document information

More support for: Informix Servers

Software version: 11.7, 12.1

Operating system(s): AIX, HP-UX, Linux, OS X, Solaris, Windows

Reference #: 1670986

Modified date: 24 September 2014

Translate this page: