We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Change the Owner of a Schema — Vertica Forum

Change the Owner of a Schema

Jim Knicely authored this tip.

As of Vertica 9.1.1, you can now transfer the ownership of a schema to another user!

Example:

dbadmin=> SELECT schema_name, schema_owner FROM schemata WHERE schema_name = 'my_etl_schema';
  schema_name  | schema_owner
---------------+--------------
 my_etl_schema | dbadmin
(1 row)

dbadmin=> CREATE USER etl_user;
CREATE USER

dbadmin=> ALTER SCHEMA my_etl_schema OWNER TO etl_user;
ALTER SCHEMA

dbadmin=> SELECT schema_name, schema_owner FROM schemata WHERE schema_name = 'my_etl_schema';
  schema_name  | schema_owner
---------------+--------------
 my_etl_schema | etl_user
(1 row)

Have fun!

Sign In or Register to comment.