Troubleshoot dynamic table permission issues¶
This page helps you diagnose and resolve permission-related dynamic table failures. For refresh failures unrelated to permissions, see Troubleshoot dynamic table refresh issues. For creation-time issues, see Troubleshoot dynamic table creation issues.
Refresh fails because secondary roles are not used¶
A query that succeeds interactively can fail during refresh because refreshes use only the owner role: secondary roles are not activated.
Typical error messages:
-
Identify which objects the refresh can’t access. Check the refresh history for the error details:
-
Grant the missing privileges directly to the dynamic table’s owner role:
-
If the privileges come from a database role, grant that database role to the dynamic table’s owner role.
Important
Do not rely on secondary roles for dynamic table access. Every object referenced in the definition must be accessible through the owner role’s primary grants.
Refresh fails after ownership transfer¶
When you transfer ownership of a dynamic table to a different role (using GRANT OWNERSHIP),
the new owner role might not have all the privileges that the original owner had. Refreshes
start failing because the new role can’t access the warehouse, base tables, or functions.
-
Check which role now owns the dynamic table:
-
Grant the new owner role all privileges needed to refresh the dynamic table:
-
After granting the privileges, resume the dynamic table if it was auto-suspended due to consecutive failures:
Tip
Before transferring ownership, run SHOW GRANTS TO ROLE <current_owner> to capture the
full list of grants. Replicate those grants to the new owner role before the transfer.
Note
Policy-related refresh issues (row access policies, masking policies, projection policies) are documented on Troubleshoot dynamic table refresh issues.
Can’t see dynamic table metadata¶
If SHOW DYNAMIC TABLES or INFORMATION_SCHEMA.DYNAMIC_TABLES() returns no rows for a dynamic
table you know exists, the issue is a missing privilege.
-
Verify that the dynamic table exists and your role can see it:
If this returns no rows, your role may also need USAGE on the database and schema.
-
Check whether your role has the MONITOR privilege on the dynamic table:
-
If your role doesn’t have MONITOR, ask the dynamic table owner to grant it:
For the full list of privileges required for dynamic table operations, see Dynamic table access control.
Refresh fails with EXECUTE AS USER permission errors¶
When a dynamic table uses EXECUTE AS USER, refreshes can fail if the required privileges or
user configuration are missing.
Missing IMPERSONATE privilege. The dynamic table’s owner role must hold IMPERSONATE on the target user. If this privilege is missing or was revoked, refreshes fail with a permission error. Grant IMPERSONATE on the target user to the dynamic table’s owner role:
User does not exist. The user specified in EXECUTE AS USER must exist. If the user was dropped or never created, refreshes fail. Recreate the user and ensure it holds the dynamic table’s owner role:
After resolving the issue, resume the dynamic table if it was auto-suspended:
What’s next¶
- To troubleshoot refresh failures on an existing dynamic table, see Troubleshoot dynamic table refresh issues.
- To troubleshoot creation-time issues, see Troubleshoot dynamic table creation issues.
- For the complete privilege reference, see Dynamic table access control.
- To set up monitoring and alerts, see Monitor dynamic tables.