Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
24
Добавлен:
16.04.2013
Размер:
4.96 Mб
Скачать

Overview of SQL Statement Execution

Overview of SQL Statement Execution

Figure 5–1 outlines the stages commonly used to process and execute a SQL statement. In some cases, these steps might be executed in a slightly different order. For example, the DEFINE stage could occur just before the FETCH stage, depending on how your code is written.

For many Oracle tools, several of the stages are performed automatically. Most users do not need to be concerned with, or aware of, this level of detail. However, you might find this information useful when writing Oracle Database applications.

See Also: Oracle Database Concepts for a description of the processing stages for each type of SQL statement

Identifying Extensions to SQL92 (FIPS Flagging)

The Federal Information Processing Standard for SQL (FIPS 127-2) requires a way to identify SQL statements that use vendor-supplied extensions. Oracle Database provides a FIPS flagger to help you write portable applications.

When FIPS flagging is active, your SQL statements are checked to see whether they include extensions that go beyond the ANSI/ISO SQL92 standard. If any non-standard constructs are found, then Oracle Database flags them as errors and displays the violating syntax.

The FIPS flagging feature supports flagging through interactive SQL statements submitted using Oracle Enterprise Manager or SQL*Plus. The Oracle precompilers and SQL*Module also support FIPS flagging of embedded and module language SQL.

When flagging is on and non-standard SQL is encountered, the following message is returned:

ORA-00097: Use of Oracle SQL feature not in SQL92 level Level

Where level can be either ENTRY, INTERMEDIATE, or FULL.

5-2 Oracle Database Application Developer's Guide - Fundamentals

Overview of SQL Statement Execution

Figure 5–1 The Stages in Processing a SQL Statement

OPEN

PARSE

query?

yes

describe?

yes

DESCRIBE

 

 

 

 

no

 

no

no

 

yes

 

 

 

more?

 

 

 

 

 

 

 

 

 

DEFINE

 

 

 

 

 

more?

yes

 

 

 

 

 

 

 

 

 

no

 

yes

 

 

 

 

 

reparse?

no

bind?

yes

BIND

 

 

 

 

 

 

no

no

 

yes

 

 

 

more?

 

 

 

 

 

 

 

EXECUTE

 

 

 

 

 

PARALLELIZE

 

 

 

 

 

query?

yes

FETCH

 

 

 

 

 

 

 

no

 

 

 

 

yes

execute

no

more?

yes

 

 

others?

 

 

 

 

 

 

 

 

 

no

 

 

 

 

 

CLOSE

 

 

 

How Oracle Database Processes SQL Statements 5-3

Соседние файлы в папке Oracle 10g