View previous topic :: View next topic
|
Author |
Message |
sararaju
New User
Joined: 04 May 2005 Posts: 25
|
|
|
|
I am facing this question in an interview
!1)before closing the cursor if you give committ then wht will be the result whether it will save the cursor changes or throw error message?pls reply for this query
2)wht is exactly bind doing in compilation stage? |
|
Back to top |
|
|
Ashutosh Shrinet
New User
Joined: 22 Aug 2004 Posts: 10 Location: New Delhi
|
|
|
|
hi,
i f u give the commit cursor automatically gets closed.it will save the cursor changes.
Bind is a process that builds ?access paths? to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It also checks the user?s authority and validates the SQL statements in the DBRM(s). |
|
Back to top |
|
|
narasimharao_koganti
New User
Joined: 26 Apr 2005 Posts: 11 Location: pune
|
|
|
|
hi,
before closing the cursor if u commit the cursor will be closed and all the changes made will be saved.
bind in compilation takes DBRM's or packages as input and gives the executable module for SQL statements, i.e., it consists of the access path specified by the optimizer for the SQL statements. u can see this access path by using EXPLAIN. |
|
Back to top |
|
|
brain_s390
New User
Joined: 06 May 2005 Posts: 58 Location: Mumbai
|
|
|
|
1)before closing the cursor if you give committ then wht will be the result whether it will save the cursor changes or throw error message?pls reply for this query
## Yes COMMIT will save the changes automatically.Additionally if you want to continue updating process after commit then specify CURSOR WITH HOLD option.This clause avoids closing the cursor and repositioning it to the last row processed when the cursor is reopened.
2)wht is exactly bind doing in compilation stage?
## Bind is a process that builds ?access paths? to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It also checks the user?s authority and validates the SQL statements in the DBRM(s).Mainly performs two things syntax checking and authorization checking.It binds together all packages into an application plan hence the name BIND.Apart from this bind has optimiser as a subcomponent.Its function is to determine the optimum access strategy. |
|
Back to top |
|
|
|