Trigger related error.

  • I had a trigger on a table for Delete event which calls a stored proc P_Test that takes one parameter.

    I dropped the trigger but when I delete a record from the table it is giving me an error

    " Procedure or function P_test has too many arguments specified."

    Is the info cached somewhere ?

  • Is what info cached?

    If it says a proc is being passed too many parameters then somewhere in the trigger or in the procedure it calls (or in a procedure that calls, etc) there's a procedure or function been called with too many arguments.

    Consider Try.. catch with the error_procedure and error_line functions in the catch. That'll tell you where to look

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • WangcChiKaBastar (1/3/2012)


    I had a trigger on a table for Delete event which calls a stored proc P_Test that takes one parameter.

    I dropped the trigger but when I delete a record from the table it is giving me an error

    " Procedure or function P_test has too many arguments specified."

    Is the info cached somewhere ?

    No, the trigger call isn't cache'd if you do an explicit DROP on the trigger. However, confirm it's gone. Refresh the object view of the database and drill down to triggers again and make sure you deleted it, and there are no other triggers on that table that could be attempting the same thing with a slightly different name.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply