Monday, October 10, 2011

EXP-00008: ORACLE error 942 encountered , ORA-00942


Once while visiting OTN , i found a user is facing the below error while performing exporting  

C:\> exp hr/hr tables=batch_job
 Export: Release 10.2.0.3.0 - Production on Mon Oct 10 14:34:35 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
Export done in WE8MSWIN1252 character set and UTF8 NCHAR character set
server uses UTF8 character set (possible charset conversion)
 About to export specified tables via Conventional Path ...
. . exporting table                 BATCH_JOB
EXP-00008 : ORACLE error 942 encountered
ORA-00942: table or view does not exist
Export terminated successfully with warnings.

While connecting connecting with "HR" user

C:\Documents and Settings\admin>sqlplus hr/hr
 SQL*Plus: Release 10.2.0.3.0 - Production on Mon Oct 10 14:34:58 2011
 Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
 Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production
 SQL>  select count(*) from batch_job;
COUNT(*)
----------
37311

Solution :  There may various possible solution .The following are
1.) One of the possible solution is that the view "SYS.EXU9TYP" which is used by EXP is missing. So to solve this issue follow the below steps : 

I.) Ensure no application user connect to database.

II.) Run the following script
SQL>@?/rdbms/admin/catexp.sql
SQL>@?/rdbms/admin/catpatch.sql

III.) Re-try EXP.

2.) Secondly,it also seems that the problem is clearly with the version of exp i.e;
Exporting  with  version : 10.2.0.3
Connecting  to  database : 10.2.0.1

3.) Export proper home and perform export, even with exp still we can solve our problem but always recommended to use expdp/impdp instead of exp/imp in oracle 10g and higher version . 

4.) Finally to find out exactly what's wrong, check for a trace file in CORE_DUMP_DEST directory.


Enjoy    :-) 


No comments: