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.
延伸文章資訊
- 1GTD Term: Incompletion Trigger List - FacileThings
Incompletion Trigger List ... It is a list of the different aspects that your areas of focus and ...
- 2List triggers in SQL Server database - Dataedo
Query below lists triggers in a database with their details. ... [type] = 'TR' then 'SQL trigger'...
- 3Trigger List · GTD® by David Allen - Coda
Trigger List. Incompletion Trigger Lists. Delete. Add below. Add above. Personal. Projects starte...
- 4Trigger list - Wikipedia
Trigger list in its most general meaning refers to a list whose items are used to initiate ("trig...
- 5List table triggers in SQL Server database - Dataedo
Query below lists tables with their triggers. Do you need a fortune teller to tell you about the ...