Creating a default sbspace

You must create a default sbspace before you register the DataBlade® module into any database, or the registration fails.

About this task

During registration, the module sets up internal directories in a default sbspace for synonym lists, stopword lists, and user-defined character sets. The also stores etx indexes in the default sbspace unless you explicitly specify another sbspace for the index. Be sure that the default sbspace is large enough to hold all of these objects.

To create the default sbspace:

Procedure

  1. Set the ONCONFIG parameter SBSPACENAME to the name of your default sbspace.
    For example, to name the default sbspace sbsp1:
    SBSPACENAME     sbsp1 # Default sbspace name

    You must update the onconfig file before you start the database server.

  2. Use the onspaces utility to create the sbspace.
    The following example shows how to create an sbspace called sbsp1 in the partition /dev/sbspace:
    % onspaces -c -S sbsp1 -g 2 -p /dev/sbspace -o 0 -s 100000 -Df "LOGGING=ON"

Results

The example sbspace has an initial offset of 0, a size of 100 MB, and logging is turned on.

You can use the FileToBLOB() function to test whether the default sbspace has been created and configured correctly, as shown in the following example executed in DB-Access:
EXECUTE FUNCTION FileToBLOB ('/tmp/some.txt', 'server');

The file /tmp/some.txt can contain any type of text, but it must be fully accessible to the user who started the database server.

If the function returns without an error, the default sbspace has been created and configured correctly.