0

I am trying to find active triggers and their associated tables in Sybase. What would be a written query?

I found the following SQL command useful select * from sysobjects where type = "TR" where deltrig =1 or instrig = 1 or updtrig =1

But, I do not know how to associate the trigger name with the name of a table.

Ken White
  • 123,280
  • 14
  • 225
  • 444
Ali Saberi
  • 864
  • 1
  • 10
  • 33
  • I think it is `sysdepends` – tinazmu May 24 '23 at 02:00
  • 1
    please confirm which Sybase RDBMS (SQLAnywhere aka ASA? ASE?) and version you're using; `sysobjects` is ASE, but you've flagged the question as ASA ... these are two different products with different names/structures for their metadata; for ASA I'd start with the `SYSTRIGGERS` view and/or the source code for any system procs that display trigger info; for ASE I'd start with the `sp_depends` stored proc, and if you're running ASE 16 you could also look at `sp_helptrigger`; if stored procs are able to provide the desired info but not in a usable format then review said proc's source code – markp-fuso May 24 '23 at 12:45

0 Answers0