Categories:

System functions (System Information)

SYSTEM$GET_SERVICE_DNS_DOMAIN¶

Given a schema name, returns that schema’s DNS namespace hash as a string.

See also:

Working with Services

Syntax¶

SYSTEM$GET_SERVICE_DNS_DOMAIN( <schema_name> )
Copy

Arguments¶

schema_name

Schema name. If the schema is not in the current database, specify the fully qualified name of the schema.

Returns¶

Returns the schema’s DNS namespace hash as a string.

Access control requirements¶

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege

Object

Notes

USAGE

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.

Examples¶

If TUTORIAL_DB is the current database, then both of the following return the same result. This is the same DNS domain that appears in the DNS name (as reported by SHOW SERVICES) for any service in the DATA_SCHEMA schema.

SELECT SYSTEM$GET_SERVICE_DNS_DOMAIN('DATA_SCHEMA');
SELECT SYSTEM$GET_SERVICE_DNS_DOMAIN('TUTORIAL_DB.DATA_SCHEMA');
Copy

Example output:

+----------------------------------------------+
| SYSTEM$GET_SERVICE_DNS_DOMAIN('DATA_SCHEMA') |
|----------------------------------------------|
| k3m6.svc.spcs.internal                       |
+----------------------------------------------+