Solved

SQL Trigger to start Windows Scheduled task

Posted on 2010-09-09
6
697 Views
Last Modified: 2012-05-10
Hi Experts, does anyone know if its possible to use a SQL trigger to start a Windows Schedules task. Examples or ideas welcome. I simply want to start a scheduled task when an insert is done in a table.
0
Comment
Question by:takwirirar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 33634621
why would you want to start a windows schedules task?you could create a sql server job, and start that on (sp_start_job) ...
0
 
LVL 1

Author Comment

by:takwirirar
ID: 33634637
Reason: A third party wrote a program for us in JAVA and this is scheduled to run every 10 minutes. Unfortunately the process takes resources whether there are records in the database to process or not. The JAVA runset is run from a batch file that it a scheduled task. If I could get either my ASP.NET program to start the batch file/scheduled task ad-hoc that would save time and resources
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 33634642
you can run java application from sql agent jobs also ...
you define a command line call to the application just as needed (aka a .bat file that does all what is needed)...
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 1

Author Comment

by:takwirirar
ID: 33634652
So I create a SQL job that runs a batch file. I then create a trigger that runs the SQL job?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 33634694
yes. as posted in the first post, you can use the sp_start_job procedure to start such a job
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 500 total points
ID: 33634697
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question