﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Connecting / Programming  / Run SQL Server Job from Command Line / 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>Thu, 20 Jun 2013 06:00:21 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Run SQL Server Job from Command Line</title><link>http://www.sqlservercentral.com/Forums/Topic353040-20-1.aspx</link><description>I am trying to use the same command and I am having trouble getting it to work.  I am running this:  RUNRMTCMD CMD('sqlcmd -U user -P password -S server name -Q "msdb.dbo.sp _start_job @job_name = ''FACT852: ProcessRetailSales'', @server_name = '' server''"') RMTLOCNAME('99.99.99.99' *IP) RMTUSER(user) RMTPWD(password)</description><pubDate>Tue, 26 Feb 2013 08:54:30 GMT</pubDate><dc:creator>vconlan</dc:creator></item><item><title>RE: Run SQL Server Job from Command Line</title><link>http://www.sqlservercentral.com/Forums/Topic353040-20-1.aspx</link><description>&lt;P&gt;I got this to work using the sa account but not when I run it with a SQL Server account. I gave rights to the SQL Server account to execute the stored procedure as well as the sp_start_job stored procedure. &lt;/P&gt;&lt;P&gt;Any ideas how I can get a generic SQL Server account to work?&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;</description><pubDate>Fri, 23 Mar 2007 08:24:00 GMT</pubDate><dc:creator>Bob Bridges-173967</dc:creator></item><item><title>RE: Run SQL Server Job from Command Line</title><link>http://www.sqlservercentral.com/Forums/Topic353040-20-1.aspx</link><description>&lt;P&gt;Adam, I figured it out... in your example change the small q to a captial Q&lt;/P&gt;&lt;P&gt;Thanks again, Bob&lt;/P&gt;</description><pubDate>Wed, 21 Mar 2007 15:54:00 GMT</pubDate><dc:creator>Bob Bridges-173967</dc:creator></item><item><title>RE: Run SQL Server Job from Command Line</title><link>http://www.sqlservercentral.com/Forums/Topic353040-20-1.aspx</link><description>&lt;P&gt;Thanks Adam... I had to tweak it just a bit but it works. One further question... when I run this from a command prompt, after it starts, there is a message that the command "started successfully." Then the next line looks like this...&lt;/P&gt;&lt;P&gt;1&amp;gt;&lt;/P&gt;&lt;P&gt;If I press the enter key it simply adds a &amp;gt;2 below that.&lt;/P&gt;&lt;P&gt;Does this mean the system is waiting on something to get me back to a regular command prompt?&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;</description><pubDate>Wed, 21 Mar 2007 15:20:00 GMT</pubDate><dc:creator>Bob Bridges-173967</dc:creator></item><item><title>RE: Run SQL Server Job from Command Line</title><link>http://www.sqlservercentral.com/Forums/Topic353040-20-1.aspx</link><description>use either osql or sqlcmd, depending on your version of SQL (2000 uses osql, 2005 is sqlcmd)you can use that to run sp_startjobso your command may look like this:osql -E -SserverName -q"sp_start_job @job_name = 'job_name', @server_name = 'server_name'"</description><pubDate>Wed, 21 Mar 2007 13:59:00 GMT</pubDate><dc:creator>Adam Angelini</dc:creator></item><item><title>Run SQL Server Job from Command Line</title><link>http://www.sqlservercentral.com/Forums/Topic353040-20-1.aspx</link><description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I need to daisy chain a SQL Server job with an AS400 job (have the AS400 job kick off the SQL Server job). I've been told that this can be done but how do I do this? What connectivity do I need and more pressing right now, what is the command line syntax for such a job?&lt;/P&gt;&lt;P&gt;thanks, &lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;</description><pubDate>Wed, 21 Mar 2007 12:16:00 GMT</pubDate><dc:creator>Bob Bridges-173967</dc:creator></item></channel></rss>