HP 3000 Manuals

DETACH [ IMAGE/SQL Administration Guide ] MPE/iX 5.0 Documentation


IMAGE/SQL Administration Guide

DETACH 

Detaches a TurboIMAGE/XL database from a DBEnvironment.

Syntax 

DET[ACH]

Command Prerequisites 

   *   SET SQLDBE issued.
   *   SET TURBODB issued.
   *   DBA authority.
   *   Database attached.

Description 

Use the DETACH command to detach a TurboIMAGE/XL database from a
DBEnvironment.[REV BEG] Obtain exclusive access to the DBEnvironment
before using the DETACH command.  Use the ISQL SELECT command to find out
if it is being accessed.  (See the ATTACH command for an example of
SELECT.)[REV END]

SET TURBODB and SET SQLDBE commands must be issued before the detach can
take place.  The database named in the most recent SET TURBODB is
detached from the DBEnvironment named in the most recent SET SQLDBE
command.

You must detach the database before performing any restructuring tasks
and reattach when the restructuring is complete.

When a database is detached, all mapping information about it is removed
from the ATCINFO file (DBEnvironmentNameCR). If it is the only database
attached to the DBEnvironment, the ATCINFO file itself is purged.  If the
TurboIMAGE/XL database is no longer attached to any DBEnvironment, the
DBNameTC file is also purged.

In addition, all mapped table definitions are removed from the
DBEnvironment system catalog.  All IMAGE/SQL views and user-created views
based on IMAGE/SQL tables and views are dropped.  Note that DBUTIL can be
used to purge and detach a database that is attached to a DBEnvironment.

Example 

In this example, SALES is detached from PartsDBE. When this occurs, all
mapping information about SALES is removed from the ATCINFO file.  If
SALES is the only database attached to PartsDBE, the ATCINFO file itself
is purged.  If SALES is no longer attached to any DBEnvironment, the
SALESTC file is also purged.
_____________________________________
|                                   |
|     :RUN IMAGESQL.PUB.SYS         |
|     >>SET SQLDBE PARTSDBE         |
|     >>SET TURBODB SALES           |
|     >>DETACH                      |
_____________________________________

            



MPE/iX 5.0 Documentation