Back to OIM Explorer

dbo.TSB_ZPersonHasUNSGroupB

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB / TSB_ZUNSAccountBInUNSGroupB at line 4; References QBM_PDBQueueInsert_Bulk

Source: sandbox-db sys.sql_modules

Source size: 726 characters

Interpretation

  • Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
  • DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.

Relations

  • Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB / TSB_ZUNSAccountBInUNSGroupB at line 4
  • References QBM_PDBQueueInsert_Bulk

Typed Edges

  • queues DBQueue task TSB_ZUNSAccountBInUNSGroupB at line 4 Bulk DBQueue insert -> TSB-K-UNSAccountBInUNSGroupB / TSB_ZUNSAccountBInUNSGroupB at line 4
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • queues DBQueue task TSB-K-UNSAccountBInUNSGroupB -> TSB_ZUNSAccountBInUNSGroupB QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: end

Complete Source

SQL36 lines
1CREATE PROCEDURE TSB_ZPersonHasUNSGroupB(2  @SlotNumber int3)4AS5BEGIN6  BEGIN TRY7    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw8    INSERT INTO @DBQueueElements_01(object,9    subobject,10    genprocid)11    SELECT12      x.uid,13      NULL,14      x.GenProcID15    FROM(16    SELECT17      DISTINCT a.uid_UNSAccountB AS uid,18      p.GenProcID19    FROM QBMDBQueueCurrent p20      WITH(readpast)21    JOIN UNSAccountB a22      ON a.uid_person = p.uid_Parameter AND p.SlotNumber = @SlotNumber AND a.UID_Person > ' '23    JOIN UNSRootB r24      ON a.UID_UNSRootB = r.UID_UNSRootB AND r.GroupUsageMask & 0x01 > 0) AS x25    EXEC QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB',26      @DBQueueElements_0127  END TRY28  BEGIN CATCH29    EXEC QBM_PSessionErrorAdd DEFAULT30    RAISERROR('',31    18,32    1)33      WITH NOWAIT34  END CATCH35  ende:36END
Open raw exported source
SQL ยท Raw6 lines
1         create   procedure TSB_ZPersonHasUNSGroupB (@SlotNumber int) AS begin BEGIN TRY declare @DBQueueElements_01 QBM_YDBQueueRaw insert into2 @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, x.GenProcID from ( select distinct a.uid_UNSAccountB as uid, p.GenProcID from QBMDBQueueCurrent3 p with (readpast) join UNSAccountB a on a.uid_person = p.uid_Parameter and p.SlotNumber = @SlotNumber and a.UID_Person > ' ' join UNSRootB r on a.UID_UNSRootB4 = r.UID_UNSRootB and r.GroupUsageMask & 0x01 > 0 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB', @DBQueueElements_015 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: end 6