By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,924 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,924 IT Pros & Developers. It's quick & easy.

Difference between Collection ID and qualifier

P: n/a
Hi Friends ,

I want to know the exact difference between collection ID and
qualifier.
I also want to know in detail : When we perform BIND operation on a
stored procedure, what we are actually trying to do ?
Why Bind operation is performed ??

Can anyone please tell me bout complete Lifecycle of developing a
Stored Prcedure ??

I know following things : [I m using db2 Ver -8 ]
1) We create stored proc using developement center.
2) We perform build operation.
3) Later we Perform BIND operation.
4) We GRANT priveliges to other users for Ececution of stored proc in
case required.
In my application , we ,the developer team , writes Stored Proc using
Our OWN ID.
But when the application is deployed , we use a special new ID created
fo that particular application.
How shld we procedd in this scenario. We follow above steps.
Waiting Expert replies. ;)

Mar 17 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
ni***********@gmail.com wrote:
I want to know the exact difference between collection ID and
qualifier.
In which context do you have "collection IDs"? I know that "qualifiers" are
used in replication scenarios. But maybe you have it somewhere else as
well?
I also want to know in detail : When we perform BIND operation on a
stored procedure, what we are actually trying to do ?
Why Bind operation is performed ??
When you create a bind file, the SQL statements in the embedded SQL code are
send to the database server (DB2 server), analyzed syntactically and
semantically, privileges are verified and then the statements are compiled
and optimized. As a final step the compiled statements are stored in the
bind file.

The binding itself takes the statements from those files and creates a
package in the database (can be another database than the one used for the
creation of the bind file). The existence of the tables (base tables or
views) is verified along with the privileges of the caller.
Can anyone please tell me bout complete Lifecycle of developing a
Stored Prcedure ??

I know following things : [I m using db2 Ver -8 ]
1) We create stored proc using developement center.
2) We perform build operation.
3) Later we Perform BIND operation.
4) We GRANT priveliges to other users for Ececution of stored proc in
case required.


5) You drop the procedure or database. ;-)

Seriously, the BIND operation is only necessary if you have SQL statements
embedded in C/C++ code. Java procedures or procedures written in SQL don't
require the bind files. Java procedures always use dynamic SQL and there
the SQL statements are send to the server and compiled/optimized there when
needed. And SQL procedures are directly translated into the DB2 internal
representation (called "section") when they are created (assuming you're on
V8.2).

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 20 '06 #2

P: n/a
"Knut Stolze" <st****@de.ibm.com> wrote in message
news:dv**********@lc03.rz.uni-jena.de...
ni***********@gmail.com wrote:

In which context do you have "collection IDs"? I know that "qualifiers"
are
used in replication scenarios. But maybe you have it somewhere else as
well?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany


Collection id's are used when binding packages in DB2 for z/OS.
Mar 20 '06 #3

P: n/a

In my project we are using SQL stored procedures.
So with reference to your last post , can i say that we dont need to
peorform BIND operation ??

Also, when I perform BUILD, does package for that soted procedure gets
automatically created ??
Is there any way to access the package related information for a stored
proc ?

Mar 21 '06 #4

P: n/a
Mark ,
can u please provide more inputs on the Collection ID's ??
We are using z/OS mainframe env.

Mar 21 '06 #5

P: n/a
<ni***********@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
Mark ,
can u please provide more inputs on the Collection ID's ??
We are using z/OS mainframe env.


Your question is a little too broad. You should consult the manuals which
describe how to use collection id's with packages. If you have a specific
question after reading the manuals, then you can post it.
Mar 21 '06 #6

P: n/a
ni***********@gmail.com wrote:

In my project we are using SQL stored procedures.
So with reference to your last post , can i say that we dont need to
peorform BIND operation ??
On DB2 for LUW Version 8.2 and later you won't need it.
Also, when I perform BUILD, does package for that soted procedure gets
automatically created ??


The package is not created if you specify the BINDFILE option for the
PRECOMPILE command and do not have the PACKAGE option present.
http://tinyurl.com/mleqh

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 21 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.