ORA-00942: Table or view does not exist

Problem

When starting your application, you get this error:

ORA-00942: Table or view does not exist

This error typically indicates you do not have sufficient privileges to access the Oracle database underlying your application.  This frequently occurs when putting an application that runs properly on your development machine into production for the first time. 

Solution

In many cases, the owner of the database of the created application does not exist in the production environment.  This owner name should be created in the production environment for the application to run.

To change the database schema name:

Step 1:  Change the schema name in all of the table binding files.

In your application’s ...\DataAccess folder is a set of XML files containing schema information for each table and database view used by your application.  Update these XML files to replace the old database schema name with the new (production) database schema name.

Step 2:  Change the schema name in your application’s Web.config file.

Step 3:  Rebuild your application.  This updates your application’s code files, SQL queries, and database stored procedures to use the new database schema name.

Step 4:  Ensure that your app has permissions to access the schema.

See Also

Part VII:  Troubleshooting Applications

Application Will Not Run

Application Runs But No Data is Displayed

Application Error Messages