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 #299 background image
Memory Considerations
HP NonStop SQL/MP Programming Manual for C—429847-008
B-5
Avoiding Memory Stack Overflows
If a stack overflow occurs, the executor traps (trap number 3), sends a message to
the EMS collector process ($0), and then abends. You can read the EMS event log
for this message. For a description of the SQL/MP messages sent to the $0
process, see the SQL/MP Messages Manual. If a call to the file system causes a
stack overflow, the SQL executor returns SQL error 8003 and file-system error 22.
You can prevent a stack overflow in a C program by following these guidelines:
ï‚·
Use the large-memory model. Specify the XMEM pragma (the default) to select the
large-memory model and the XVAR pragma (also the default) to direct the
C compiler to allocate static aggregates in extended memory.
ï‚·
Allocate SQL internal data structures (SQLIN, SQLIVARS, and SQLOVARS) in
extended memory (which is the default for the large-memory model). The
SQLMEM pragma (USER or EXT) controls the placement of the SQL structures;
SQLMEM EXT (extended memory) is the default.
ï‚·
Use the Binder SET EXTENDSTACK command to extend the user stack space.
For more information, see the Binder Manual.
ï‚·
When you start the program, increase the number of data pages for the program
using one of these options:
ï‚°
Interactively, specify the MEM option to increase the data pages in the TACL
RUN command. For more information, see the TACL Reference Manual.
ï‚°
Programmatically, set the memory-pages parameter of the NEWPROCESS or
PROCESS_CREATE_ system procedure. For more information, see the
Guardian Procedure Calls Reference Manual.

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
BrandHP
ModelNonStop SQL/MP
CategorySoftware
LanguageEnglish

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