Procedures and Functions in Modules (DB2 for Linux, UNIX,
and Windows)
The IBM® Database Add-Ins for Visual Studio provide qualified
support for the use of modules in DB2® Version 9.7 for Linux®,
UNIX®, and Windows®, or later, data servers.
Modules are database objects that are a collection of other database objects
such as procedures and functions. Modules are used primarily to group together
object definitions that have a common business purpose or use. For more
information about modules, refer to
Modules in the DB2 Version 9.7 for Linux, UNIX, or Windows Information
Center.
The following actions are supported for modules:
Disambiguating procedures or functions with the same name and the same specific
name that are in different modules
Module names are not shown in the Server Explorer, only object names and, if
objects are grouped by schema, schema names. To determine the module that a
procedure or a function is in, review its Module property in
the Properties window. The value of the property is the name of the module that
the procedure or the function is in. If the value of the property is blank, the
procedure or the function is not in a module.
Internally, a three-part name of the form schema-name.module-name.object-specific-name
is used to refer to procedures and functions that are in modules.
Disambiguating the parameters of procedures or functions that have the same
specific name and that are in the same schema
If multiple procedures or functions have the same specific name and are in the
same schema, the parameters for all of the procedures or functions are listed
under each procedure or function in the Server Explorer. To determine the
actual parameters of a procedure or a function, review its definition in the
IBM Procedure Designer or the IBM Function Designer.
Running procedures and functions that are in modules
When you run a procedure or a function that is in a module, the Run Options
window does not indicate the name of the module. You must determine beforehand
from its Module property the correct procedure or function to
run.
Viewing result sets for procedures that are in modules
After you run a procedure that is in a module, you can open the Result Set
Definitions window to see the result set definitions and the result sets for
the procedure.
Note: You must open the Result Set Definitions window by
using the Open Result Set Definition command on the shortcut
menu of the procedure node. If you expand the Result Sets node
for a procedure that is in a module, the Result Set Definitions window opens,
but no result set definitions are displayed.
Deleting the definitions of procedures and functions that are in modules
You can delete a procedure or a function that is in a module. If you have
multiple procedures or functions that have the same name and that are in the
same schema, determine beforehand from its Module property the
correct procedure or function to delete.
Generating sample XAML applications from procedures that are in modules
You can use a procedure that is in a module to generate a sample XAML
application. If the Server Explorer lists multiple occurrences of the procedure
that you want to use, determine the correct procedure beforehand from its Module
property.
Generating Web methods for procedures and functions that are in modules
You can use a procedure or a function that is in a module to generate a Web
method. If the Server Explorer lists multiple occurrences of the procedure or
the function that you want to use, determine the correct procedure or function
beforehand from its Module property.
Creating and deploying IBM data Web services from procedures and functions that
are in modules
You can use a procedure or a function that is in a module to create an IBM data
Web service. If the Server Explorer lists multiple occurrences of the procedure
or the function that you want to use, determine the correct procedure or
function beforehand from its Module property.
The following actions are not supported for modules:
Creating modules
There is no designer that you can use to create modules. Modules must exist
already on your DB2 for Linux, UNIX, and Windows data server.
Adding procedures to modules
You cannot specify a module for procedures that you create in the IBM Procedure
Designer. Procedures already must be in modules on your DB2 for Linux, UNIX,
and Windows data server before you work with them in the add-ins.
Adding functions to modules
You cannot specify a module for a function that you create in the IBM Function
Designer. Functions already must be in modules on your DB2 for Linux, UNIX, and
Windows data server before you work with them in the add-ins.
Changing the definition of procedures and functions that are in modules
You can open the definition of a procedure or a function that is in a module.
However, the definition of the procedure or the function opens in read-only
mode in the IBM Procedure Designer or the IBM Function Designer, respectively.
Creating procedures and functions from existing procedures and functions that
are in modules
You cannot base a new procedure or a new function on the definition of an
existing procedure or function that is in a module.
Debugging SQL procedures in modules
You cannot debug SQL procedures that are in modules, either individually or in
CLR applications.
Using multiple procedures or functions with the same specific name and in the
same schema in .NET applications
If you have multiple procedures or functions with the same specific name that
are in the same schema, you cannot create a data source for any of those
procedures or functions.