Oracle коды пользовательских ошибок

PL/SQL блок:

DECLARE
…  — объявляющая секция
BEGIN
…  — выполняющая секция
EXCEPTION
…  — секция обработки исключительных ситуаций
END;
/

При установлении исключительной ситуации управление программой сразу же передается
в секцию исключительных ситуаций блока.
Если такой секции в блоке нет, то исключение передается в объемлющий блок.

После передачи управления обработчику, вернуться в выполняющую секцию блока невозможно.

Исключения бывают:

— стандартные
— определенные пользователем

Стандартные исключительные ситуации инициируются автоматически при возникновении
соответствующей ошибки Oracle.

Исключительные ситуации, определяемые пользователем,
устанавливаются явно при помощи оператора RAISE.

Обрабатываются исключения так:

EXCEPTION
    WHEN имя_ex1 THEN
        …; — обработать
    WHEN имя_ex2 THEN
        …; — обработать
    WHEN OTHERS THEN
        …; — обработать
END;
/

Имена исключений не должны повторяться т.е. каждое исключение может
обрабатываться максимум только одним обработчиком в секции EXCEPTION

Один обработчик может обслуживать несколько исключительных ситуаций
и их нужно перечислить в условии WHEN через OR

EXCEPTION
    WHEN NO_DATA_FOUND OR TOO_MANY_ROWS THEN
        INSERT INTO log_table(info) VALUES (‘A select error occurred.’);
END;
/

Два исключения одновременно один обработчик обработать не может:

WHEN имя_ex1 AND имя_ex2  — > ERR

Пользовательское исключение должно быть определено:

DECLARE
    e_my_ex EXCEPTION;
    …
BEGIN
    IF (…) THEN
        RAISE e_my_ex;
    END IF;
    …

EXCEPTION
    WHEN e_my_ex THEN
    …
END;
/

После перехвата более специализированных исключений:

WHEN … THEN

WHEN … THEN

мы можем перехватить все остальные исключения с помощью:

WHEN OTHERS THEN

Обработчик OTHERS рекомендуется помещать на самом высоком уровне программы:
(В самом высшем блоке)
для обеспечения распознавания всех возможных ошибок.

Иначе ошибки будут распространяться в вызывающую среду и возможны
нежелательные последствия, такие как откат на сервере текущей транзакции.

Не используйте в промышленном коде такое:

WHEN OTHERS THEN NULL;

т.к. оно будет молчаливо перехватывать все неожиданные ошибки не сообщая,
что они произошли.

Обработчик OTHERS должен регистрировать ошибку и возможно предоставлять
дополнительную информацию для дальнейшего исследования.

WHEN OTHERS THEN
    INSERT INTO log_table(info) VALUES (‘Another error occurred.’);
END;
/

Информацию об ошибках можно получить при помощи двух встроенных функций:

— SQLCODE
— SQLERRM

первая возвращает код текущей ошибки а вторая текст сообщения об ошибке

Для исключений определенных пользователем:

SQLCODE возвращает 1
а
SQLERRM «User-defined Exception»

WHEN OTHERS THEN
    v_ErrorCode := SQLCODE;
    v_ErrorText := SUBSTR(SQLERRM, 1, 200);
    INSERT INTO log_tab(code, message, info) VALUES (v_ErrorCode, v_ErrorText, ‘Oracle error.’);
END;
/

В таблице log_tab поле message ограничено 200 символами
и чтобы не произошло ошибки при вставке, мы урезаем длину
сообщения до 200 символов с помощью SUBSTR
А то максимальная длина сообщения может достигать 512 символов.

Функция SQLERRM может принимать один числовой аргумент.
При этом она возвратит текст сообщения об ошибке, код которой равен заданному числу.

Аргумент должен быть всегда отрицательным числом.
Если аргумент равен 0, то будет возвращено сообщение:
ORA-0000: normal, succesful completion

При положительном аргументе не равном 100 будет возвращено сообщение:
non-ORACLE Exception

А при

SQLERRM(100) — > ORA-1403: no data found

Это исключение ANSI

Остальные коды ошибок Oracle все отрицательные.

Для получения информации об ошибке можно также использовать функцию
FORMAT_ERROR_STACK из пакета DBMS_UTILITY

Её можно непосредственно использовать в операторах SQL:

WHEN OTHERS THEN
    INSERT INTO log_tab(code, message, info) VALUES (NULL,
                                                     SUBSTR(DBMS_UTILITY.FORMAT_ERROR_STACK, 1, 200),
                                                    ‘Oracle error occurred.’);
END;
/

Ещё одна функция.

DBMS_UTILITY.FORMAT_ERROR_BACKTRACE

она аналогична  FORMAT_ERROR_STACK
но не подвержена ограничению длины сообщения в 2000 байт.
Она возвращает полностью весь стек ошибок на момент инициирования исключительной ситуации.

Любое именованное исключение можно связать с конкретной ошибкой ORACLE.

Например, в ORACLE есть стандартная ошибка ORA-1400, которая возникает при пропуске значения
или вставке значения NULL в столбец с ограничением NOT NULL.

ORA-1400: mandatory NOT NULL column missing or NULL during insert.

Мы хотим создать свое пользовательское именованное исключение и связать его с этой стандартной ошибкой ORA-1400

DECLARE
e_my_ex EXCEPTION;
PRAGMA EXCEPTION_INIT(e_my_ex, -1400);

BEGIN
WHEN e_my_ex THEN
    INSERT INTO log_tab(info) VALUES (‘ORA-1400 occurred.’);
END;
/

Теперь мы перехватываем её по имени с помощъю WHEN или THEN

Все стандартные исключительные ситуации также ассоциируются с соответствующими им ошибками Oracle
при помощи прагмы EXCEPTION_INIT в пакете STANDARD

VALUE_ERROR  — > ORA-6501
TO_MANY_ROWS — > ORA-1422
ZERO_DIVIDE  — > ORA-1476
……….
и т.д.

Так что если вам не хватает некоего имени конкретной ошибки ORA-NNNN,
то придумайте свое имя и свяжите его с ошибкой с помощью прагмы : EXCEPTION_INIT

Для собственных пользовательских исключений можно придумать свои коды ошибок, которые разрешено брать из диапазона:
-20000 до -20999
и придумать свой текст сообщения

RAISE_APPLICATION_ERROR(номер, текст, [флаг]);

TRUE — пополнить список ранее произошедших ошибок
FALSE — новая ошибка заместит текущий список ошибок (по умолчанию)

set serveroutput on

variable a NUMBER;
variable b NUMBER;

exec :a := 0;
exec :b := 10;

DECLARE
    l_a NUMBER := :a;
    l_b NUMBER := :b;
    l_c NUMBER;

BEGIN
    IF l_a = 0 THEN
        raise_application_error(-20005, ‘Divizor is 0’);
    END IF;
    l_c := l_b / l_a;
    dbms_output.put_line(‘The result: ‘||l_c);
EXCEPTION
    WHEN OTHERS THEN
        dbms_output.put_line(SQLERRM);
END;
/

Поскольку у исключения нет имени, то его может обработать только обработчик OTHERS

Но такое исключение можно и поименовать
и с помощью прагмы связать с нашим кодом.

DECLARE

    my_ex EXCEPTION;
    …..
    …..
    PRAGMA EXCEPTION_INIT(my_ex, -20005);

BEGIN
    IF (…) THEN
        raise_application_error(-20005, ‘Divizor is 0’);
    …..
    …..

EXCEPTION
    WHEN my_ex THEN
        dbms_output.put_line(SQLERRM);
END;
/

Теперь это исключение можно обработать по имени с помощью:

WHEN my_ex THEN

EXCEPTION PROPAGATION

enclosing block  — обьемлющий блок

Если в текущем блоке имеется обработчик данной исключительной ситуации,
то он выполняется и блок успешно завершается.
Управление передаётся вышестоящему блоку.

Если обработчик отсутствует, исключительная ситуация передается в обьемлющий блок и инициируется там.
Если обьемлющего блока не существует, то исключение будет передано вызывающей среды (например SQL*Plus).

При вызове процедуры также может создаваться обьемлющий блок:

BEGIN

    p(…); — вызов процедуры
EXCEPTION
    WHEN OTHERS THEN
        — исключение инициированное p()
        — будет обработано здесь
END;
/

Исключения инициируемые в секции обьявлений (DECLARE) не обрабатываются секцией EXCEPTION
текущего блока, а передаются в EXCEPTION обьемлющего блока.

Тоже самое, если исключение инициируется в секции EXCEPTION,
то обработка данного исключения передается в обьемлющий блок.

Исключительную ситуацию можно обработать в текущем блоке и сразу снова установить
то же самое исключение, которое будет передано в обьемлющую область:

DECLARE

    A EXCEPTION;
BEGIN

    RAISE A;
EXCEPTION
    WHEN A THEN
        INSERT INTO log_tab(info) VALUES (‘Exception A occurred.’);
        COMMIT;
        RAISE;
END;
/

Тут commit гарантирует, что результаты insert будут зафиксированы
в базе данных в случае отката транзакции.

С помощью пакета UTL_FILE можно избежать необходимости commit
или используйте автономные транзакции.

Область действия исключительной ситуации

BEGIN
    DECLARE
        e_ex EXCEPTION;  — видно по имени только внутри блока
    BEGIN
        RAISE e_ex;
    END;
EXCEPTION
    — тут исключение не видно по имени e_ex
    — и его можно обработать с помощью обработчика OTHERS

    WHEN OTHERS THEN
        — инициируем это исключение повторно
        RAISE;  — Теперь это исключение передается вызывающей среде
END;
/

Если сообщение об ошибке, определяемой пользователем, нужно передать из блока,
рекомендуется описывать исключительную ситуацию и модуле так,
чтобы она была видима вне этого блока.
Или воспользуйтесь функцией : RAISE_APPLICATION_ERROR

Как описать исключение, которое будет видно вне блока?

Нужно создать пакет Globals и описать в нем пользовательское исключение.
Такая исключительная ситуация будет видима и во внешнем блоке.

CREATE OR REPLACE PACKAGE Globals AS
    e_ex EXCEPTION;
END Globals;

BEGIN
    BEGIN
        RAISE Globals.e_ex;
    END;

EXCEPTION
    WHEN Globals.e_ex THEN
        — инициируем повторно
        — для передачи в вызывающую среду
        RAISE;
END;
/

  В пакете Globals можно также объявлять:

— таблицы
— переменные
— типы

Избегайте необработанных исключений
Нельзя допускать завершение программ, пока в них остаются необработанные исключения

Используйте обработчик OTHERS на самом верхнем уровне программы.
И пусть он регистрирует факт и время возникновения ошибки.
И ни одна ошибка не останется без внимания.

DECLARE

    v_ErrorNumber NUMBER;
    v_ErrorText   VARCHAR2(200);
BEGIN
    …
    …

EXCEPTION
    WHEN OTHERS THEN
        …

        v_ErrorNumber := SQLCODE;
        v_ErrorText   := SUBSTR(SQLERRM, 1, 200);

        INSERT INTO log_tab(code, message, info)
        VALUES (v_ErrorNumber, v_ErrorText,
                ‘Oracle error …at ‘ || to_char(sysdate, ‘DD-MON-YYHH24:MI:SS’));
END;
/

Можно использовать и утилиту  DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
она регистрирует первоначальное местовозникновения исключения.

Как определить, где произошла ошибка?

BEGIN

    SELECT …
    SELECT …
    SELECT …
EXCEPTION
    WHEN NO_DATA_FOUND THEN
    — какой select инициировал ошибку?
END;
/

Можно создать счетчик, указывающий на sql — оператор:

DECLARE

    v_sel_count NUMBER := 1;
BEGIN

    SELECT …
    v_sel_count := 2;
    SELECT …
    v_sel_count := 3;
    SELECT …

EXCEPTION
    WHEN NO_DATA_FOUND THEN
        INSERT INTO log_tab(info)
        VALUES (‘no data found in select ‘||v_sel_count);
END;
/

Можно разместить каждый select в собственном врутреннем блоке

BEGIN

    BEGIN
        SELECT …
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            INSERT INTO log_tab(info)
            VALUES (‘no data found in select 1’);
    END;

    BEGIN
        SELECT …
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            INSERT INTO log_tab(info)
            VALUES (‘no data found in select 2’);
    END;

    BEGIN
        SELECT …
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            INSERT INTO log_tab(info)
            VALUES (‘no data found in select 3’);
    END;

END;
/

Или использовать : DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
и потом анализировать файл трассировки.

Пусть в нашей программе Oracle выдает ошибку ORA-01844: not f valid month

перехватить его можно так:

EXCEPTION
    WHEN OTHERS THEN
        IF SQLCODE = -1843 THEN

Да, код плохо читаем.
Сделаем его более лучшим:

PROCEDURE my_procedure
IS
    invalid_month EXCEPTION;
    PRAGMA EXCEPTION_INIT(invalid_month, -1843);

BEGIN
    ….
EXCEPTION
    WHEN invalid_month THEN

так уже более понятней.

В этом учебном материале вы узнаете, как использовать встроенные исключительные ситуации в Oracle/PLSQL c синтаксисом и примерами.

Описание

Встроенные исключительные ситуации это исключительные ситуации, которые имеют определенные имена в PL/SQL. Они определены в стандартном пакете в PL/SQL и не могут быть определены программистом.
Oracle имеет стандартный набор встроенных исключительных ситуаций:

Исключительные ситуации ORACLE Ошибки Oracle Пояснения
DUP_VAL_ON_INDEX ORA-00001 Вы пытались выполнить операторы insert или update поля, изменение значения которого нарушит ограничение уникальности поля.
TIMEOUT_ON_RESOURCE ORA-00051 Возбуждается при возникновении таймаута, когда ORACLE ожидает ресурса.
TRANSACTION_BACKED_OUT ORA-00061 Откат удаленной части транзакции.
INVALID_CURSOR ORA-01001 Вы пытаетесь сослаться на курсор, который еще не существует. Это могло произойти потому, что вы выполняете выборку (fetch) курсора, который был закрыт (close) или не был открыт (open).
NOT_LOGGED_ON ORA-01012 Вы пытаетесь выполнить вызов в Oracle, не подключившись к Oracle.
LOGIN_DENIED ORA-01017 Вы пытаетесь войти в Oracle с неверными имя пользователя / пароль.
NO_DATA_FOUND ORA-01403 Вы пробовали один из следующих вариантов:

  1. 1. Вы выполнили SELECT INTO и запрос не вернул ни одной строки.
  2. 2. Вы ссылаетесь на неинициализированную строку в таблице.
  3. 3. Вы читаете после конца файла пакета UTL_FILE.
TOO_MANY_ROWS ORA-01422 Вы пытались выполнить SELECT INTO и запрос вернул более одной строки.
ZERO_DIVIDE ORA-01476 Вы пытались поделить число на ноль.
INVALID_NUMBER ORA-01722 Вы пытаетесь выполнить оператор SQL который пытается преобразовать строку в число.
STORAGE_ERROR ORA-06500 Вы исчерпали доступную память или память повреждена.
PROGRAM_ERROR ORA-06501 Это общее сообщение Обратитесь в службу поддержки Oracle, возбуждается по причине обнаружения внутренней ошибки.
VALUE_ERROR ORA-06502 Вы пытались выполнить операцию и была ошибка преобразования, усечения, или ограничения числовых или символьных данных.
CURSOR_ALREADY_OPEN ORA-06511 Вы попытались открыть курсор, который уже открыт.

Синтаксис

Рассмотри синтаксис встроенных исключительных ситуаций в процедуре и функции.

Синтаксис для процедуры

CREATE [OR REPLACE] PROCEDURE procedure_name
[ (parameter [,parameter]) ]
IS
[declaration_section]BEGIN
executable_sectionEXCEPTION
WHEN exception_name1 THEN
[statements]

WHEN exception_name2 THEN
[statements]

WHEN exception_name_n THEN
[statements]

WHEN OTHERS THEN
[statements]

END [procedure_name];

Синтаксис для функции

CREATE [OR REPLACE] FUNCTION function_name
[ (parameter [,parameter]) ]
RETURN return_datatype
IS | AS
[declaration_section]BEGIN
executable_sectionEXCEPTION
WHEN exception_name1 THEN
[statements]

WHEN exception_name2 THEN
[statements]

WHEN exception_name_n THEN
[statements]

WHEN OTHERS THEN
[statements]

END [function_name];

Пример использования исключительных ситуаций в процедуре.

CREATE OR REPLACE PROCEDURE add_new_supplier

   (supplier_id_in IN NUMBER, supplier_name_in IN VARCHAR2)

IS

BEGIN

   INSERT INTO suppliers (supplier_id, supplier_name )

   VALUES ( supplier_id_in, supplier_name_in );

EXCEPTION

   WHEN DUP_VAL_ON_INDEX THEN

      raise_application_error (-20001,‘Вы пытались вставить дубликат supplier_id.’);

   WHEN OTHERS THEN

      raise_application_error (-20002,‘Произошла ошибка при вставке supplier.’);

END;

В этом примере, мы перехватываем исключительную ситуацию DUP_VAL_ON_INDEX. Мы можем также использовать WHEN OTHERS, чтобы перехватить остальные исключительные ситуации.

EXCEPTION блок

Обработка ошибок производится в блоке exception:

begin
	-- Код
exception
	-- Обработка ошибок
	when .... then .....;
	when .... then .....;
	when .... then .....;
end;

Ошибки отлавливаются в пределах блока begin-end. Работает это так:

  1. Сначала выполняется код между begin и exception
  2. Если ошибок не произошло, тогда секция между exception и end ингорируется
  3. Если в процессе выполнения кода происходит ошибка, выполнение останавливается
    и переходит в блок exception.
  4. Если в блоке находится обработчик для исключения, вызывается код после then
  5. Если обработчик не найден, исключение выбрасывается за пределы блока begin-end

Пример блока с обработчиком исключений:

declare
    l_val number;
begin
    select 1 into l_var
    where 2 > 3;
exception
    when no_data_found then
        dbms_output.put_line('Нет данных');
    when dup_val_on_index then
        dbms_output.put_line('Такая строка уже есть');
end;

Предопределённые ошибки

Ошибки обрабатываются по их имени, поэтому часть наиболее частых ошибок в PL/SQL
уже предопределена, как например вышеуказанные no_data_found и dup_val_on_index.

Ниже показан их список и в каких случаях ошибка может возникнуть.

Ошибка Когда возникает
ACCESS_INTO_NULL Попытка присвоить значение атрибуту неинициализированного объекта.
CASE_NOT_FOUND В выражении CASE не нашлось подходящего условия When, и в нём отсутствует условие Else.
COLLECTION_IS_NULL Попытка вызвать любой метод коллеции(за исключением Exists) в неинициализированной вложенной таблице или ассоциативном массиве, или попытка присвоить значения элементам неинициализированной вложенной таблице или ассоциативного массива.
CURSOR_ALREADY_OPEN Попытка открыть уже открытый курсор. Курсор должен быть закрыт до момента его открытия. Цикл FOR автоматически открывает курсор, который использует, поэтому его нельзя открывать внутри тела цикла.
DUP_VAL_ON_INDEX Попытка вставить в таблицу значения, которые нарушают ограничения, созданные уникальным индексом. Иными словами, ошибка возникает, когда в колонки уникального индекса добавляются дублирующие записи.
INVALID_CURSOR Попытка вызова недопустимой операции с курсором, например закрытие не открытого курсора.
INVALID_NUMBER Ошибка приведения строки в число в SQL запросе, потому что строка не является числовым представлением (В PL/SQL коде в таких случаях выбрасывается VALUE_ERROR). Также может возникнуть, если значение параметра LIMIT в выражении Bulk collect не является положительным числом.
LOGIN_DENIED Попытка подключиться к БД с неправильным логином или паролем.
NO_DATA_FOUND Выражение SELECT INTO не возвращает ни одной строки, или программа ссылается на удалённый элемент во вложенной таблице или неинициализированному объекту в ассоциативной таблице. Агрегатные функции в SQL, такие как AVG или SUM, всегда возвращают значение или null. Поэтому, SELECT INTO, которое вызывает только агрегатные функции, никогда не выбросит NO_DATA_FOUND. Выражение FETCH работает так, что ожидает отсутствия строк в определённый момент, поэтому ошибка также не выбрасывается.
NOT_LOGGED_ON Обращение к БД будучи неподключенным к ней
PROGRAM_ERROR Внутренняя проблема в PL/SQL.
ROWTYPE_MISMATCH Курсорные переменные, задействованные в присваивании, имеют разные типы.
SELF_IS_NULL Попытка вызвать метод неинициализированного объекта.
STORAGE_ERROR Переполнение памяти или память повреждена.
SUBSCRIPT_BEYOND_COUNT Попытка обратиться к элементу вложенной таблицы или ассоциативного массива по индексу, который больше, чем количество элементов в коллекции.
SUBSCRIPT_OUTSIDE_LIMIT Попытка обратиться к элементу коллекции по индексу(например, -1) вне допустимого диапазона.
SYS_INVALID_ROWID Ошибка конвертации строки в rowid.
TIMEOUT_ON_RESOURCE Возникает при ожидании доступности ресурса.
TOO_MANY_ROWS Выражение SELECT INTO возвращает более одной строки.
VALUE_ERROR Арифметическая ошибка, ошибка конвертации, или превышение размерности типа. Может возникнуть, к примеру, если в переменную с типом number(1) попытаться присвоить значение 239.
ZERO_DIVIDE Попытка деления на ноль.

Объявление собственных ошибок

Можно объявлять собственные исключения, давая им
названия, которые полнее раскрывают их суть.

declare
    -- Объявление собственного исключения,
    -- которое мы выбрасываем, если значение заработной
    -- платы ниже дозволенного минимума.
    exc_too_low_salary exception;
    l_salary number := 100;
begin
    if l_salary < 200 then
        -- Бросаем ошибку.
        raise exc_too_low_salary;
    end if;

exception
    when exc_too_low_salary then
        dbms_output.put_line('Обработчик исключения');
end;

Область видимости собственного исключения в данном случае — блок, в котором оно
объявлено. Вне этого блока обработать исключение не получится.

Для более удобной работы с собственными исключениями их можно вынести в отдельный пакет:

create or replace pck_hr_errors is

-- Объявляем исключения в спецификации пакета.
-- Тела пакет не имеет, только спецификацию.

exc_wrong_name      exception;
exc_too_low_salary  exception;
exc_incorrect_pass  exception;

end;

Далее работать с этими исключениями можно подобным образом:

begin
    -- Какой-то код
    ...
exception
    when pck_hr_errors.exc_too_low_salary then
        -- Обработка исключения
        ...
end;

Обработка непредопределённых ошибок

Не все ошибки в Oracle являются предопределёнными. Когда возникает необходимость
их обрабатывать, нужно связать переменную типа exception с кодом ошибки, которую нужно обработать:

declare
    -- объявляем ошибку
    e_incorrect_date exception;

    -- связываем ошибку с кодом
    pragma exception_init(e_incorrect_date, -1830);
begin
    dbms_output.put_line(to_date('2022-02-01', 'dd.mm.yyyy'));
exception
    when e_incorrect_date then
        dbms_output.put_line ('Неправильный формат даты');
end;

Следует помнить, что коды ошибок являются отрицательными числами.

Ошибки и вложенные блоки

Если ошибка не обрабатывается в пределах блока begin ..end,
она выбрасывается за его пределы. Далее эта ошибка может быть
обработана блоком exception внешнего блока. Если и там ошибка
не обрабатывается, она выбрасывается и за его пределы, и так
далее.

declare
    a number;

-- Внешний блок
begin
    -- Вложенный блок
    begin
        a := 1 / 0;
        -- Важно помнить, что после возникновения ошибки
        -- выполнение кода в пределах блока прекращается.
        -- Следующий код не будет выполнен
        dbms_output.put_line('Этот код не будет выполнен');
    end;
exception
    when zero_divide:
        dbms_otuput.put_line('Ошибка обработана внешним блоком');
end;

raise_application_error

Если ошибка, брошенная Oracle, достигает клиентского приложения,
то она имеет примерно такой текст: ORA-01722 invalid number.

Процедура raise_application_error позволяет вызвать исключение
с заданным номером, связать его с сообщением и отправить его
вызывающему приложению.

begin
    raise_application_error(-20134, 'Неправильный номер паспорта');
end;

Диапазон возможных кодов ошибок [-20999, 20000]. Сообщение должно
помещаться в тип varchar2(2000).

Можно указать третий boolean параметр, который в случае
значения true добавит текущую ошибку в список предыдущих
ошибок, возникших в приложении. По умолчанию значение равно false,
что значит, про сообщение об ошибке заменяет все предыдущие ошибки
собой.

Мы можем объявить собственное исключение, связать его с номером
в диапазоне [-20999, 20000] и использовать для обработки исключений,
брошенных с помощью raise_application_error:

declare
    e_wrong_passport exception;
    
    -- связываем ошибку с кодом
    pragma exception_init(e_wrong_passport, -20999);
begin
    raise_application_error(-20999, 'Неправильный номер паспорта');
exception
    when e_wrong_password then
        dbms_output.put_line ('Неправильный номер паспорта');
end;

October 11, 2020
ORACLE

This article contains information about Oracle PL/SQL Exception and Types such as system defined, user defined.

What is Exception in Oracle PL/SQL?

These are the structures used for the management of errors that occur during the execution of commands.

Oracle PL/SQL Exception Types

  • System-defined
  • User-defined

The use of the PL / SQL Exception structure is as follows.

DECLARE

     definitions

BEGIN

     commands

EXCEPTION

    WHEN HATATURU THEN

         commands

    WHEN OTHERS THEN

         commands

END;

Sample Exception Usage is as follows;

BEGIN

    DBMS_OUTPUT.put_line(3/0);

EXCEPTION

    WHEN ZERO_DIVIDE THEN

        DBMS_OUTPUT.put_line(‘Divide by zero error.’);

    WHEN OTHERS THEN

        DBMS_OUTPUT.put_line(‘unknown error.’);

END;

System Defined Exceptions in Oracle PL/SQL

The Exception type previously created by Oracle PL / SQL is called System defined.

System-defined exception types are listed below.

  • ACCESS_INTO_NULL
  • ASE_NOT_FOUND
  • COLLECTION_IS_NULL
  • DUP_VAL_ON_INDEX
  • INVALID_CURSOR
  • INVALID_NUMBER, LOGIN_DENIED
  • NO_DATA_FOUND
  • NOT_LOGGED_ON
  • PROGRAM_ERROR
  • ROWTYPE_MISMATCH
  • SELF_IS_NULL
  • STORAGE_ERROR
  • TOO_MANY_ROWS
  • VALUE_ERROR
  • ZERO_DIVIDE

User Defined Exceptions in Oracle PL/SQL

Oracle also allows custom exception definition. These Exception types are called user defined exceptions. You can create User Defined Exception as follows.

DECLARE

    MY_CUSTOM_ERROR EXCEPTION;

BEGIN

    NULL;

END;

We can set a special error code for the exception as follows.

DECLARE

    CUSTOM_ERROR EXCEPTION;

    PRAGMA EXCEPTION_INIT (CUSTOM_ERROR, 1453);

BEGIN

    NULL;

END;

The occured error can be triggered by RAISE.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

SET SERVEROUTPUT ON;

DECLARE

    CUSTOM_ERROR EXCEPTION;

    PRAGMA EXCEPTION_INIT (CUSTOM_ERROR, 1453);

    v_sayi PLS_INTEGER := ‘0’;

BEGIN

    IF v_sayi = 0 THEN

        RAISE CUSTOM_ERROR;

         RAISE_APPLICATION_ERROR(1453, ‘Another Error.’);

    END IF;

EXCEPTION

    WHEN CUSTOM_ERROR THEN

        DBMS_OUTPUT.put_line(‘Special Error Occured.’);

        DBMS_OUTPUT.put_line(SQLERRM);

    WHEN OTHERS THEN

        DBMS_OUTPUT.put_line(‘Unknown Error Occured.’);

END;

The RAISE_APPLICATION_ERROR function takes the “error code”, “error message”, and “whether the error should be replaced with existing errors” as parameters to create a custom error.

You can find more detailed information about below topics in the below link.

PL/SQL Tutorial

You will find below topics in this article.

  1. What is PL/SQL
  2. Oracle PL/SQL Data Types and Variables and Literals
  3. Oracle PL/SQL Operators
  4. Oracle PL/SQL Conditional Statements
  5. Oracle PL/SQL Loops
  6. Oracle PL/SQL Procedures and Procedure Parameters
  7. Oracle PL/SQL Functions
  8. Oracle PL/SQL Cursor
  9. Oracle PL/SQL Records
  10. Oracle PL/SQL Exception
  11. Oracle PL/SQL Trigger
  12. Oracle PL/SQL Packages
  13. Oracle PL/SQL Collections

You can find more information about exception at docs.oracle.com

Loading

This page contains an Oracle SQLCODE list of errors that you may encounter when working with Oracle SQL. The codes are ANSI-standard, which means you should find them with all relational databases.s

The list of SQLCODE messages is shown below.

Code Explanation -7 Statement contains the illegal character character -10 The string constant beginning string is not terminated -29 Into clause required -60 Invalid type specification : spec -84 Unacceptable SQL statement -101 The statement is too long or too complex -102 Literal string is too long. string begins string -103 literal is an invalid numeric literal -104 Illegal symbol “token”. some symbols that might be legal are: token-list -105 Invalid string -107 The name name is too long. maximum allowable size is size -109 clause clause is not permitted -110 Invalid hexadecimal literal beginning string -111 A column function does not include a column name -112 The operand of a column function is another column function -113 Invalid character found in string, reason code – nnn -114 The location name location does not match the current server -115 A predicate is invalid because the comparison operator operator is followed by a parenthesized list or by any or all without a subquery -117 The number of insert values is not the same as the number of object columns -118 The object table or view of the insert, delete, or update statement is also identified in a from clause -119 A column identified in a having clause is not included in the group by clause -120 A where clause or set clause includes a column function -121 The column name is identified more than once in the insert or update statement -122 A select statement with no group by clause contains a column name and a column function in the select clause or a column name is contained in the select clause but not in the group by clause -125 An integer in the order by clause does not identify a column of the result -126 The select statement contains both an update clause and an order by clause -127 Distinct is specified more than once in a subselect -128 Invalid use of NULL in a predicate -129 The statement contains too many table names -130 The escape clause consists of more than one character, or the string pattern contains an invalid occurrence of the escape character -131 Statement with like predicate has incompatible data types -132 A like predicate is invalid because the second operand is not a string -133 A column function in a subquery of a having clause is invalid because all column references in its argument are not correlated to the group by result that the having clause is applied to -134 Improper use of long string column column-name or a host variable of maximum length greater than 254 -136 Sort cannot be executed because the sort key length is greater than 4000 bytes -137 Result of concatenation too long -138 The second or third argument of the substr function is out of range -144 Invalid section number number -150 The object of the insert, delete, or update statement is a view for which the requested operation is not permitted -151 The update statement is invalid because the catalog description of column column-name indicates that it cannot be updated -152 The drop clause clause in the alter statement is invalid because constraint-name is a constraint-type -153 The create view statement does not include a required column list -154 The create view failed because the view definition contains a union, a union all, or a remote object -156 The statement does not identify a table -157 Only a table name can be specified in a foreign key clause. object-name is not the name of a table. -158 The number of columns specified for the view is not the same as the number of columns specified by the select clause -159 Drop or comment on token identifies a(n) token rather than a(n) token -160 The with check option cannot be used for the specified view -161 The insert or update is not allowed because a resulting row does not satisfy the view definition -164 auth-id1 does not have the privilege to create a view with qualification authorization id -170 The number of arguments specified for function-name is invalid -171 The data type, length, or value of argument nn of function-name is invalid -173 UR is specified on the with clause but the cursor is not read-only -180 The string representation of a datetime value has invalid syntax -181 The string representation of a datetime value is not a valid datetime value -182 An arithmetic expression with a datetime value is invalid -183 An arithmetic operation on a date or timestamp has a result that is not within the valid range of dates -184 An arithmetic expression with a datetime value contains a parameter marker -185 The local format option has been used with a date or time and no local exit has been installed -186 The local date length or local time length has been increased and executing program relies on the old length -187 A reference to a current date/time special register is invalid because the mvs tod clock is bad or the mvs parmtz is out of range -188 The string representation of a name is invalid -189 Ccsid ccsid is unknown or invalid for the data type or subtype -191 A string cannot be used because it is invalid mixed data -197 Qualified column names in order by clause not permitted when union or union all specified -198 The operand of the prepare or execute immediate statement is blank or empty -199 Illegal use of keyword keyword. token token-list was expected -203 A reference to column column-name is ambiguous -204 name is an undefined name -205 column-name is not a column of table table-name -206 column-name is not a column of an inserted table, updated table, or any table identified in a from clause -208 The order by clause is invalid because column name is not part of the result table -198 The operand of the prepare or execute immediate statement is blank or empty -199 Illegal use of keyword keyword. token token-list was expected -203 A reference to column column-name is ambiguous -204 name is an undefined name -205 column-name is not a column of table table-name -206 column-name is not a column of an inserted table, updated table, or any table identified in a from clause -208 The order by clause is invalid because column name is not part of the result table -219 The required explanation table table-name does not exist -220 The column column-name in explanation table table-name is not defined properly -221 “set of optional columns” in explanation table table-name is incomplete. optional column column-name is missing -250 The local location name is not defined when processing a three-part object name -251 Token name is not valid -300 The string contained in host variable or parameter position-number is not nul-terminated -301 The value of input host variable or parameter number position-number cannot be used as specified because of its data type -302 The value of input variable or parameter number position-number is invalid or too large for the target column or the target value -303 A value cannot be assigned to output host variable number position-number because the data types are not comparable -304 A value with data type data-type1 cannot be assigned to a host variable because the value is not within the range of the host variable in position position-number with data type data-type2 -305 The NULL value cannot be assigned to output host variable number position-number because no indicator variable is specified -309 A predicate is invalid because a referenced host variable has the NULL value -310 Decimal host variable or parameter number contains non decimal data. -311 The length of input host variable number position-number is negative or greater than the maximum -312 Undefined or unusable host variable variable-name -313 The number of host variables specified is not equal to the number of parameter markers -314 The statement contains an ambiguous host variable reference -330 A string cannot be used because it cannot be translated. reason reason-code, character code-point, host variable position-number -331 A string cannot be assigned to a host variable because it cannot be translated. reason reason-code, character code-point, position position-number -332 Sysstrings does not define a translation from ccsid ccsid to ccsid -333 The subtype of a string variable is not the same as the subtype known at bind time and the difference cannot be resolved by translation -338 An on clause is invalid -339 The SQL statement cannot be executed from an ascii based drda application requestor to a v2r2 db2 subsystem -351 An unsupported SQLtype was encountered in position “” on a prepare or describe operation -400 The catalog has the maximum number of user defined indexes -401 The operands of an arithmetic or comparison operation are not comparable -402 An arithmetic function or operator arith-fop is applied to character or datetime data -404 The update or insert statement specifies a string that is too long column-name -405 The numeric literal literal cannot be used as specified because it is out of range -406 A calculated or derived numeric value is not within the range of its object column -407 An update or insert value is NULL, but the object column column-name cannot contain NULL values -408 An update or insert value is not comparable with the data type of its object column column-name -409 Invalid operand of a count function -410 The floating point literal literal contains more than 30 characters -411 Current SQLid cannot be used in a statement that references remote objects -412 The select clause of a subquery specifies multiple columns -414 A like predicate is invalid because the first operand is not a string -415 The corresponding columns, column-number, of the operands of a union or a union all do not have comparable column descriptions -416 An operand of a union contains a long string column -417 A statement string to be prepared includes parameter markers as the operands of the same operator -418 A statement string to be prepared contains an invalid use of parameter markers -419 The decimal divide operation is invalid because the result would have a negative scale -420 The value of a character string argument was not acceptable to the function-name function -421 The operands of a union or union all do not have the same number of columns -426 Dynamic commit not valid at an application server where updates are not allowed -427 Dynamic rollback not valid at an application server where updates are not allowed -440 The number of parameters in the parameter list does not match the number of parameters expected for stored procedure name, authid authid, luname luname. number parameters were expected. -444 User program name could not be found -450 Stored procedure name, parameter number number, overlayed storage beyond its declared length -469 SQL call statement must specify an output host variable for parameter number. -470 SQL call statement specified a NULL value for input parameter number, but the stored procedure does not support NULL values -471 SQL call for stored procedure name failed due to reason rc -500 The identified cursor was closed when the connection was destroyed -501 The cursor identified in a fetch or close statement is not open -502 The cursor identified in an open statement is already open -503 A column cannot be updated because it is not identified in the update clause of the select statement of the cursor -504 The cursor name cursor-name is not defined -507 The cursor identified in the update or delete statement is not open -508 The cursor identified in the update or delete statement is not positioned on a row -509 The table identified in the update or delete statement is not the same table designated by the cursor -510 The table designated by the cursor of the update or delete statement cannot be modified -511 The for update clause cannot be specified because the table designated by the cursor cannot be modified -512 Statement reference to remote object is invalid -513 The alias alias-name must not be defined on another local or remote alias -514 The cursor cursor-name is not in a prepared state -516 The describe statement does not identify a prepared statement -517 Cursor cursor-name cannot be used because its statement name does not identify a prepared select statement -518 The execute statement does not identify a valid prepared statement -519 The prepare statement identifies the select statement of the opened cursor cursor-name -525 The SQL statement cannot be executed because it was in error at bind time for section = sectno package = pkgname consistency token = x’contoken’ -530 The insert or update value of foreign key constraint-name is invalid -531 The primary key in a parent row cannot be updated because it has one or more dependent rows in relationship constraint-name -532 The relationship constraint-name restricts the deletion of row with rid x’rid-number’ -533 Invalid multiple-row insert -534 The primary key cannot be updated because of multiple-row update -536 The delete statement is invalid because table table-name can be affected by the operation -537 The primary key clause, a foreign key clause, or a unique clause identifies column column-name more than once -538 Foreign key name does not conform to the description of the primary key of table table-name -539 Table table-name does not have a primary key -540 The definition of table table-name is incomplete because it lacks a primary index or a required unique index -542 column-name cannot be a column of a primary key or a unique constraint because it can contain NULL values -543 A row in a parent table cannot be deleted because the check constraint check-constraint restricts the deletion -544 The check constraint specified in the alter table statement cannot be added because an existing row violates the check constraint -545 The requested operation is not allowed because a row does not satisfy the check constraint check-constraint -546 The check constraint constraint-name is invalid -548 A check constraint that is defined with column-name is invalid -549 The statement statement is not allowed for object_type1 object_name because the bind option dynamicrules(bind) in the object_type2 is in effect -551 auth-id does not have the privilege to perform operation operation on object object-name -552 auth-id does not have the privilege to perform operation operation -553 auth-id specified is not one of the valid authorization ids -554 An authorization id cannot grant a privilege to itself -555 An authorization id cannot revoke a privilege from itself -556 authid2 cannot have the privilege privilege on_object revoked by authid1 because the revokee does not possess the privilege or the revoker did not make the grant -557 Inconsistent grant/revoke keyword keyword. permitted keywords are keyword-list -558 Invalid clause or combination of clauses on a grant or revoke -559 All authorization functions have been disabled -567 bind-type authorization error using auth-id authority package = package-name privilege = privilege -571 The statement would result in a multiple site update -574 The specified default value conflicts with the column definition. -601 The name of the object to be created is identical to the existing name name of the object type obj-type -602 Too many columns specified in a create index -603 A unique index cannot be created because the table contains rows which are duplicates with respect to the values of the identified columns -604 A column definition specifies an invalid length, precision, or scale attribute -607 Operation or option operation is not defined for this object -611 Only lockmax 0 can be specified when the lock size of the tablespace is tablespace or table -612 column-name is a duplicate column name -613 The primary key or a unique constraint is too long or has too many columns -614 The index cannot be created because the sum of the internal lengths of the identified columns is greater than the allowable maximum -615 operation-type is not allowed on a package in use -616 obj-type1 obj-name1 cannot be dropped because it is referenced by obj-type2 obj-name2 -617 A type 1 index cannot be defined on a table in a table space with locksize row -618 Operation operation is not allowed on system databases -619 Operation disallowed because the work file database is not stopped -620 Keyword keyword in stmt type statement is not permitted for a table space in the work file database -621 Duplicate dbid dbid was detected and previously assigned to database-name -622 For mixed data is invalid because the mixed data install option is no -623 A clustering index already exists on table table-name -624 Table table-name already has a primary key -625 Table table-name does not have an index to enforce the uniqueness of the primary key -626 The alter statement is not executable because the page set is not stopped -627 The alter statement is invalid because the pageset has user-managed data sets -628 The clauses are mutually exclusive. -629 Set NULL cannot be specified because foreign key name cannot contain NULL values -630 The where not NULL specification is invalid for type 1 indexes -631 Foreign key name is too long or has too many columns -632 The table cannot be defined as a dependent of table-name because of delete rule restrictions -633 The delete rule must be delete-rule -634 The delete rule must not be cascade -635 The delete rules cannot be different or cannot be set NULL -636 The partitioning keys are not specified in ascending or descending order -637 Duplicate keyword keyword -638 Table table-name cannot be created because column definition is missing -639 A NULLable column of a foreign key with a delete rule of set NULL cannot be a column of the key of a partitioned index -640 Locksize row cannot be specified because table in this tablespace has type 1 index -642 Too many columns in unique constraints -643 Check constraint exceeds maximum allowable length -644 Invalid value specified for keyword keyword in stmt-type tatement -646 Table table-name cannot be created in partitioned/default table space tspace-name because it already contains a table -647 Bufferpool bp-name cannot be specified because it has not been activated -650 The alter index cannot be executed, reason reason -651 Table description exceeds maximum size of object descriptor. -652 Violation of installation defined edit or validation procedure proc-name -653 Table table-name in partitioned table space tspace-name is not available because its partitioned index has not been created -655 The create or alter stogroup is invalid because the storage group would have both specific and non-specific volume ids -660 Index index-name cannot be created on partitioned table space tspace-name because key limits are not specified -661 Index index-name cannot be created on partitioned table space tspace-name because the number of part specifications is not equal to the number of partitions of the table space -662 A partitioned index cannot be created on a non-partitioned table space tspace-name -663 The number of key limit values is either zero, or greater than the number of columns in the key of index index-name -665 The part clause of an alter statement is omitted or invalid -666 stmt-verb object cannot be executed because function is in progress -667 The clustering index for a partitioned table space cannot be explicitly dropped -668 The column cannot be added to the table because the table has an edit procedure -669 A table in a partitioned table space cannot be explicitly dropped -670 The record length of the table exceeds the page size limit -671 The bufferpool attribute of the table space cannot be altered as specified because it would change the page size of the table space -672 Operation drop not allowed on table table_name -676 A 32k page bufferpool may not be used for an index -677 Insufficient virtual storage for bufferpool expansion -678 The literal literal specified for the index limit key must conform to the data type data-type of the corresponding column column-name -679 The object name cannot be created because a drop is pending on the object -680 Too many columns specified for a table -681 Column column-name in violation of installation defined field procedure. rt: return-code, rs: reason-code, msg: message-token -682 Field procedure procedure-name could not be loaded -683 Invalid column type for fieldproc, bit data, sbcs data, or mixed data option, column-name -684 The length of literal list beginning string is too long -685 Invalid field type, column-name -686 Column defined with a field procedure can not compare with another column with different field procedure -687 Field types incomparable -688 Incorrect data returned from field procedure, column-name, msgno -689 Too many columns defined for a dependent table -690 The statement is rejected by data definition control support. reason reason-code -691 The required registration table table-name does not exist -692 The required unique index index-name for ddl registration table table-name does not exist -693 The column column-name in ddl registration table or index table-name (index-name) is not defined properly -694 The ddl statement cannot be executed because a drop is pending on the ddl registration table table-name -713 The replacement value for special-register is invalid -715 Program program-name with mark release-dependency-mark failed because it depends on functions of the release from which fallback has occurred -716 Program program-name precompiled with incorrect level for this release. -717 Bind-type for object-type object-name with mark release-dependency-mark failed because object-type depends on functions of the release from which fallback has occurred. -718 Rebind for package package-name failed because ibmreqd of ibmreqd is invalid -719 Bind add error using auth-id authority package package-name already exists -720 Bind error, attempting to replace package = package_name with version = version2 but this version already exists -721 Bind error for package = pkg-id contoken = ‘contoken’x is not unique so it cannot be created -722 Bind-type error using auth-id authority package package-name does not exist -726 Bind error attempting to replace package = . there are enable or disable entries currently associated with the package -730 The parent of a table in a read-only shared database must also be a table in a read-only shared database -731 User-defined dataset dsname must be defined with shareoptions(1,3) -732 The database is defined on this subsystem with the roshare read attribute but the table space or index space has not been defined on the owning subsystem -733 The description of a table space, index space, or table in a roshare read database must be consistent with its description in the owner system -734 The roshare attribute of a database cannot be altered from roshare read -735 Database dbid cannot be accessed because it is no longer a shared database -736 Invalid obid obid specified -737 Implicit table space not allowed -741 A work file database is already defined for member member-name -742 Dsndb07 is the implicit work file database -751 A stored procedure has been placed in must_rollback state due to SQL operation name -752 The connect statement is invalid because the process is not in the connectable state -802 Exception error ‘exception-type’ has occurred during ‘operation-type’ operation on ‘data-type’ data, position ‘position-number’ -803 An inserted or updated value is invalid because the index in index space indexspace-name constrains columns of the table so no two rows can contain duplicate values in those columns. rid of existing row is x’rid’ -804 An error was found in the application program input parameters for the SQL statement. reason reason -805 Dbrm or package name location-name.collection-id.dbrm-name.consistency -token not found in plan plan-name. reason reason -807 Access denied: package package-name is not enabled for access from connection-type connection-name -808 The connect statement is not consistent with the first connect statement -811 The result of an embedded select statement is a table of more than one row, or the result of the subquery of a basic predicate is more than one value -812 The SQL statement cannot be processed because a blank collection-id was found in the current packageset special register while trying to form a qualified package name for program program-name.consistency-token using plan plan-name -815 A group by or having clause is implicitly or explicitly specified in an embedded select statement or a subquery of a basic predicate -817 The SQL statement cannot be executed because the statement will result in a prohibited update operation -818 The precompiler-generated timestamp x in the load module is different from the bind timestamp y built from the dbrm z -819 The view cannot be processed because the length of its parse tree in the catalog is zero -820 The SQL statement cannot be processed because catalog-table contains a value that is not valid in this release -822 The SQLda contains an invalid data address or indicator variable address -840 Too many items returned in a select or insert list -842 A connection to location-name already exists -843 The set connection or release statement must specify an existing connection -870 The number of host variables in the statement is not equal to the number of descriptors -900 The SQL statement cannot be executed because the application process is not connected to an application server -901 Unsuccessful execution caused by a system error that does not preclude the successful execution of subsequent SQL statements -902 Pointer to the essential control block (ct/rda) has value 0, rebind required -904 Unsuccessful execution caused by an unavailable resource. reason reason-code, type of resource resource-type, and resource name resource-name -905 Unsuccessful execution due to resource limit being exceeded, resource name = resource-name limit = limit-amount1 cpu seconds (limit-amount2 service units) derived from limit-source -906 The SQL statement cannot be executed because this function is disabled due to a prior error -908 Bind-type error using auth-id authority bind, rebind or auto-rebind operation is not allowed -909 The object has been deleted -910 The SQL statement cannot access an object on which a drop or alter is pending -911 The current unit of work has been rolled back due to deadlock or timeout. reason reason-code, type of resource resource-type, and resource name resource-name -913 Unsuccessful execution caused by deadlock or timeout. reason code reason-code, type of resource resource-type, and resource name resource-name -917 Bind package failed -918 The SQL statement cannot be executed because a connection has been lost -919 A rollback operation is required -922 Authorization failure: error-type error. reason reason-code -923 Connection not established: db2 condition reason reason-code, type resource-type, name resource-name -924 Db2 connection internal error, function-code, return-code, reason-code -925 Commit not valid in ims/vs or cics environment -926 Rollback not valid in ims/vs or cics environment -927 The language interface (li) was called when the connecting environment was not established. the program should be invoked under the dsn command -929 Failure in a data capture exit: token -939 Rollback required due to unrequested rollback of a remote server -947 The SQL statement failed because it will change a table defined with data capture changes, but the data cannot be propagated -948 Distributed operation is invalid -950 The location name specified in the connect statement is invalid or not listed in the communications database -965 Stored procedure procname terminated abnormally -2001 The number of host variable parameters for a stored procedure is not equal to the number of expected host variable parameters. actual number SQLdanum, expected number opnum -30000 Execution failed due to a distribution protocol error that will not affect the successful execution of subsequent commands or SQL statements: reason reason-code (sub-code) -30020 Execution failed due to a distribution protocol error that caused deallocation of the conversation: reason -30021 Execution failed due to a distribution protocol error that will affect the successful execution of subsequent commands or SQL statements: manager manager at level level not supported error -30030 Commit request was unsuccessful, a distribution protocol violation has been detected, the conversation has been deallocated. original SQLcode=original-SQLcode and original SQLstate=original-SQLstate -30040 Execution failed due to unavailable resources that will not affect the successful execution of subsequent commands or SQL statements. reason type of resource resource name product id rdbname -30041 Execution failed due to unavailable resources that will affect the successful execution of subsequent commands and SQL statements reason type of resource resource name product id rdbname -30050 command or SQL statement invalid while bind process in progress -30051 Bind process with specified package name and consistency token not active -30052 Program preparation assumptions are incorrect -30053 Owner authorization failure -30060 Rdb authorization failure -30061 Rdb not found -30070 command not supported error -30071 object not supported error -30072 : parameter not supported error -30073 : parameter value not supported error -30074 Reply message with codepoint (svrcod) not supported error -30080 Communication error code (subcode) -30090 Remote operation invalid for application execution environment

Понравилась статья? Поделить с друзьями:
  • Oriel 963 ash ошибка что делать
  • Oracle vm virtualbox ошибка 0x80004005
  • Oriel 960 ошибка ash
  • Oriel 790 ошибка ash как исправить
  • Oriel 790 ошибка a5h