SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-42
Using BACKUP and RESTORE
The REGISTERONLY ON option does not generate usages in the USAGES table.
If you require usages on the production system, you must explicitly recompile the
program. If you do recompile the program, specify the COMPILE INOPERABLE
PLANS option to improve performance.
5. Run the program with DEFINEs that point to the objects on the production system.
The SQL executor uses the similarity check to compare the production tables with
the development tables. If the similarity check passes for an SQL statement, the
SQL executor executes the statement without recompiling it.
Example: Moving a Program Without Registering It on the
New System
The next example describes a scenario where you want to compile a program on one
system and then move it to a different system before you run it. You do not require that
the program be registered in the catalog on the second system. To eliminate
recompilation on the new system, use execution-time name resolution for all DML
statements and compile the program with the NOREGISTER ON option before you
move it to the new system.
Follow these steps:
1. Specify the CONTROL QUERY BIND NAMES AT EXECUTION directive in the
program’s source file to enable execution-time name resolution for all DML
statements.
You might need to specify this directive more than once, depending on the
structure of your program and the scoping rules for the host language you are
using. For more information, see Deferring Name Resolution on page 10-13.
2. Explicitly SQL compile the program with the NOREGISTER ON option.
3. Move the program to the other systems by using the FUP or SQLCI DUP
command or the BACKUP and RESTORE programs.
4. Run the program. The NOREGISTER option enables the program to run although
the program is not recompiled on the new system or registered in the catalog.
Using BACKUP and RESTORE
To use the BACKUP and RESTORE programs to move an SQL program file from one
node to another node:
1. On the first node, back up the program.
2. On the second node, restore the program using the SQLCOMPILE ON and
REGISTERONLY ON options. The program is restored and registered on the
second node without being recompiled.