KNOWLEDGE BASE

Error "ActiveRecord::JDBCError: ERROR: permission denied for relation <table or view name>" When Restoring from Backup


Published: 26 Nov 2014
Last Modified Date: 12 Oct 2015

Issue

When restoring Tableau Server from a backup, the following error might occur:
 
ActiveRecord::JDBCError: ERROR: permission denied for relation <table name or view name>



 

Environment

Tableau Server

Resolution

Remove user-created content from the postgres database using pgAdmin and reinstall. This content is listed in the error message, after the word "relation". For more information, see pgAdmin3 on the PostgreSQL website.

Cause

The postgres database encountered unexpected content.

Additional Information

Longer error text from tabadmin.log:

==  SetReadonlyUserPermissions: migrating =====================================
-- execute("\n      GRANT CONNECT ON DATABASE workgroup TO readonly;\n      GRANT USAGE ON SCHEMA public TO readonly;\n      GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;\n    ")
rake aborted!
An error has occurred, this and all later migrations canceled:

 

ActiveRecord::JDBCError: ERROR: permission denied for relation <TABLE-OR-VIEW-NAME>:
      GRANT CONNECT ON DATABASE workgroup TO readonly;
      GRANT USAGE ON SCHEMA public TO readonly;
      GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;

Did this article resolve the issue?