Skip to main content
Mitratech Success Center

Events and Actions count check

SELECT 
    (select count(*) from CMO.dbo.Audit) AS [CMO DB Events],   -- Replace 'CMO' with CMO DB name
    (select count(*) from CMO_Replication.dbo.Audit) AS [Replication DB Events], -- Replace 'CMO_Replication' with Replication DB name
    (select count(*) from CMO__Staging.dbo.Event) AS [Staging DB Events], -- Replace 'CMO_Staging' with Staging DB name
    (select count(*) from CMO_DW.dbo.DimEvent) AS [DWH DB Events] -- Replace 'CMO_DWH' with Data Warehouse DB name


SELECT 
    (select count(*) from CMO.dbo.Action) AS [CMO DB Actions], -- Replace 'CMO' with CMO DB name
    (select count(*) from CMO_Replication.dbo.Action) [Replication DB Actions], -- Replace 'CMO_Replication' with Replication DB name
    (select count(*) from CMO_Staging.dbo.Action) AS [Staging DB Actions], -- Replace 'CMO_Staging' with Staging DB name
    (select count(*) from CMO_DW.dbo.DimAction) AS [DWH DB Actions]  -- Replace 'CMO_DWH' with Data Warehouse DB name

 

Example given below - 


clipboard_e499dc349a1d039acc2cc495da5dfc5dd.png

  • Was this article helpful?