-5001: Missing privilege

Explanation:

...

       1.      The user is not authorized to execute the SQL statement.

       2.      The user is not authorized to execute this SQL statement for data definition. The privilege necessary for this SQL statement is only granted within a role. Such limited privileges are sufficient for other SQL statements, but not for those relating to data definitions.

User Action:

Use a QUERY statement issued on the DOMAIN.TABLEPRIVILEGES or DOMAIN.COLUMNS system table to determine what privileges you have for the given table or its columns. You cannot execute the desired SQL statement.