SQL/MP Installation and Management Guide

HP NonStop SQL/MP Installation and Management Guide523353-004
10-1
10
Managing Database Applications
Managing your database includes supporting the operating requirements and access
requirements of your application programs and maintaining valid application programs.
Providing this support and maintenance can include both performance-related and
operational tasks.
Program Validity
Certain DDL statements and utility commands can invalidate a program and mark the
program as invalid in the catalog and program file label. When a program is marked as
invalid, it is subject to automatic recompilation on subsequent executions, depending
on the values of various compile and run time options.
If the file label changes during these DDL operations, the operation completes without
marking the program as invalid. The invalid condition of the program, however, is
detected at run time.
If a DDL operation causes a program to become invalid, SQL notifies operations in
progress by invalidating all opens of the object that changed, causing the next I/O to
fail. In many cases SQL can automatically reopen the object and continue processing.
In some cases, however, the application must retry the request. For cursor operations,
this typically requires a close and reopen of the cursor to reestablish the open. In other
cases, you might need to end abnormally and rerun the current transaction. If you
obtain an open invalidation error, see the associated error message for specific
recovery information.
Operations That Invalidate a Program
Copying the program file. If you copy a program file by using the FUP DUPLICATE
command, the original file is unaffected, but the new file is invalid. For more
information, see Moving Programs on page 10-39.
Binding the program file. If you explicitly bind a program file by using the Binder
program, the original file is unaffected, but the resulting target file is invalid.
Restoring a program file. If you restore a program file (or an underlying table of a
protection or shorthand view used by the program) by using the RESTORE
program without specifying the SQLCOMPILE ON option, the restored program is
invalid.
Running the Accelerator for the program file. If you run the accelerator to optimize
the object code (TNS/R systems only), the program file becomes invalid.