Solved

How can I get rid of ORA-08103 Error?

Posted on 2014-12-28
5
304 Views
Last Modified: 2015-01-08
Dear Experts,

I sometimes get ORA-08103 error for the following PL/SQL code. Could you please help me?

Best Regards.

DECLARE
[There is Single Line Declaration]
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET db_file_multiblock_read_count=16';
INSERT  /*+ APPEND PARALLEL NOLOGGING */  INTO MAINTABLE (<Column List>) SELECT (<Column List>) FROM TMP_TABLE;
COMMIT;
EXECUTE IMMEDIATE 'TRUNCATE TABLE TMP_TABLE DROP STORAGE';
END;

ORA-08103: at line 5. object no longer exists
ORA-06512: at line 3. Sql: DECLARE
0
Comment
Question by:GurcanK
  • 3
5 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
My guess is that some other process has dropped TMP_TABLE before this code has completed the run.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
Comment Utility
1. Can you give us the line what is in the declare section as well.. may be you could change the name of the variable/mask it accordingly.

2. Also could you please help to add an exception handling section to your plsql block to trap the errors as shown below.

DECLARE
 [There is Single Line Declaration]
 BEGIN
 EXECUTE IMMEDIATE 'ALTER SESSION SET db_file_multiblock_read_count=16';
 INSERT  /*+ APPEND PARALLEL NOLOGGING */  INTO MAINTABLE (<Column List>) SELECT (<Column List>) FROM TMP_TABLE;
 COMMIT;
 EXECUTE IMMEDIATE 'TRUNCATE TABLE TMP_TABLE DROP STORAGE';
Exception
when others then
dbms_output.put_line('In exception section:' );
dbms_output.put_line('sqlcode:' || sqlcode );
dbms_output.put_line(sqlerr:' || sqlerrm );
 END;
0
 

Author Comment

by:GurcanK
Comment Utility
Thnaks everyone, Slightwv was right, I revealed that another user drops.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
Glad to help.  Don't forget to close out the question.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
GurcanK,

Can I ask why there was an even split of points here?  I don't see how http:#a40521104 helped answer the question.

I don't have  a problem if you wanted to offer some points as an assist for exception handling but that has nothing to do with what was generating the error.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now