16.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.

Chapter 8 – Developing SQL stored procedures 255<br />

3. In the <strong>IBM</strong> SQL and Routine Development perspective tool bar, click the Save<br />

button(<br />

). Alternatively, select File -> Save from the main menu.<br />

8.3.7 Deploy the stored procedure <strong>for</strong> debugging<br />

<strong>Data</strong> <strong>Studio</strong> includes an integrated stored procedure debugger which steps you through<br />

your stored procedure code to resolve problems. Be<strong>for</strong>e you can debug a stored<br />

procedure, you must deploy it <strong>for</strong> debugging. To deploy a stored procedure <strong>for</strong> debugging<br />

from <strong>Data</strong> <strong>Studio</strong>:<br />

1. Follow the steps to deploy a stored procedure as described in 8.3.3 as shown in Figure<br />

8.11 to Figure 8.12. However, instead of selecting Finish, select Next.<br />

2. On the Routine Options page, select the Enable debugging option as shown in Figure<br />

8.20, and click Finish.<br />

Figure 8.20 – Enable debugging<br />

3. As be<strong>for</strong>e, you can use the SQL Results view to verify the deployment result.<br />

8.3.8 Run the stored procedure in debug mode<br />

To run the stored procedure in debug mode:<br />

1. In the <strong>Data</strong> Project Explorer, navigate to the Stored Procedures folder, right-click<br />

STOREDPROCEDURE1, and select Debug as shown in Figure 8.21.

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

Saved successfully!

Ooh no, something went wrong!