on 2012 May 25 11:31 AM
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.
Request clarification before answering.
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:
Batch scripts should call dbisql or dbisql.com, not dbisql.exe. The dbisql.com executable is linked as a console application.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.