ORA-00942 table or view does not exist Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it. For Trusted Oracle7 configured in DBMS MAC mode, you may get this message if you attempt to access an object that you do not dominate. Action: Check each of the following:the spelling of the table or view name.
that a view is not specified where a table is required.
that an existing table or view name exists. Contact the database administrator if the table needs to be created or if user or application privileges are required to access the table. Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted. 
For Trusted Oracle7 in DMBS MAC mode, if the cause is an object existing at a higher label, alter your current label to dominate the creation label of the object. Then retry the command. 

解决方案 »

  1.   

    IMP-00003 Oracle message code num encountered Cause: Import encountered the referenced Oracle error. 
    Action: Look up the Oracle message and take appropriate action. (To find information on the error number, click the Help Topics button in this window, click the Index tab, then type the error number, including its three-letter prefix with the hyphen.) 
      

  2.   

    关于表空间,你可以先drop掉,然后再创建不就可以了
      

  3.   

    直接删除表空间有时候很慢,
    如果仅仅是"把该表空间的表结构和数据统统删除"的话:
    select distinct 'drop table '||segment_name||';' from user_segments where tablespace_name ='TBS1';
    然后执行结果.如过仅仅是表结构,没有数据的话,导入的时候,加参数ignore=y就不会报对象已存在地错了!
      

  4.   

    只有这两个错误吗?Problem Description: ====================  You have a situation where USER1 owns table T1 with snapshot log MLOG$_T1.  You export USER1 and want to import into USER2. You use the FROMUSER=  TOUSER=  option of the Import utility to accomplish this.  During import, you receive errors:  IMP-00017: following statement failed with ORACLE error 942:  "CREATE TRIGGER "SCOTT"."TLOG$_TEST"    after insert or update or delete on "  ""RSERNA"."TEST"    referencing old as old for each row  "  "declare    dmltype char;  begin    if     inserting then dmltype := 'I';   "  " elsif  updating  then dmltype := 'U';    elsif  deleting  then dmltype := "  "'D';    end if;    insert into "RSERNA"."MLOG$_TEST" (m_row$$, dmltype$$)  "  "    values (:old.rowid, dmltype);  end; " IMP-00003: ORACLE error 942 encountered ORA-00942: table or view does not exist   Problem Explanation: ====================  FROMUSER and TOUSER is not supported if the export file dump contains snapshots or snapshot logs.  Excerpt from Oracle8i Utilities Manual:      Snapshots, snapshot logs, and related items are exported with the     schema name explicitly given in the DDL statements, therefore, snapshtos     and their related items cannot be imported into a different schema.      If you attempt to user FROMUSER/TOUSER to import snapshot data, an error      will be written to the Import log and the items will not be imported.   Search Words: =============  snapshots exp/imp IMP-17 IMP-3 ORA-942  Solution Description: =====================  If your export dump contained a snapshot log, you will have to manually create  your snapshot log for the table you've import into the new user.  If your export dump contained a snapshot, you will have to manually create your snapshot.   Solution Explanation: =====================  Since exporting snapshot or snapshot logs and importing into another schema is  not supported, you will have to recreate the objects on the new schema because  Import will always give errors. 
      

  5.   

    我用的imp语句是imp usera/pw log=**.log file=** FROMUSER=userb,是不是应该用FROMUSER=userb/password?把导出的密码也给它?
      

  6.   

    我用的是 oracle 9i,现在直接用DROP把表空间删除了,再重新建了一个,再导入,还是那些错误,我再看了一下,其实是三个错误,顺序是这样的:
    IMP-00017:following statement failed with ORACLE error 942:
    "create  ****"
    IMP-00003:ORACLE error 942 encountered
    ORA-000942:table or view does not exit
    共重复出现了5次。
      

  7.   

    是不是说我需要手工创建一个snapshot log ?怎么建呢?
      

  8.   

    CREATE SNAPSHOT [schema.]snapshot 
        [ [PCTFREE  integer] [PCTUSED  integer] 
          [INITRANS integer] [MAXTRANS integer] 
          [TABLESPACE tablespace] 
          [STORAGE storage_clause]     [ USING INDEX [  PCTFREE integer | TABLESPACE tablespace 
                        | INITTRANS integer | MAXTRANS integer 
                        | STORAGE storage_clause ] ... 
        | [CLUSTER cluster (column [, column]...)] ] 
        [ REFRESH [FAST | COMPLETE | FORCE] [START WITH date] [NEXT date]] 
        AS subquery 
    schema 
        is the schema to contain the snapshot.  If you omit schema, Oracle     creates the snapshot in your schema. snapshot 
        is the name of the snapshot to be created.     Oracle chooses names for the table, views, and index used to 
        maintain the snapshot by prefixing the snapshot name.  To limit 
        these names to 30 bytes and allow them to contain the entire 
        snapshot name, Oracle Corporation recommends that you limit your 
        snapshot names to 23 bytes. 
    PCTFREE 
    PCTUSED 
    INITRANS 
    MAXTRANS 
        establishes values for these parameters for the internal table 
        Oracle uses to maintain the snapshot's data. TABLESPACE 
        specifies the tablespace in which the snapshot is to be created.  If 
        you omit this option, Oracle creates the snapshot in the default 
        tablespace of the owner of the snapshot's schema. STORAGE 
        establishes storage characteristics for the table Oracle uses to     maintain the snapshot's data. USING INDEX 
        specifies the storage characteristics for the index on a simple 
        snapshot.  If the USING INDEX clause not specified, the index is 
        create with the same tablespace and storage parameters as the 
        snapshot. CLUSTER 
        creates the snapshot as part of the specified cluster.  Since a 
        clustered snapshot uses the cluster's space allocation, do not use     the PCTFREE, PCTUSED, INITRANS, or MAXTRANS parameters, the 
        TABLESPACE option, or the STORAGE clause in conjunction with the 
        CLUSTER option. REFRESH 
        specifies how and when Oracle automatically refreshes the snapshot: 
                FAST 
                       specifies a fast refresh, or a refresh using only the 
                       updated data stored in the snapshot log associated 
                       with the master table.             COMPLETE 
                       specifies a complete refresh, or a refresh that re- 
                       executes the snapshot's query. 
                FORCE 
                       specifies a fast refresh if one is possible or 
                       complete refresh if a fast refresh is not possible. 
                       Oracle decides whether a fast refresh is possible at 
                       refresh time.                    If you omit the FAST, COMPLETE, and FORCE options, 
                       Oracle uses FORCE by default. 
                START WITH 
                       specifies a date expression for the first automatic 
                       refresh time. 
                NEXT 
                       specifies a date expression for calculating the 
                       interval between automatic refreshes.     Both the START WITH and NEXT values must evaluate to a time in the     future.  If you omit the START WITH value, Oracle determines the 
        first automatic refresh time by evaluating the NEXT expression when 
        you create the snapshot.  If you specify a START WITH value but omit 
        the NEXT value, Oracle refreshes the snapshot only once.  If you 
        omit both the START WITH and NEXT values or if you omit the REFRESH 
        clause entirely, Oracle does not automatically refresh the snapshot. AS subquery 
        specifies the snapshot query.  When you create the snapshot, Oracle 
        executes this query and places the results in the snapshot.  The 
        select list can contain up to 253 expressions.  A snapshot query is 
        subject to the same restrictions as a view query. PREREQUISITES:     To create a snapshot in your own schema, you must have CREATE 
        SNAPSHOT system privilege.  To create a snapshot in another user's     schema, you must have CREATE ANY SNAPSHOT system privilege.     Before a snapshot can be created, the user SYS must run the SQL 
        script DBMSSNAP.SQL on both the database to contain the snapshot and 
        the database(s) containing the tables and views of the snapshot's 
        query.  This script creates the package SNAPSHOT which contains both 
        public and private stored procedures used for refreshing the 
        snapshot and purging the snapshot log.  The exact name and location     of this script may vary depending on your operating system.     When you create a snapshot, Oracle creates a table, two views, and 
        an index in the schema of the snapshot.  Oracle uses these objects 
        to maintain the snapshot's data.  You must have the privileges 
        necessary to create these objects.  For information on these 
        privileges, see the CREATE TABLE, CREATE VIEW, and CREATE INDEX     commands.     The owner of the schema containing the snapshot must have either 
        space quota on the tablespace to contain the snapshot or UNLIMITED 
        TABLESPACE system privilege.  Also, both you (the creator) and the 
        owner must also have the privileges necessary to issue the 
        snapshot's query.     To create a snapshot, you must be using Oracle with the procedural 
        option.  To create a snapshot on a remote table or view, you must     also be using the distributed option. 
      

  9.   

    CREATE SNAPSHOT LOG ON [schema.]table 
        [PCTFREE  integer]    [PCTUSED  integer]     [INITRANS integer]    [MAXTRANS integer] 
        [TABLESPACE tablespace] 
        [STORAGE storage_clause] schema 
        is the schema containing the snapshot log's master table.  If you 
        omit schema, Oracle assumes the master table is contained in your 
        own schema. Oracle creates the snapshot log in the schema of its 
        master table.  You cannot create a snapshot log for a table in the     schema of the user SYS. table 
        is the name of the master table for which the snapshot log is to be 
        created.  You cannot create a snapshot log for a view.     Oracle chooses names for the table and trigger used to maintain the 
        snapshot log by prefixing the master table name.  To limit these 
        names to 30 bytes and allow them to contain the entire master table 
        name, Oracle Corporation recommends that you limit master table     names to 24 bytes. PCTFREE 
    PCTUSED 
    INITRANS 
    MAXTRANS 
        establishes values for these parameters for the snapshot log. TABLESPACE 
        specifies the tablespace in which the snapshot log is to be created. 
        If you omit this option, Oracle creates the snapshot log in the 
        default tablespace the owner of the snapshot log's schema. STORAGE 
        establishes storage characteristics for the snapshot log. PREREQUISITES:     You must have the privileges necessary to create a table in the 
        schema of the master table.  For information on these privileges, 
        see the CREATE TABLE command.     Before a snapshot log can be created, the user SYS must run the SQL 
        script DBMSSNAP.SQL on the database containing the master table. 
        This script creates the package SNAPSHOT which contains both public     and private stored procedures used for refreshing the snapshot and 
        urging the snapshot log.  The exact name and location of this script 
        may vary depending on your operating system.     You must also have the privileges to create a trigger on the master 
        table.  For information on these privileges, see the CREATE TRIGGER 
        command. 
        If you are using Trusted Oracle in DBMS MAC mode, your DBMS label     must dominate the label of the tablespace in which the snapshot log 
        is to be stored.