CREATE LOCATION

The CREATE LOCATION command allows you to define multiple XDB Server locations under the same XDB Server. Each XDB Server location contains a set of catalog tables for that location.

Invocation

CREATE LOCATION is an executable command that can be issued interactively, embedded in a host language or dynamically prepared.

Authorization

Users must possess the INSTALL authority (or be a super user) to create or drop XDB Server locations.

Syntax

CREATE LOCATION <location-name> IN <location-path> 
        SORT SEQUENCE {<language-name> EBCDIC | EBCDIC | INSENSITIVE | SENSITIVE | USER}] 
    [XDB SYSTEM TABLES] 
    [VERSION V23 | V31 | V41 | V51 | V60| V71| V80]

Parameters:

location-name Specifies a 1 to 16 character name for a new user-created location. This name must be unique among all location names created under this XDB Server.
location-path Preceded by the keyword IN, specifies a path for storing the new location files. This path is usually a subdirectory under the XDB Server directory, but can be any user-specified path.

Description

When the CREATE LOCATION command is issued, the XDB Server creates a directory structure for the new location and adds information about the new location to the SYSXDB.SYSLOCALS, and SYSIBM.SYSLOCATIONS catalog tables in the SYSTEM location.

A unique name must be specified for each location (following the rules for long identifiers), along with a directory path for the location's files and database subdirectories. The first eight characters of the location-name parameter also serve as the file name for a set of dictionary files, which are automatically created by the XDB Server for each new location, and stored in the location's root directory (location-path parameter).

location-name.DDT Contains information about the tables associated with a location.
location-name.DDF Contains information about the table columns associated with a location.
location-name.DDI Contains information about the indexes associated with a location.
location-name.DDV Contains information on the XDB Server version used to create the location.

These location dictionary files are automatically maintained and updated by the XDB Server and cannot be accessed by users.

SORT SEQUENCE

This clause allows you to choose between a case SENSITIVE, case INSENSITIVE, EBCDIC, or USER defined sort sequence for the new location. The XDB Server default is case INSENSITIVE.

FORWARD LOG

If Forward Log archiving for the location is desired, you can assign both a Forward Log name and optional path designation. If no Forward Log name is specified, the XDB Server creates a default log name by taking the first eight characters of the location name and appending a .FWD file extension. Forward Log files should ideally be stored on separate disk drives, allowing for extra insurance in the event of a location drive failure. Forward Log options are stored in the SYSXDB.SYSLOCALS catalog table in the SYSTEM location.

VERSION

Since system catalog tables differ with each XDB Server version, locations created with an older version XDB Server are not compatible with a newer version XDB Server. This optional clause creates an XDB Server location compatible with DB2 3.1, 4.1, 5.1, 6.0, 7.1 or 8.0 by using a value of V31, V41, V51, V60, V71 or V80 within the VERSION clause. V23, V31, V41, V51, V60, V71 and V80 are the only valid options for the VERSION clause.

Example:

The following command creates a location subdirectory named locat1 under the XDB Server directory (C:\XDB60):

CREATE LOCATION jbl IN d:\qa\jbl sort sequence german ebcdic;