MPE/iX 5.0 Documentation
ALLBASE/Turbo CONNECT Administrator's Guide
How Turbo CONNECT Works
Turbo CONNECT users can select data in mapped tables in the same way that
data in native ALLBASE/SQL tables is selected.
To understand how this is accomplished, you need to know:
* What files are used by Turbo CONNECT.
* How Turbo CONNECT files are used.
* What takes place during the attach/detach process
* How Turbo CONNECT maps TurboIMAGE/XL security.
* How Turbo CONNECT maps TurboIMAGE/XL data types.
* What takes place at run time.
Turbo CONNECT Files
Turbo CONNECT creates two important files, ATCINFO in the same group and
account as the DBEnvironment, and DBNameTC in the same group and account
as the TurboIMAGE/XL database. (See Figure 3-1.)
Figure 3-1. Files created by Turbo CONNECT
These files contain information about the relationships between all
attached TurboIMAGE/XL databases and their DBEnvironments. Specifically:
ATCINFO is a permanent privileged file in the same group and
account as the DBEnvironment. It contains mapping
information about each TurboIMAGE/XL database attached to
the DBEnvironment. One ATCINFO file exists for each
DBEnvironment.
It is named ATCINFO unless a file equation has been set
before the attach. Its name is placed in the DBECon file
of the DBEnvironment so that it can be located whenever
Turbo CONNECT needs to use or update the information in
this file.
DBNameTC is a permanent privileged file in the same group and
account as the TurboIMAGE/XL database. It contains the
fully qualified names of the DBEnvironments to which the
TurboIMAGE/XL database is attached. This information is
used to let external utilities such as DBUTIL know that the
database is attached to one or more DBEnvironments.
What Takes Place during an Attach?
An attach is the process that establishes the connection between the
TurboIMAGE/XL database and the DBEnvironment. Figure 3-2 shows a
TurboIMAGE/XL database and DBEnvironment before the TurboIMAGE/XL
database is attached.
Figure 3-2. A TurboIMAGE/XL database and a DBEnvironment before the attach
When the TurboIMAGE/XL database is attached to the DBEnvironment, several
events take place:
1. The ATCINFO and DBNameTC files are created.
2. Definitions of the TurboIMAGE/XL mapped tables are placed in the
system catalog of the DBEnvironment. These entries in the system
catalog identify the tables as mapped tables. The naming
convention for ALLBASE/SQL tables is OwnerName.TableName. By
default, in mapped tables Turbo CONNECT specifies the database
name as the owner name and the data set name as the table
name. Thus, the naming convention for mapped tables is
MappedDatabaseName.MappedDataSetName. (At attach time, you must
substitute a different owner name if an already attached database
has the same name.)
3. The TurboIMAGE/XL database creator (DBC) is defined in the ATCINFO
file as a Turbo CONNECT user. (For security reasons, all other
Turbo CONNECT users must be explicitly added by the DBC.)
Figure 3-3 shows an attached database.
Figure 3-3. An attached TurboIMAGE/XL database
What Takes Place during a Detach?
When a database is detached, you can no longer use ALLBASE/SQL to access
TurboIMAGE/XL data. All views based on mapped tables are dropped. This
includes views created by users as well as Turbo CONNECT-created views.
Mapped table definitions are removed from the system catalog and all
mapping information about the detached TurboIMAGE/XL database is removed
from the ATCINFO file.
If you are detaching the only TurboIMAGE/XL database attached to the
DBEnvironment, the ATCINFO file is deleted and its name is removed from
the DBECon file. If you are detaching the TurboIMAGE/XL database from
the only DBEnvironment it is attached to, the DBNameTC file is deleted.
Detach if you plan to restructure the database or if you wish to remove
all mapping information about the database from the ATCINFO file.
When the database is detached, all customized mapping information
(alternate data types and added Turbo CONNECT users) is lost and must be
remapped when the database is reattached. ATCUtil command files are
useful for this purpose (refer to tasks 12 and 13 in chapter 2), but to
protect database security be sure command files that contain passwords
and other sensitive information are carefully controlled. (A message
notifies you when Turbo CONNECT commands containing maintenance words or
passwords have been logged.)
MPE/iX 5.0 Documentation