The script will Extract User Privileges Definition in Vertica. SELECT 'GRANT ' || REPLACE(privileges_description, '*', '') || ' ON ' || COALESCE(object_schema, '') || '.' || object_name || ' TO ' || grantee || ';' as GRANTS FROM v_catalog.grants WHERE COALESCE(privileges_description, '') > '' ORDER BY 1;
SELECT 'GRANT ' || REPLACE(privileges_description, '*', '') || ' ON ' || COALESCE(object_schema, '') || '.' || object_name || ' TO ' || grantee || ';' as GRANTS FROM v_catalog.grants WHERE COALESCE(privileges_description, '') > '' ORDER BY 1;