Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
Need to Send a notification to Slack on Insert into SQL table

I want to send a notification to Slack on Insert into the table. What is the best way to achieve this for a local SQL database? This throws an error Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

USE [MYDB2021]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER [dbo].[mytrigger]
   ON  [dbo].[Doc_Header ] 
   AFTER INSERT,UPDATE
AS 
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for trigger here
    DECLARE @command VARCHAR(1000)
    SET @command = 'C:\notify.bat'
    EXEC master..xp_cmdshell @command 

END

The Notify.bat file runs a js file to send a notification to slack

@echo OFF
start cmd /k "node C:\slack.js"
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!