Ошибка ora 04088 error during execution of trigger

I am facing following problem. I created a table with following sql in Oracle 11g release 2:

create table loc_aud
(
username varchar2(20),
audittime date,
IP VARCHAR2(30),
locno number(4),
old_city number(4),
new_city number(4)
);

This table is in sys schema. Then I created a trigger for value base auditing using following command in sys schema

CREATE OR REPLACE TRIGGER location_audit    
AFTER UPDATE OF city    
ON hr.locations     
REFERENCING NEW AS NEW OLD AS OLD     
FOR EACH ROW  
BEGIN 
IF :old.city != :new.city THEN
     INSERT INTO loc_aud  
     VALUES (user, sysdate, UTL_INADDR.get_host_address,
     :new.location_id,:old.city,:new.city);
  END IF; 
END;

After that I connected with hr schema and tried to update the city column with following command:

update locations set city = 'Dhaka' where location_id = 2100;

But it is giving me following errors

update locations set city = 'Dubai' where location_id = 2100
       *
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at "SYS.LOCATION_AUDIT", line 3
ORA-04088: error during execution of trigger 'SYS.LOCATION_AUDIT'

What am I doing wrong?

This is how exceptions work: if you catch them, they aren’t automatically raised to the caller. So don’t (go) catch them ;) if that’s what you want.

The

  IF SQL%ROWCOUNT >= 1 THEN
    raise_application_error(-20901, 'Salary out of range!');
  END IF;

Is caught in your trigger, and interrupts the update, by your exception block:

EXCEPTION
  WHEN ...
  WHEN OTHERS THEN
    dbms_output.put_line(SQLCODE || SQLERRM);
    raise_application_error(-20901, 'Salary out of range!');
END;

But you do something wrong here!

… because you raise your Salary error event if its not linked with the amount! You raise it in any «OTHERS» case.

You must remove this thing raising the wrong error in any case, so:

EXCEPTION
  WHEN no_data_found THEN
    dbms_output.put_line(SQLCODE || SQLERRM);
  WHEN too_many_rows THEN
    dbms_output.put_line(SQLCODE || SQLERRM);
  WHEN OTHERS THEN
    dbms_output.put_line(SQLCODE || SQLERRM);
    raise;
END;

I created a trigger as below:

CREATE OR REPLACE TRIGGER trigger_test
AFTER INSERT ON trigger_1
FOR EACH ROW
DECLARE
t_identifier VARCHAR2(10);
t_name VARCHAR2(20);
BEGIN
t_identifier := (:NEW.IDENTIFIER);
t_name := (:NEW.NAME);
INSERT INTO trigger_2(IDENTIFIER,NAME)VALUES(t_identifier,t_name);
COMMIT;
END;

I am trying to insert a row in trigger_1

INSERT INTO trigger_1(IDENTIFIER,NAME)
VALUES('1234567','Vijay');

It is giving me the errors:

ORA-04092: cannot COMMIT in a trigger
ORA-06512: at "LVSDBO46.TRIGGER_TEST", line 8
ORA-04088: error during execution of trigger 'LVSDBO46.TRIGGER_TEST'

Could nybody please help?

I am facing following problem. I created a table with following sql in Oracle 11g release 2:

create table loc_aud
(
username varchar2(20),
audittime date,
IP VARCHAR2(30),
locno number(4),
old_city number(4),
new_city number(4)
);

This table is in sys schema. Then I created a trigger for value base auditing using following command in sys schema

CREATE OR REPLACE TRIGGER location_audit    
AFTER UPDATE OF city    
ON hr.locations     
REFERENCING NEW AS NEW OLD AS OLD     
FOR EACH ROW  
BEGIN 
IF :old.city != :new.city THEN
     INSERT INTO loc_aud  
     VALUES (user, sysdate, UTL_INADDR.get_host_address,
     :new.location_id,:old.city,:new.city);
  END IF; 
END;

After that I connected with hr schema and tried to update the city column with following command:

update locations set city = 'Dhaka' where location_id = 2100;

But it is giving me following errors

update locations set city = 'Dubai' where location_id = 2100
       *
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at "SYS.LOCATION_AUDIT", line 3
ORA-04088: error during execution of trigger 'SYS.LOCATION_AUDIT'

What am I doing wrong?

I am facing following problem. I created a table with following sql in Oracle 11g release 2:

create table loc_aud
(
username varchar2(20),
audittime date,
IP VARCHAR2(30),
locno number(4),
old_city number(4),
new_city number(4)
);

This table is in sys schema. Then I created a trigger for value base auditing using following command in sys schema

CREATE OR REPLACE TRIGGER location_audit    
AFTER UPDATE OF city    
ON hr.locations     
REFERENCING NEW AS NEW OLD AS OLD     
FOR EACH ROW  
BEGIN 
IF :old.city != :new.city THEN
     INSERT INTO loc_aud  
     VALUES (user, sysdate, UTL_INADDR.get_host_address,
     :new.location_id,:old.city,:new.city);
  END IF; 
END;

After that I connected with hr schema and tried to update the city column with following command:

update locations set city = 'Dhaka' where location_id = 2100;

But it is giving me following errors

update locations set city = 'Dubai' where location_id = 2100
       *
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at "SYS.LOCATION_AUDIT", line 3
ORA-04088: error during execution of trigger 'SYS.LOCATION_AUDIT'

What am I doing wrong?

May 1, 2021

I got ” ORA-04088: error during execution of trigger ‘string.string’” error in Oracle database.

ORA-04088: error during execution of trigger ‘string.string’

Details of error are as follows.

ORA-04088 error during execution of trigger 'string.string'

Cause: A runtime error occurred during execution of a trigger.

Action: Check the triggers which were involved in the operation.



error during execution of trigger ‘string.string’

This ORA-04088 errors are related with the runtime error occurred during execution of a trigger.

when I check related table triggers and constraints, problem is occured because of trigger.

I have disabled triggers with following command.

alter trigger TRIGGER_NAME disable;

Or Check and fix the triggers which were involved in the operation.

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 1,214 views last month,  1 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

While I was testing something on a 12.1 test database got this below error whenever I’m trying to execute specific admin commands:

SQL> drop user xx;
drop user xx
*
ERROR at line 1:
ORA-04088: error during execution of trigger ‘SYS.XDB_PI_TRIG’
ORA-00604: error occurred at recursive SQL level 1
ORA-06550: line 3, column 13:
PLS-00302: component ‘IS_VPD_ENABLED’ must be declared
ORA-06550: line 3, column 5:
PL/SQL: Statement ignored

SQL> alter table bb move online compress;  

alter table bb move online compress

            *

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-04088: error during execution of trigger ‘SYS.XDB_PI_TRIG’

ORA-00604: error occurred at recursive SQL level 2

ORA-06550: line 3, column 13:

PLS-00302: component ‘IS_VPD_ENABLED’ must be declared

ORA-06550: line 3, column 5:

PL/SQL: Statement ignored

The above was just a sample but the error with showing up with lots of admin commands!

I checked the trigger SYS.XDB_PI_TRIG which causing this error and it was already valid, so I decided to DISABLE it, and then admin commands ran as usual:

SQL> alter trigger SYS.XDB_PI_TRIG disable;

Trigger altered.

Above failing admin commands have run smoothly:

SQL> alter table bb move online compress; 

Table altered.

Frankly speaking, I tried to google that error without any success, I didn’t dig deeper, so I took the shortest/laziest way and disabled the root cause trigger as a dirty fix, the database where I disabled that trigger was a test DB, most probably one of my fancy test scenarios caused this issue to happen.

In case you have the same error on a Production Database I strongly recommend you to contact Oracle Support before disabling the above-mentioned trigger.

Update: I’ve dug more and found that the root cause was that someone created a table with the name «sys» under SYS user. Bug 17431402 yes it’s a bug because the engine should throw an error if someone tries to create an object with a «reserved word».

I’ve dropped that object «sys.sys» and the error disappeared:

SQL> alter trigger SYS.XDB_PI_TRIG disable;


Trigger altered.


SQL> drop table sys.sys;


Table dropped.


SQL> alter trigger SYS.XDB_PI_TRIG enable;


Trigger altered.

SQL> alter table bb move online compress; 

Table altered.

phew!

Problem Description
-------------------------------
You are creating a trigger that includes an exception handling block.  You wish to raise a user defined error when a certain condition is met within the trigger body using keyword RAISE.  
Inside your error handling block you also include a call to RAISE_APPLICATION_ERROR.

Consider this code example --
 create table tmp (col1 char(40));
create table violations (col1 varchar2(30));
 
CREATE OR REPLACE TRIGGER DEMO_RULE_001
BEFORE INSERT OR UPDATE ON TMP
FOR EACH ROW
DECLARE
  RULE_001 EXCEPTION;
BEGIN
  IF :NEW.col1 = 'mike' THEN
  dbms_output.put_line(:new.col1);
  INSERT INTO VIOLATIONS values ('violation logged');
  -- Raise rule
  RAISE RULE_001;
  END IF;
EXCEPTION
WHEN RULE_001 THEN  
  RAISE_APPLICATION_ERROR (-20001,'Guideline Violation, Rule-001.');
END; 
 
When this trigger is executed, you receive the ora-4088 and ora-6512 errors.
ORA-04088: error during execution of trigger 'SCOTT.DEMO_RULE_001'
 
 Solution Description
-------------------------------
 You cannot use both RAISE, within the execution block of a trigger, and RAISE_APPLICATION_ERROR, within the exception block.  
 Explanation
------------------------
 RAISE forces execution to move into the exception block.RAISE_APPLICATION_ERROR, within the exception block, terminates the program.If the trigger body does not complete, the triggering SQL statement and any 
SQL statements within the trigger body are rolled back. Thus, execution completes unsuccessfully with a runtime error and it appears as if none of the code within the trigger body gets executed.
 
Consider this corrected code --
CREATE OR REPLACE TRIGGER DEMO_RULE_001
BEFORE INSERT OR UPDATE ON TMP
FOR EACH ROW
DECLARE
  RULE_001 EXCEPTION;
BEGIN
  IF :NEW.col1 = 'mike' THEN
  dbms_output.put_line(:new.col1);
  INSERT INTO VIOLATIONS values ('violation logged');
  -- Raise rule
  RAISE RULE_001;
  END IF;
EXCEPTION
WHEN RULE_001 THEN  
  --raise_application_error(-20001, 'Guideline Violation, Rule-001.');
  dbms_output.put_line('Guideline Violation, Rule-001.');
END;
 
Oracle Support Doc ID 103293.1

Hello, we used exceltable package a few week ago and everything was fine. During this period, our oracle admins applied some patch or etc. and now we get an oracle error ORA-04088 which is connected with trigger checking grants to PUBLIC. I don’t know why something should grant privileges to PUBLIC, but it seems that error emerges on this row — «open l_rc for l_query using p_file, p_method, p_password;» in first getCursor function in EXCELTABLE package. We use ORACLE DB 12.2. Do you have any idea where is granting privileges used and why emerges this error? Thank you in advance.

  1. This is part of our SQL code:
    declare
    piv_excel_name ext_ds_upt_kalendar_pro_kl.nazev_souboru%TYPE := ‘Kalendar.xlsx’;
    piv_nazev_listu ext_ds_upt_kalendar_pro_kl.nazev_listu%TYPE := ‘Plan’;
    cv_db_adresar CONSTANT VARCHAR2(16) := ‘DB_DIR’;
    lvr_data SYS_REFCURSOR;

begin
lvr_data :=
ExcelTable.getCursor(
p_file => ExcelTable.getFile(cv_db_adresar, piv_excel_name)
, p_sheet => piv_nazev_listu
, p_cols => ‘»A2″ VARCHAR2(100) column »A»’
, p_range => ‘A2:A2’
);
end;

  1. This is whole error message:
    Error report —
    ORA-04088: error during execution of trigger ‘APPLDBA_P.BEFORE_GRANT_PUBLIC’
    ORA-00604: error occurred at recursive SQL level 3
    ORA-20997: Public grants on data schema objects not allowed
    ORA-06512: on line 23
    ORA-06512: on «EXT_STAGE.EXCELTABLE», line 4087
    ORA-06512: on line 11
  1. 00000 — «error during execution of trigger ‘%s.%s’»
    *Cause: A runtime error occurred during execution of a trigger.
    *Action: Check the triggers which were involved in the operation.
  1. This is the trigger mentioned above:
    create or replace TRIGGER appldba_p.before_grant_public BEFORE GRANT ON DATABASE
    declare
    vLst ora_name_list_t;
    vCnt int;

function is_authorized(p_owner varchar2,p_grantor varchar2) return varchar2 is
vRet varchar2(1);
begin
select decode(max(profile),’DAT_USER_PROFILE’,’F’,’T’) into vRet from dba_users where username=p_owner;
if vRet=’F’ then
select decode(count(*),0,’F’,’T’) into vRet from dba_role_privs where granted_role=’DBA’ and grantee=p_grantor;
end if;
return vRet;
end;

begin
if ora_dict_obj_name is null then
return;
end if;

vCnt:=ora_grantee(vLst);
for i in 1..nvl(vCnt,0) loop
if vLst(i)=’PUBLIC’ and is_authorized(ora_dict_obj_owner,ora_login_user)=’F’ then
raise_application_error(-20997,’Public grants on data schema objects not allowed’);
end if;
end loop;
end;

14.12.2010, 22:58. Показов 10932. Ответов 8


Вечер добрый. Создал триггер, который на Insert должен проверять есть-ли запись с некоторыми данными, если уже есть , то выдать ошибку.

SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CREATE TABLE Party ( 
  ID NUMBER(9) NOT NULL PRIMARY KEY, 
Winner CHAR(2) NOT NULL
  )
  /
  
CREATE TABLE Game( 
Nr NUMBER(9) NOT NULL,
ID NUMBER(9) NOT NULL,
TYPE CHAR(2),
Color CHAR(2),
CONSTRAINT ID_fk
    FOREIGN KEY (ID)
        REFERENCES Party,
    CONSTRAINT Game_pk
          PRIMARY KEY(Nr,ID)
  )
/ 
 
CREATE OR REPLACE TRIGGER Game_U
 BEFORE INSERT ON Game FOR EACH ROW
 DECLARE 
 count_figure INTEGER;
   BEGIN
   IF(:NEW.Type='k')
    THEN
   SELECT COUNT(*) INTO count_figure FROM Game WHERE TYPE=:NEW.Type AND Color=:NEW.Color AND ID=:NEW.ID;
   IF(count_figure=1)
    THEN
           raise_application_error (-20999,'Figure with this color already exist');
    END IF;
    END IF;
   END;
/

В таблице Party — содержатся номера игр , в Game- положение фигур в игре, при этом на доске не должно быть 2-х фигур одинакового типа одного цвета. Создал триггер , добавил записи:

SQL
1
2
3
INSERT INTO Party (Id,Winner) VALUES (1,'w');
INSERT INTO  Game(Nr,Id,TYPE,Color) VALUES (1,1,'k','w');
INSERT INTO  Game(Nr,Id,TYPE,Color) VALUES (2,1,'k','b');

После этого пытаюсь создать еще одну фигуру на доске

SQL
1
INSERT INTO  Game(Nr,Id,TYPE,Color) VALUES (3,1,'k','w');

Получаю следующее сообщение
Error at line 1:
ORA-20999:Figure with this color already exis
ORA-06512: at «SYSTEM.Game_U», line 9
ORA-04088: error during execution trigger «SYSTEM.Game_U»

Триггер вроде правильный. Помогите пожалуйста разобраться,в чем может быть проблема?

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

0

Одна из моих функций обновления не может быть выполнена, потому что приведенный ниже триггер выдает исключение ORA-2001, ORA-06512 и ORA-04088.

create or replace TRIGGER "UAM_USER"."BEFORE_UPDATE_VILLAGE" BEFORE UPDATE ON village
FOR EACH ROW
DECLARE  
    v_tbl_id  NUMBER(2);  
    user_xcep EXCEPTION;
    PRAGMA EXCEPTION_INIT( user_xcep, -20001 );
BEGIN

   IF :OLD.panchayat_id != :NEW.panchayat_id
   THEN
   RAISE user_xcep;
   END IF;

        v_tbl_id := 14;

    IF :OLD.name != :NEW.name
    THEN 

    INSERT INTO UAM_USER.MASTER_HISTORY
            (HISTORY_ID
            ,TBL_ID
            ,USER_ID
            ,FIELD_NAME
            ,OLD_VALUE
            ,NEW_VALUE
            ,HISTORY_DATE
            ,USER_NAME
            ,record_id)
    VALUES
            (MASTER_HISTORY_SEQ.NEXTVAL
            ,v_tbl_id
            ,:NEW.UPDATE_BY
            ,'Name'
            ,:OLD.name
            ,:NEW.name
            ,:NEW.UPDATE_DATE
            ,:NEW.update_by_name
            ,:NEW.village_id
            );
    END IF;

    IF (:OLD.name_hindi IS NULL AND :NEW.name_hindi IS NOT NULL)
    OR (:NEW.name_hindi IS NULL AND :OLD.name_hindi IS NOT NULL)
    OR (:OLD.name_hindi != :NEW.name_hindi)
    THEN 

    INSERT INTO UAM_USER.MASTER_HISTORY
            (HISTORY_ID
            ,TBL_ID
            ,USER_ID
            ,FIELD_NAME
            ,OLD_VALUE
            ,NEW_VALUE
            ,HISTORY_DATE
            ,USER_NAME
            ,record_id)
    VALUES
            (MASTER_HISTORY_SEQ.NEXTVAL
            ,v_tbl_id
            ,:NEW.UPDATE_BY
            ,'Name Hindi'
            ,:OLD.name_hindi
            ,:NEW.name_hindi
            ,:NEW.UPDATE_DATE
            ,:NEW.update_by_name
            ,:NEW.village_id
            );
    END IF;


IF (:OLD.status IS NULL AND :NEW.status IS NOT NULL)
    OR (:NEW.status IS NULL AND :OLD.status IS NOT NULL)
    OR (:OLD.status != :NEW.status)
    THEN 

    INSERT INTO UAM_USER.MASTER_HISTORY
            (HISTORY_ID
            ,TBL_ID
            ,USER_ID
            ,FIELD_NAME
            ,OLD_VALUE
            ,NEW_VALUE
            ,HISTORY_DATE
            ,USER_NAME
            ,record_id)
    VALUES
            (MASTER_HISTORY_SEQ.NEXTVAL
            ,v_tbl_id
            ,:NEW.UPDATE_BY
            ,'Status'
            ,:OLD.status
            ,:NEW.status
            ,:NEW.UPDATE_DATE
            ,:NEW.update_by_name
            ,:NEW.village_id
            );
    END IF;

END;

ЖУРНАЛ КОНСОЛИ:

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [ UPDATE village   SET  name = ?       ,panchayat_id = ?       ,name_hindi = ?       ,status = ?       ,update_date = ?       ,update_by = ?       ,update_by_name = ?       ,dc_id = ?       ,loksabha_id = ?       ,census_code = ?       ,pincode = ?       ,area_type = ?   WHERE village_id = ? ]; SQL state [72000]; error code [20001]; ORA-20001: 
ORA-06512: at "UAM_USER.BEFORE_UPDATE_VILLAGE", line 9
ORA-04088: error during execution of trigger 'UAM_USER.BEFORE_UPDATE_VILLAGE'
; nested exception is java.sql.SQLException: ORA-20001: 
ORA-06512: at "UAM_USER.BEFORE_UPDATE_VILLAGE", line 9
ORA-04088: error during execution of trigger 'UAM_USER.BEFORE_UPDATE_VILLAGE'

Я не могу понять это, я проверяю все свои параметры в своем контроллере, все параметры в порядке, и в моем контроллере и сервисе нет проблем, проблема выше триггера и согласно моим исследованиям и разработкам коды ошибок {{X0} } и ORA-06512 представляют ошибку относительно ширины столбца, а ORA-4088 представляют рекурсивное обновление.

ОБНОВЛЕНИЕ КОДА:

  @Override
    public void update(Village village) {
        String q = " UPDATE village "
                + "  SET  name = :name "
//                + "      ,panchayat_id = :panchayat_id "
                + "      ,name_hindi = :name_hindi "
                + "      ,status = :status "
                + "      ,update_date = :update_date "
                + "      ,update_by = :update_by "
                + "      ,update_by_name = :update_by_name "
                + "      ,dc_id = :dc_id "
                + "      ,loksabha_id = :loksabha_id "
                + "      ,census_code = :census_code "
                + "      ,pincode = :pincode "
                + "      ,area_type = :area_type "
                + "  WHERE village_id = :village_id ";
        MapSqlParameterSource param = new MapSqlParameterSource();
        param.addValue("village_id", village.getVillageId());
        param.addValue("panchayat_id", village.getPanchayat() != null ? village.getPanchayat().getPanchayatId() : null);
        param.addValue("name", village.getName());
        param.addValue("name_hindi", village.getNameHindi());
        param.addValue("status", village.getStatus());
        param.addValue("update_date", village.getUpdateDate());
        param.addValue("update_by", village.getUserdetail() != null ? village.getUserdetail().getUserId() : null);
        param.addValue("update_by_name", village.getUserdetail().getName());
        param.addValue("dc_id", village.getDc() != null ? village.getDc().getDcId() : null);
        param.addValue("loksabha_id", village.getLoksabha() != null ? village.getLoksabha().getLoksabhaId() : null);
        param.addValue("census_code", village.getCensusCode());
        param.addValue("pincode", village.getPincode());
        param.addValue("area_type", village.getAreaType());
        getNamedParameterJdbcTemplate().update(q, param);
    }

Я проверяю свои столбцы, все в порядке, поэтому все, что осталось, это ORA-04088, и я не могу понять, где и как он рекурсивно пытается обновить таблицы.

Пожалуйста помоги

ORA-06512 — это стандартная ошибка PL / SQL, когда вызываемая процедура (или триггер) не работает.

Ora-04088 — это стандартная ошибка, которую Oracle выдает, когда выполняющийся триггер получает ошибку времени выполнения.

Основная причина — ошибка ORA-20001. Это диапазон исключений, определяемых пользователем, и вот! ваш триггер определяет один:

PRAGMA EXCEPTION_INIT( user_xcep, -20001 );

Триггер вызывает это исключение здесь:

   IF :OLD.panchayat_id != :NEW.panchayat_id
   THEN
   RAISE user_xcep;
   END IF;

Похоже, ваш оператор обновления пытается изменить значение panchayat_id. Лучшим решением было бы удалить этот столбец из предложения SET:

SET  name = ?       ,panchayat_id = ? 

Глядя на свой SpringBatch (или любой другой) код, возможно, вам стоит изменить проверку валидации. Возможно что-то вроде этого:

   IF :OLD.panchayat_id  is null then
       null; -- allow update
   ELSIF  :NEW.panchayat_id  is null then
      :NEW.panchayat_id := :OLD.panchayat_id; -- don't wipe existing value
   ELSIF :OLD.panchayat_id != :NEW.panchayat_id
   THEN
       RAISE user_xcep;
   END IF;


3

APC
11 Окт 2018 в 09:46

Согласно документации:

ORA-06512: в строке

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

По сути, эта ошибка является частью стека ошибок, сообщающего, в какой строке произошла фактическая ошибка.

И документация:

ORA-04088: ошибка во время выполнения триггера ‘string.string’

Причина. Произошла ошибка во время выполнения триггера.

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

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

begin
  if upper(:new.name) = 'TEST' then
    raise_application_error(-20001, 'Sorry, that value is not allowed.');
  end if;
exception
  when others then
    dbms_output.put_line(sqlcode|' '|sqlerrm);
end; 

May 1, 2021

I got ” ORA-04088: error during execution of trigger ‘string.string’” error in Oracle database.

ORA-04088: error during execution of trigger ‘string.string’

Details of error are as follows.

ORA-04088 error during execution of trigger 'string.string'

Cause: A runtime error occurred during execution of a trigger.

Action: Check the triggers which were involved in the operation.



error during execution of trigger ‘string.string’

This ORA-04088 errors are related with the runtime error occurred during execution of a trigger.

when I check related table triggers and constraints, problem is occured because of trigger.

I have disabled triggers with following command.

alter trigger TRIGGER_NAME disable;

Or Check and fix the triggers which were involved in the operation.

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 1,383 views last month,  1 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

May 1, 2021

I got ” ORA-04088: error during execution of trigger ‘string.string’” error in Oracle database.

ORA-04088: error during execution of trigger ‘string.string’

Details of error are as follows.

ORA-04088 error during execution of trigger 'string.string'

Cause: A runtime error occurred during execution of a trigger.

Action: Check the triggers which were involved in the operation.



error during execution of trigger ‘string.string’

This ORA-04088 errors are related with the runtime error occurred during execution of a trigger.

when I check related table triggers and constraints, problem is occured because of trigger.

I have disabled triggers with following command.

alter trigger TRIGGER_NAME disable;

Or Check and fix the triggers which were involved in the operation.

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 1,383 views last month,  1 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Hello, we used exceltable package a few week ago and everything was fine. During this period, our oracle admins applied some patch or etc. and now we get an oracle error ORA-04088 which is connected with trigger checking grants to PUBLIC. I don’t know why something should grant privileges to PUBLIC, but it seems that error emerges on this row — «open l_rc for l_query using p_file, p_method, p_password;» in first getCursor function in EXCELTABLE package. We use ORACLE DB 12.2. Do you have any idea where is granting privileges used and why emerges this error? Thank you in advance.

  1. This is part of our SQL code:
    declare
    piv_excel_name ext_ds_upt_kalendar_pro_kl.nazev_souboru%TYPE := ‘Kalendar.xlsx’;
    piv_nazev_listu ext_ds_upt_kalendar_pro_kl.nazev_listu%TYPE := ‘Plan’;
    cv_db_adresar CONSTANT VARCHAR2(16) := ‘DB_DIR’;
    lvr_data SYS_REFCURSOR;

begin
lvr_data :=
ExcelTable.getCursor(
p_file => ExcelTable.getFile(cv_db_adresar, piv_excel_name)
, p_sheet => piv_nazev_listu
, p_cols => ‘»A2″ VARCHAR2(100) column »A»’
, p_range => ‘A2:A2’
);
end;

  1. This is whole error message:
    Error report —
    ORA-04088: error during execution of trigger ‘APPLDBA_P.BEFORE_GRANT_PUBLIC’
    ORA-00604: error occurred at recursive SQL level 3
    ORA-20997: Public grants on data schema objects not allowed
    ORA-06512: on line 23
    ORA-06512: on «EXT_STAGE.EXCELTABLE», line 4087
    ORA-06512: on line 11
  1. 00000 — «error during execution of trigger ‘%s.%s'»
    *Cause: A runtime error occurred during execution of a trigger.
    *Action: Check the triggers which were involved in the operation.
  1. This is the trigger mentioned above:
    create or replace TRIGGER appldba_p.before_grant_public BEFORE GRANT ON DATABASE
    declare
    vLst ora_name_list_t;
    vCnt int;

function is_authorized(p_owner varchar2,p_grantor varchar2) return varchar2 is
vRet varchar2(1);
begin
select decode(max(profile),’DAT_USER_PROFILE’,’F’,’T’) into vRet from dba_users where username=p_owner;
if vRet=’F’ then
select decode(count(*),0,’F’,’T’) into vRet from dba_role_privs where granted_role=’DBA’ and grantee=p_grantor;
end if;
return vRet;
end;

begin
if ora_dict_obj_name is null then
return;
end if;

vCnt:=ora_grantee(vLst);
for i in 1..nvl(vCnt,0) loop
if vLst(i)=’PUBLIC’ and is_authorized(ora_dict_obj_owner,ora_login_user)=’F’ then
raise_application_error(-20997,’Public grants on data schema objects not allowed’);
end if;
end loop;
end;

  • Ошибка ora 02291 integrity constraint
  • Ошибка ora 01652 невозможно увеличить временный сегмент
  • Ошибка ora 01438 value larger than specified precision allowed for this column
  • Ошибка ora 01422 точная выборка возвращает количество строк больше запрошенного
  • Ошибка ora 01033 oracle initialization or shutdown in progress