List triggers in SQL Server database - Dataedo
文章推薦指數: 80 %
Query below lists triggers in a database with their details. ... [type] = 'TR' then 'SQL trigger' else '' end as [type], case when is_disabled = 1 then ... SQLServerDataDictionaryQueryToolbox ListtriggersinSQLServerdatabase PiotrKononow 25thJune,2018 Articlefor: SQLServer ▾ AzureSQLDatabase Oracledatabase IBMDb2 Teradata MySQL MariaDB Querybelowliststriggersinadatabasewiththeirdetails. Query selecttrg.nameastrigger_name, schema_name(tab.schema_id)+'.'+tab.nameas[table], casewhenis_instead_of_trigger=1then'Insteadof' else'After'endas[activation], (casewhenobjectproperty(trg.object_id,'ExecIsUpdateTrigger')=1 then'Update'else''end +casewhenobjectproperty(trg.object_id,'ExecIsDeleteTrigger')=1 then'Delete'else''end +casewhenobjectproperty(trg.object_id,'ExecIsInsertTrigger')=1 then'Insert'else''end )as[event], casewhentrg.parent_class=1then'Tabletrigger' whentrg.parent_class=0then'Databasetrigger' end[class], casewhentrg.[type]='TA'then'Assembly(CLR)trigger' whentrg.[type]='TR'then'SQLtrigger' else''endas[type], casewhenis_disabled=1then'Disabled' else'Active'endas[status], object_definition(trg.object_id)as[definition] fromsys.triggerstrg leftjoinsys.objectstab ontrg.parent_id=tab.object_id orderbytrg.name; Columns trigger_name-nameofthetrigger table-nameofthetriggertable(fortabletriggers)withschemaname activation-triggeractivationtime:AfterorInsteadof event-specificSQLoperation:Insert,UpdateorDelete class-triggerclass: Databasetrigger-fortheDDLtriggers Tabletrigger-forobjectorcolumnfortheDMLtriggers type-objecttype: Assembly(CLR)trigger SQLtrigger status-triggerstatus Active Disabled definition-SQLdefinitonoftrigger Rows Onerowrepresentsonetrigger Scopeofrows:allcolumn,tableanddatabase(DDL)triggersinadatabase Orderedbytriggername Sampleresults 0 Therearenocomments.Clickheretowritethefirstcomment.
延伸文章資訊
- 1Trigger list - Wikipedia
Trigger list in its most general meaning refers to a list whose items are used to initiate ("trig...
- 2Listing All Triggers in the SQL Server
This tutorial shows you how to list all triggers in SQL Server by querying data from the sys.trig...
- 3Incompletion Trigger List - Getting Things Done
Incompletion Trigger List. Home/household real estate, repairs, construction, remodeling, landlor...
- 4GTD Term: Incompletion Trigger List - FacileThings
Incompletion Trigger List ... It is a list of the different aspects that your areas of focus and ...
- 5Reference » GTD Trigger List - Hack / Make
This list is from Getting Things Done and is useful for when doing brain dumps to trigger your me...