17.10.2015 Views

Getting Started with IBM Data Studio for DB2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

180 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>IBM</strong> <strong>Data</strong> <strong>Studio</strong> <strong>for</strong> <strong>DB2</strong><br />

Refresh explorer view after script is run<br />

You can select this option to refresh the <strong>Data</strong> Source Explorer or Administrator Explorer<br />

view after you run the script.<br />

Open new connection when script is run<br />

You can select this option to create a new connection to the target database that is used to<br />

run your scripts.<br />

By default, this option is selected. The Run method must be set to a JDBC environment if<br />

you wish to deselect it. If you do, the in<strong>for</strong>mation from the Connection field is used and the<br />

Commit on completion of script and Roll Back on completion of script options are disabled.<br />

On Success<br />

These options specify how statements are handled when they are run successfully. The<br />

availability of each option depends on the run method you select. More in<strong>for</strong>mation is<br />

available in the next section.<br />

On Error<br />

These options specify how statements are handled when an error occurs. The availability<br />

of each option depends on the run method you select. More in<strong>for</strong>mation is available in the<br />

next section.<br />

5.5.1 JDBC result preferences<br />

Table 5.1 describes the behavior when statements are run successfully or encounter errors<br />

in a JDBC environment:<br />

On Success On Error Result<br />

Commit after each<br />

statement<br />

Commit after each<br />

statement<br />

Commit on completion of<br />

script<br />

Continue<br />

Stop<br />

Continue<br />

If a statement is successful, it is committed<br />

to the specified database.<br />

If an error occurs, the next statement will<br />

run.<br />

If a statement is successful, it is committed<br />

to the specified database.<br />

If an error occurs, the script will stop<br />

running.<br />

If all of the statements in the script are<br />

successful, all statements are committed to<br />

the specified database.<br />

If an error occurs, the next statement will<br />

run, and all successful statements are<br />

committed to the specified database.<br />

Commit on completion of Stop and Commit If all of the statements in the script are

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!