Edit the Alarm Alerts and in the email body and place the following line of code:
{{LongRunningSQL.query_text}}
Example:
The following is the default email message:
Spotlight has raised an alarm:
Connection: {{CONNECTION_NAME}}
Time: {{TIME}}
Severity: {{SEVERITY}}
{{ALARM_NAME}}: {{MESSAGE}}
Add the line of code to the end:
Spotlight has raised an alarm:
Connection: {{CONNECTION_NAME}}
Time: {{TIME}}
Severity: {{SEVERITY}}
{{ALARM_NAME}}: {{MESSAGE}}
{{LongRunningSQL.query_text}}