cancel
Showing results for 
Search instead for 
Did you mean: 

DBISQL CMD Failing via Task Scheduler

1,350

Preface... I'm totally new to Sybase SQL Anywhere. I've created a CMD file that does 4 data pulls from our Sybase SQL Anywhere database. The CMD file resides on the C Drive of the server that the database is installed on. When I run the CMD file manually, it connects and pulls the data successfully. When I schedule it via the Task Scheduler, it fails with a result of (0x9). Here's one of my data pull lines in the CMD file:

dbisql -nogui -C "eng=sh_asa_server;dbn=ShData;uid=dba;pwd=sql" "SELECT AlertCode, Caption, ModuleCode, IntCode, StrCode, replace(replace(AlertMessage, CHAR(13) + CHAR(10), ' '), '|', '-') AS AlertMsg, Check1, Check2, Check3, Check4 FROM SH_Alerts WHERE Check3 = 1; OUTPUT TO Alerts.txt FORMAT ASCII DELIMITED BY '|' QUOTE ''" >nul 2>nul

Any assistance would be very greatly appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Changing the order of the connection string (UN, PW, ENG, DB, LINKS), adding the TCPIP and mapping the full path of the OUTPUT TO has worked. Thank you all!! You've very much been sanity and life saviors!!!