Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Posts
    3

    Unanswered: Problem In Database trigger

    HI Friendz,
    I am facing a problem in one of the database trigger.I am unbale to find out in which trigger the error is present.

    I am using a proprietary language(trim/pl) for the application devolopment.From this language we can use SQL statements for database operations.While Insertion into one table error is coming , so no row is inserting into the table.But from this language I am unable find out the SQL error.

    I want a method through which, I can find out all the operations oracle has done like the triggers fired, status of the execution of triggers.
    If any one have an idea on these things please help me.

    Thanks&Regards
    Vidya

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Use SQL*Plus and/or PL/SQL in place of trim/pl

  3. #3
    Join Date
    Dec 2003
    Posts
    3
    HI Thanks for your reply.There is no option for me to use trim/pl.BUt from trim/pl I can use any command that will work on SQL* or Pl.sql.
    Basically I want to log the database operations during my program execution.Is there any procedure for it.

    Thanks&regards
    Vidyadhar

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    ALTER SESSION SET SQL_TRACE=TRUE

  5. #5
    Join Date
    Dec 2003
    Posts
    3
    Hi
    Thanks for ur reply.I have a small doubt .
    Are we able to find it out through SQL trace, if possible which option of TKPROF gices that information.
    Thanks
    Vidyadhar

  6. #6
    Join Date
    Dec 2003
    Posts
    74
    Is your program doing multiple inserts?

    I you are just inserting one record you can do the following.

    1- Modify your trigger which is causing the error to add an exception handler:
    ...At the end of your trigger add the following:
    .....EXCEPTION
    ..........WHEN OTHERS THEN
    ...............DBMS_OUTPUT.PUT_LINE('err code:' || SQLCODE || ':' || SQLERRM);

    2 - Log onto SQL*Plus and type the following command
    .....set serveroutput on;

    3 - Run your trigger into your database

    4 - Manually insert a record and your oracle error should be returned.

    Regards

    Edwin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •