SlideShare a Scribd company logo
1 of 3
An invisible oracle 11 bug.
It was in September 2016 I was importing an oracle 11 database. I suddenly
see an issue while import, which I have not seen before. So I tried to re-import
but the issue still re-occurs. So I tried with other database dump still the same
issue and it continued with other oracle databases. The issue was.
ORA-31693:Table data object DEPARTMENT failed to load/unload and is being
skipped due to error
ORA-02354: error in exporting importing data
ORA-39776: fatal Direct Path API error loading table DEPARTMENT
ORA-00600: internal error code, arguments: [klaprs_11], [60], [2], [164], [], [], [], [], [],
[], [], []
I started googling around to find out the solution but to my surprise I don’t see
anything specific solution to my issue. So I thought to look into oracle
support- knowledge base, Archive, community, patches, documentation, bugs
etc but I have seen only workarounds for this issue but no exact solution. I
have also raised the question with oracle community but still no clear solution.
Also there was no clear explanation why this is happening? So I started
exploring myself by running all the scripts to find out the reason. It took
many days to zero down the reason why it occurs and reason it occurs is very
unusual.
The issue occurs when you create a default column and immediately drop it.
To our wonder the corruption happens to a different column which you create
while you create and drop this default column. And when you export this
database and try to import it then you reproduce this issue.
You can also reproduce this issue by selecting the corrupted column.
Select employee_address from department where employee_address is not
null;
you should get null values as result or oracle.sql.NUMBER@7ec7ec0d (if
number) or oracle.sql.NCLOB@7ec7ec0d (if clob). Something like below.
So what is the solution?
Take the backup of the table.
If data in column is required.
Solution 1:
a) Create table temp_employee as employee.
b) Create a temporary column of the corrupted column
temp_employee_addres
c) Update column temp_employee_address = employee_address
without corrupted data
d) Drop old column employee_addres
e) Rename temp_employee_address to employee_address
OR
If data in column is not required.
Solution 2:
a) Drop the corrupted column
b) Create a fresh column
Solution 3:
a) Never create a default column and drop it immediately.
This invisible reality happened with many oracle 11 databases.
This invisible bug is fixed in oracle 12.
Note: If this bug is already in the exported dump file. Whether you import in any
oracle version it will solve your issue.

More Related Content

Similar to An invisible oracle bug

Page 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docxPage 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docx
alfred4lewis58146
 
Page 3 of 11Delete this text and type your name here This .docx
Page 3 of 11Delete this text and type your name here This .docxPage 3 of 11Delete this text and type your name here This .docx
Page 3 of 11Delete this text and type your name here This .docx
alfred4lewis58146
 
JPQL/ JPA Activity 1
JPQL/ JPA Activity 1JPQL/ JPA Activity 1
JPQL/ JPA Activity 1
SFI
 
OverviewUsing the C-struct feature, design, implement and .docx
OverviewUsing the C-struct feature, design, implement and .docxOverviewUsing the C-struct feature, design, implement and .docx
OverviewUsing the C-struct feature, design, implement and .docx
alfred4lewis58146
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
jenkinsmandie
 
JPQL/ JPA Activity 2
JPQL/ JPA Activity 2JPQL/ JPA Activity 2
JPQL/ JPA Activity 2
SFI
 

Similar to An invisible oracle bug (20)

Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And Alerting
 
Autonumber
AutonumberAutonumber
Autonumber
 
Informatica faq's
Informatica faq'sInformatica faq's
Informatica faq's
 
OBIEE 11g : Repository Creation Steps
OBIEE 11g : Repository Creation StepsOBIEE 11g : Repository Creation Steps
OBIEE 11g : Repository Creation Steps
 
32373 uploading-php-shell-through-sql-injection
32373 uploading-php-shell-through-sql-injection32373 uploading-php-shell-through-sql-injection
32373 uploading-php-shell-through-sql-injection
 
Page 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docxPage 5 of 7Delete this text and type your name hereThis fi.docx
Page 5 of 7Delete this text and type your name hereThis fi.docx
 
Data Warehouse and Business Intelligence - Recipe 7 - A messaging system for ...
Data Warehouse and Business Intelligence - Recipe 7 - A messaging system for ...Data Warehouse and Business Intelligence - Recipe 7 - A messaging system for ...
Data Warehouse and Business Intelligence - Recipe 7 - A messaging system for ...
 
SAS Programming.ppt
SAS Programming.pptSAS Programming.ppt
SAS Programming.ppt
 
How To Automate Part 2
How To Automate Part 2How To Automate Part 2
How To Automate Part 2
 
Page 3 of 11Delete this text and type your name here This .docx
Page 3 of 11Delete this text and type your name here This .docxPage 3 of 11Delete this text and type your name here This .docx
Page 3 of 11Delete this text and type your name here This .docx
 
JPQL/ JPA Activity 1
JPQL/ JPA Activity 1JPQL/ JPA Activity 1
JPQL/ JPA Activity 1
 
OverviewUsing the C-struct feature, design, implement and .docx
OverviewUsing the C-struct feature, design, implement and .docxOverviewUsing the C-struct feature, design, implement and .docx
OverviewUsing the C-struct feature, design, implement and .docx
 
Pl lab solution
Pl lab solutionPl lab solution
Pl lab solution
 
Dbms question
Dbms questionDbms question
Dbms question
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
 
Editdmpfile
EditdmpfileEditdmpfile
Editdmpfile
 
JPQL/ JPA Activity 2
JPQL/ JPA Activity 2JPQL/ JPA Activity 2
JPQL/ JPA Activity 2
 
Conf orm - explain
Conf orm - explainConf orm - explain
Conf orm - explain
 
Advanced SQL Injection: Attacks
Advanced SQL Injection: Attacks Advanced SQL Injection: Attacks
Advanced SQL Injection: Attacks
 
Data recovery consistency with check db
Data recovery consistency with check dbData recovery consistency with check db
Data recovery consistency with check db
 

An invisible oracle bug

  • 1. An invisible oracle 11 bug. It was in September 2016 I was importing an oracle 11 database. I suddenly see an issue while import, which I have not seen before. So I tried to re-import but the issue still re-occurs. So I tried with other database dump still the same issue and it continued with other oracle databases. The issue was. ORA-31693:Table data object DEPARTMENT failed to load/unload and is being skipped due to error ORA-02354: error in exporting importing data ORA-39776: fatal Direct Path API error loading table DEPARTMENT ORA-00600: internal error code, arguments: [klaprs_11], [60], [2], [164], [], [], [], [], [], [], [], [] I started googling around to find out the solution but to my surprise I don’t see anything specific solution to my issue. So I thought to look into oracle support- knowledge base, Archive, community, patches, documentation, bugs etc but I have seen only workarounds for this issue but no exact solution. I have also raised the question with oracle community but still no clear solution. Also there was no clear explanation why this is happening? So I started exploring myself by running all the scripts to find out the reason. It took many days to zero down the reason why it occurs and reason it occurs is very unusual. The issue occurs when you create a default column and immediately drop it. To our wonder the corruption happens to a different column which you create while you create and drop this default column. And when you export this database and try to import it then you reproduce this issue. You can also reproduce this issue by selecting the corrupted column. Select employee_address from department where employee_address is not null; you should get null values as result or oracle.sql.NUMBER@7ec7ec0d (if number) or oracle.sql.NCLOB@7ec7ec0d (if clob). Something like below.
  • 2. So what is the solution? Take the backup of the table. If data in column is required. Solution 1: a) Create table temp_employee as employee. b) Create a temporary column of the corrupted column temp_employee_addres c) Update column temp_employee_address = employee_address without corrupted data d) Drop old column employee_addres e) Rename temp_employee_address to employee_address OR If data in column is not required. Solution 2: a) Drop the corrupted column b) Create a fresh column Solution 3: a) Never create a default column and drop it immediately.
  • 3. This invisible reality happened with many oracle 11 databases. This invisible bug is fixed in oracle 12. Note: If this bug is already in the exported dump file. Whether you import in any oracle version it will solve your issue.