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

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

796


Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?

6864


What does db2 plan contain?

573


What are types of indexes?

597


Is schema the same as database?

633






What is the use of db2?

590


What are the contents of dclgen?

661


What is the use of db2 optimizer?

613


How do I copy a table in db2?

577


What are iseries servers?

570


What are the rules for db2 programming?

647


What do you mean by commit and rollback?

598


What does db2 blu stand for?

664


What is runstats and reorg in db2?

800


Explain about rct.

654