resume_engine()#
#resume_engine(name STRING)
A procedure that resumes the specified RelationalAI (RAI) engine if it is suspended.
This procedure returns after the resume command is issued and does not wait for the engine to be ready to accept transactions.
Use api.resume_engine()
for a blocking version of this procedure.
Requires the eng_admin
application role.
Parameters#
Name | Type | Description |
---|---|---|
name | STRING | The name of the engine to resume (case-sensitive). |
Returns#
A table with the following columns:
Column | Type | Description |
---|---|---|
NAME | STRING | The name of the engine. |
MESSAGE | STRING | A message indicating the result of the operation. |
Example#
Use the api.resume_engine_async()
procedure to resume a suspended engine:
#-- Resume the engine 'my_rai_engine' if it is suspended.
CALL relationalai.api.resume_engine_sync('my_rai_engine');
/*+-----------------+----------------------+
| NAME | MESSAGE |
+-----------------+----------------------+
| my_rai_engine | resumed successfully |
+-----------------+----------------------+ */
api.resume_engine()
returns immediately after the resume command is issued and does not wait for the engine to be ready to accept transactions.
To check the status of the engine, use the api.get_engine()
procedure or query the api.engines
view:
#-- Check the status of the engine 'my_rai_engine'.
-- The engine is ready to accept transactions when the `STATUS` column is 'READY'.
-- If the engine status is 'PENDING', it is still being initialized.
CALL relationalai.api.get_engine('my_rai_engine');
/*+---------------------+--------------+-------------------------+------+--------+------------+-------------------------------+------------------------------ +-----------------------------+-------------------+-------------------------+----------------------+
| NAME | ID | VERSION | SIZE | STATUS | CREATED_BY | CREATED_ON | UPDATED_ON | COMPUTE_POOL | AUTO_SUSPEND_MINS | SUSPENDS_AT | AWAIT_STORAGE_VACUUM |
|---------------------+--------------+-------------------------+------+--------+------------+-------------------------------+-------------------------------+-----------------------------+-------------------+-------------------------+----------------------|
| CDC_MANAGED_ENGINE | a9d7f3b2c8e4 | 2025.1.24-eec68944 | S | READY | SYSTEM | 2025-01-27 15:22:15.500 -0700 | 2025-01-27 15:22:16.731 -0700 | RELATIONAL_AI_HIGHMEM_X64_S | 60 | NULL | false |
+---------------------+--------------+-------------------------+------+--------+------------+-------------------------------+-------------------------------+-----------------------------+-------------------+-------------------------+----------------------+ */
Refer to the Compute Resources guide for more information on managing engines.