How to list all available schemas

Most schemas are defaulted to public unless a specific schema is used. To find out what schema to reflect for your datasource, you can run the following query on your database to list all available schemas. Not all databases have this functionality.

Amazon Redshift

select * from pg_namespace;

DB2
select schemaname from syscat.schemata

MySQL
You can leave the schema blank since for MySQL, physically a schema is synonymous with a database.

Oracle
select USERNAME from SYS.ALL_USERS

PostgreSQL
select nspname from pg_catalog.pg_namespace

Presto
SHOW SCHEMAS [ FROM catalog ]

SQL Server
SELECT * FROM sys.schemas

Vertica
SELECT table_schema FROM v_catalog.tables


To reflect multiple schemas, refer to Multiple schemas per datasource connection.