EasyManua.ls Logo

HP NonStop SQL/MP User Manual

HP NonStop SQL/MP
331 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #301 background imageLoading...
Page #301 background image
HP NonStop SQL/MP Programming Manual for C—429847-008
C-1
C Maximizing Local Autonomy
This appendix describes about the local autonomy in the NonStop SQL/MP
network-distributed database.
Topics include:
ï‚·
Using a Local Partition
ï‚·
Using TACL DEFINEs on page C-2
ï‚·
Using Current Statistics on page C-2
ï‚·
Skipping Unavailable Partitions on page C-3
Local autonomy in a network-distributed database ensures that a program can access
data on the local node, regardless of the availability of remote SQL objects. In some
cases, the design of NonStop SQL/MP allows for local autonomy. For example, if a
DDL change alters a table on \NODEA when \NODEB is unavailable, an SQL program
file on \NODEB that uses the altered \NODEA table is not marked as invalid. The
invalid SQL program on \NODEB that is erroneously marked as valid is detected at run
time by the timestamp check and then automatically recompiled.
If your program accesses a network-distributed database, you can maximize local
autonomy by following these guidelines:
ï‚·
Use a local partition, rather than the primary partition, as the table name.
ï‚·
Use TACL DEFINEs.
ï‚·
Use current statistics.
ï‚·
Skip unavailable partitions.
For collations, NonStop SQL/MP supports run-time node autonomy, because collations
are stored in an SQL object’s file label and within expressions that operate on the SQL
objects.
For example, suppose that you create a partitioned table named TABLEA with
partitions on \NEWYORK and \PARIS. TABLEA requires the collation
\NEWYORK.$SQL.COLLATE.FRENCH. If \NEWYORK goes down, programs on
\PARIS that refer to TABLEA continue to run because they get the collation information
from the TABLEA file label. However, the recompilation of a program on \PARIS that
uses TABLEA fails because the \NEWYORK.$SQL.COLLATE.FRENCH collation is not
available.
Using a Local Partition
If your program accesses a remote partition, the SQL compiler looks for information
about the table in a remote catalog. If the remote node is down, the SQL compilation
fails. However, if your program uses a local partition, the SQL compiler looks for the
information in a local catalog. If the local node and data are available, the SQL
compilation is successful.

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the HP NonStop SQL/MP and is the answer not in the manual?

HP NonStop SQL/MP Specifications

General IconGeneral
PlatformHP NonStop Servers
Data ModelRelational
SQL StandardANSI SQL
Concurrency ControlMulti-Version Concurrency Control (MVCC)
Fault ToleranceYes
High AvailabilityYes
CategoryDatabase Software
Initial Release1980s
Operating SystemHP NonStop OS
LicenseProprietary
TypeRelational Database Management System
Transaction ManagementACID Compliance
DeveloperHewlett Packard Enterprise

Summary

1. Introduction

Developing a C Program

Outlines the process of creating C programs with embedded SQL statements.

Dynamic SQL

Describes how to construct, compile, and run SQL statements at runtime.

2. Host Variables

3. SQL/MP Statements and Directives

4. Data Retrieval and Modification

Single-Row SELECT Statement

Retrieves a single row of data from tables or views into host variables.

Multirow SELECT Statement

Returns multiple rows from tables or views, one row at a time, using cursors.

INSERT Statement

Inserts one or more rows into a table or protection view using host variables.

Using SQL Cursors

Explains how to use named pointers to access sets of rows one at a time.

5. SQL/MP System Procedures

6. Explicit Program Compilation

Explicit Program Compilation

Outlines the general steps for compiling C programs with embedded SQL.

Developing a C Program in the Guardian Environment

Details C program development within the Guardian environment.

7. Program Execution

Required Access Authority

Specifies the access permissions needed to run NonStop SQL program files.

8. Program Invalidation and Automatic SQL Recompilation

Program Invalidation

Explains how SQL program files can become invalid due to changes or errors.

Automatic SQL Recompilation

Describes the run-time recompilation process invoked by the SQL executor.

9. Error and Status Reporting

10. Dynamic SQL Operations

Uses for Dynamic SQL

Identifies scenarios where dynamic SQL programs are beneficial.

Dynamic SQL Statements

Summarizes dynamic SQL statements usable in a C program.

11. Character Processing Rules (CPRL) Procedures

Appendix B: Memory Considerations

Avoiding Memory Stack Overflows

Provides guidelines to prevent stack overflows for SQL statements.

Related product manuals