TSContainerLock procedure

The TSContainerLock procedure controls whether multiple sessions can write to a container at one time.

Syntax

TSContainerLock(
           container_name  varchar(128),
           flag            integer);
container_name
The name of the container. Must be an existing container name.
flag
Controls whether multiple sessions can write to the container:

0 = Multiple sessions can write to the container at the same time. Multiple locks are available for the container.

1 = Only one session at a time can write to the container. One lock is available for the container.

Usage

By default, multiple sessions can write to a container at the same time. You can prevent more than one session from writing to a container by setting the flags argument to 1. Data is loaded faster when a single session writes to a container and the flags argument is set to 1. If your application enforces that one session writes to a container at a time, set the flags argument to 1 to improve performance.

Example

The following statement restricts the number of sessions that can write to the container named ctn_sm0 to 1:

EXECUTE PROCEDURE TSContainerLock('ctn_sm0',1);