Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Executing SQL Agent Job Remotely
Executing SQL Agent Job Remotely
Rate Topic
Display Mode
Topic Options
Author
Message
Rups
Rups
Posted Thursday, June 04, 2009 8:50 AM
Old Hand
Group: General Forum Members
Last Login: Wednesday, March 27, 2013 1:52 PM
Points: 360,
Visits: 173
Hi,
I need to create a batch file for a user. This batch file will have to execute a Sql agent job on Remote Server.
I am not able to execute SQL Agent job using batch file remotely.
User's machine doesn't have sql server installed and we don't want to install it either.
Is it possible to execute a SQL Agent job from a Batch file out of Remote User's machine where we don't have SQL Server installed???
Thanks in advance.
-RP
-RP
Post #729021
spaghettidba
spaghettidba
Posted Thursday, June 04, 2009 10:40 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 3:39 PM
Points: 4,804,
Visits: 8,073
You could write a .VBS Script to connect to the server and issue msdb.dbo.sp_start_job @job_name = 'yourjobname'.
Hope this helps
Gianluca
Get your two-cent-answer quickly
The Spaghetti DBA
Post #729135
Rups
Rups
Posted Thursday, June 04, 2009 10:53 AM
Old Hand
Group: General Forum Members
Last Login: Wednesday, March 27, 2013 1:52 PM
Points: 360,
Visits: 173
Ya, I can do that using VBS but they don't want it. they want it to be done by .bat or .cmd only.
Is it possible?
Thanks for your reply..
-RP
-RP
Post #729147
spaghettidba
spaghettidba
Posted Friday, June 05, 2009 1:31 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 3:39 PM
Points: 4,804,
Visits: 8,073
If you can't have a VBS, then you need something able to connect to SQL server and issue queries. One thing that comes to my mind is sqlcmd or osql. You can copy just the .exe to the client machine and then run it with the query as a parameter. I tried that with osql.exe and it worked, without installing anything on the client side.
Hope this helps
Gianluca
Get your two-cent-answer quickly
The Spaghetti DBA
Post #729450
spaghettidba
spaghettidba
Posted Friday, June 05, 2009 2:39 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 3:39 PM
Points: 4,804,
Visits: 8,073
You're incredibly lucky: take a look at today's articles:
http://www.sqlservercentral.com/articles/SQL+Job/66421/
Get your two-cent-answer quickly
The Spaghetti DBA
Post #729479
Rups
Rups
Posted Friday, June 05, 2009 8:39 AM
Old Hand
Group: General Forum Members
Last Login: Wednesday, March 27, 2013 1:52 PM
Points: 360,
Visits: 173
Superb.
Excellent.
Thanks a lot for your help, even your post solved my issue, Article has nothing about remote machine without having sql client installed on it.
I copied that OSQL file on user's machine and tried to run it and it worked... "Bole to Jhakaas" means Outstanding in my language.
Thanks for your help again.
-RP
-RP
Post #729783
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.