SQL Query To Get A List Of The Active Triggers From The Database

How to get a list of the active triggers from the database using SQL query?

Issue Description

How to get a list of the active triggers from the database using SQL query?

Resolution

To get the name of triggers that are currently enabled, the following query can be used:

SELECT [Name],TenantId

FROM UiPath.[dbo].[ProcessSchedules]

WHERE [Enabled]=1 group by TenantId, [Name]

To retrieve all their details on a specific tenant(based on the Tenant ID), use the below query:

SELECT *

FROM UiPath.[dbo].[ProcessSchedules]

WHERE [Enabled]=1 and TenantId= 0

TenantID = 0 corresponds to the Default Tenant. Replace the ID with the desired tenant.

Note: To avoid any unwanted scenarios, take a backup of the database before running any scripts or commands.