﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / General / SQL Server 7,2000  / Executing batches asychronously? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 10:35:25 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Executing batches asychronously?</title><link>http://www.sqlservercentral.com/Forums/Topic422114-9-1.aspx</link><description>Arun,Has this helped?</description><pubDate>Thu, 15 Nov 2007 04:18:03 GMT</pubDate><dc:creator>EvilPostIT</dc:creator></item><item><title>RE: Executing batches asychronously?</title><link>http://www.sqlservercentral.com/Forums/Topic422114-9-1.aspx</link><description>The syntax for sp_add_job has a parameter called @delete_level. If you use this you can set the job to delete itself on completion (wether it is successful or not).You will need to look at sp_add_job,sp_add_jobstep &amp; sp_start_job. (all in msdb)Quickest and easiest way to work all this out is to run sql profiler filtered by your username and create a job in enterprise manager. It will give you all the code you need. Job explore the options a little more to make sure your getting everything you want.</description><pubDate>Wed, 14 Nov 2007 15:32:30 GMT</pubDate><dc:creator>EvilPostIT</dc:creator></item><item><title>RE: Executing batches asychronously?</title><link>http://www.sqlservercentral.com/Forums/Topic422114-9-1.aspx</link><description>"Create a job which deletes itself..."???!Explain.</description><pubDate>Wed, 14 Nov 2007 11:20:00 GMT</pubDate><dc:creator>Arun T Jayapal</dc:creator></item><item><title>RE: Executing batches asychronously?</title><link>http://www.sqlservercentral.com/Forums/Topic422114-9-1.aspx</link><description>You could use the sp_add_job to create a job which deletes itself after running and then execute it using sp_start_job.</description><pubDate>Wed, 14 Nov 2007 09:34:15 GMT</pubDate><dc:creator>EvilPostIT</dc:creator></item><item><title>RE: Executing batches asychronously?</title><link>http://www.sqlservercentral.com/Forums/Topic422114-9-1.aspx</link><description>No.  You can only do this by having a job that runs (say every 5 minutes) to send the emails or execute other batch proceses.Jez</description><pubDate>Wed, 14 Nov 2007 09:22:21 GMT</pubDate><dc:creator>Jez-448386</dc:creator></item><item><title>Executing batches asychronously?</title><link>http://www.sqlservercentral.com/Forums/Topic422114-9-1.aspx</link><description>Say I have a procedure inside which I have the task of sending out emails...this may be another procedure or a batch of statements. Can I run this separately without my main batch processing not waiting or blocking for this task?</description><pubDate>Wed, 14 Nov 2007 08:09:54 GMT</pubDate><dc:creator>Arun T Jayapal</dc:creator></item></channel></rss>