Availability Guide for Application Design
Designing Applications for Change
Availability Guide for Application Design—525637-004
10-30
Physically Reconfiguring the Database
operations when the number of operations against the database is low. You can
specify when this phase executes by using special commit criteria.
The application can now safely use the new partition. Application downtime can be
further reduced by using execution-time name resolution to access the new partition.
To do this, you need to use execution-time name resolution or high-availability options
of the SQL compiler, as described later in this section.
Design Considerations
To take advantage of the ability to make physical changes while the application is
running, the application designer and developers must consider the following:
•
Changes in the underlying definition of SQL objects such as tables, indexes, views,
and collations invalidate SQL applications that use these objects. Subsequent
access to these objects will fail.
•
Applications are denied access to the database (or part of the database) during the
commit phase. Concurrent operations return open invalidation errors. Other
operations might cause timeouts.
To enable applications to access the reconfigured data, you must either execute with
execution-time name resolution enabled, or recompile. To reduce or eliminate
downtime due to recompilation, you can use execution-time name resolution as
described in Recompiling or Execution-Time Name Resolution for Data Definition
Changes on page 10-36.
To allow for the nonavailability of the reconfigured objects during the commit phase,
you have the following choices:
•
Plan to take the application down (briefly) during the commit phase.
•
Avoid running any requests against the table or index during the commit phase.
•
Code the application to retry timeouts and open invalidation errors.
Taking the application down makes sense if you plan on performing static SQL
recompilation. If you need to keep the application running, however, you must check
for timeout errors and open invalidation errors. Timeout errors should be retried. For
open invalidation errors, you must reopen the object and retry the operation. Affected
transactions are rolled back and retried.
In addition, the physical changes made to the database will invalidate some of the
application’s execution plans. To reduce or eliminate downtime due to recompilation,
you can use execution-time name resolution or recompilation features as described in
Recompiling or Execution-Time Name Resolution for Data Definition Changes on
page 10-36.
Using the Similarity Check
The following text discusses the similarity check in general terms. We then discuss
some specific examples of the kinds of changes indicated above and include
information on the role played by similarity checks in these examples. For more details