SYSTEM$WAIT_FOR_STABLE_OPENFLOW_CONNECTORS

Waits until each named connector leaves a transitional state. Gen 2 Openflow commands that change connector state run asynchronously, so call this function after an ALTER command when a script must not continue until the change has settled. This is the recommended default for automation.

See also:

SYSTEM$WAIT_FOR_STABLE_OPENFLOW_DEPLOYMENTS, SYSTEM$WAIT_FOR_OPENFLOW_DEPLOYMENT_STATUS, SYSTEM$WAIT_FOR_STABLE_OPENFLOW_RUNTIMES, SYSTEM$WAIT_FOR_OPENFLOW_RUNTIME_STATUS, SYSTEM$WAIT_FOR_OPENFLOW_CONNECTOR_STATUS

Syntax

SELECT SYSTEM$WAIT_FOR_STABLE_OPENFLOW_CONNECTORS(
  <timeout_seconds>,
  '<connector_name>' [ , '<connector_name>' ... ]
);

Arguments

timeout_seconds

Maximum time to wait, in seconds.

'connector_name'

One or more connector names. Use the fully qualified name <database>.<schema>.<name>. With USE DATABASE and USE SCHEMA set, a simple name resolves in the current session.

Returns

Returns 'OK' on success. Raises an error if the timeout elapses or if a connector enters a failed state.

Access control

Requires any privilege on the named connector.

Usage notes

  • The Openflow UI performs equivalent polling internally.
  • If the function times out, the underlying operation continues. Re-run the wait function with a fresh timeout.

Examples

Wait for a connector to start:

ALTER OPENFLOW CONNECTOR my_db.my_schema.my_connector START;

SELECT SYSTEM$WAIT_FOR_STABLE_OPENFLOW_CONNECTORS(600, 'my_db.my_schema.my_connector');

Wait for a configuration commit to complete:

ALTER OPENFLOW CONNECTOR my_db.my_schema.my_connector COMMIT;

SELECT SYSTEM$WAIT_FOR_STABLE_OPENFLOW_CONNECTORS(600, 'my_db.my_schema.my_connector');

Wait for termination before dropping the connector:

ALTER OPENFLOW CONNECTOR my_db.my_schema.my_connector TERMINATE;

SELECT SYSTEM$WAIT_FOR_STABLE_OPENFLOW_CONNECTORS(600, 'my_db.my_schema.my_connector');

DROP OPENFLOW CONNECTOR my_db.my_schema.my_connector;