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.

Open formatted source/search result

Parameters

NameTypeOutput
@TableNamevarcharno
@Operationvarcharno
@TriggerNamevarcharno

Referenced objects

SchemaObjectColumn/minorClass
DialogTableOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_PSQLCreateOBJECT_OR_COLUMN
QBM_PTriggerDropOBJECT_OR_COLUMN
QBM_VHeavyLoadTablesOBJECT_OR_COLUMN
dboDPR_FSQTriggerRIMemberShipOBJECT_OR_COLUMN
dboDPR_FSQTriggerWatchMemberShipOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_OR_COLUMN
dboQBM_FSQTriggerDefOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

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

ParameterTypeDirection
@TableNamevarchar(30)input
@Operationvarchar(16)input
@TriggerNamevarchar(30)input

DML targets

None extracted.

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 objectRelationEvidence
dbo.DPR_ZTriggerCreateMembershipSQL expression dependencyOBJECT_OR_COLUMN
dbo.DPR_ZTriggerCreateMembershipsource text referencehas TRY/CATCH error handling