Locations

Restriction: This topic applies to Windows environments only.

At the highest level of the logical storage hierarchy is the location. You can have multiple locations defined and available under one copy of the XDB Server software. This differs slightly from the IBM DB2 concept of locations, but the naming convention of location-name.authid.object-name is the same on both platforms.

Note: Do not copy, alter, or move the files in locations. Doing so can corrupt the system location and jeopardize all the data managed by the XDB Server.

A system catalog database called DSNDB06 resides in each location to maintain information about the location and all tables and databases in that location, including which tables and indexes belong to which databases and where objects are located on disk. The system location also contains two other system-related databases: DSNDDF and XDBACF. The DSNDDF database contains tables such as SYSXDB.SYSLOCALS and SYSIBM.SYSLOCATIONS which together serve as an index to local and remote locations. The XDBACF database contains tables for system security.

Each location, including the system location, also contains a DSNDB04 database. This database is the default database for storing tables and other objects that a user creates without specifying a database name.

The mainframe system catalog tables have a two-part name, using SYSIBM as the AuthID qualifier (for example, SYSIBM.SYSDATABASES and SYSIBM.SYSTABLES). The XDB Server uses this same AuthID for all system tables that have a corresponding table on DB2. The XDB Server has additional system catalog tables that have no counterparts on mainframe DB2. These catalog tables are prefixed with the SYSXDB AuthID (except SYSIBM.SYSXDBMAP).

When you install the XDB Server, the system catalog databases in the SYSTEM location are stored in subdirectories under the SYSTEM subdirectory of your XDB Directory. (Your "XDB Directory" refers to the directory where you installed the XDB Server and related executable software.)

Note: Do not run DDL files in the SYSTEM location.

For example, if you install the XDB Server in c:\xdb\ /xdb/ , then the system databases will be placed in the following subdirectories:

Windows:
  • c:\xdb\system\dsndb06\
  • c:\xdb\system\dsndb07\
  • c:\xdb\system\dsnddf\
  • c:\xdb\system\xdbacf\
  • c:\xdb\system\dsndb04\
UNIX:
  • /xdb/system/dsndb06/
  • /xdb/system/dsndb07/
  • /xdb/system/dsnddf/
  • /xdb/system/xdbacf/
  • /xdb/system/dsndb04/

Whenever you create a new location you must specify a Location Name (up to 16 characters long) according to the following guidelines:

In addition to specifying a location name when you create a new location, you must also specify a directory for it on disk, according to the conventions for your operating system. For example, you could use the command:

Windows:
 CREATE LOCATION locat1 IN c:\xdb\locat1
UNIX:
 CREATE LOCATION locat1 IN /xdb/locat1

When you issue this command, the XDB Server creates the directory on disk and adds information about the new location to the SYSXDB.SYSLOCALS and the SYSIBM.SYSLOCATIONS tables in the SYSTEM location. Other options are available on the CREATE LOCATION command to allow you to specify the sort sequence, forward log name and other items. You can edit the SYSXDB.SYSLOCALS table to change these parameters.

Note: In an XDB database, the sort sequence (EBCDIC, ASCII, etc.) is defined when the location is created. You can change the sort sequence of a location with the ALTER LOCATION command.

You can execute the following utility command any place you can issue SQL commands to specify the current location:

SET LOCATION TO location-name

Your default current location is maintained in your client configuration. See the setup and configuration documentation that came with your client application for details. If you want to use or create objects in a location other than your current location, use SET LOCATION TO prior to entering your other SQL statements. In embedded SQL, and to access remote locations, you must use the CONNECT command.

Note: Distributed Unit of Work (DUW) Processing is also available for accessing data in locations other than your own. See Distributed Processing for more information.