Database Trigger

  • hi,

    Is it possible for a database trigger to get names of table(s),which was affected by last transection?

    e.g. if i have database say temp and temp has a number of tables say tbl1,tbl2......tbl10, and any store procedure say sp1 inserts record in tables tbl1 and tbl2, now, with the help of Database trigger ,is it possible to get a name of tables that was affected by my last transection without knowing store procedure logic?

  • Not possible.

    The only database-scoped triggers are the DDL triggers that fire on schema changes. DML triggers have to be placed on each table and will fire when that table is changed.

    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
  • thanks Gail

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

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