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. |
|
IP address of the service instance. Other instances of the same service (or other services) can use this IP address to connect to a specific service instance. When you’re running multiple service instances, you can implement leader election among the instances of a service by electing the instance with |
Access control requirements¶
A role used to execute this operation 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¶
The command doesn’t require a running warehouse to execute.
The command only returns objects for which the current user’s current role has been granted at least one access privilege.
The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.
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.
The command returns a maximum of ten thousand records for the specified object type, as dictated by the access privileges for the role used to execute the command. Any records above the ten thousand records limit aren’t returned, even with a filter applied.
To view results for which more than ten thousand records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.
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 | ip_address |
|---------------+-------------+--------------+-------------+--------+------------------------------------------------------------------+----------------------+----------------------+------------|
| TUTORIAL_DB | DATA_SCHEMA | ECHO_SERVICE | 0 | READY | edaf548eb0c2744a87426529b53aac75756d0ea1c0ba5edb3cbb4295a381f2b4 | 2025-02-21T07:17:02Z | 2025-02-21T07:17:02Z | 10.244.3.8 |
+---------------+-------------+--------------+-------------+--------+------------------------------------------------------------------+----------------------+----------------------+------------+