Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Commands in CmdExec job type
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

37 Posts

Posted - 01/21/2010 :  01:06:03  Show Profile  Reply with Quote
In a CmdExec job, you can enter commands directly into the job step window, or you can call a cmd script which contains the actual commands.

Are there any technical reasons to prefer one over the other? or it's mostly a personal preference thing?

Norsk Yak Master

3271 Posts

Posted - 01/21/2010 :  04:47:00  Show Profile  Reply with Quote
The job step window is basically the same as the cmd prompt so you can run .bat-file sor basically do whatever. You do need to make sure that the user that runs the step has permissions to do what's required though.

- Lumbago
Go to Top of Page

Flowing Fount of Yak Knowledge

8781 Posts

Posted - 01/21/2010 :  04:56:08  Show Profile  Visit webfred's Homepage  Reply with Quote
A cmd script can be used in many jobs and changes are only to make at one point.
If you have entered the commands directly into the job step windows then you have to alter all jobs.

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page


5072 Posts

Posted - 01/21/2010 :  10:26:34  Show Profile  Visit russell's Homepage  Reply with Quote
also much easier to edit a .cmd file than working in the job step window
Go to Top of Page

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 01/21/2010 :  10:42:26  Show Profile  Visit jackv's Homepage  Reply with Quote
easier to have as part of your management library i.e .bat

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000