Back to OIM Explorer

dbo.QBM_TDQBMDBPrincipal

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QBMDBPrincipal. Trigger parent table: QBMDBPrincipal

Source: sandbox-db sys.sql_modules

Source size: 552 characters

Interpretation

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

Relations

  • Trigger parent table: QBMDBPrincipal

Typed Edges

  • trigger on table QBMDBPrincipal Trigger parent table: QBMDBPrincipal
  • references source dbo.QBM_FCVGUIDToModuleOwner source text reference
  • references source dbo.QBM_FGIDBOwner source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

Complete Source

SQL33 lines
1CREATE trigger QBM_TDQBMDBPrincipal2  ON QBMDBPrincipal FOR3DELETE NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM deleted)10    GOTO start11    RETURN start:12    IF EXISTS(13      SELECT TOP 1 114      FROM deleted15      WHERE16        LoginName > ' ' AND dbo.QBM_FCVGUIDToModuleOwner(UID_QBMDBPrincipal) <> dbo.QBM_FGIDBOwner())17    BEGIN18      RAISERROR('#LDS#Deletion on permission table {0} is not allowed.|QBMDBPrincipal|',19      18,20      1)21        WITH nowait22    END23  END TRY24  BEGIN CATCH25    EXEC QBM_PSessionErrorAdd DEFAULT26    RAISERROR('',27    18,28    1)29      WITH NOWAIT30  END CATCH31  endLabel:32  RETURN33END
Open raw exported source
SQL ยท Raw5 lines
1 create   trigger QBM_TDQBMDBPrincipal on QBMDBPrincipal  for delete not for Replication as begin  BEGIN TRY if exists (select top 1 1 from deleted2) goto start return start: if exists (select top 1 1 from deleted where LoginName > ' ' and dbo.QBM_FCVGUIDToModuleOwner(UID_QBMDBPrincipal) <> dbo.QBM_FGIDBOwner3()) begin raiserror('#LDS#Deletion on permission table {0} is not allowed.|QBMDBPrincipal|', 18, 1) with nowait end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd4 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end 5