dbo.QBM_TUAssembly_DialogColumn
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 7
- Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 7
- Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 7
- Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 7
- Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 10
- Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 10
- Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 10
- Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 17
- Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 17
- Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 27
- References QBM_PDBQueueInsert_Single
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: DialogColumn
Typed Edges
- queues DBQueue task QBM_ZScriptAssemblyReset at line 7 Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 7
- queues DBQueue task QBM_ZViewBuildAll at line 7 Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 7
- queues DBQueue task QBM_ZTriggerWatchCreate at line 7 Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 7
- queues DBQueue task QBM_ZScriptAssemblyReset at line 10 Single DBQueue insert -> QBM-K-ScriptAssemblyReset / QBM_ZScriptAssemblyReset at line 10
- queues DBQueue task QBM_ZViewBuildAll at line 10 Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 10
- queues DBQueue task QBM_ZTriggerWatchCreate at line 10 Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 10
- queues DBQueue task QBM_ZViewBuildAll at line 17 Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 17
- queues DBQueue task QBM_ZTriggerWatchCreate at line 17 Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 17
- queues DBQueue task QBM_ZTriggerWatchCreate at line 27 Bulk DBQueue insert -> QBM-K-CommonMakeWatchtrigger / QBM_ZTriggerWatchCreate at line 27
- trigger on table DialogColumn Trigger parent table: DialogColumn
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FGITableName source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_FGITableName
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QBM_TUAssembly_DialogColumn2 ON DialogColumn FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')7 DECLARE @XUser nvarchar(64) = object_name(@@procid)8 DECLARE @Xdate datetime = getutcdate()9 BEGIN TRY10 IF EXISTS(11 SELECT TOP 1 112 FROM inserted)13 GOTO start14 IF EXISTS(15 SELECT TOP 1 116 FROM deleted)17 GOTO start18 RETURN start:19 IF20 UPDATE(FormatScript) OR21 UPDATE(IsDeactivatedByPreProcessor) OR22 UPDATE(Template) OR23 UPDATE(CanSeeScript) OR24 UPDATE(CanEditScript)25 BEGIN26 IF EXISTS(27 SELECT TOP 1 128 FROM deleted d29 JOIN DialogColumn c30 ON d.UID_DialogColumn = c.UID_DialogColumn31 WHERE32 (ISNULL(d.FormatScript, '') <> ISNULL(c.FormatScript, '') OR d.IsDeactivatedByPreProcessor <> c.IsDeactivatedByPreProcessor OR ISNULL(d.Template33 , '') <> ISNULL(c.Template, '') OR ISNULL(d.CanSeeScript, '') <> ISNULL(c.CanSeeScript, '') OR ISNULL(d.CanEditScript,34 '') <> ISNULL(c.CanEditScript, '')))35 BEGIN36 EXEC QBM_PDBQueueInsert_Single 'QBM-K-ScriptAssemblyReset',37 'Tmpl',38 '#',39 @GenProcID40 END41 END42 IF43 UPDATE(IsOverwritingTemplate) OR44 UPDATE(Template) OR45 UPDATE(Format) OR46 UPDATE(FormatScript)47 BEGIN48 UPDATE dialogcolumn49 SET IsTemplateChanged = 1,50 XDateUpdated = @Xdate,51 XUserUpdated = @XUser52 WHERE53 uid_dialogcolumn IN(54 SELECT uid_dialogcolumn55 FROM inserted) AND isnull(IsTemplateChanged,56 0) = 057 END58 IF59 UPDATE(Columnname) OR60 UPDATE(DataType) OR61 UPDATE(CustomComment) OR62 UPDATE(Commentary) OR63 UPDATE(IsDeactivatedByPreProcessor)64 BEGIN65 EXEC QBM_PDBQueueInsert_Single 'QBM-K-ScriptAssemblyReset',66 'TypedWrappers',67 '#',68 @GenProcID69 END70 IF71 UPDATE(UID_DialogTable) OR72 UPDATE(ColumnName) OR73 UPDATE(uid_basecolumn) OR74 UPDATE(UID_DialogColumnUnionView) OR75 UPDATE(IsDeactivatedByPreprocessor) OR76 UPDATE(IsNoAutoExtendPermissions)77 BEGIN78 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw79 INSERT INTO @DBQueueElements_01(object,80 subobject,81 genprocid)82 SELECT83 x.uid,84 NULL,85 @GenProcID86 FROM(87 SELECT i.UID_DialogTable AS UID88 FROM inserted i89 UNION90 SELECT d.UID_DialogTable AS UID91 FROM deleted d92 UNION93 SELECT t.UID_DialogTableBase94 FROM dialogtable t95 JOIN inserted i96 ON i.UID_DialogTable = t.UID_DialogTable97 WHERE98 t.UID_DialogTableBase > ' '99 UNION100 SELECT t.UID_DialogTableBase101 FROM dialogtable t102 JOIN deleted d103 ON d.UID_DialogTable = t.UID_DialogTable104 WHERE105 t.UID_DialogTableBase > ' '106 UNION107 SELECT t.UID_DialogTableUnion108 FROM dialogtable t109 JOIN deleted d110 ON d.UID_DialogTable = t.UID_DialogTable111 WHERE112 t.UID_DialogTableUnion > ' '113 UNION114 SELECT t.UID_DialogTableUnion115 FROM dialogtable t116 JOIN inserted d117 ON d.UID_DialogTable = t.UID_DialogTable118 WHERE119 t.UID_DialogTableUnion > ' ') AS x120 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonRebuildView',121 @DBQueueElements_01122 END123 IF124 UPDATE(datatype) OR125 UPDATE(isPkmember) OR126 UPDATE(isAlternatePkmember) OR127 UPDATE(IsToWatch) OR128 UPDATE(IsToWatchDelete) OR129 UPDATE(IsCustomConfigurable) OR130 UPDATE(IsDeactivatedByPreProcessor) OR131 UPDATE(SplittedLookupSupport)132 BEGIN133 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw134 INSERT INTO @DBQueueElements_02(object,135 subobject,136 genprocid)137 SELECT138 dbo.QBM_FGITableName(x.uid),139 NULL,140 @GenProcID141 FROM(142 SELECT i.UID_DialogTable AS UID143 FROM Dialogcolumn i144 JOIN deleted d145 ON i.UID_DialogColumn = d.UID_DialogColumn146 WHERE147 isnull(i.datatype, 0) <> isnull(d.datatype, 0) OR isnull(i.isPkmember, 0) <> isnull(d.isPkmember,148 0) OR isnull(i.isAlternatePkmember, 0) <> isnull(d.isAlternatePkmember, 0) OR isnull(i.IsToWatch, 0) <> isnull(d.IsToWatch,149 0) OR isnull(i.IsToWatchDelete, 0) <> isnull(d.IsToWatchDelete, 0) OR isnull(i.IsCustomConfigurable, 0) <> isnull(d.IsCustomConfigurable,150 0) OR isnull(i.IsDeactivatedByPreProcessor, 0) <> isnull(d.IsDeactivatedByPreProcessor, 0) OR isnull(i.SplittedLookupSupport,151 '') <> isnull(d.SplittedLookupSupport, '')152 UNION153 SELECT t.UID_DialogTableBase154 FROM dialogtable t155 JOIN inserted i156 ON i.UID_DialogTable = t.UID_DialogTable157 WHERE158 t.UID_DialogTableBase > ' '159 UNION160 SELECT t.UID_DialogTableBase161 FROM dialogtable t162 JOIN deleted d163 ON d.UID_DialogTable = t.UID_DialogTable164 WHERE165 t.UID_DialogTableBase > ' '166 UNION167 SELECT t.UID_DialogTable168 FROM dialogtable t169 JOIN inserted c170 ON c.UID_DialogTable = t.UID_DialogTableUnion) AS x171 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger',172 @DBQueueElements_02173 END174 END TRY175 BEGIN CATCH176 EXEC QBM_PSessionErrorAdd DEFAULT177 RAISERROR('',178 18,179 1)180 WITH NOWAIT181 END CATCH182 ende:183 RETURN184END
Open raw exported source
1 create trigger QBM_TUAssembly_DialogColumn on DialogColumn for Update not for Replication as begin declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext2('') declare @XUser nvarchar(64) = object_name(@@procid) declare @Xdate datetime = getutcdate() BEGIN TRY if exists (select top 1 1 from inserted) goto3 start if exists (select top 1 1 from deleted) goto start return start: if update(FormatScript) or update(IsDeactivatedByPreProcessor) or update(Template4) or update(CanSeeScript) or update(CanEditScript) begin if exists (select top 1 1 from deleted d join DialogColumn c on d.UID_DialogColumn = c.UID_DialogColumn5 where ( ISNULL(d.FormatScript, '') <> ISNULL(c.FormatScript, '') or d.IsDeactivatedByPreProcessor <> c.IsDeactivatedByPreProcessor or ISNULL(d.Template6, '') <> ISNULL(c.Template, '') or ISNULL(d.CanSeeScript, '') <> ISNULL(c.CanSeeScript, '') or ISNULL(d.CanEditScript, '') <> ISNULL(c.CanEditScript, ''7) ) ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-ScriptAssemblyReset', 'Tmpl', '#', @GenProcID end end if update(IsOverwritingTemplate) or update(Template8) or update(Format) or update(FormatScript) begin update dialogcolumn set IsTemplateChanged = 1 , XDateUpdated = @Xdate , XUserUpdated = @XUser where uid_dialogcolumn9 in (select uid_dialogcolumn from inserted) and isnull(IsTemplateChanged,0) = 0 end if update(Columnname) or update(DataType) or update(CustomComment) 10or update(Commentary) or update(IsDeactivatedByPreProcessor) begin exec QBM_PDBQueueInsert_Single 'QBM-K-ScriptAssemblyReset', 'TypedWrappers', '#', @GenProcID11 end if update(UID_DialogTable) or update(ColumnName) or update(uid_basecolumn) or update(UID_DialogColumnUnionView) or update(IsDeactivatedByPreprocessor12) or update(IsNoAutoExtendPermissions) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid13) select x.uid, null, @GenProcID from (select i.UID_DialogTable as UID from inserted i union select d.UID_DialogTable as UID from deleted d union select14 t.UID_DialogTableBase from dialogtable t join inserted i on i.UID_DialogTable = t.UID_DialogTable where t.UID_DialogTableBase > ' ' union select t.UID_DialogTableBase15 from dialogtable t join deleted d on d.UID_DialogTable = t.UID_DialogTable where t.UID_DialogTableBase > ' ' union select t.UID_DialogTableUnion from16 dialogtable t join deleted d on d.UID_DialogTable = t.UID_DialogTable where t.UID_DialogTableUnion > ' ' union select t.UID_DialogTableUnion from dialogtable17 t join inserted d on d.UID_DialogTable = t.UID_DialogTable where t.UID_DialogTableUnion > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonRebuildView'18, @DBQueueElements_01 end if update(datatype) or update(isPkmember) or update(isAlternatePkmember) or update(IsToWatch) or update(IsToWatchDelete) or19 update(IsCustomConfigurable) or update(IsDeactivatedByPreProcessor) or update(SplittedLookupSupport) begin declare @DBQueueElements_02 QBM_YDBQueueRaw20 insert into @DBQueueElements_02 (object, subobject, genprocid) select dbo.QBM_FGITableName(x.uid), null, @GenProcID from (select i.UID_DialogTable as 21UID from Dialogcolumn i join deleted d on i.UID_DialogColumn = d.UID_DialogColumn where isnull(i.datatype,0) <> isnull(d.datatype,0) or isnull(i.isPkmember22,0) <> isnull(d.isPkmember,0) or isnull(i.isAlternatePkmember,0) <> isnull(d.isAlternatePkmember,0) or isnull(i.IsToWatch,0) <> isnull(d.IsToWatch,0) 23or isnull(i.IsToWatchDelete,0) <> isnull(d.IsToWatchDelete,0) or isnull(i.IsCustomConfigurable,0) <> isnull(d.IsCustomConfigurable,0) or isnull(i.IsDeactivatedByPreProcessor24,0) <> isnull(d.IsDeactivatedByPreProcessor,0) or isnull(i.SplittedLookupSupport, '') <> isnull(d.SplittedLookupSupport, '') union select t.UID_DialogTableBase25 from dialogtable t join inserted i on i.UID_DialogTable = t.UID_DialogTable where t.UID_DialogTableBase > ' ' union select t.UID_DialogTableBase from 26dialogtable t join deleted d on d.UID_DialogTable = t.UID_DialogTable where t.UID_DialogTableBase > ' ' union select t.UID_DialogTable from dialogtable27 t join inserted c on c.UID_DialogTable = t.UID_DialogTableUnion ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger', @DBQueueElements_0228 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 29