2

I am trying to schedule a bcp job in server 2012 task scheduler. My batch file works fine when I double-click on it. It includes this line:

  bcp "SELECT * FROM [TIME_KEEPER]" queryout D:\DATA\TIMESHEET_DBASE.csv -S 10.0.0.54 /c /t, -T

The file is created from the command line. Scheduler has:

  • Action: start a program
  • Script: D:\DATA\myBatch.bat
  • Start in: D:\Data

I am using the same account for other scheduled tasks and they are running fine.

aschipfl
  • 33,626
  • 12
  • 54
  • 99
Aliababa
  • 21
  • 2

1 Answers1

0

Sounds like a security issue.

Do any of the other scheduled tasks use the bcp executable and connect to the same server pulling data from teh same table? If not then you have to track down the security being used.

When you double click your batch, it is run as the account you are logged in as. Is it possible that your scheduled tasks are running as a different account than what you are logged in as?

As a test, are you able to log in to the windows server using the same account the task scheduler is executing the tasks (assuming they are different)?

Should get similar error at that point. Just a start.

jamie
  • 745
  • 4
  • 11