Previous Topic: DXnewdb Tool—Create a New Datastore

Next Topic: DXpassword Tool—Hash a Password

DXnewdsa Tool—Create a New DSA

Use the DXnewdsa tool to create a new DSA.

If a DSA with the same name already exists, the command exits.

If the datastore exists, DXnewdsa uses it, without changing its size or contents. If the datastore does not exist, DXnewdsa creates the datastore.

DXnewdsa creates configuration files for the new DSA. The configuration includes the following commands:

#gxgrid configuration
set dxgrid-db-location = ...;
set dxgrid-db-size = ...;
set cache-index = all-attributes;
set lookup-cache = true;

Note: For a list of the status codes returned by all the DXtools commands, including this command, see Exit Status Codes for the DXtools.

DXnewdsa has the following format:

dxnewdsa  [options] dsaname port [prefix]
options

Denotes one or more of the following options:

-t {data | router}
data

(default) Specifies that DXnewdsa should create a data DSA.

router

Specifies that DXnewdsa should create a router DSA.

-l location

(Optional) Defines the directory that holds the datastore. This is only valid for a data DSA.

The default directory is DXHOME/data.

If the location is provided as a relative location, DXnewdsa takes this as relative to the current directory, to produce an absolute path. DXnewdsa uses the -l parameter to create a command in the DSA configuration file, as follows:

set dxgrid-db-location = location;
-s size

(Optional) Defines the size of the datastore in MB. This is only valid for a data DSA. It is ignored if the datastore already exists.

DXnewdsa writes the size as a dxgrid-db-size setting in the DSA configuration file.

The maximum is 60,000.

The default is 500 MB.

dsaname

Defines the name of the DSA. Maximum length is 31 characters.

port

Specifies the port number of the DSA.

prefix

(Optional) Defines the namespace prefix. To specify the prefix, use LDAP syntax; for example as follows:

ou=Internet Sales, o=ACME Corp, c=US

Example: Create a data DSA with Default Options

dxnewdsa DSA1 1234

This command creates a data DSA1 and specifies port 1234 and a null prefix.

Example: Create a Data DSA with Simple Prefix

dxnewdsa DSA1 1234 ou=Internet Sales, o=ACME Corp, c=US

The configuration includes the prefix setting in the knowledge file in the following form:

set dsa DSA1 = 
{
...
prefix = <c US> <o Acme Corp> <ou Internet Sales>
...
}