I would like to know if the dbisql command that I ran succeeded or not. When I try to check using %errorleve%, I don't see it change for success or failure. What is the preferred method to find that out. I am trying to kick off the backup using a script. But, I would like to know for any unpredictable error. Any help is greatly appreciated.

asked 25 May '12, 10:31

Barup's gravatar image

accept rate: 0%

The documentation includes the following in the Remarks section:

Non-zero exit codes are set only when you run Interactive SQL in batch mode (with a command line that contains a SQL statement or the name of a script file).

This also might be applicable:

For Windows, there are two executables:

  1. Batch scripts should call dbisql or dbisql.com, not dbisql.exe. The dbisql.com executable is linked as a console application.

  2. The dbisql.exe executable is linked as a windowed application and does not block the command shell from which it was started. If dbisql.exe is run from a batch file, you won't see any output sent to the standard output or standard error files.

permanent link

answered 25 May '12, 13:35

Graham%20Hurst's gravatar image

Graham Hurst
accept rate: 28%

In addition to Graham's suggestions, you might also use the DBBACKUP utility directly if your script does not contain more than the BACKUP statement.

Like all other database utilities, DBBACKUP returns exit codes that you can check for:

Software component exit codes

permanent link

answered 26 May '12, 10:05

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 May '12, 10:31

question was seen: 834 times

last updated: 26 May '12, 10:05