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

Overview of PL/SQL Program Units

--This procedure accepts two arguments. Emp_id is a

--number that corresponds to an employee number.

--SAL_INCR is the amount by which to increase the

--employee's salary. If employee exists, then update

--salary with increase.

BEGIN

UPDATE Emp_tab

SET Sal = Sal + Sal_incr WHERE Empno = Emp_id;

IF SQL%NOTFOUND THEN Raise_application_error(-20011, 'Invalid Employee

Number: ' || TO_CHAR(Emp_id)); END IF;

END Sal_raise;

END Employee_management;

Note: If you want to try this example, then first create the sequence number Emp_sequence. Do this with the following SQL*Plus statement:

SQL> CREATE SEQUENCE Emp_sequence

> START WITH 8000 INCREMENT BY 10;

PL/SQL Object Size Limitation

The size limitation for PL/SQL stored database objects such as procedures, functions, triggers, and packages is the size of the DIANA (Descriptive Intermediate Attributed Notation for Ada) code in the shared pool in bytes. The UNIX limit on the size of the flattened DIANA/pcode size is 64K but the limit may be 32K on desktop platforms such as DOS and Windows.

The most closely related number that a user can access is the PARSED_SIZE in the data dictionary view USER_OBJECT_SIZE. That gives the size of the DIANA in bytes as stored in the SYS.IDL_xxx$ tables. This is not the size in the shared pool. The size of the DIANA part of PL/SQL code (used during compilation) is significantly larger in the shared pool than it is in the system table.

Size Limitation by Version The size limitation of a PL/SQL package is approximately 128K parsed size in release 7.3. For releases earlier than 7.3 the limitation is 64K.

7-14 Oracle Database Application Developer's Guide - Fundamentals

Тут вы можете оставить комментарий к выбранному абзацу или сообщить об ошибке.

Оставленные комментарии видны всем.

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