Back to OIM Explorer

dbo.ADS_TUADSOtherSID

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on ADSOtherSID. Trigger parent table: ADSOtherSID

Source: sandbox-db sys.sql_modules

Source size: 717 characters

Interpretation

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

Relations

  • Trigger parent table: ADSOtherSID

Typed Edges

  • trigger on table ADSOtherSID Trigger parent table: ADSOtherSID
  • 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

SQL45 lines
1CREATE trigger ADS_TUADSOtherSID2  ON ADSOtherSID FOR3UPDATE NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM deleted)10    GOTO start11    IF EXISTS(12      SELECT TOP 1 113      FROM inserted)14    GOTO start15    RETURN start:16    DECLARE @GenProcID varchar(38)17    SELECT @GenProcID = dbo.QBM_FGISessionContext('')18    IF19    UPDATE(ObjectSID)20    BEGIN21      IF EXISTS(22        SELECT TOP 1 123        FROM ADSOtherSID a24        JOIN deleted d25          ON a.UID_ADSOtherSID = d.UID_ADSOtherSID26        WHERE27          isnull(a.ObjectSID, N '') <> isnull(d.ObjectSID, N ''))28      BEGIN29        RAISERROR('#LDS#Changing the SID of an object cannot take place.|',30        18,31        2)32          WITH nowait33      END34    END35  END TRY36  BEGIN CATCH37    EXEC QBM_PSessionErrorAdd DEFAULT38    RAISERROR('',39    18,40    1)41      WITH NOWAIT42  END CATCH43  ende:44  RETURN45END
Open raw exported source
SQL ยท Raw6 lines
1create   trigger ADS_TUADSOtherSID on ADSOtherSID  for update not for Replication as begin  BEGIN TRY if exists (select top 1 1 from deleted) goto2 start if exists (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext(''3) if update(ObjectSID) begin if exists (select top 1 1 from ADSOtherSID a join deleted d on a.UID_ADSOtherSID = d.UID_ADSOtherSID where isnull(a.ObjectSID4, N'') <> isnull(d.ObjectSID, N'') ) begin raiserror( '#LDS#Changing the SID of an object cannot take place.|', 18, 2) with nowait end end  END TRY BEGIN5 CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 6