DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Trigger fails to trigger

  1. #1
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650

    Trigger fails to trigger

    When ever a local table is either INSERTed or UPDATEed trigger has to fire by INSERTing the record in the remote table.

    Local table: Oracle 9i on windows
    Remote table: SQL server 2000 on windows

    1. DBlink is working fine
    2. ODBC connection is good too

    On INSERT or UPDATE the trigger is not firing and not throwing any error. Checked the possibilities. Where to start to troubleshoot?
    "What is past is PROLOGUE"

  2. #2
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    I'd bet your trigger is firing, just not doing what you think it should do.

    Have you tried putting some debugging code in your trigger to insert variables, "Im in here", etc. into a local table?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  3. #3
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Put some dbms_output in your trigger and see whether it gets fired
    Thanx
    Sam



    Life is a journey, not a destination!


  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    dbms_output wont help as it executeed by the server, nowhere for your output to be sent

  5. #5
    Join Date
    May 2005
    Location
    AZ, USA
    Posts
    131
    is the trigger and dblink owned by the same schema?

  6. #6
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Quote Originally Posted by davey23uk
    dbms_output wont help as it executeed by the server, nowhere for your output to be sent
    The same i was wondering as how to execute

    is the trigger and dblink owned by the same schema?
    yes
    "What is past is PROLOGUE"

  7. #7
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    As i mentioned earlier abt the different RDBMS could the incompatibility between column sizes between the tables givin all troubles.
    "What is past is PROLOGUE"

  8. #8
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    you will need to debug it, use insert statements or utl file to trap what is going on

  9. #9
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Quote Originally Posted by davey23uk
    you will need to debug it, use insert statements or utl file to trap what is going on
    That's what I was trying to say in my first post. Create a table, then insert your variables, errors, etc into a varchar column in that table. If there's no rows in it, it's not firing, if you get rows, they'll tell you what's going on.

    utl_file is another good option. Davey's got it goin' on.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

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


Click Here to Expand Forum to Full Width