Home » RDBMS Server » Server Administration » ORA-00942: table or view does not exist
ORA-00942: table or view does not exist [message #125523] Mon, 27 June 2005 04:25 Go to next message
krishnavm
Messages: 5
Registered: June 2005
Location: India
Junior Member

Hi....

I have installed Oracle database 9.2.0.1.0
After installation ...i tried to connect from
a java class using scott/tiger@oracle it was successfull
After that i created one user TEST with paasword TEST
in SYSTEM table space with temporary table space TEMP

and connected from sqlplus > conn test/test@oracle
and created a table tab_test

but this time when i tried to connect from java it shows
using test/test@oracle
##Error in executeQuery :oracle :ORA-00942: table or view does not exist###

what would be the reason ...please help me solving this problem

Also i tred to create another TABLESPACE and create a user in that
tablespace ...still the same problem



thanks for the same
Krishna
Re: ORA-00942: table or view does not exist [message #125527 is a reply to message #125523] Mon, 27 June 2005 04:54 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
HI

Pls check if the query is referencing any non-existent object/table.

Regds
Girish
Re: ORA-00942: table or view does not exist [message #125585 is a reply to message #125523] Mon, 27 June 2005 17:56 Go to previous messageGo to next message
vadlamani
Messages: 39
Registered: November 2003
Member

The user Test does not have the required privileges on the tables...grant select , insert & update on the tables to user Test...

Thanks
Satish
Re: ORA-00942: table or view does not exist [message #125600 is a reply to message #125585] Tue, 28 June 2005 00:04 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Hi Satish

A user has got al privileges on objects created in its schema.. so as mentioned by Krishna, that he created table tab_test under user test, all privileges on this table tab_test are available with user test.

Thus whatever u said in this case is not applicable.

Quote:

The user Test does not have the required privileges on the tables...grant select , insert & update on the tables to user Test...

Thanks
Satish


The only scenario when this error can come is when the sql query is accessing any non-existent object. Let Krishna check the actual query that is getting executed.

Regds
Girish
Re: ORA-00942: table or view does not exist [message #125606 is a reply to message #125523] Tue, 28 June 2005 00:51 Go to previous messageGo to next message
krishnavm
Messages: 5
Registered: June 2005
Location: India
Junior Member

hi friends...

after installing oracle ...under SCOTT's schema
we have tables EMP,DEPT....
through Java class these tables are accessible ok?

After that i connected as scott/tiger@oracle throgh SQL PLUS
and created a table TAB_TEST...
Once more... "i have created this table under SCOTT user".
so the user will have SELECT privilege.
But from java this table is not accessible
Why is it so?
showing error
##oracle :ORA-00942: table or view does not exist###

from SQLPLUS as SCOTT user its accessible

Please comment

thanks
Krishna
Re: ORA-00942: table or view does not exist [message #125611 is a reply to message #125606] Tue, 28 June 2005 01:06 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
HI Krishna

Below is the description of this error:

ORA-00942: table or view does not exist
Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.
Action: Check each of the following:

* the spelling of the table or view name.
* that a view is not specified where a table is required.
* that an existing table or view name exists.

Contact the database administrator if the table needs to be created or if user or application privileges are required to access the table.

Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted.

On basis of this, first do check what SQL statement is getting you this error, then match the objects accessed in that SQL statement ith the ones already existent under that user.

Regds
Girish
Re: ORA-00942: table or view does not exist [message #125619 is a reply to message #125523] Tue, 28 June 2005 01:34 Go to previous messageGo to next message
krishnavm
Messages: 5
Registered: June 2005
Location: India
Junior Member

Hi



sqlplus> conn scott/tiger@oracle

select * from tab;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE

sqlplus> CREATE TABLE tab_test (emp_id number4),emp_name varchar2(100));

select * from tab;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
TAB_TEST TABLE


in the above case ...from JAVA program
SELECT * FROM emp
returns values ...WORKING CORRECTLY

But on executing
SELECT * FROM tab_test

Error in executeQuery :orcl :ORA-00942: table or view does not exist


Thanks & Regards
Krishna
Re: ORA-00942: table or view does not exist [message #125622 is a reply to message #125619] Tue, 28 June 2005 01:36 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Have you got any records in "tab_test" table?

If no, then insert a few & then try this.
Re: ORA-00942: table or view does not exist [message #125627 is a reply to message #125523] Tue, 28 June 2005 01:53 Go to previous messageGo to next message
krishnavm
Messages: 5
Registered: June 2005
Location: India
Junior Member

yes inserted some records and tried ...still same error

Sad(

Krishna
Re: ORA-00942: table or view does not exist [message #125629 is a reply to message #125627] Tue, 28 June 2005 01:59 Go to previous message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Sorry seems stupid to ask...
but hey, in the java program are you using connect string scott/tiger@oracle only for connecting to database?
Actually this is to make sure that program is connecting to this database only, in which you are making changes.
Previous Topic: ALTER TABLE MOVE TABLESPACE
Next Topic: tns-name mising
Goto Forum:
  


Current Time: Fri Sep 27 00:15:21 CDT 2024