SQL/MP Installation and Management Guide
Moving a Database
HP NonStop SQL/MP Installation and Management Guide—523353-004
9-10
Moving the System Catalog
4. Create an OBEY command file you can use to insert the rows from the existing 
CATALOGS table into the re-created CATALOGS table. This command sequence 
queries the existing CATALOGS table and generates an OBEY command file that 
contains a report in INSERT-statement format. This command series appears in 
OBEY command file format for entering through SQLCI. Use this command file for 
CATALOGS table versions 300 and later.
-- --------------------------------------------------------------
-- BEGIN OBEY COMMAND FILE COMMAND SEQUENCE TO QUERY THE CATALOGS 
-- TABLE AND GENERATE A REPORT IN INSERT-STATEMENT FORMAT
-- --------------------------------------------------------------
OUT_REPORT obey-insert-file CLEAR;
RESET LAYOUT *;
SET LAYOUT PAGE_LENGTH ALL;
RESET SESSION *;
SET SESSION LIST_COUNT 0;
RESET STYLE *;
SET STYLE HEADINGS OFF;
SELECT CATALOGNAME,
 SUBSYSTEMNAME,
 VERSION,
 VERSIONUPGRADETIME,
 CATALOGCLASS,
 CATALOGVERSION
FROM $catalogs-vol.SQL.CATALOGS
 WHERE CATALOGCLASS <> "S"
;
DETAIL "INSERT INTO $new-catalogs-vol.SQL.CATALOGS", SKIP,
 " VALUES (""", CATALOGNAME, """,", SKIP,
 " """, SUBSYSTEMNAME, """,", SKIP,
 " """, VERSION, """,", SKIP,
 " ", VERSIONUPGRADETIME, " ,", SKIP,
 " """, CATALOGCLASS, """," , SKIP,
 " ", CATALOGVERSION, SKIP,
 " )", SKIP,
 ";", SKIP
;
LIST ALL;
-- in which obey-insert-file is any EDIT file;
-- catalogs-vol is the volume on which the current CATALOGS table
-- resides;
-- new-catalogs-vol is the volume on which the new CATALOGS table 
is to
-- reside.
OUT_REPORT; -- Closes report file
RESET LAYOUT *; RESET STYLE *; -- Resets report defaults
RESET SESSION *; SET SESSION LIST_COUNT ALL;
-- --------------------------------------------------------
-- END REPORT PRODUCING COMMAND SERIES --------------------
-- --------------------------------------------------------










