KNOWLEDGE BASE

ORA-00942 when Connecting to Oracle


Published: 10 Jun 2016
Last Modified Date: 17 May 2021

Issue

When using an Oracle user account different than the one previously used to create a data source in Tableau Desktop, the following error may occur:

Oracle database error 942: ORA-00942: table or view does not exist

Environment

  • Tableau Desktop
  • Oracle
  • Custom SQL

Resolution

1. Verify the user has access to the desired tables.

2. Specify the schema as that of the user who created the data source by using initial SQL: 
  1. In the Oracle connector dialog in Tableau Desktop, click 'Initial SQL'.
  2. In the Initial SQL dialog, enter the following statement (where <schema name> is the schema of the user who created the data source):
    ALTER SESSION SET CURRENT_SCHEMA = <schema name>
  3. Click OK, and sign in to the database.

Cause

The schema qualifier is omitted in the custom SQL query, so the object names are resolved under the schema of the user signed in to the Oracle database. One or more of the objects referenced in the custom SQL query do not exist in the current user schema.
Did this article resolve the issue?