Chapter Contents

Previous

Next
UPDATE_LOCK_TYPE=

UPDATE_LOCK_TYPE=



Specifies whether or not a table lock is set on a DB2 table during an UPDATE operation.

Default value: None


Syntax
Details
See Also

Syntax

UPDATE_LOCK_TYPE= TABLE


Details

If you are updating a large part of a table, you can improve your performance by using UPDATE_LOCK_TYPE= to lock the entire table and prevent other application processes from having concurrent access to it. This is more efficient than locking each page as it is updated and unlocking it when the changes are committed. You can also use UPDATE_LOCK_TYPE= to prevent timeouts from contention with other application processes that are updating the same table.

DB2 locking is handled internally. Consult your DBA to determine what the locking process is for your installation of DB2.

If you set UPDATE_LOCK_TYPE=TABLE, then you must also set the CONNECTION= option to UNIQUE, which means that there is a separate physical connection for each table that is opened in your SAS application. You cannot share a connection when a DB2 table is locked. If you do not set the CONNECTION= option to UNIQUE, the SAS step fails.

If you set UPDATE_LOCK_TYPE=TABLE, you might also want to evaluate whether or not you want to change the SPOOL= option from its default value of YES. If the table is locked and its data cannot be changed during the update transaction, you might not need to create a utility spool file.

Note:   Use UPDATE_LOCK_TYPE= with caution because it locks all the tables in a nonsegmented table space, even if they are not the table that is specifically locked. The locks are held until a commit point or until the connection is freed. All other application processes are locked out of the non-segmented table space for the duration of the lock.   [cautionend]
For a full description of this option, refer to UPDATE_LOCK_TYPE=

See Also

READ_LOCK_TYPE=


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.