SHOW SERVICE INSTANCES IN SERVICE¶
Lists instances of a service.
The command output offers visibility into auto-scaling and rolling upgrades by displaying the status of each individual service instance.
- See also:
Snowpark Container Services overview, CREATE SERVICE, SHOW SERVICES, SHOW SERVICE CONTAINERS IN SERVICE
Syntax¶
SHOW SERVICE INSTANCES IN SERVICE <name>
Parameters¶
name
Specifies the identifier for the service whose instances to list.
Quoted names for special characters or case-sensitive names are not supported.
Output¶
The command output provides properties and metadata of the service instances in the following columns:
Column |
Description |
---|---|
|
Database in which the service is created. |
|
Schema in which the service is created. |
|
Name of the service. |
|
ID of the service instance (this is the index of the service instance starting from 0). |
|
One of the following values, which indicates the current status of the service instance:
|
|
The unique and immutable identifier that represents the service specification content. |
|
The time when Snowflake started creating the service instance. |
|
The time when Snowflake acknowledged the service instance is running on a node. |
Access control requirements¶
A role used to execute this SQL command must have the following privileges at a minimum:
Privilege |
Object |
Notes |
---|---|---|
Any one of these privileges: OWNERSHIP or MONITOR |
Service |
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
Usage notes¶
To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.
Examples¶
The following example lists instances of the echo_service
service in the current database and schema for the session:
SHOW SERVICE INSTANCES IN SERVICE echo_service;
Sample output:
+---------------+-------------+--------------+-------------+--------+------------------------------------------------------------------+----------------------+----------------------+
| database_name | schema_name | service_name | instance_id | status | spec_digest | creation_time | start_time |
|---------------+-------------+--------------+-------------+--------+------------------------------------------------------------------+----------------------+----------------------|
| TUTORIAL_DB | DATA_SCHEMA | ECHO_SERVICE | 0 | READY | cb0cbefa3376e75e5926d56535198ce27b3790780beb2c924085eef41dad9adf | 2024-08-08T18:31:38Z | 2024-08-08T18:34:01Z |
+---------------+-------------+--------------+-------------+--------+------------------------------------------------------------------+----------------------+----------------------+