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 628541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:38:52+00:00 2026-05-13T19:38:52+00:00

I have a table for which i have written a trigger: CREATE OR REPLACE

  • 0

I have a table for which i have written a trigger:

CREATE OR REPLACE TRIGGER ac01_control_trigg
AFTER INSERT ON ac1_control_test 
FOR EACH ROW
DECLARE
    BEGIN
   IF :NEW.cur_pgm_name = 'LSN' 
   AND :NEW.nxt_pgm_name ='MD' 
   AND :NEW.file_status='RD' THEN 
    INSERT INTO ac1_control_test 
    (FILE_NAME, FILE_PATH,FILE_STATUS,CUR_PGM_NAME,NXT_PGM_NAME)
    VALUES 
   (:NEW.FILE_NAME, :NEW.FILE_PATH,:NEW.FILE_STATUS,:NEW.CUR_PGM_NAME,'MD_MPS');   
END IF;
END ac01_control_trigg;

when i am trying to insert into the table i am getting an error below!

ORA-04098: trigger 'CNGDB18.AC01_CONTROL_TRIGG' is invalid and failed re-validation

could anybody please help?

also when i compile the trigger in Toad,i am getting compile errors as below:

LINE/COL ERROR
-------- -----------------------------------------------------------------
3/65     PLS-00049: bad bind variable 'NEW_FILE_STATUS'

but what is the wrong with this?
and what does this error mean?

  • 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-13T19:38:53+00:00Added an answer on May 13, 2026 at 7:38 pm

    EDIT: Now that we see the message, the solution is easy 🙂

    Use
    :NEW.file_status='RD' instead of
    :new_file_status='RD'


    Your trigger object is invalid (there is a problem with the code).

    Test this with:

    SELECT object_name, status
    FROM user_objects
    WHERE object_name = 'AC1_CONTROL_TRIGG';
    

    Should return:
    AC1_CONTROL_TRIGG INVALID

    You can try the following in SQL*Plus to get a description of the error:

    ALTER TRIGGER ac1_control_trigg COMPILE;
    
    SHOW ERROR TRIGGER ac1_control_trigg;
    

    Using TOAD, you can just type these two lines into an editor, select them and use Editor>Execute SQL via SQL*Plus.

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

Sidebar

Ask A Question

Stats

  • Questions 336k
  • Answers 336k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You are correct in your initial assessment. It's worth noting… May 14, 2026 at 3:54 am
  • Editorial Team
    Editorial Team added an answer Try something like this (tested on MSSQL2008): DECLARE @Data TABLE(Period1… May 14, 2026 at 3:54 am
  • Editorial Team
    Editorial Team added an answer This does open the door for it appearing that your… May 14, 2026 at 3:54 am

Related Questions

I have written a complex query that will return me a list of IDs.
I have a table with some 30 columns, already used in the application extensively.
I have a location search website for a city, we started out with collecting
I am a complete novice at php and postgres. I have been searching all
I am working on a project, which includes a searching task by entering the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.