script to find Db owner details in aws Redshift DB
SELECT d.datname as "Name",
pg_catalog.pg_get_userbyid(d.datdba) as "Owner"
FROM pg_catalog.pg_database d
WHERE d.datname = 'redshiftDB'
ORDER BY 1;
Name | Owner
-------------+------------------------------
redshiftDB | DB_owner_username
(1 row)
No comments:
Post a Comment