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


How can i add DROP grant to user?? — Vertica Forum

How can i add DROP grant to user??

ShawHaleShawHale Vertica Customer
edited March 2021 in General Discussion

I wanna add drop grant to user, so i execute this query
ref ) this user already had other grants(SELECT, UPDATE, DELETE) ,
GRANT DROP ON schema wmp_ep_product_dev to searchop_juhyeontae;
but the user doesn't have DROP privilige... https://19216811.cam/
In this case, how can i add DROP grant to user??

Answers

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited March 2021

    Look into inherited privileges...

    https://www.vertica.com/docs/latest/HTML/Content/Authoring/AdministratorsGuide/DBUsersAndPrivileges/Privileges/InheritedPrivilegesOverview.htm

    Example:

    dbadmin=> CREATE SCHEMA s;
    CREATE SCHEMA
    
    dbadmin=> CREATE USER u;
    CREATE USER
    
    dbadmin=> GRANT USAGE ON SCHEMA s TO u;
    GRANT PRIVILEGE
    
    dbadmin=> GRANT DROP ON SCHEMA s TO u;
    GRANT PRIVILEGE
    
    dbadmin=> CREATE TABLE s.t(c INT);
    CREATE TABLE
    
    dbadmin=> \c - u
    You are now connected as user "u".
    
    dbadmin=> DROP TABLE s.t;
    ROLLBACK 8959:  Insufficient privileges on t, drop privileges needed
    
    dbadmin=> \c
    You are now connected as user "dbadmin".
    
    dbadmin=> ALTER TABLE s.t INCLUDE SCHEMA PRIVILEGES;
    ALTER TABLE
    
    dbadmin=> \c - u
    You are now connected as user "u".
    
    dbadmin=> DROP TABLE s.t;
    DROP TABLE
    

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file