NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
F-31
Considerations—FREE RESOURCES
CLOSE TABLES
directs SQL to close tables. Otherwise, other users or programs may open them even
though they are not privileged to do so.
Considerations—FREE RESOURCES
Effect on buffers
If CONTROL TABLE SEQUENTIAL INSERT/UPDATE is set to ENABLE or ON,
FREE RESOURCES also flushes the insert/update buffer for audited and
nonaudited tables.
Effect on audited tables
On audited tables, FREE RESOURCES releases locks acquired only within the
current TMF transaction using STABLE access. FREE RESOURCES releases locks
that apply only to data being read. Locks on data that has been inserted, updated, or
deleted by the current transaction are released automatically when the transaction
completes.
FREE RESOURCES does not affect a table lock on an audited table. The lock is
released when the transaction ends unless SQL acquired the lock under STABLE
access and no updates were performed.
Effect on nonaudited tables
On nonaudited tables, unless you specify AUDITONLY, FREE RESOURCES
releases all locks acquired by DML statements with REPEATABLE access, whether
or not a TMF transaction is in progress.
You must use either FREE RESOURCES or UNLOCK TABLE to release locks on
nonaudited tables under these conditions:
°
A DML statement with REPEATABLE access operates on nonaudited tables or
on views with underlying nonaudited tables.
°
LOCK TABLE statements are in effect.
°
A host program is returning control to a requester but holds locks on nonaudited
files because it used the AUDITONLY option on COMMIT WORK,
ROLLBACK WORK, or another FREE RESOURCES statement.
You must use FREE RESOURCES or COMMIT WORK to ensure the insert/update
buffer is flushed for nonaudited tables before you exit SQLCI or a host program. (In
programs, you must then check SQLCA for flush errors.)
Effect on cursors
FREE RESOURCES closes all cursors on nonaudited tables or views unless you
specify the AUDITONLY option.
FREE RESOURCES closes all cursors with BROWSE access to audited tables or
views. FREE RESOURCES closes a cursor with STABLE or REPEATABLE access