Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Analyze Schema Statistics

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 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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.