CREATE MATERIALIZED VIEW - TABLE OR VIEW DOES NOT EXIST

Anybody can help me? Why could this happen?
SQL> CREATE MATERIALIZED VIEW LESTARI.YIELD_BI_ACTUAL_PLAN_BLOK_MVU
2 TABLESPACE MVU
3 NOCACHE
4 NOPARALLEL
5 REFRESH FORCE
6 START WITH TO_DATE('19-APR-2005 18:00:00','DD-MON-YYYY HH24:MI:SS')
7 WITH PRIMARY KEY
8 USING DEFAULT LOCAL ROLLBACK SEGMENT
9 DISABLE QUERY REWRITE AS
10 SELECT PT,
11 TO_CHAR(TANGGAL,'MMYYYY')PERIODE,
12 AFDELING,
13 BLOK,
14 TH_TANAM,
15 SUM(TON_TERIMA) TON_TERIMA,
16 SUM(JJG_TERIMA) JJG_TERIMA,
17 SUM(JJG_PANEN) JJG_PANEN,
18 SUM(HK) HK, (LS_TANAM),
19 DECODE(LS_TANAM,0,0,ROUND((SUM(TON_TERIMA)/(LS_TANAM)),2)) YIELD,
20 HITUNG_STANDARD_YIELD (PT, TH_TANAM,TO_CHAR(TANGGAL,'MMYYYY')) YIELD_STD,
21 DECODE(SUM(JJG_TERIMA),0,0,ROUND(SUM(TON_TERIMA)*1000/SUM(JJG_TERIMA),2)) BJR,
22 HITUNG_STANDARD_BJR_TH_TANAM(PT,TH_TANAM) BJR_STD,
23 DECODE(SUM(HK),0,0,ROUND((SUM(TON_TERIMA)*1000/SUM(HK)),2)) OP,
24 DECODE(SUM(JJG_TERIMA),0,0,HITUNG_STANDARD_OUTPUT_PEMANEN(ROUND(SUM(TON_TERIMA)*1000/SUM(JJG_
TERIMA),2))) OP_STD,
25 MAX(POTENSI) POTENSI,
26 MAX(DIS_POT) DIS_POT,
27 DECODE(LS_TANAM,0,0,ROUND(MAX(POTENSI)*MAX(DIS_POT)/100/LS_TANAM,2)) YIELD_POTENSI,
28 MAX(RAPIM) RAPIM,
29 MAX(DIS_RAPIM) DIS_RAPIM,
30 DECODE(LS_TANAM,0,0,ROUND(MAX(RAPIM)*MAX(DIS_RAPIM)/100/LS_TANAM,2)) YIELD_RAPIM
31 FROM (SELECT B.*, A.LS_TANAM, A.TH_TANAM, POTENSI, DIS_POT, RAPIM, DIS_RAPIM
32 FROM ASSET_BLOK_VU A, T_TANAMAN B, T_PLAN_TANAMAN C, T_DISTRIBUSI_PLAN_TANAMAN D
33 WHERE A.PT = B.PT
34 AND B.PT = C.PT
35 AND C.PT = D.PT
36 AND A.KD_AFD = B.AFDELING
37 AND B.AFDELING = C.AFDELING
38 AND A.KD_BLOK = B.BLOK
39 AND B.BLOK = C.BLOK
40 AND A.TAHUN = TO_CHAR(TANGGAL,'RRRR')
41 AND TO_CHAR(TANGGAL,'MM')=D.BULAN
42 AND A.TAHUN = D.TAHUN
43 AND A.TAHUN = C.TAHUN
44 AND A.LS_TANAM > 0) A
45 GROUP BY PT, TO_CHAR(TANGGAL,'MMYYYY'), AFDELING, BLOK, LS_TANAM, TH_TANAM
46 /
CREATE MATERIALIZED VIEW LESTARI.YIELD_BI_ACTUAL_PLAN_BLOK_MVU
ERROR AT LINE 1:
ORA-00942: TABLE OR VIEW DOES NOT EXIST

32 FROM ASSET_BLOK_VU A, T_TANAMAN B, T_PLAN_TANAMAN C, T_DISTRIBUSI_PLAN_TANAMAN D
Either of these tables/views do not exist. Check the spelling of the table/view names

Similar Messages

  • Materialized view does not exist upon refresh

    Hi all,
    I got the following stack trace upon executing 'DBMS_MVIEW.REFRESH('Layout_tab','C')' to refresh an materialized view upon an object table:
    ORA-23401: materialized view "MINIMOL"."LAYOUT_TAB" does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 794
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 851
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 832
    The view create statement is following:
    CREATE MATERIALIZED VIEW PlateLayout_tab
    OF PlateLayout
    CACHE
    REFRESH ON DEMAND
    AS
    SELECT
    PlateLayout(l.id,VALUE(pos),l.ComputeCheckerboardPosition(VALUE(pos)))
    FROM
    Layout_tab l
    , TABLE(mcu_enumerate.LoopFor(1,l.wells_across * l.wells_down)) pos;
    now what is going wrong? I can't even create the view with the 'REFRESH ON COMMIT' option.
    Thanks,
    Henrik

    John,
    it is only a typo in the posted message, but the executed SQL-smt of course was:
    EXECUTE DBMS_MVIEW.REFRESH('PlateLayout_tab','C');
    After browsing through metalink I even tried this:
    EXECUTE DBMS_MVIEW.REFRES('PlateLayout_tab','C','',TRUE,FALSE,0,0,0,TRUE);
    with the same stack trace.
    By the way the MVIEW is accessible via:
    SELECT * FROM PlateLayout_tab
    Thanks,
    Henrik

  • Create materialized View fails with "table or view does not exist"

    DB: 10.2.0.4
    OS: Win 2003
    Hi,
    Here in my tests, i have 2 databases (A(source) and B(backup)), and i am trying to create an mview in database B to replicate data from one test table from database A, only for test purpose. I'm getting the error "table or view does not exist" when i try to create a mview with REFRESH FAST. Here is my code:
    CREATE MATERIALIZED VIEW TESTES.TAB_TESTES_REPLIC_MVIEW_02
    REFRESH FAST
    START WITH TO_DATE('21/02/2012 18:50:00', 'DD/MM/YYYY HH24:MI:SS')
    NEXT SYSDATE + 1/24/60
    WITH PRIMARY KEY
    AS SELECT REGISTRO1,
    REGISTRO2
    FROM TESTES.TAB_TESTES_REPLIC_MVIEW_02@DB_LINK_ORA10;
    The dblink is workig fine(dblink user has select privilege on TESTES.TAB_TESTES_REPLIC_MVIEW_02), and i have created the mview log on database A.
    Where is my mistake.
    Thanks a lot.
    Edited by: Fabricio_Jorge on 21/02/2012 19:06

    I found the solution.
    I had to grant SELECT on the mview log. The name is avaiable in DBA_MVIEW_LOGS

  • Problem creating a view in Administrator: 942: table or view does not exist

    Hi and thank you for reading,
    I am working with the Administration tool and would like to create a view in the physical layer. However I am getting the following error messages when I try to view the Date in the view:
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[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.
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    I proceed as following:
    Right click on a physical schema (this schema is already created and works in Answers) -> new Physical Schema ->Table Type: Select -> Select * from Table_A where name='name' (Table_A is in the physical schema) -> OK -> Save -> Deploy -> Update Row count (works) -> View Data -> Error
    Any Idea what I am doing wrong. I have started with an easy select statement to test how to create a view in Oracle Administrator.
    Thanks a lot for any help
    Evgeny

    Do you see Table_A, and in which database schema?
    Try to put alias (database user) before table name.
    Select * from user.Table_A where name='name'
    Where user is database user.
    If you have Table_A in another user and connection pool is set to different user, then grant select from Table_A owner to connection pool user (make synonym for Table_A):
    Example (I'm using connection pool from userB and have tables from userA and userB).
    create or replace public synonym xx for userA.xx
    and
    grant select on xx to userB
    Hope this helps.
    Regards,
    Goran
    http://108obiee.blogspot.com

  • 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}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Table or views does not exists on create package body

    Hi folks.....
    I',m having a problem....
    I am trying to create the pakage body, but i can't because i'm get the error ORA-000942 TABLE OR VIEWS DOES NOT EXIST, i don't understand !!!!
    When i create de procedure, it's suscessful
    I did GRANT ALL ON GEMCO.CAD_FILIAL TO USR_MLADMIN;
    But the error persisits
    Someone has any idea ?
    Tanks Spaulonci

    Is USR_MLADMIN a role or a schema?
    You need to grant the privileges directly to the schema and not through a role

  • 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.

  • 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.

  • PL/SQL: ORA-00942: table or view does not exist

    Hi
    i have logged into my schema and trying to access the database "DAD" which has the table name "SCHOOL"
    i wrote a function which should give me new_sno when i give it the old_sno
    and i have this errors , pls help
    CREATE OR REPLACE FUNCTION ORIG_SN(OSNO in Number,OTN in Number)
    RETURN Number IS
    NEW_SNO Number:=0;
    BEGIN
    SELECT new_sno AS NEW_SNO
    FROM DAD.SCHOOL
    WHERE ORIG_SNO = OSNO AND ORIG_TN = OTN;
    RETURN NEW_SNO;
    END ORIG_SN;
    Warning: Function created with compilation errors.
    Errors for FUNCTION ORIG_SN:
    LINE/COL ERROR
    5/1 PL/SQL: SQL Statement ignored
    6/15 PL/SQL: ORA-00942: table or view does not exist
    Thanks in advance ..

    Try this,
    CREATE VIEW SCHOOL_VIEW AS SELECT * FROM DAD.SCHOOL;and then change your function like
    CREATE OR REPLACE FUNCTION ORIG_SN(OSNO in Number,OTN in Number)
    RETURN Number IS
    my_new_sno Number:=0;
    BEGIN
    SELECT new_sno INTO my_new_sno FROM SCHOOL_VIEW WHERE ORIG_SNO = OSNO AND ORIG_TN = OTN;
    RETURN my_new_sno;
    END ORIG_SN;and see if it is getting created without any errors.
    -Arun
    Edited by: Arunkumar Ramamoorthy on Aug 15, 2009 1:56 AM

  • 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

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

    Hi:
    I created a .sql file and a loader file. Running the .sql file with sql * plus Worksheet:
    declare
    gr sdo_georaster;
    begin
    select image into gr from gis.RasterImages where geoid=1 for update;
    sdo_geor.generatePyramid(gr,'resampling=NN');
    update gis.RasterImages set image=gr where geoid=1;
    commit;
    end;
    I trying to create a pyramid,but the error appeared:
    ERROR at line 1:
    ORA-29400: DATA CONTROL ERROR ORA-00942: table or view does not exist
    ORA-06512: &#22312; "MDSYS.SDO_GEOR_INT", line 162
    ORA-06512: &#22312; "MDSYS.SDO_GEOR", line 826
    ORA-06512: &#22312; line 5
    I don't know why?
    Anyone can help me?
    Thanks.

    Hi,
    I think you are executing the select statement for schema X and the table is in the schema srnr.
    And schema X is not having select privilege on the table 'students' present in schema srnr.
    Goto schema srnr.
    Execute the following statement:
    grant select on students to X;
    This will give schema X the privilege to query the table students present in srnr.
    Regards,
    Anupama

  • Error in Upload file-table or view does not exist-wwv_flow_file_objects$

    Hi,
    i am trying to upload a file and then store the contents of the file into one of my tables in the schema.I wrote one package for uploading the file and then a process to insert each record in the uploaded file to the table in my schema.When i try compiling the package it gives an error.
    PL/SQL: ORA-00942: table or view does not exist
    The name of the table is wwv_flow_file_objects$
    The package is as follows-
    CREATE OR REPLACE PACKAGE BODY Text_File_Pkg AS
    FUNCTION get_file_lines (
    p_file_name IN VARCHAR2,
    p_lines IN OUT line_tab_type,
    p_rec_sep IN VARCHAR2 DEFAULT dos_new_line
    ) RETURN INTEGER
    IS
    v_binary_file BLOB;
    v_text_file CLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    v_warning INTEGER;
    v_rec_sep_len CONSTANT INTEGER := LENGTH(p_rec_sep);
    v_start_pos INTEGER := 1;
    v_end_pos INTEGER := 1;
    v_line_num INTEGER := 1;
    v_file_length INTEGER;
    BEGIN
    IF p_file_name IS NULL
    THEN
    RETURN 1;
    END IF;
    IF p_rec_sep IS NULL
    THEN
    RETURN 2;
    END IF;
    SELECT blob_content
    INTO v_binary_file
    FROM wwv_flow_file_objects$
    WHERE NAME = p_file_name
    AND (mime_type = 'text/plain' OR mime_type = 'application/octet-stream')
    AND doc_size &gt; 0;
    DBMS_LOB.createtemporary(v_text_file, TRUE);
    DBMS_LOB.converttoclob(v_text_file, v_binary_file,
    DBMS_LOB.lobmaxsize, v_dest_offset,
    v_src_offset, DBMS_LOB.default_csid,
    v_lang_context, v_warning);
    IF v_warning = DBMS_LOB.warn_inconvertible_char
    THEN
    -- Unable to convert file.
    RETURN 3;
    END IF;
    v_file_length := DBMS_LOB.getlength(v_text_file);
    LOOP
    EXIT WHEN v_start_pos &gt; v_file_length;
    v_end_pos := DBMS_LOB.INSTR(v_text_file, p_rec_sep, v_start_pos);
    IF v_end_pos = 0
    THEN
    v_end_pos := v_file_length + 1;
    END IF;
    IF (v_end_pos - v_start_pos) &gt; 4000
    THEN
    -- Line exceeds 4000 characters.
    RETURN 4;
    END IF;
    p_lines(v_line_num) := DBMS_LOB.SUBSTR(v_text_file, v_end_pos - v_start_pos, v_start_pos);
    v_line_num := v_line_num + 1;
    v_start_pos := v_end_pos + v_rec_sep_len;
    END LOOP;
    RETURN 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN 5;
    END get_file_lines;
    END Text_File_Pkg;
    Any suggestions.
    Many Thanks,
    Sanjai

    Hi,
    i am trying to upload a file and then store the contents of the file into one of my tables in the schema.I wrote one package for uploading the file and then a process to insert each record in the uploaded file to the table in my schema.When i try compiling the package it gives an error.
    PL/SQL: ORA-00942: table or view does not exist
    The name of the table is wwv_flow_file_objects$
    The package is as follows-
    CREATE OR REPLACE PACKAGE BODY Text_File_Pkg AS
    FUNCTION get_file_lines (
    p_file_name IN VARCHAR2,
    p_lines IN OUT line_tab_type,
    p_rec_sep IN VARCHAR2 DEFAULT dos_new_line
    ) RETURN INTEGER
    IS
    v_binary_file BLOB;
    v_text_file CLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    v_warning INTEGER;
    v_rec_sep_len CONSTANT INTEGER := LENGTH(p_rec_sep);
    v_start_pos INTEGER := 1;
    v_end_pos INTEGER := 1;
    v_line_num INTEGER := 1;
    v_file_length INTEGER;
    BEGIN
    IF p_file_name IS NULL
    THEN
    RETURN 1;
    END IF;
    IF p_rec_sep IS NULL
    THEN
    RETURN 2;
    END IF;
    SELECT blob_content
    INTO v_binary_file
    FROM wwv_flow_file_objects$
    WHERE NAME = p_file_name
    AND (mime_type = 'text/plain' OR mime_type = 'application/octet-stream')
    AND doc_size &gt; 0;
    DBMS_LOB.createtemporary(v_text_file, TRUE);
    DBMS_LOB.converttoclob(v_text_file, v_binary_file,
    DBMS_LOB.lobmaxsize, v_dest_offset,
    v_src_offset, DBMS_LOB.default_csid,
    v_lang_context, v_warning);
    IF v_warning = DBMS_LOB.warn_inconvertible_char
    THEN
    -- Unable to convert file.
    RETURN 3;
    END IF;
    v_file_length := DBMS_LOB.getlength(v_text_file);
    LOOP
    EXIT WHEN v_start_pos &gt; v_file_length;
    v_end_pos := DBMS_LOB.INSTR(v_text_file, p_rec_sep, v_start_pos);
    IF v_end_pos = 0
    THEN
    v_end_pos := v_file_length + 1;
    END IF;
    IF (v_end_pos - v_start_pos) &gt; 4000
    THEN
    -- Line exceeds 4000 characters.
    RETURN 4;
    END IF;
    p_lines(v_line_num) := DBMS_LOB.SUBSTR(v_text_file, v_end_pos - v_start_pos, v_start_pos);
    v_line_num := v_line_num + 1;
    v_start_pos := v_end_pos + v_rec_sep_len;
    END LOOP;
    RETURN 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN 5;
    END get_file_lines;
    END Text_File_Pkg;
    Any suggestions.
    Many Thanks,
    Sanjai

  • 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 :>)

  • Scheduling error causing - ORA-00942: table or view does not exist

    Hello
    I have the following problem, I created an scenario that its supposed to run every 1 hour, it has an interface that moves an amount of records from one table to another (the amount of records is not fixed it changes). The problem arises when the amount of data to move is so big that the hour between executions is not enough and the scenario is still running when a second execution of the same scenario starts to run (as scheduled), so in the interface when the second process is trying to run the loading step it fails and I got the error ODI-1228 Caused By: java.sql.BatchUpdateException: ORA-00942: table or view does not exists. So the scenario fails and it logs this error. I think the error is due to the table in stage being locked by the first execution of the scenario.
    I don't want to change the amount of time between executions because it is usually enough, I just want to avoid the execution of a scenario when there is another execution of the same scenario still running, is there any way to do this?.
    Thanks
    LJ

    Hello
    Thanks for your answer, I already have the "Interval between repetitions" property set to 1 hour, but when one execution takes more than one hour the scheduler starts another and I have 2 processes accessing the same table and it is when I have a concurrence error on the staging table.
    How can I ensure that I wont have two or more executions of the same scenario running at the same time?.
    Thanks,
    LJ

  • Java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist while invoking a DBAdapter

    I have a WebService which is invoked , the request is routed through the mideator to the DBAdapter .DBAdapter interacts with the database and replies the result.
    I send in the CreditCardNumber in the request and recieve its Status (VALID,INVALID). i get this error every time . i have tried almost every thing to fix this . Please help me with same .
    Below is the complete error stacktrace.
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'getCreditValidationSelect' failed due to: DBReadInteractionSpec Execute Failed Exception. Query name: [getCreditValidationSelect], Descriptor name: [getCreditValidation.Creditcardinfo]. Caused by java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist . See root exception for the specific exception. This exception is considered retriable, likely due to a communication failure. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "942" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Thanks in advance

    Can you please check the following
    a. check the JNDI Configuration. ( check for the value used for XADatasourceName )
    b. check the Data source created for the User.
    c. Incase you have updated the existing JNDI then you need to update the adapter with the New Deployment Plan.
    Thanks,
    Sunil Gopal

  • 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 ...

Maybe you are looking for

  • How can i get my music from my android to my mac iTunes

    i have an android phone and i have gotten some music from the google play store and i want to know how do i get it to download to my iTunes on my mac...... can anyone help?

  • Accounting entries

    Hi All I have a problem while doing excise invoicing. At the time of GR incoming excise invoice is captured amd posted. The BED and SED accounts are deitted and CENVAT clearance account is credited.. During MIRO when i refer same PO and do , the acco

  • Config settings for Closed indicator in PR

    Dera experts , I want the system to automatically set the "closed " indicator in PR "quantity/Dates" tab , once a PO has been generated ( fully/partially ordered) Can anyone tell me the settings for the same ??   Regards   Anis

  • Authorization check of Tcode FCH7 (reprint check) / FCHN (display check)

    Hello to you all, Does any of you know of an option of extended the authorization check of Tcode FCH7 (reprint check) / FCHN (display check) using authorization object F_BKPF_BEK / F_LFA1_BEK? Regards, yoav Bernstain

  • How to use array function?

    I want to create a array with the data are in the table (one or more than one field). By using function makearray or array, it can create the array with one record e.g. Local  stringvar Array x := MakeArray ({CASES.ASSIGNTO}); ubound(x); the result w