Saturday, February 9, 2008

IBM Data Studio - Creating/Deploying stored procedures through the different application regions:

Create 4 different projects:- “Development”, “Systems”, “Acceptance” & and “Production” on your desktop or any number depending on your installation standards. This needs to be done only once on your desktop.

Create a new stored procedure in “Development” by clicking on the stored procedures folder and then right click and select “New”, “Stored Procedure”.
Enter the name of the procedure, e.g.TESTSP and click Next…
Now add the appropriate qualifier to the procedure name
COLLID needs to be modified to reflect the region.
WLM environment also needs to be modified to reflect the region.
Modify the code appropriately, by adding in your SQL, during your edit session if there are any apparent syntax errors the editor will highlight them to bring them to your attention.
When you’ve completed the editing process press the ‘save’ button.
After the changes are made, right click on the stored procedure and click on ‘Deploy’.
Make sure that Use Current Database is selected and click Next to continue…
Under Routine options change the following:
Collection ID: to your installation standards
WLM environment: to your installation standards

Click the ‘Deploy Options’ tab and….
Modify the Build utility to your installation standard.
Click on the pull down on the right hand side of the field to display a list.
Change build utility to your installation standard.

Modifying the Bind options

Click on the … on the right hand side of the field to open the bind options dialog box

ACTION (REPLACE) ISOLATION(CS) QUALIFIER(XYZ) OWNER(XYZ) VALIDATE(BIND) CURRENTDATA(NO)

Click Finish…

Make sure there are no errors by expanding the Data Output window to full screen mode.
If there were changes to the stored procedure, make sure you see the message that the stored procedure was re-built or re-constructed.
If it is a new stored procedure, then you will see the message saying that the stored procedure was built.

Testing your stored procedure
When you have deployed your procedure with no errors, test your stored procedure by right clicking it in the Data Project Explorer window