Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:36:01+00:00 2026-05-25T18:36:01+00:00

I’m having problems running my application – Oracle is raising an ORA-04092: cannot COMMIT

  • 0

I’m having problems running my application – Oracle is raising an

ORA-04092: cannot COMMIT in a trigger issue.

Now I am trying to find the trigger which contains commit statement. Is it possible to find the trigger which has the commit statement in all `dba_triggers’?

select * from dba_triggers statement  

gives me all dba triggers. Now I have to search these triggers with the word commit.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:36:02+00:00Added an answer on May 25, 2026 at 6:36 pm

    If you get the full error stack, you should be able to see what line of what trigger is throwing the error. That’s the most efficient approach. For example, if you create a trigger that commits and run an INSERT, the stack trace will show you what line of what trigger caused the error.

    SQL> create table t (
      2    col1 number
      3  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create trigger trg_t
      2    before insert on t
      3    for each row
      4  begin
      5    commit;
      6* end;
    SQL> /
    
    Trigger created.
    
    SQL> begin
      2    insert into t values( 1 );
      3  end;
      4  /
    begin
    *
    ERROR at line 1:
    ORA-04092: cannot COMMIT in a trigger
    ORA-06512: at "SCOTT.TRG_T", line 2
    ORA-04088: error during execution of trigger 'SCOTT.TRG_T'
    ORA-06512: at line 2
    

    You can search the source for all triggers looking for a particular string. Something like this will look for the literal “COMMIT” in any trigger in whatever schemas you specify.

    SELECT name, text, line
      FROM dba_source
     WHERE owner IN (<<schemas you want to search>>)
       AND upper(text) like '%COMMIT%';
    

    On the other hand, there is a strong probability that the trigger that is failing is calling a stored procedure and it is the stored procedure that is committing. So searching the source of your triggers may not be beneficial.

    You could potentially mitigate that by doing a recursive query on DBA_DEPENDENCIES (or ALL_DEPENDENCIES or USER_DEPENDENCIES depending on your privilege level and the scope of what you want to search for) to find all of the procedures that are potentially called from any trigger and to search the source of all of those procedures from DBA_SOURCE. But that’s going to be much more complex than simply examining the full error stack.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm having trouble keeping the paragraph square between the quote marks. In firefox the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.