Pl/sql ORA-00942 err

Hi,
I have created procedure in that i m creating a table and merging it with some other table and after that i fetching the records in the ref cursor and at last i m droping the same table.I m working on Oracle 9i.Sometimes i m able to complie the procedure but sometime i m getting the err ORA-00942 Table or View doesnot exist.I dont understand the reason y it is coming.I have restarted the database server but still i m getting the err.Give me some solution for that

Your procedure probably looks like this:
SQL> CREATE OR REPLACE PROCEDURE p_test IS
  2  BEGIN
  3    EXECUTE IMMEDIATE 'create table tt ( a number )';
  4    INSERT INTO tt VALUES ( 4 );
  5    -- some other coding
  6    EXECUTE IMMEDIATE 'drop table tt';
  7  END;
  8  /
Warning: Procedure created with compilation errors.And the error during compilation is:
SQL> show err
Errors for PROCEDURE P_TEST:
LINE/COL ERROR
4/3      PL/SQL: SQL Statement ignored
4/15     PL/SQL: ORA-00942: table or view does not existThat's because table tt doesn't exist during compilation and PL/SQL compiler cannot validate INSERT statement. To avoid it you must make INSERT as dynamic SQL:
SQL> ed
Wrote file afiedt.buf
  1  CREATE OR REPLACE PROCEDURE p_test IS
  2  BEGIN
  3    EXECUTE IMMEDIATE 'create table tt ( a number )';
  4    EXECUTE IMMEDIATE 'INSERT INTO tt VALUES ( 4 )';
  5    -- some other coding
  6    EXECUTE IMMEDIATE 'drop table tt';
  7* END;
SQL> /
Procedure created.
SQL> exec p_test;
PL/SQL procedure successfully completed.
SQL>
But in general, it's very bad idea to create table, do some processing and drop the table at the end of it. You may face another run time error when two or more users running the same procedure at the same time - they may not be able to create 2 or more tables with the same name ( depends on what ID they use to connect to DB, generic or individual ). In your situation it's better to use temporary tables.

Similar Messages

  • 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

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

  • ORA-06550: line 33, column 9: PL/SQL: ORA-00942: table or view does not exi

    hi,
    I am getting this error during the deployment. But whatever tables i have used for doing mappings in the mapping editor, those tables are existing in the database. Source and target database is same in my project. please assist on this.
    Thanks,
    Kuamr

    Hi mandi,
    Thanks for your assistance. And after deploying into runtime repository,mapping is deployed with the following error.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    If you have any idea on this, please assist.
    thanks,
    kumar

  • Security problem? (ORA-00942 error when creating procedure)

    First, in SQL*Plus connect as system user:
    SQL>connect system/oracle
    Then, create table proctest for user scott and insert records:
    SQL>create table scott.proctest ( name varchar2(10)) ;
    SQL>insert into scott.proctest values ( 'bigboy' ) ;
    SQL>select * from scott.proctest ;
    NAME
    bigboy
    Then, create procedure testproc for user system using table scott.proctest:
    SQL>CREATE OR REPLACE PROCEDURE testproc AS
    2 v_name VARCHAR2(10) ;
    3 BEGIN
    4 SELECT Name INTO v_name FROM scott.proctest WHERE rownum < 2 ;
    5 DBMS_OUTPUT.PUT_LINE( 'Name: ' || v_name ) ;
    6 END ;
    7 /
    Then, errs report:
    SQL>show err;
    LINE/COL ERROR
    4/2 PL/SQL: SQL
    4/2 PL/SQL: SQL Statement ignored
    4/37 PL/SQL: ORA-00942: Table or view does not exist
    Then, explicitly grant select privilege on proctest to system:
    SQL>grant select on scott.proctest to system ;
    And at this time compile the above precedure again, there's no errors.
    I have got some instruction that if a procedure wants to use some table,
    the owner of this procedure has to have corresponding privileges to use this table and
    these privileges have to be granted directly to the user. It doesn't work if
    the privileges are granted i.e. through roles.
    And in the example above the user has select on scott.proctest privilege but
    this privilege is granted through DBA role. So it doesn't work if
    I do not explicitly grant select privilege to system.
    My question is:
    Why does Oracle define this rule? Is it a kind of security consideration?

    Since stored procedures rely on privileges that are granted directly to the user, Oracle only needs to re-validate stored procedures when direct grants to the schema owner change. In general, the rate at which the privileges assigned to roles are changed is much higher than the rate at which privileges assigned to a particular user are changed, so this cuts down on on the cost of revalidating procedures.
    More importantly, Oracle roles can be assigned to users, but a user can also have non-default roles and password-protected roles. If Oracle allowed privileges through roles to affect the privileges of a stored procedure, handling these sorts of cases would be quite difficult and would result in far more confusion than in today's implementation.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

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

  • ORA-00942 error in simple stored proc

    Guys,
    I'm trying to learn to write some procedures in oracle and have started with the following;
    CREATE OR REPLACE PROCEDURE sp__who
    IS
    BEGIN
    FOR rec IN (SELECT s.SID, s.serial#, p.spid, s.osuser, s.program,
    s.status
    FROM v$process p, v$session s
    WHERE p.addr = s.paddr)
    LOOP
    DBMS_OUTPUT.put_line ('SID: ' || rec.SID);
    DBMS_OUTPUT.put_line ('Serial Nbr: ' || rec.serial);
    DBMS_OUTPUT.put_line ('SPID: ' || rec.spid);
    DBMS_OUTPUT.put_line ('OS User: ' || rec.osuser);
    DBMS_OUTPUT.put_line ('Program: ' || rec.program);
    DBMS_OUTPUT.put_line ('Status: ' || rec.status);
    DBMS_OUTPUT.put_line ('------------------------------');
    END LOOP;
    END sp__who;
    SHOW ERRORS;
    This is failing with a PL/SQL: ORA-00942: table or view does not exist - it seems to be complaining about v$session and v$process - I do have access to these as I can run the select by itself fine...
    Any ideas why?
    Also, can anyone suggest a good website for learning PL/SQL and oracle procedure writing?
    Cheers!
    Pete

    I'm a DBA (Sybase / SQL Server DBA!) and I'm learning to support oracle instances in my current role.
    The stored procedure will be used to extract a list of users active or otherwise in the database... Ideally giving enough information to make decisions easier when it comes to killing processes, etc. Replicating in part, the sybase equivalent stored procedures. (long term plan will be to recreate all the sybase sp_ procedures in oracle)
    What's written so far is obviously very basic and will need further enhancements to make it useful as intended - but having zero experience of writing procs in Oracle I thought it best to start with a simple select :-)

  • Raise exception ORA-00942

    --How do I raise an exception for 6550 or 942?  Here is the anonymous block that I'm running in SQL Developer which fails to raise an exception:
    --(I might add that this is a self contained example; the table "image_masterr" does not exist)
    --I'm running in 10.2.0.1
    DECLARE
    lcl_temp1 VARCHAR2(10);
    v_error_code NUMBER;
    v_error_message VARCHAR2(255);
    no_table EXCEPTION;
    no_table_942 EXCEPTION;
    PRAGMA EXCEPTION_INIT(no_table, -06550);
    PRAGMA EXCEPTION_INIT(no_table_942, -00942);
    BEGIN
    DECLARE
    lcl_temp VARCHAR2(20);
    BEGIN
    v_error_code := SQLCODE;
    v_error_message := SQLERRM;
    SELECT count(1) INTO lcl_temp FROM image_masterr;
    v_error_code := SQLCODE;
    v_error_message := SQLERRM;
    DBMS_OUTPUT.PUT_LINE('There is no problem '|| lcl_temp);
    EXCEPTION
    WHEN no_table OR no_table_942 THEN
    DBMS_OUTPUT.PUT_LINE('There is a problem ');
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('There is a problem ');
    END;
    DBMS_OUTPUT.PUT_LINE('There is no problem :'||v_error_code ||v_error_message );
    END;

    You cannot expect to catch such an exception at compile time, since PL/SQL identifies all referenced objects in your code first. If any object does not exist, a compile error is generated, hence the exception block will never be executed since it is only evaulated at runtime.
    Furthermore, even though the table may exist, if the user in which you are running the code cannot see the table, you will still get a compile error.
    SQL> DECLARE
      2    lcl_temp1       VARCHAR2(10);
      3    v_error_code    NUMBER;
      4    v_error_message VARCHAR2(255);
      5    no_table        EXCEPTION;
      6    no_table_942    EXCEPTION;
      7    PRAGMA          EXCEPTION_INIT(no_table, -06550);
      8    PRAGMA          EXCEPTION_INIT(no_table_942, -00942);
      9 
    10    BEGIN
    11      DECLARE
    12        lcl_temp VARCHAR2(20);
    13      BEGIN
    14     
    15        v_error_code  := SQLCODE;
    16        v_error_message := SQLERRM;
    17       
    18        SELECT count(1)
    19        INTO lcl_temp
    20        FROM image_masterr;
    21       
    22        v_error_code    := SQLCODE;
    23        v_error_message := SQLERRM;
    24       
    25        DBMS_OUTPUT.PUT_LINE('There is no problem '|| lcl_temp);
    26       
    27      EXCEPTION
    28        WHEN no_table OR no_table_942 THEN
    29          DBMS_OUTPUT.PUT_LINE('There is a problem ');
    30 
    31        WHEN OTHERS THEN
    32          DBMS_OUTPUT.PUT_LINE('There is a problem ');
    33    END;
    34    DBMS_OUTPUT.PUT_LINE('There is no problem :'||v_error_code ||v_error_message );
    35  END;
    36  /
          FROM image_masterr;
    ERROR at line 20:
    ORA-06550: line 20, column 12:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 18, column 7:
    PL/SQL: SQL Statement ignored

  • SQL Error: ORA-00942: table or view does not exist + CX_RS_SQL_ERROR

    HI ,
    we are facing below issue while activating info object xxxxxxxx
    " SQL Error: ORA-00942: table or view does not exist "  and   " CX_RS_SQL_ERROR  "
    can any one help us out to resolve this issue.
    Thanks,
    EDK......

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • 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

  • Oracle JDBC Driver, SQL, and erroneous ORA-00942

    We've been running the following prepared statement without trouble for several months: "SELECT ST FROM STATELT WHERE UPPER(ST)=UPPER(?) OR UPPER(STATE)=UPPER(?) OR UPPER(ABBREV)=UPPER(?) ", using the latest version of the Oracle JDBC drivers. The code that calls the statement, in this case, substitutes "ME" for the three ? characters via setString().
    Yesterday, we pointed our application to an identically populated schema running on the same Oracle 8.1.6.1.0 server. The only difference was that the schema name was 11 characters long rather than six. The STATELT synonym was valid, and could be queried via SQL*PLUS. However, running the query produced an ORA-00942: "table or view does not exist" error.
    Here's the really weird bit: Adding a space to the above anywhere that is legal including before SELECT, at the very end of the SQL, between SELECT and ST (so that there are 2 spaces there), on either side of any of the ='s, all make the SQL work.
    We tried this with an older 8.1.6 JDBC driver and the latest version from the Oracle TechNet site (downloaded yesterday), on three separate computers, and on Windows 2000 and Linux. The problem does seem to be specific to the new schema, but we see no reason why.
    I'd like to know what's up here, since it is shipping software. I'm beginning to suspect that the Oracle Server itself might be responsible, rather than the JDBC driver per se.

    Luis Cabral wrote:
    jschell wrote:
    Although if you are changing the object structure then the code to deal with it must change as well. So, especially in developement, why is restarting a problem?It is not that restarting per se is a problem. Here us developers do not have the required privileges to restart the JDBC pool and we have to ask the DBA to do it, and sometimes he is not immediately available. It is not a big thing but this can impact the development process.Your development process is hideously flawed then.
    The pool exists in the JEE server. And from your first post it seems that you have permission to restart that but not to access the management console. It is ridiculous to have access the the former and not the later.
    Not to mention that you should have your own JEE instance to develop on. Actually it is weird to me that a DBA would even be touching a JEE server. The competent ones I know don't even know how to do that. They know the database not the application servers.
    >
    In addition, having to restart a whole JDBC pool just because you changed a database object definition does not seem very flexible to me. Such issue does not exist in other connection types, for instance in OCI connections, that is why I thought there should be an option to turn it off if required.
    Well specifically you have to restart the pool because you were USING the object that changed.
    And I am rather certain that you can turn off the pool entirely.
    Even in production, I reckon that this may have a negative impact. For instance, say that you need to deploy a hot fix for a bug in one application that involves the re-creation of one single object type. This means that the whole JDBC pool, which may be used by other applications, may have to be shut down just because of that single object.Good point.
    I suggest you stop using complex objects in Oracle. I suspect that would eliminate the problem completely.

  • Insertin Data useing SQL Procedure Getting Error ORA-00942 and ORA-06512

    I have two Schemas ISYS and ISYSTWO
    I had created a Stored Procedure RECINC2 in Schema ISYS
    as
    procedure recinc2(cName IN CHAR,cWhere IN CHAR,cTable in CHAR)
    AS
    cQry VARCHAR2(1000);
    BEGIN
    cQry := 'INSERT INTO '||cName||'.'||cTable||' SELECT * FROM '||cTable|| ' WHERE ||cWhere;
    dbms_output.put_line(cqry);
    EXECUTE IMMEDIATE cQry;
    end;
    NOW WHEN in Run it gives error
    SQL> begin
    2 recinc2('ISYSTWO','CODE=4','AGENTS');
    3 end;
    4 /
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "ISYS.RECINC2", line 8
    ORA-06512: at line 2
    BUT IF I EXECUTE
    the DBMS output
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    it executes and gives fine result
    Please help
    Thanks
    Chaand kackria

    SQL> conn ISYSTWO/ISYSTWO
    Connected.
    SQL> grant all on agents to isys;
    Grant succeeded.
    SQL> conn isys/isys
    Connected.
    SQL> exec recinc2('ISYSTWO','CODE=4','AGENTS');
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    PL/SQL procedure successfully completed.

  • Error at "spacechk_ini" phase with SQL ERROR 942: ORA-00942

    Dear support,
    I am posting this problem again in upgrade forum as i am still dont have proper answer.
    We are performing upgrade from 4.0B (4.0B Ext kernel level 996 , windows 2000 Oracle 9.2.0.5  ) to 4.7 Ext 2.00 SR1. I have upgraded my database from 8.1.7.4 to 9.2.0.5 as prerequisite for upgrade.
    While performing Initialization module we got below error
    " No DB freespace check possible code -4 "
    When i analyzed slog found below error
    Phase SPACECHK_INI:
    ERROR: Statement: SELECT "TABLESPACE_NAME", "BYTES"/1048576 FROM SYS."DBA_TEMP_FILES" WHERE "BYTES" >= 1048576
    ERROR: SQL ERROR 942: ORA-00942: table or view does not exist
    ERROR: Statement: SELECT "TABLESPACE_NAME", "BYTES"/1048576 FROM SYS."DBA_TEMP_FILES" WHERE "BYTES" >= 1048576
    ERROR: ERROR 256: invalid cursors id
    ERROR: SQL ERROR 942: ORA-00942: table or view does not exist
    have observed one more thing at my database ( which is now upgraded to 9.2.0.5 as prerequisite for upgrade to 4.7)
    select * from dba_temp_files;
    no rows selected.
    But when i run same querry to my another server which is 4.7 oracle 9.2.0.5 i get output as list of datafiles with PSAPTEMP tablespace.
    I think problem might be this fixed tables/view dba_temp_files is showing no rows as PSAPTEMP tablespace.Also we cannot add any value to this table as it is fixed tabel/view.
    How we can troubleshoot this?
    I would also like to inform in my 40 B database PSAPTEMP tablespace is dictionary managed after upgrade to 9.2.0.5 but
    In another server which is 4.7 9.2.0.5 , PSAPTEMP tablespace is locally managed
    May be this is the problem why my dba_temp_files showing nothing.
    Do i need to perform DMTS to LMTS for psaptemp tablespace.so that my dba_temp_files view will show me psaptemp tablespace under it?
    Can anybody suggess something on the same at earliest ?
    Best Regards,
    AjitR

    Markus ,
    Thanks for reply but i have performed database refresh of my DEV server long time back. Now as part of upgrade i have also performed Oracle upgrade from 8.1.7.4 to 9.2.0.6 . Now how can i bring data in dba_temp_files.
    Shouls i go for drop and recreate PSAPTEMP tablespace option.
    Please guide me in detail as i cannot restore backup from any other server to DEV because database already upgraded.
    Best Regards,
    AjitR

  • APEX 4.0 SQL ERROR -ORA-00942

    Hi, I'm new to APEX. I'm having some trouble getting the following which creates a view to execute. I keep getting the ora-00942 table or view does not exist when it reaches the code in bold. When i look at the objects in APEX and SQL Developer the table is right in front of me. Any insight as to why i'm getting this error?
    select ctt.firstname
    , ctt.lastname
    , ctt.contact_type
    , ads.address_type
    , ads.address_line1
    , ads.address_line2
    , ads.postcode
    , ads.city
    , ads.state
    , ads.country
    , aac.default_yn
    , ctt.id
    , ads.id
    from app_contacts ctt
    , app_addresses ads
    , app_ads_ctt aac
    where aac.ctt_id = ctt.id
    and aac.ads_id = ads.id
    The code is from a new book by Packt Publishing "APEX 4.0 Cookbook" which i'm using to get up to speed on APEX 4.0. I don't want to take any shortcuts. I'd really appreciate some help.
    Thanks

    Hi Ben,
    Here is the complete statement and i've indicated in bold where the error occurs. The problem area is enclosed in asterisks when encapsulated by
    create or replace view "APP_VW_CONTACTS" as
    select ctt.firstname
    , ctt.lastname
    , ctt.contact_type
    , ads.address_type
    , ads.address_line1
    , ads.address_line2
    , ads.postcode
    , ads.city
    , ads.state
    , ads.country
    , aac.default_yn
    , ctt.id
    , ads.id
    from app_contacts ctt
    , app_addresses ads
    , app_ads_ctt aac
    where aac.ctt_id = ctt.id
    and aac.ads_id = ads.id
    This code generates the ora-00942 error (table or view does not exist)  in SQL Developer and ora-00957 (duplicate column name) in APEX SQL WORKSHOP.
    Your code,SELECT * FROM user_tables WHERE LOWER(table_name) = 'app_ads_ctt';
    returns i row with a status of 'VALID' in SQL WORKSHOP.
    Edited by: 844466 on Mar 16, 2011 4:24 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Java.sql.SQLException: ORA-00942: table or view does not exist

    Hi all,
    I have an Oracle table called: USER_APP_VERSION with the fields (all String): (username, application_name, version).
    I use PreparedStatement to insert rows into table:
    String psInsertRpt = "INSERT INTO USER_APP_VERSION (username, application_name, version) VALUES (?, ?, ?)";
    rptPS = conn.prepareStatement(psInsertRpt);
    rptPS.setString(1, username);
    rptPS.setString(2, source);
    rptPS.setString(3, version);
    rptPS.executeUpdate(); At executeUpdate() line, I get the following error:
    java.sql.SQLException: ORA-00942: table or view does not exist
    The table does exist, I can use the "INSERT INTO USER_APP_VERSION (username, application_name, version) VALUES ("name", "source", "version")";
    to insert rows into db at sql command line, however, when run the same query as part of my Java code, get the SQLException.
    Any idea? Any help is greatly appreciated.

    Thanks for the raply. I can connect to the db using a username and password, and run the query with no problem. I use the same username and password to make a jdbc connection from Java code. Since username and password are the same, does "permission" is still an issue? If yes, how can I solve it?

Maybe you are looking for

  • How do I safely and correctly override equals in a generic element class?

    (I posted this in the collection forum, but it was suggested I should take it here instead.) I've written an OrderedPair element class, (OrderedPair<K,V>), so I can have a set of ordered pairs. To get the container to treat OrderedPairs as values ins

  • Web Gallery help separating photos into 2 collections

    Help creating web gallery please. I would like to separate photos in the gallery into 2 different collections or categories. When I set up my web gallery in LR 2.0 and choose the first set of photos, I can name this collection title on the right pane

  • Using the BR*tools in portal

    Hi all, I am trying to use the BR*tools from a oracle database but having trouble setting the environment variables for the tool.  I'm on a windows platform.  Do I change these variables in the system part of the control panel? Thanks, Jin Bae

  • ABAP statement for deleting the content of a infocube

    Hello, does someone know a abap statement or Babi to delete all data from a info cube?

  • How Can i Create my own sounds in Garageband?

    I know how to take songs and create them into ringtones for my iphone but i would like to know how i can create a simple sounding text messaging notifier from garageband. Anyone have any ideas?