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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Commands in CmdExec job type

Author  Topic 

cddot
Starting Member

37 Posts

Posted - 2010-01-21 : 01:06:03
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?

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-01-21 : 04:47:00
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
http://xkcd.com/327/
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-01-21 : 04:56:08
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

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-01-21 : 10:26:34
also much easier to edit a .cmd file than working in the job step window
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-01-21 : 10:42:26
easier to have as part of your management library i.e .bat

Jack Vamvas
--------------------
http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -