SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-39
Moving Programs
label. If the program file is not available, the invalidation is registered in the program’s
catalog and detected at run time.
Moving Programs
Moving a program is similar to moving other SQL objects, but somewhat easier
because programs have no dependencies. You can use either FUP DUP or SQLCI
DUP or the BACKUP and RESTORE utilities to move SQL programs stored in
Guardian SQL files. To move SQL programs stored in OSS files, use the appropriate
OSS utility. (For more information about OSS utilities, see the Open System Services
Shell and Utilities Reference Manual.)
Normally, when you move a program the new program is not registered in a target
catalog and authority to write to the catalog is not required for the move operation. The
new file is created with the SQL SENSITIVE flag turned off so that the new program file
is no longer a valid SQL program. If you specified a similarity check during the original
compilation of your program, you do not need to recompile your program. Otherwise,
you must explicitly SQL compile the program files after a move to validate the
programs and register them in a catalog.
Programs are easily moved between databases in these situations:
•
Logical names have been used in the programs. Logical names in a program make
program code independent of the location of the database so that the program can
be compiled with a new set of DEFINEs and validated to a new database.
•
The program accesses similar objects and can run without recompilation.
These paragraphs describe the use of compiler options that affect recompilation when
moving programs, followed by information about using RESTORE and SQLCI DUP to
move SQL programs stored in Guardian files. For a comparison of moving SQL objects
with the SQLCI DUP utility and with the BACKUP and RESTORE utilities, see Moving
Database Objects on page 9-14.
Caution. If an SQL object has the UNRECLAIMED FREESPACE (F) or INCOMPLETE
SQLDDL OPERATION (D) attribute set, do not attempt to back up, move, or duplicate the
object until the attribute is reset. For more information, see UNRECLAIMED FREESPACE (F)
and INCOMPLETE SQLDDL OPERATION (D) Flags on page 7-24.