ORA-00942 - What is the table or view that not exists?

Hi,
Is there any way to identify which table or view that the error message refers, in a SQL code (select, insert, etc)?

SQL> select * from garbage;
select * from garbage
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> insert into garbage values (1);
insert into garbage values (1)
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> update garbage set a = 1;
update garbage set a = 1
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> delete from garbage ;
delete from garbage
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> drop table garbage;
drop table garbage
ERROR at line 1:
ORA-00942: table or view does not exist
SQL>

Similar Messages

  • ORA-00942: the table or view does not exist

    Hello!!!!
    I have tree simple mappings each one with only one dimention and sometimes external or normal tables. One of them is ok but I can´t deploy the others.
    In Controle Center I have this messege: the table or view does not exist.
    I genereted both queries and run in SQL navigator with the same message.
    I realized that I can set the schema properties for external tables but I couldn´t do the same for Dimension (or I don´t know where I can do this).
    I believe that I have to set this propertie for dimension to have my mapping running ok, but I realized that the only one mapping that is ok does not have this propertie set.
    Where is the problem?!!?!?!?
    I validated these mapping and they have warnnings about column length, no errors.
    In the previous OWB version I used to set this propertie, but in 10.2 I don´t know if is realy necessary.

    Try to open the package body with a tool like TOAD and try to compile it. When you use TOAD the process stops where the error is. Then you know which table or view doesn't exist for the OWB. If the table or view does exist then it is almost certainly a missing privilege that prevents you from succesfully deploying your mapping. If the table or view does not exist then you've got to deploy the underlying (bound) table.
    Regards,
    Jörg

  • APEX_APPLICATION_FILES: ORA-00942: table or view does not exist

    Hello,
    As my first APEX task I am attempting the upload/download demo on http://download.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/up_dn_files.htm
    The ultimate goal is to store PDF files in the database.
    In order to complete step 1: To create an application using the Create Application Wizard:
    - I first created a user from SYSTEM called 'myapp'
    - Next I logged into 'myapp' to continue the exercise. (I am wondering if that is where I am going wrong... If so, please clarify)
    - Knowing that I would want to save the upload to a table I created a table with a BLOB
    I did the steps for the upload and ran the application - no errors to there.
    Next I needed to "To create a report on APEX_APPLICATION_FILES:".
    I started the wizard as instructed. When I pasted the SELECT ... FROM APEX_APPLICATION_FILES, I got the table or view does not exist. A quick review of the TABLES tab shows only the tables that I created. Not any of the system tables or views.
    I logged back in as SYSTEM and reviewed the 'rights' given the user 'myapp'. All were checked.
    I knew nothing of Oracle when I installed XE, so I took defaults or whatever the install doc said to do. Is that part of the problem? It is clear that I do not have rights to see that table, but I also do not see the table when logged in as SYSTEM.
    Any insight appreciated,
    Rick

    Thanks for the reply.
    Version is:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Database      
    NAME     XE
    CREATED     10/13/2006 08:04:21 PM
    RESETLOGS_TIME     10/13/2006 08:04:25 PM
    Install Version 10.2.1015
    Regarding the code links, this one looks like what I need:
    DECLARE
    l_bfile BFILE;
    l_blob BLOB;
    BEGIN
    INSERT INTO tab1 (col1)
    VALUES (empty_blob())
    RETURN col1 INTO l_blob;
    l_bfile := BFILENAME('IMAGES', 'MyImage.gif');
    DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
    DBMS_LOB.fileclose(l_bfile);
    COMMIT;
    END;
    Is the 'BFILENAME' function that causes the 'get a filename' dialog box of Windows to open for the user to find which file to upload?
    I'm going off to look for a newer version of APEX, thanks.

  • Table or view does not exist when using in PL/SQL block

    I hav something strange...
    When i execute a query it works just fine... When i use the exact same query in a function i want to create, i get the error 'table or view does not exist'
    I create the function with the same user then when i'm executing the query.
    For example:
    select name,userid from portal.WWLOG_ACTIVITY_LOGS
    if i execute this... it works fine. I get my results.
    However when i create a function:
    CREATE OR REPLACE FUNCTION EBUSINESS.GET_USER_CREATOR (p_userid IN Varchar2) return VARCHAR2
    as
    /*CURSOR c_user_creator IS
    select distinct name,userid from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;*/
    v_creator varchar2(500);
    v_ret_val VARCHAR2(500) := 'NOT_FOUND';
    BEGIN
    select userid into v_ret_val from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;
    --v_ret_val := x.userid;
    --end loop;
    -- Is the user in the group or not?
    /*OPEN c_user_creator;
    FETCH c_user_creator INTO v_creator;
    IF c_user_creator%FOUND THEN
    v_ret_val := v_creator;
    ELSE
    v_ret_val := 'NOT FOUND';
    END IF;
    CLOSE c_user_creator;*/
    Return v_ret_val;
    END;
    The table or view does not exist...
    I tryed with cursor, select into, for x in (select....)
    Nothing works.
    A select grant is a select grant right? Are there different grant you should use so you can select it into a function or just do a normal select?
    I also tryed to create a view that just sais select * from WWLOG_ACTIVITY_LOGS but that doesn't work...

    Are there different grant you should use so you can
    select it into a function or just do a normal select? Yes. Grants on objects used in functions/procedures must be given directly to the user, and not through a role.

  • Database startup showing ORA-00942: table or view does not exist in trace

    Hi Friends,
    SunOS 5.10 Generic_137112-06 i86pc i386 i86pc , 64 Bit
    Oracle 10.2.0.1.0
    While I am doing a startup, getting following error.
    SQL> startup;
    ORACLE instance started.
    Total System Global Area 3221225472 bytes
    Fixed Size 2122544 bytes
    Variable Size 410819792 bytes
    Database Buffers 2801795072 bytes
    Redo Buffers 6488064 bytes
    Database mounted.
    ORA-01092: ORACLE instance terminated. Disconnection forcedThe alert log shows the following
    Errors in file /applns/oracle/admin/CTSD1/udump/ctsd1_ora_11486.trc:
    ORA-00942: table or view does not exist
    Error 942 happened during db open, shutting down database
    USER: terminating instance due to error 942
    Instance terminated by USER, pid = 11486
    ORA-1092 signalled during: ALTER DATABASE OPEN...A look at the trace file shows this
    /applns/oracle/admin/CTSD1/udump/ctsd1_ora_11486.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /applns/oracle
    System name: SunOS
    Node name: N890
    Release: 5.10
    Version: Generic_137112-06
    Machine: i86pc
    Instance name: CTSD1
    Redo thread mounted by this instance: 1
    Oracle process number: 23
    Unix process pid: 11486, image: oracle@N890 (TNS V1-V3)
    *** SERVICE NAME:() 2011-02-16 19:24:50.188
    *** SESSION ID:(325.3) 2011-02-16 19:24:50.188
    Successfully allocated 3 recovery slaves
    Using 367 overflow buffers per recovery slave
    Thread 1 checkpoint: logseq 45929, block 2, scn 310788795>cache-low rba: logseq 45929, block 3
    >on-disk rba: logseq 45929, block 52, scn 310788832
    >start recovery at logseq 45929, block 3, scn 0
    ----- Redo read statistics for thread 1 -----
    Read rate (ASYNC): 24Kb in 0.31s => 0.08 Mb/sec
    Total physical reads: 4096Kb
    Longest record: 0Kb, moves: 0/61 (0%)
    Longest LWN: 16Kb, moves: 0/3 (0%), moved: 0Mb
    Last redo scn: 0x0000.128642df (310788831)
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 1
    Average hash chain = 4/4 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 117/121 = 1.0
    *** 2011-02-16 19:24:50.515
    KCRA: start recovery claims for 4 data blocks
    *** 2011-02-16 19:24:50.515
    KCRA: blocks processed = 4/4, claimed = 4, eliminated = 0
    *** 2011-02-16 19:24:50.516
    Recovery of Online Redo Log: Thread 1 Group 1 Seq 45929 Reading mem 0
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 1
    Average hash chain = 4/4 = 1.0
    Max compares per lookup = 1
    Avg compares per lookup = 121/121 = 1.0
    ORA-00942: table or view does not existI have searched MOS and Google, but didn;'t get any relevant results.
    Also flushed my shared_pool as mentioned in (http://www.tanelpoder.com/files/oracle_rowcache.pdf) after mount and started , still no luck
    Any help is appreciated
    Thanks
    SSN

    Hi,
    Thanks.
    Tried log mining, but still couldn't find the culprit. I think now, I have to drop and create this db.Still wondering what might have happened.
    select group#,status from v$log;
        GROUP# STATUS
             1 INACTIVE
             3 INACTIVE
             2 CURRENT
    SQL> select group#,MEMBER from v$logfile where group#=2;
        GROUP#
    MEMBER
             2
    /applns/oracle/oradata/CTSD1/redo02.log
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo02.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.
    SQL> select group#,MEMBER from v$logfile where group#=1;
        GROUP#
    MEMBER
             1
    /applns/oracle/oradata/CTSD1/redo01.log
             1
    /applns/oracle/oradata/CTSD1/redolog001.log
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo01.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redolog001.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL> EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.
    SQL> select group#,MEMBER from v$logfile where group#=3
        GROUP#
    MEMBER
             3
    /applns/oracle/oradata/CTSD1/redo03.log
    SQL> EXECUTE sys.DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/applns/oracle/oradata/CTSD1/redo03.log',OPTIONS => sys.DBMS_LOGMNR.NEW);
    PL/SQL procedure successfully completed.
    SQL>  EXECUTE sys.DBMS_LOGMNR.START_LOGMNR;
    PL/SQL procedure successfully completed.
    SQL> SELECT COUNT (*) FROM   v$logmnr_contents WHERE  operation = 'DDL';
      COUNT(*)
             0
    SQL> EXECUTE sys.DBMS_LOGMNR.END_LOGMNR();
    PL/SQL procedure successfully completed.SSN

  • ORA-00942: table or view does not exist in database control

    Hi all,
    i am getting "ORA-00942: table or view does not exist" error while accessing tablespaces from database control. i am able to access control files, redo log files everything fine, but not tablespaces.
    database version ---> 10.2.0.1
    OS ----> RedHat Enterprise Linux 4 U 2
    but the database is working fine from SQL*Plus and other Editors. this error is only from database control. so what might be the cause.
    Any Ideas ...........
    Balaji

    hi,
    Have you tried to re register your database within OEM, CG

  • A newbie problem - Why 'ORA-00942: table or view does not exist'

    Hi,
    I am a newbie having a very basic problem.
    I have just created a table by reading in a CSV file.
    However when I try to SELECT from it, I get an error message saying :-
    ORA-00942: table or view does not exist
    How can this be when I can see the table name ?
    I have tried a couple of things that I found in the Discussion Forum, like 'ALTER SCHEMA' and 'GRANT SELECT'.
    Neither seemed sensible because I have just created a table, and sure enough, neither helped.
    It's disappointing that something so basic can go wrong.
    I will be very grateful for any advice.
    Barry

    This tool and forum is awesome. I'm a developer that was never touched HTMLDB and now with in a month I'm developing applications quickly and when I have a question I have this active forum to ask my sometimes stupid and othertimes valid questions! This is great! I don't know where you all find the time to help out so much!
    It is a little addicting though... I find myself sitting down Saturday morning just to spend a couple of minutes reading the posts and next thing I know hours have gone by as I use what I read because I can't wait until Monday...
    Thank you all for everything!!!! HTMLDB, APEX, Javascript and now in another post I'm learning about "Fine Grained Access Control" or "Virtual Private Database".
    Enjoy, BillC :>)

  • Not able to create EM repository - ORA-00942: table or view does not exist

    -bash-3.00$ emca -config dbcontrol db -repos recreate
    STARTED EMCA at 2010-06-02 12:12:29
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Enter the following information:
    Database SID: eric1
    Listener port number: 1521
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    You have specified the following settings
    Database ORACLE_HOME ................ /oracle/product/10.2.0/db_1
    Database hostname ................ solx
    Listener port number ................ 1521
    Database SID ................ eric1
    Email address for notifications ...............
    Outgoing Mail (SMTP) server for notifications ...............
    Do you wish to continue? [yes(Y)/no(N)]: Y
    2010-06-02 12:12:52 oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_2010-06-02_12-12-29-PM.log.
    2010-06-02 12:13:02 oracle.sysman.emcp.EMReposConfig dropRepository
    INFO: Dropping the EM repository (this may take a while) ...
    2010-06-02 12:13:05 oracle.sysman.emcp.util.PlatformInterface executeCommand
    WARNING: Error executing /oracle/product/10.2.0/db_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=solx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=eric1))) -repos_user SYSMAN -action drop -verbose -output_file /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_repos_drop_2010-06-02_12-13-02-PM.log
    2010-06-02 12:13:05 oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error dropping the repository
    2010-06-02 12:13:05 oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_repos_drop_<date>.log for more details.
    2010-06-02 12:13:05 oracle.sysman.emcp.EMConfig perform
    SEVERE: Error dropping the repository
    Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_2010-06-02_12-12-29-PM.log for more details.
    Could not complete the configuration. Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_2010-06-02_12-12-29-PM.log for more details.So I looked into a log file: /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_2010-06-02_12-12-29-PM.log
    Here is an end of it ( I can paste all log file if necessary but it is very long):
    CONFIG: Starting execution: /oracle/product/10.2.0/db_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=solx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=eric1))) -repos_user SYSMAN -action drop -verbose -output_file /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_repos_drop_2010-06-02_12-13-02-PM.log
    2010-06-02 12:13:05 oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Exit value of 51
    2010-06-02 12:13:05 oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Enter SYS user's password :
    Enter repository user password :
    Getting temporary tablespace from database...
    prepare(SELECT tablespace_name FROM dba_tablespaces WHERE contents='TEMPORARY'  AND status='ONLINE'): ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 28 in 'SELECT tablespace_name FROM <*>dba_tablespaces WHERE contents='TEMPORARY'  AND status='ONLINE'')
    2010-06-02 12:13:05 oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: stty: : No such device or address
    stty: : No such device or address
    stty: : No such device or address
    stty: : No such device or address
    2010-06-02 12:13:05 oracle.sysman.emcp.util.PlatformInterface executeCommand
    WARNING: Error executing /oracle/product/10.2.0/db_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=solx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=eric1))) -repos_user SYSMAN -action drop -verbose -output_file /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_repos_drop_2010-06-02_12-13-02-PM.log
    2010-06-02 12:13:05 oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error dropping the repository
    2010-06-02 12:13:05 oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_repos_drop_<date>.log for more details.
    2010-06-02 12:13:05 oracle.sysman.emcp.EMConfig perform
    SEVERE: Error dropping the repository
    Refer to the log file at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/eric1/emca_2010-06-02_12-12-29-PM.log for more details.
    2010-06-02 12:13:05 oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error dropping the repository
            at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:176)
            at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:127)
            at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:142)
            at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:479)
            at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1123)
            at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:463)
            at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:412)...and here I can easly see that error: ORA-00942: table or view does not exist.
    But what does it mean to me ? I mean what should I ro to create/recreate missing table or view ?

    Hi, so here are my tries:
    1. admin:
    Below Dirs dont not exist:
    <ORACLE_HOME>/<hostname_sid>
    <ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>
    ...also it was unable to drop user - does not exist
    -bash-3.00$ sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Jun 2 12:55:44 2010
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Release 10.2.0.2.0 - Production
    SQL> sqlplus "/as sysdba"
    drop user sysman cascade;
    drop role MGMT_USER;
    drop user MGMT_VIEW cascade;
    drop public synonym MGMT_TARGET_BLACKOUTS;
    drop public synonym SETEMVIEWUSERCONTEXT;
    SP2-0734: unknown command beginning "sqlplus "/..." - rest of line ignored.
    SQL> drop user sysman cascade
    ERROR at line 1:
    ORA-01918: user 'SYSMAN' does not exist
    SQL> drop role MGMT_USER
    ERROR at line 1:
    ORA-01919: role 'MGMT_USER' does not exist
    SQL> drop user MGMT_VIEW cascade
    ERROR at line 1:
    ORA-01918: user 'MGMT_VIEW' does not exist
    SQL> drop public synonym MGMT_TARGET_BLACKOUTS
    ERROR at line 1:
    ORA-01432: public synonym to be dropped does not exist
    SQL> drop public synonym SETEMVIEWUSERCONTEXT
    ERROR at line 1:
    ORA-01432: public synonym to be dropped does not exist
    {code}
    I also tried this:
    2. coskan         
    {code}
    -bash-3.00$ sqlplus sys/qaz123@eric1 as sysdba
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Jun 2 12:51:34 2010
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Release 10.2.0.2.0 - Production
    SQL> SELECT tablespace_name FROM dba_tablespaces WHERE contents='TEMPORARY' AND status='ONLINE';
    SELECT tablespace_name FROM dba_tablespaces WHERE contents='TEMPORARY' AND status='ONLINE'
    ERROR at line 1:
    ORA-00942: table or view does not exist
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error(20,22): PL/SQL: ORA-00942: table or view does not exist

    I am getting currently getting an error when I try and insert into a table from a different schema from my Stored Procedure:
    Error(20,22): PL/SQL: ORA-00942: table or view does not exist
    I am explicitly calling the table with the schema name infront i.e.
    INSERT INTO SAPSR3.ZTREC_NAME_TYPE
    MASTER_ID,
    NAME_TYPE,
    FAMILY_NAME,
    FIRST_NAME,
    MIDDLE_NAME,
    TITLE
    VALUES
    In_MasterID,
    In_NameType,
    In_FamilyName,
    In_FirstName,
    In_MiddleName,
    In_Title
    I only get this error when I try and compile my stored procedure. If I try this insert not within a stored procedure (i.e. a blank script) it works perfectly.
    Can anyone tell me what Im doing wrong?
    Thanks.

    Hi,
    It sounds like you (the procedure owner) have privileges on that table only through a role.
    Roles don't count in stored procedures created with AUTHID OWNER (which is the default).
    Either
    (1) Have user SAPSR3 grant the necessary privileges directly to you (or to PUBLIC), or
    (2) change the procedure so that it runs with the caller's privileges, by adding AUTHID CURRENT_USER after the argument list but before the keyword IS (os AS) like this:
    CREATE OR REPLACE PROCEDURE     foo
    (     x     IN     NUMBER
    AUTHID CURRENT_USER
    IS ...

  • Error while deploying map: ORA-00942 Table or view does not exist

    Hi OWB experts,
    I'm having yet another problem with OWB, this time when I try to deploy a mapping I get this error:
    ORA-06550: line 59, column 3:
    PL/SQL: ORA-00942: table or view does not exist
    DIM_01_ESTCON_MAP
    ORA-06550: line 93, column 3:
    PL/SQL: SQL Statement ignored
    If I open the package that OWB created I see the errors:
    CURSOR "DEDUP_SRC_0_IN2_c" IS
    SELECT
    "DEDUP_INPUT_SUBQUERY2$1"."ESTADOCONEXION_ID" "ESTADOCONEXION_ID",
    "DEDUP_INPUT_SUBQUERY2$1"."ESTADOCONEXION_COD_ESTCON" "ESTADOCONEXION_COD_ESTCON",
    "DEDUP_INPUT_SUBQUERY2$1"."ESTADOCONEXION_DESC_ESTCON" "ESTADOCONEXION_DESC_ESTCON",
    "DEDUP_INPUT_SUBQUERY2$1"."STANDARD_TOTAL_COD_TTL" "STANDARD_TOTAL_COD_TTL"
    FROM
    (SELECT
    DISTINCT
    "DIM_01_ESTCON_MAP"."GET_CONST_CA_0_ESTADOCO" "ESTADOCONEXION_ID",
    "ESTADOS"."ESTADO" "ESTADOCONEXION_COD_ESTCON",
    "ESTADOS"."DESC_EST" "ESTADOCONEXION_DESC_ESTCON",
    "DIM_01_ESTCON_MAP"."GET_TOTAL_C_0_TTLID" "STANDARD_TOTAL_COD_TTL"
    FROM
    "CONSULTA"."ESTADOS"@"PROD@AYADEV_LOCATION" "ESTADOS"
    WHERE
    ( estado LIKE 'EC%' )) "DEDUP_INPUT_SUBQUERY2$1";
    Where AYADEV_LOCATION points to the module/schema/location where my source data is.
    Now, I have defined three modules:
    SOURCE, where I defined the tables and other objects from the original database (source data)
    STAGE, where I am performing all the transformations; here I defined all the maps
    TARGET, this holds the dimensions and fact tables.
    Now all three modules point to different databases. The dblink for AYADEV_LOCATION has been created and shouldn't present any problems. The username that I'm using to log on to the source database is current and I can connect to it through SQL+ or any other program (TOAD, SQLDeveloper).
    What could be happening here? I'm using OWB 10g R2, with Oracle DB 10g R2.
    I'd really appreciate any help you could provide.
    Best Regards,
    --Osvaldo
    [osantos]

    Hi,
    I'm still having problems but I found out why these tables are returning errors. The username I've been given by the DBA to connect to the database is CONSULTA, but this user is only for querying purposes, the actual objects reside on a differente schema, of course, which is PROD. So the line:
    "CONSULTA"."ESTADOS"@"PROD@AYADEV_LOCATION" "ESTADOS"
    raises an exception because the table ESTADOS is not located on that schema, but on PROD. If I query the table from SQL Plus with:
    SELECT *
    FROM [email protected]@AYADEV_LOCATION
    then there's no problem at all.
    Why is this? How do I instruct OWB to point to the correct schema or to avoind fully qualifying the table name?
    Please help me, I'm kind of confused here.
    Best Regards,
    --oswaldo.
    [osantos]

  • 10gLiteR3 publishing ORA-00942: table or view does not exist error

    Hi All,
    I am encountering table or view does not exist error while publishing using the api.
    Below is the code:
    try {
    consolidatorManager.openConnection("MOBILEADMIN","PASSWORD", ADMIN_JDBC_URL);
    mobileResourceManager = new MobileResourceManager("MOBILEADMIN","PASSWORD",ADMIN_JDBC_URL);
    consolidatorManager.createPublicationItem(EXT_CONN, "RMT_TEST_TABLE" , "MOBILEADMIN","RMT_TEST_TABLE", "F", "SELECT * FROM MOBILEADMIN.RMT_TEST_TABLE", null, null);
    consolidatorManager.addPublicationItem(mobileResourceManager.getPublication("/mobileApp"),"RMT_TEST_TABLE",null, null, "S", null, null);
    } catch (Exception e) {
    e.printStackTrace();
    When I execute the above code it does not throw any exceptions but I see the below error in err.log. I,U,D triggers are getting created on the remote table, CMP, CFM, CVR,CLG tables are also created, I also see primary key for this table in VPKS. Publishing seems to be fine but I see the below error in err.log.
    java.sql.SQLException: ORA-00942: table or view does not exist
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2117)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2331)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:422)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:366)
         at oracle.lite.sync.Subscription.getVirtualTablePrimaryKey(Subscription.java:7522)
         at oracle.lite.sync.Subscription.getTablePrimaryKey(Subscription.java:7365)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2334)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2157)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2129)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2108)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2093)
         at oracle.lite.sync.Subscription.CreatePublicationItem(Subscription.java:2079)
         at oracle.lite.sync.ConsolidatorManager.createPublicationItem(ConsolidatorManager.java:1253)
    I am not able to figure out what table it is looking for. Any ideas why this is happening?

    check the MGP compose process, is it also showing the error?
    If it is them at some point in 10.2 Oracle introduced a 'feature' (ie: bug) that causes problems to the housekeeping routines when new versions of publication items are published
    In 10.0 and early 10.2 when making changes to publication items VIEWS called CPV$.. were created to log the column list for each version of a publication item, and check if you are making changes when you publish. In the case of old versions, once all clients have synchronised and been moved to the latest version it tries to delete this view.
    at some point the publish started creating TABLES instead of views (but using the same naming convention ie: CPV$..). This works fine as far as the logging of changes and old column lists, but the housekeeping called at the end of the publish and GP process still trieds to do a DROP VIEW and this causes the error.
    The only way of clearing this i have found is to look at the log file to get the name of the object that it is trying to drop, set up a view script to create a dummy view with the list of columns in the table, drop the table and then create the view. It then gets dropped on the next MGP cycle and the error goes away
    If the error is not showing up in the MGP process, only in the publish, and your changes appear to be publishing OK, then the problem is likely to be with a snapshot definition AFTER the change you have made - real pain to identify on re-publish - possibly missing schema name in the snapshot definition

  • Backup report function returns: ORA-00942: table or view does not exist

    Hello All,
    I recently switched over from control file RMAN to recovery catalog. I logged into the 11g database control, executed a full backup and all went well. However, I just noticed that after I click on 'Backup Report' in database control (enterprise manager) I get the following error message: " java.sql.SQLException: ORA-00942: table or view does not exist"
    I was able to view backup reports prior to switching over to recover catalog. What am I missing or what is missing, sort to speak?
    Thanks all !
    -Ron

    Thanks for the reply Werner. I did try it as 'SYS' but no luck. Strange...This was a new enterprise manager - DB control and the backup reprt function was working prior to using the recover catalog. Anthing in the recovery catalog database that may be missing?
    Rob..

  • YTD, QTD and Year grain metrics = ORA-00942: table or view does not exist

    Hi everyone,
    I'm having a weird issue. I've got some GL data that I want to report on in three different grains: Quarter To Date, Year To Date and Entire Year. For the first two measures, I've setup a time dimension and I'm using the ToDate function. Works perfectly. For the third measure, I select the SUM aggregation and then in the Levels Tab, I go to my time dimension and set the logical level to "Year".
    Each measure reports correctly by itself, however, when I join in the three in one report, the who thing blows up on me and gives me an ORA message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    When I only do two of the measures (any two), the report works fine. But it's when I add that third measure in, I get myself in trouble. Additionally, I checked the log file and the report never gets to the point where it generates a physical query. It's only creating a logical query and then it doesn't save the physical query anywhere.
    Can anyone explain what the problem is? Why don't these three measures behave well together? What can I do to force them to co-operate?
    It seems that the real culprit is the entire year measure. It only behaves well with 1 other measure, but once you get two additional measures, it causes the report to get the ORA error.
    Thanks for any help you can give!
    -Joe

    It turns out I was incorrect that there were no physical queries being generated. They were there in the log files, they had so many SAWITH<number> clauses that I thought they were the logical query (i.e. saw_0, saw_1, etc).
    Once I found the physical query, I ran it by hand and also got the table did not exist error. I added in WITH clause by with clause until I got the error to occur. After about an hour of digging, it turned out that a query using a full outer join (about 16 queries in) caused the table does not exist error. I'm not sure what it is about the full outer join that makes Oracle not see the table. When I get some free time I'll dig deeper into that issue.
    But once I realized what was going on, I went into the DB connections and disabled FULL OUTER JOINs. No problem now.
    Like I said, if I find what caused the original problem (i.e. what syntactically was incorrect about the FULL OUTER JOIN), I'll update this post.
    -Joe

  • Dba_objects: ORA-00942: table or view does not exist

    I created a proc like:
    CREATE OR REPLACE PROCEDURE SEE_PROC
    (v_owner varchar2)
    as
    begin
    EXECUTE IMMEDIATE
    'SELECT COUNT(*) from dba_objects WHERE OBJECT_TYPE = :1 AND OWNER = :2'
    USING 'PROCEDURE', v_owner;
    end;
    for a dba user, say appadmin, and attempted to exec it
    from a different schema test101:
    exec appadmin.see_proc('TEST101');
    and got:
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "APPADMIN.SEE_PROC", line 6
    ORA-06512: at line 1
    view DBA_OBJECTS not accessible/not built?
    Any help is appreciated.
    - Zack Hu

    Assuming that you are using Oracle 9i/10g, by default anyone who is not SYSDBA CANNOT see DBA tables.
    The parameter 07_DICTIONARY_ACCESSIBILITY is responsible for this and by default it is set to FALSE. Set it to TRUE and see if it works. Note: Anyone will be able to read any DBA data dictionary tables so use it with caution.
    <quote>for a dba user, say appadmin, and attempted to exec it from a different schema test101:
    exec appadmin.see_proc('TEST101');
    </quote>
    When you execute a procedure from the appadmin schema that does not mean you have any DBA priviledges! Who ever you are logged in as is what matters.
    -Raj Suchak
    [email protected]

  • ORA-00942: table or view does not exist

    select
                        nvl(appr.APPROVER_NAME, org.APPROVER_NAME) as APPROVER_NAME,
                        nvl(appr.APPROVER, org.APPROVER) as APPROVER,
                        nvl(appr.APPROVER_TYPE, org.APPROVER_TYPE) as APPROVER_TYPE,
                        nvl(appr.ASSIGNED_DATE, org.ASSIGNED_DATE) as ASSIGNED_DATE,
                        nvl(appr.APPROVAL_DATE, '-') as APPROVAL_DATE,
                        nvl(appr.STATE, org.STATE) as STATE,
                                    org.SEQ as numberoftimesmodified,
                        nvl(appr.PROCESS, org.PROCESS) as PROCESS,
                        appr.seq2
                        from (
                             select a.seq,
                             b.usr_display_name as APPROVER_NAME,
                             b.usr_login as APPROVER,
                             'User' as APPROVER_TYPE,
                             '-' as ASSIGNED_DATE,
                             '-' as STATE,
                             a.seq as numberoftimesmodified,
                             '-' as PROCESS
                             from(
                                  SELECT 1 as seq, USR_UDF_MANAGER_LOGIN as GID, '' as approver_name, 'user' as approver_type FROM DEVT_OIM.USR WHERE USR_LOGIN =:BENEFICIARY_GID AND :APPLICATION = 'Oracle 11i On demand'
                                  UNION
                                  select rownum as seq, regexp_substr(:APPROVERPAYLOAD,'[^,]+', 1, level) as gid, '' as approver_name, 'user' as approver_type from dual
                                  where :APPLICATION != 'Oracle 11i On demand'
                                  connect by regexp_substr(:APPROVERPAYLOAD, '[^,]+', 1, level) is not null
                             ) a
                             inner join DEVT_OIM.usr b on a.gid = b.usr_login
                        ) org
                        left join(
                             select b.numberoftimesmodified as seq, rownum as seq2, a.*
                             from
                                  select
                                  LEAD(a.ASSIGNEES) OVER(ORDER BY a.numberoftimesmodified) as prev_gid,
                                  LEAD(a.pushbacksequence) OVER(ORDER BY a.numberoftimesmodified) as prev_pushbacksequence,
                                  a.ASSIGNEES as current_gid,
                                  nvl(retrieveGidName(a.ASSIGNEES), '-') as APPROVER_NAME, 
                                  (DEVT_OIM.TOKNEW(REPLACE(a.ASSIGNEES, ',', ':'))) as APPROVER,
                                  'User' as APPROVER_TYPE,
                                  a.pushbacksequence,
                                  TO_CHAR(a.assigneddate,'DD-Mon-YYYY HH:MI:SS AM') as ASSIGNED_DATE,
                                  case when a.state = 'WITHDRAWN' then TO_CHAR(a.updateddate,'DD-Mon-YYYY HH:MI:SS AM') else TO_CHAR(d.updateddate,'DD-Mon-YYYY HH:MI:SS AM') end as APPROVAL_DATE,
                                  a.numberoftimesmodified,
                                  case when a.state = 'EXPIRED' then 'Expired' when a.approvalduration is null then 'Pending' when  a.outcome = 'REJECT' then 'Rejected' else 'Approved' end as PROCESS,
                                  d.state as process2,
                                  case when d.substate = 'REASSIGNED' then 'Reassigned' when d.state = 'INFO_REQUESTED' then 'Request Info' when a.state = 'EXPIRED' then 'Expired'
                                       when  a.outcome = 'REJECT' then 'Rejected' when d.substate = 'INFO_SUBMITTED' then 'Submitted' when a.state = 'WITHDRAWN' then 'Withdrawn' when e.state is null then 'Pending' else 'Approved' end as state,
                                  e.ASSIGNEES, d.substate
                                  from WFTASKHISTORY a
                                  left join WFTASKHISTORY d on d.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and d.numberoftimesmodified = (a.numberoftimesmodified+1)
                                  left join WFTASKHISTORY e on e.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and e.numberoftimesmodified = (a.numberoftimesmodified-1) and e.ASSIGNEES = a.ASSIGNEES
                                  where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY and a.state is not null
                                  order by a.numberoftimesmodified
                             ) a
                             inner join (select rownum as numberoftimesmodified, pushbacksequence from (select distinct pushbacksequence from WFTASKHISTORY a where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY order by pushbacksequence)) b
                             on b.pushbacksequence = a.pushbacksequence
                             where a.prev_gid != a.current_gid or prev_gid is null
                             order by a.numberoftimesmodified
                        ) appr on org.seq = appr.seqORA-00942: table or view does not exist
    00942. 00000 - "table or view does not exist"
    *Cause:   
    *Action:
    Error at Line: 55 Column: 172

    Hi User,
    The ORA - 00942 indicates that the Underlying object is not present in the Database.
    Just Check whether the Table you are used in the Select statement exists in the user/Schema.
    To check this..
    SELECT *
      FROM USER_TABLES
    WHERE TABLE_NAME = 'YOUR_TABLE_NAME';Or
    Simply,
    SELECT *
      FROM TAB;If you are using the Table from other Schema, Just give the table name like this..
    SELECT *
      FROM SCHEMA_USER.table_name;Thanks,
    Shankar

Maybe you are looking for

  • Where to see the boot image package path installed on my DP server

    I have distribute the boot image content to one of my DP server. Where can I see the package is installed at which location at that particular DP in SCCM 2012 console?

  • Default PR type for MRP (planned order -- PR)

    Hi Expert, Is there any posibility to set default PR type for planned order - PR conversion from MRP? in SAP standard, PR type is NB, we have configured specific PR type, let say PRM. The purpose is we do not need to change NB to PRM while converting

  • Which option is better?

    Hi all, I am developing an application which is is CMS.It consists images to upload and display it on web-page.Now here two things comes... 1 Option: Uplaod the image and store it into the database and then display. 2 Option: Upload the image store i

  • How do I find a #ebooks for irc?

    Some Helpful person deleted my chatzilla. I want to get it set to down load ebooks. mozilla had a helpful page I used when I first loaded the addin.

  • Could not get Previous Week Day starting today

    I need help  to get PREVIOUS WEEK day starting today. Eg: Today is 15 / 09 / 2011 I need Date 08 / 09 / 2011 Hence both 15th and 08 are Thursday. One is today's thursday and other is previous week thursday. Regards