Skip to Main Content
Return to Navigation

Running Scripts Outside of Change Assistant

If you are running a script outside of Change Assistant, keep in mind that the default behavior of Change Assistant is to stop when any errors are encountered. To replicate that behavior outside of Change Assistant, you will need to run the script using the correct options. The following table displays the command line options required per database platform to either stop at errors or continue when errors are encountered.

Database

Stop/Continue at Errors

Oracle

Exit on error:

<sqltool> <accessID>/<password>@<dbname>@<scriptname>

Prepend script with: WHENEVER SQLERROR EXIT

Continue on error:

<sqltool> <accessID>/<password>@<dbname>@<scriptname>

Prepend script with: WHENEVER SQLERROR CONTINUE

DB2 z/OS

Exit on error:

<sqltool> /c /w /i DB2 -tvf <script name> -z <log name> -s

Continue on error:

<sqltool> /c /w /i DB2 -tvf <script name> -z <log name>

DB2 LUW

Exit on error:

<sqltool> /c /w /i DB2 -vf <script name> -z <log name> -s

Continue on error:

<sqltool> /c /w /i DB2 -vf <script name> -z <log name>

Informix

Exit on error:

<sqltool> -e -a - <script file> >> <log file> 2>&1

Continue on error:

<sqltool> -e - <script file> >> <log file> 2>&1

Microsoft SQL Server

Exit on error:

<sqltool> -U <accessID> -P <password> -s <server name> -D <database name> -i <script name> -o <log name> -e -n -I -b

Continue on error:

<sqltool> -U <accessID> -P <password> -s <server name> -D <database name> -i <script name> -o <log name> -e -n -I

Sybase

No option to stop on error.