Questions tagged «ddl-trigger»

1
如何使用内置函数解析数据库触发器的名称?
我有一个数据库触发器,用于防止我在用户数据库中创建某些过程。 它出现在中sys.triggers,带有object_id,但我无法使用该object_id功能来找到它。 SELECT OBJECT_ID(t.name, t.type) AS object_id, * FROM sys.triggers AS t; 同样,我可以在中找到它sys.dm_exec_trigger_stats。我object_name无法解决,但是可以解决object_definition。 SELECT OBJECT_NAME(dets.object_id, dets.database_id) AS object_name, OBJECT_DEFINITION(dets.object_id) AS object_definition, * FROM sys.dm_exec_trigger_stats AS dets; 是否有一个函数可以接受数据库级触发器的对象ID,并返回其名称?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.