dbo.DPR_PTriggerCreateMembership
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:03.147 · modified 2026-04-14T23:20:35.607 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@TableName | varchar | no |
@Operation | varchar | no |
@TriggerName | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogTable | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_PSQLCreate | OBJECT_OR_COLUMN | ||
| QBM_PTriggerDrop | OBJECT_OR_COLUMN | ||
| QBM_VHeavyLoadTables | OBJECT_OR_COLUMN | ||
| dbo | DPR_FSQTriggerRIMemberShip | OBJECT_OR_COLUMN | |
| dbo | DPR_FSQTriggerWatchMemberShip | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | OBJECT_OR_COLUMN | |
| dbo | QBM_FSQTriggerDef | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure DPR_PTriggerCreateMembership (@TableName varchar(30) , @Operation varchar(16) , @TriggerName varchar(30) ) 2as begin declare @TriggerBody nvarchar(max) declare @SQLcmd nvarchar(max) declare @tabletype nvarchar(1) declare @DebugLevel char(1) = 'W' declare @DebugMessage 3 nvarchar(4000) declare @DebugSwitch int = 0 declare @IsDeactivatedByPreProcessor bit declare @VarDeclaration nvarchar(max) = ' 4 declare @IsSimulationMode bit = dbo.QBM_FGIIsSimulationMode() 5 declare @TrackingDate datetime = getutcdate() 6 declare @SimulationModeBuffer QBM_YTriggerOperation 7 ' 8 SET XACT_ABORT OFF BEGIN TRY select top 1 @tabletype = t.TableType , @IsDeactivatedByPreProcessor = t.IsDeactivatedByPreProcessor from DialogTable t with 9 (readpast) where TableName = @TableName if @tabletype <> 'T' or @TableName in (select TableName from QBM_VHeavyLoadTables ) or @IsDeactivatedByPreProcessor 10 = 1 or not exists (select top 1 1 from information_schema.tables where table_name = @TableName and table_type in ('BASE TABLE', 'VIEW') ) begin goto dropOnly 11 end select @TriggerBody = dbo.DPR_FSQTriggerWatchMemberShip(@TableName, @operation) if @TriggerBody like '--Debug%' begin if @DebugSwitch > 0 begin print 12 @TriggerBody end select @TriggerBody = '' end select @TriggerBody = @TriggerBody + dbo.DPR_FSQTriggerRIMemberShip(@TableName, @operation) if @triggerbody 13 > ' ' begin select @SQLcmd = dbo.QBM_FSQTriggerDef (@TriggerName , @TableName , @Operation , @TriggerBody , @VarDeclaration , 'Trigger DPRMembership for ' 14 + @TableName + '(' + @Operation + ')' ) if @DebugSwitch > 0 begin print substring(@SQLcmd, 1, 4000) print substring(@SQLcmd, 4001, 4000) print substring 15(@SQLcmd, 8001, 4000) print substring(@SQLcmd, 12001, 4000) print substring(@SQLcmd, 16001, 4000) print substring(@SQLcmd, 20001, 4000) print substring 16(@SQLcmd, 24001, 4000) print substring(@SQLcmd, 28001, 4000) print substring(@SQLcmd, 32001, 4000) print substring(@SQLcmd, 36001, 4000) print substring 17(@SQLcmd, 40001, 4000) print substring(@SQLcmd, 44001, 4000) print substring(@SQLcmd, 48001, 4000) print substring(@SQLcmd, 52001, 4000) print substring 18(@SQLcmd, 56001, 4000) print substring(@SQLcmd, 60001, 4000) print substring(@SQLcmd, 64001, 4000) print substring(@SQLcmd, 68001, 4000) print substring 19(@SQLcmd, 72001, 4000) print substring(@SQLcmd, 76001, 4000) print substring(@SQLcmd, 80001, 4000) print substring(@SQLcmd, 84001, 4000) print substring 20(@SQLcmd, 88001, 4000) print substring(@SQLcmd, 92001, 4000) print substring(@SQLcmd, 96001, 4000) end exec QBM_PSQLCreate @TriggerName, 'T', @SQLcmd, 21 @UnComment = 0 end else begin exec QBM_PTriggerDrop @TriggerName end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000 22) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return dropOnly: exec QBM_PTriggerDrop @TriggerName end 23
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:35.607
has TRY/CATCH error handling
Summary: calls QBM_PSQLCreate, QBM_PTriggerDrop, QBM_PSessionErrorAdd; reads/joins DialogTable, QBM_VHeavyLoadTables, information_schema
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@TableName | varchar(30) | input |
@Operation | varchar(16) | input |
@TriggerName | varchar(30) | input |
DML targets
None extracted.Called routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @TableName @Operation @TriggerName @TriggerBody @SQLcmd @tabletype @DebugLevel @DebugMessage @DebugSwitch @IsDeactivatedByPreProcessor @VarDeclaration @IsSimulationMode @TrackingDate @SimulationModeBuffer @operation @triggerbody @UnComment @Rethrow
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
| Referencing object | Relation | Evidence |
|---|---|---|
| dbo.DPR_ZTriggerCreateMembership | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.DPR_ZTriggerCreateMembership | source text reference | has TRY/CATCH error handling |