TSContainerSetPool procedure

The TSContainerSetPool procedure moves the specified container into the specified container pool.

Syntax

TSContainerSetPool(
      container_name varchar(128,1),
      pool_name varchar(128,1) default null);

TSContainerSetPool(
      container_name varchar(128,1));
container_name
The name of the container to move.
pool_name
The name of the container pool in which to move the container.

Description

You can use the TSContainerSetPool procedure to move a container into a container pool, move a container from one container pool to another, or remove a container from a container pool. Containers that created automatically are in the container pool named autopool by default. If you create a container with the TSContainerCreate procedure, the container does not belong to a container pool until you run the TSContainerSetPool procedure to move it into a container pool.

If the container pool specified in the TSContainerSetPool procedure does not exist, the procedure creates it.

To move a container from one container pool to another, run the TSContainerSetPool procedure and specify the destination container pool name.

To move a container out of a container pool, run the TSContainerSetPool procedure without a container pool name.

The TSContainerTable table contains a row for each container and the container pool to which the container belongs.

Example 1: Move a container into a container pool

The following statement moves a container named ctn_1 into a container pool that is named smartmeter_pool:

EXECUTE PROCEDURE TSContainerSetPool
   ('ctn_1', 'smartmeter_pool');

Example 2: Remove a container from a container pool

The following statement removes a container named ctn_1 from its container pool:

EXECUTE PROCEDURE TSContainerSetPool
   ('ctn_1');