What is ACQUIRE/RELEASE in BIND?

Answer Posted / sabahat khan

The ACQUIRE and RELEASE options of bind determine when DB2
locks an object (table, partition, or table space)which
your application uses and when it releases the lock.

The options apply to static SQL statements(like Embedded
SQL statement in application program), which are bound
before your program executes. If your program executes
dynamic SQL statements, the objects they lock are locked
when first accessed and released at the next commit point
though some locks acquired for dynamic SQL might be held
past commit points.


ACQUIRE(ALLOCATE)
Acquires the lock when the object is allocated. This option
is not allowed for BIND or REBIND PACKAGE.

ACQUIRE(USE)
Acquires the lock when the object is first accessed.

RELEASE(DEALLOCATE)
Releases the lock when the object is deallocated (the
application ends). The value has no effect on dynamic SQL
statements, which always use RELEASE(COMMIT)

RELEASE(COMMIT)
Releases the lock at the next commit point, unless cursors.
If the application accesses the object again, it must
acquire the lock again.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can record locking be achieved in those DB2 versions which do not support it?

623


What is db2?

739


What does reorg do in db2?

574


How can we retrieve the total number of records in RPG & CLLE?

194


What is drop table?

582






Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

607


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

3788


What is cascading rollback?

621


What is null value in db2?

563


How can you quickly find out the # of rows updated after an update statement?

631


Define db2 and its databases?

618


Are views updateable?

642


How do you simulate the explain of an embedded sql statement in spufi/qmf?

634


What is the difference between using bind () and rebind () methods of naming class?

788


Mention some fields that are a part of sqlca.

600