SQL/MP Installation and Management Guide

Moving a Database
HP NonStop SQL/MP Installation and Management Guide523353-004
9-36
Backing Up and Purging SQL Objects
Dropping User Catalogs (Step 6)
To drop all catalogs except the system catalog from the node, enter this statement for
each catalog while you are logged on as the super ID:
>> DROP CATALOG catalog-name;
If you get an error while attempting to drop a catalog, use the SQLCI CLEANUP utility,
as described later under Purging Detached SQL Objects (Step 8).
Backing Up and Dropping the System Catalog (Step 7)
Before dropping the system catalog, back up any SQL objects it contains and save a
copy of the SQLCI2 program to be recompiled on the renamed or renumbered node by
following these steps:
1. If your system catalog contains SQL objects, back up the objects you want to save,
or move the objects to another catalog. You can use this BACKUP command to
save the objects in the system catalog; enter the command at the command
interpreter prompt:
20> BACKUP *.*.* FROM CATALOG sys-catalog, AUDITED,
OPEN, LISTALL
In the BACKUP command, sys-catalog is the name of the volume and
subvolume on which your system catalog resides.
2. Use the SQLCI DUP command to save the SQLCI2 program in ZZSQLCI2:
>> DUP SQLCI2, ZZSQLCI2, SAVEALL;
3. Remove the system catalog, including the CATALOGS table and the SQLCI2
program:
>> EXIT
21> SQLCI
>> DROP SYSTEM CATALOG sys-catalog
;
You cannot drop the system catalog while SQLCI2 is running, as it normally is
during an SQLCI session in which you have entered other commands. As the
example shows, you probably need to end the current SQLCI session and start a
new one before entering the DROP SYSTEM CATALOG command. Alternatively,
you can exit from SQLCI and enter the command at the command interpreter
prompt:
>> EXIT
21> SQLCI DROP SYSTEM CATALOG sys-catalog
Be sure to drop all the user catalogs before attempting to drop the system catalog.
You cannot drop the system catalog until all entries for user catalogs are deleted
from the CATALOGS table.