1

I am trying to capture output and errors throw from shell script executed via isql. I've tried with the following code, but it doesn't work:

isql -q -i e:\test\script.sql e:\db\testdb.fdb -m -u sysuser -p xxx

I am looking for example how to use –m[erge_stderr] command.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
carolyn
  • 21
  • 4
  • You are not capturing output (`-o`) in the above commandline. Could you describe in more detail what you are doing, and what exactly doesn't work, and what happens instead? – Mark Rotteveel May 26 '15 at 08:44
  • I am working on window service scheduler that will trigger this upgrade script. The above script triggering using System.Process. System hang when the above process is executed. I manage to troubleshoot and found out that executing the script will return exception error. I'm trying to capture the error exception thrown so that my System.Process will not hang. – carolyn May 27 '15 at 02:31
  • As far as I know the `-e` only works with `-o`. If you are using `System.Process`, you'll probably need to either read error yourself, or instruct it to redirect error output for you. I don't know `System.Process`, so I can't be more specific right now. – Mark Rotteveel May 27 '15 at 05:06
  • Thanks Mark. Can you provide me a workable example for -m? – carolyn May 27 '15 at 06:23
  • Its ok Mark. I've found the solution. It works with the following code :- isql -q -i e:\test\script.sql e:\db\testdb.fdb -o e:\error.txt -m -u sysuser -p xxx – carolyn May 27 '15 at 08:54

0 Answers0