Back to OIM Explorer

dbo.TSB_TIRMSESetHasEntitlement

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on ESetHasEntitlement. Trigger parent table: ESetHasEntitlement

Source: sandbox-db sys.sql_modules

Source size: 1.029 characters

Interpretation

  • Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.

Relations

  • Trigger parent table: ESetHasEntitlement

Typed Edges

  • trigger on table ESetHasEntitlement Trigger parent table: ESetHasEntitlement
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL47 lines
1CREATE trigger TSB_TIRMSESetHasEntitlement2  ON ESetHasEntitlement FOR3INSERT NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM inserted)10    GOTO start11    RETURN start:12    DECLARE @GenProcID varchar(38)13    SELECT @GenProcID = dbo.QBM_FGISessionContext('')14    IF EXISTS(15      SELECT TOP 1 116      FROM inserted i17      JOIN UNSGroupB x18        ON i.Entitlement = x.XObjectKey AND x.HasReadOnlyMemberships = 1) OR EXISTS(19    SELECT TOP 1 120    FROM inserted i21    JOIN UNSGroupB1 x22      ON i.Entitlement = x.XObjectKey AND x.HasReadOnlyMemberships = 1) OR EXISTS(23    SELECT TOP 1 124    FROM inserted i25    JOIN UNSGroupB2 x26      ON i.Entitlement = x.XObjectKey AND x.HasReadOnlyMemberships = 1) OR EXISTS(27    SELECT TOP 1 128    FROM inserted i29    JOIN UNSGroupB3 x30      ON i.Entitlement = x.XObjectKey AND x.HasReadOnlyMemberships = 1)31    BEGIN32      RAISERROR('#LDS#Cannot make assignment because it involves a group with read only memberships.|',33      18,34      2)35        WITH nowait36    END37  END TRY38  BEGIN CATCH39    EXEC QBM_PSessionErrorAdd DEFAULT40    RAISERROR('',41    18,42    1)43      WITH NOWAIT44  END CATCH45  ende:46  RETURN47END
Open raw exported source
SQL ยท Raw8 lines
1  create   trigger TSB_TIRMSESetHasEntitlement on ESetHasEntitlement  for Insert not for Replication as begin  BEGIN TRY if exists (select top 12 1 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('')  if exists (select top 1 1 3from inserted i join UNSGroupB x on i.Entitlement = x.XObjectKey and x.HasReadOnlyMemberships = 1) or exists (select top 1 1 from inserted i join UNSGroupB14 x on i.Entitlement = x.XObjectKey and x.HasReadOnlyMemberships = 1) or exists (select top 1 1 from inserted i join UNSGroupB2 x on i.Entitlement = x.XObjectKey5 and x.HasReadOnlyMemberships = 1) or exists (select top 1 1 from inserted i join UNSGroupB3 x on i.Entitlement = x.XObjectKey and x.HasReadOnlyMemberships6 = 1) begin raiserror( '#LDS#Cannot make assignment because it involves a group with read only memberships.|', 18, 2) with nowait end END TRY BEGIN CATCH7 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 8