ALTER PUMP

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > ALTER statements >

ALTER PUMP

Previous pageReturn to chapter overviewNext page

ALTER PUMP is used to start/restart or stop/pause the operation of one or more pumps. If you start multiple pumps, these will be started in topological order. That is, pumps that depend on other pumps for their data will be started after the pumps they require.

You can use a wildcard character to indicate pumps by schema (such as myschema.*), or list them individually, (pump1, pump2, pump3).  Wildcarding for referencing catalog objects uses a standard SQL syntax. Statements that use incorrect syntax (such as schema_*.*) will fail.

Topological order is automatically calculated by s-Server. As a result, you can list pumps in the ALTER statement in any order.

Starting Pumps in Topological Order

In order for an application or application module to function correctly, you should start all the pumps in a single ALTER PUMP statement. This ensures no data loss.

It is also best practice to stop all pumps with a single ALTER PUMP statement to undeploy an application or application module.

Pump Behavior on s-Server Shutdown or Restart

When s-Server is shutdown gracefully, all active pumps are suspended.

When s-Server is restarted, any pumps that were suspended at shutdown time are restarted. Pumps that have been stopped by a user SQL script will not be restarted automatically, and must therefore be restarted by a SQL script.

Syntax

<alterpump> ::= ALTER PUMP <qualified-pump-name> | <pumps-list> <pumpaction>

<pumps-list> ::= [pump-expr[, pump-expr ] * ]

<pumpaction> ::= START | STOP

 

Chart

alterPump

Examples

--start pump "mypump" in current schema

ALTER PUMP "mypump" START;

--start pump "mypump" in schema "myschema"

ALTER PUMP "myschema"."mypump" START;

-- start all pumps in myschema in topological order

ALTER PUMP myschema.* START;

-- stop all pumps in “myschema” in reverse topological order

ALTER PUMP myschema.* STOP;

-- start a given list of pumps in topological order

ALTER PUMP pump1, pump2, pump21, pump11 START;

-- or

ALTER PUMP newschema.pump2, oldschema.* START;

-- start all pumps in the catalog

-- Pumps without start/stop privileges for the user

-- will be skipped

ALTER PUMP *.* START;