x
login about faq Site discussion (meta-askssc)

Cannot run echo command in SQL cmdexec

Dear all, I have a problem when creating SQL job in cdmexec job. My job as following: 1. Create job. 2. Choose step as cmdexec, this stepp to call .bat file. code of bat file:

ECHO begin                     
REN C:\test.txt test1.txt                     
ECHO end                    

The problem I met that the job status was success, but the message in the ECHO commands not show (the command line window not dispaly). How can I show the msg of ECHo command? Please help me!

more ▼

asked Jan 26 '10 at 04:11 AM in Default

tpkhoa gravatar image

tpkhoa
1 1 1 1

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

When you run a job inside SQL Server Agent I don't think you'll ever see the window. In the Advanced Properties of the step you can set an output file for the step. That should hold the results of the ECHO command.

more ▼

answered Jan 26 '10 at 10:54 AM

graz gravatar image

graz ♦
525 2 4 5

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x455
x83
x75

asked: Jan 26 '10 at 04:11 AM

Seen: 1507 times

Last Updated: Jan 26 '10 at 10:53 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.