Use SVV_ REDSHIFT_DATABASES to view a list of all the databases that a user has access to. This includes the databases on the cluster and the databases created from datashares provided by remote clusters.

SVV_REDSHIFT_DATABASES is visible to all users. Superusers can see all rows; regular users can see only metadata to which they have access.

Table columns

Column name Data type Description
database_name varchar(128) The name of the database.
database_owner integer The database owner user ID.
database_type varchar(16) The type of database. Possible types are local or shared databases.
database_acl varchar(256) The string that defines the permissions for the specified user or user group for the database.
database_options text The properties of the database.

Sample query

The following example returns the output for SVV_REDSHIFT_DATABASES.

SELECT database_name, database_type FROM svv_redshift_databases WHERE database_name = 'tickit_db'; database_name | database_owner | database_type | database_acl | database_options --------------+----------------+---------------+--------------+------------------ tickit_db | shared | | |