TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

Chapter 8 425
Using the Database Utilities
>>DETACH
>>DETACH
The DETACH command detaches the database from the DBEnvironment(s) the database is
attached to. You can use one command of DBUTIL to detach a given database from all of the
DBEnvironments to which it is attached; you do not have to specify each DBEnvironment
name.
If you copy your database to a different account or different group, then issue a DETACH
command for the copied database, you will get an error stating that the detach failed from
dbename.group.account
(ATCERR 32052). It is because the DETACH of the database
triggers a lookup of the TC file (which contains the names of the DBE to which the
database is attached). However, DBUTIL's subsequent verification of the original DBE
shows the name of the original database (not the name of the copied database) as the one
attached to this DBE. Due to this discrepancy, the following things happen:
DBUTIL reports an error and does not perform a real detach of the copied database.
The attached flag in the rootfile (copy) as well as the entry in the TC file is cleared, in
spite of the error.
The original production database still remains attached to the DBE.
The DETACH command updates the root file. Therefore, use caution when copying an
attached database.
Syntax
>> DET[ACH]
database name
[/
maintword
]
For example:
>>DETACH ORDERS
where ORDERS is the
database name
.
Parameters
database name
is the name of the database.
maint word
is the maintenance password.
Example
>>DETACH ORDERS/secret
Database has been detached from these HP SQL DBEnvironments:
NEWDBE.BTRTESTS.IMAGESQL
TEMDBE.BTRTESTS.IMAGESQL
>>