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.
A system catalog (a set of catalog tables) maintains information about each table and database and its components, including which tables belong to which databases and where objects are located on disk. There is one system catalog per copy of DB2 software (one catalog per location or subsystem).
Like the mainframe, there may be one or more databases within a location. Each database can have one or more table spaces and tables, with associated indexes, views, and synonyms.
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.)
For example, if you install the XDB Server in c:\xdb\ , then the system databases will be placed in the following subdirectories:
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:
CREATE LOCATION locat1 IN c:\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.
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.