Analyze Schema Statistics

ersaurabhexersaurabhex - Select Field -

https://www.vertica.com/blog/analyze-statistics-schema-level-part-2-quick-tip/
Based on above knowledge tips, I created a function but i have trouble giving access to individual database users. Only DBA user is able to run that.

Comments

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited December 2019

    Did you grant the EXECUTE privilege?

    Example:

    dbadmin=> CREATE USER joe;
    CREATE USER
    
    dbadmin=> GRANT EXECUTE ON PROCEDURE analyze_schema_statistics(schema_name VARCHAR) TO joe;
    GRANT PRIVILEGE
    
    dbadmin=> \c - joe
    You are now connected as user "joe".
    
    dbadmin=> SELECT analyze_schema_statistics('test_stats');
     analyze_schema_statistics
    ---------------------------
                             0
    (1 row)
    

Leave a Comment

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