Friday, September 8, 2017

ORA-39142: incompatible version number 5.1 in dump file

ORA-39142: incompatible version number 5.1 in dump file.


Recently I came across one issue while importing schema dump in 12c database.

My Scenario.
Schema Export taken from Database version 12.2.0.1.0
Schema Import needs to be done on Database version 12.1.0.1.0

While doing import to 12.1, I have received following error and import terminated.

ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "/u01/stage/schema_dump.dmp"

Further analysis.
As above error shows that there is some incompatibility with the versioning of Database and Dump File version.

Here are some facts as per oracle Doc related to DB versioning and Dump file compatibility.

Data Pump dumpfile compatibility


Export From Source Database With COMPATIBLE
  10.1.0.x.y
  10.2.0.x.y
  11.1.0.x.y
  11.2.0.x.y
  12.1.0.x.y
12.2.0.x.y
10.1.0.x.y
           -
           -
           -
           -
           -
         -
10.2.0.x.y
VERSION=10.1
           -
           -
           -
           -
         -
11.1.0.x.y
VERSION=10.1
VERSION=10.2
           -
           -
           -
         -
11.2.0.x.y
VERSION=10.1
VERSION=10.2
VERSION=11.1
           -
           -
         -
12.1.0.x.y
VERSION=10.1
VERSION=10.2
VERSION=11.1
VERSION=11.2
           -
         -
12.2.0.x.y
VERSION=10.1
VERSION=10.2
VERSION=11.1
VERSION=11.2
VERSION=12.1
         -


Data Pump client/server compatibility.




Connecting to Database version
expdp and impdp client version
10gR1
10.1.0.x
10gR2
10.2.0.x
11gR1
11.1.0.x
11gR2
11.2.0.x
12cR1
12.1.0.x
12cR2
12.2.0.x
10.1.0.x
supported
supported
supported
supported
supported
supported
10.2.0.x
no
supported
supported
supported
supported
supported
11.1.0.x
no
no
supported
supported
supported
supported
11.2.0.x
no
no
no
supported
supported
supported
12.1.0.x
no
no
no
no
supported
supported
12.2.0.x
no
no
no
no
no
supported


Solution To above problem.

While taking export from higher version of DB i.e. 12.2.0.1.0 use version parameter in expdp command.

Example
expdp scott/tiger@orcl directory=EXPIMP schemas=scott Version=12.1 dumpfile=Exp_Scott.dmp logfile=Exp_Scott.log

Now, you can import schema without any error.

impdp scott/tiger@orcldg directory=EXPIMP schemas=scott dumpfile=Exp_Scott.dmp logfile=Imp_Scott.log



Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert

Friday, June 30, 2017

Application Container in Oracle Database 12c R2

Application Container in Oracle Database 12c R2


“Application Container” is one of the new features of Oracle Database 12c Release 2.

In 12c Release 1, we have CDB, in which multiple database (PDBs) can be created. Now in 12c Release 2, new component has been introduce called, “Application Container”.

Application Container is optional. One can create as and when required. Application container seems to be a mini CDB, within CDB root.

Application Container also have it’s own PDBs.

I have publish this article on Oracle Community.

This Article has two parts,
  1.     Basic Understanding of Application container and it’s architecture. Click Here
  2.     Create, Install, upgrade application in application container. Click Here

Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert
 

Saturday, April 15, 2017

AIOUG, OTN Yathra 2017

AIOUG, OTN Yathra 2017


Guys, I am very glad to inform that OTN Yathra is back again. Yea, it is officially announced now.

Every year, AIOUG is organizing OTN Yathra. It’s yearly tech event. The OTN Yathra will cover six major IT cities to bring the Oracle community together. The purpose of this event is to give people knowledge of new technology of Oracle Products and enhancements.

It is strongly recommended to join OTN Yathra and meet industry Gurus and Experts.
You will be able meet industry Gurus and Experts, discuss on any technology issues, doubts and learn new technologies in person. 

Who should attend it ?
  • Application Developers
  • Application Manager
  • Architects
  • Business Analyst
  • Consultants
  • Developers
  • Oracle DBAs
  • Operation Managers
  • System Administrator
Location and Agenda

Please visit official website http://otnyathra.in/ for Agenda in each city.


Location
Date
Chennai
10-Jun-2017
Bengaluru
11-Jun-2017
Hyderabad
17-Jun-2017
Pune
18-Jun-2017
Mumbai
24-Jun-2017
Delhi
25-Jun-2017




Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert
 

Wednesday, March 29, 2017

Oracle Open World 2017, India

Oracle Open World 2017, India

I am very glad to inform that Oracle Open World is coming in India. This is really very great for each technologist in India to attend such big IT event.

This is first time Oracle has organized "Oracle Open World" in India.

Schedule Date
'- 09th May 2017
'- 10th May 2017

Location 
Pragati Maidan,
New Delhi,
India.

Please visit official link for more details,
https://www.oracle.com/in/openworld/index.html





Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert
 

Saturday, February 18, 2017

ORA-39002, ORA-39070, ORA-29283, ORA-6512 Using DataPump Export EXPDP or Import IMPDP

ORA-39002, ORA-39070, ORA-29283, ORA-6512 Using DataPump Export EXPDP or Import IMPDP


During DataPump export or import received below error messages:

ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation

Above errors are having various reason, these are,

Reason 1) 
Listener process has not been started under the same account as the database instance service.
Check the output of,
Ps –ef | grep pmon
Ps –ef | grep tnslsnr

SolutionWhen using ASM, it might possible that listener may have been started from ASM home instead of RDBMS home and security settings not accepting request.


Reason 2) 
In RAC instance, sometimes you may face trouble by using connection string, example is given as below,
expdp scott/tiger@mydb directory=expimp dumpfile=scott.dmp logfile= scott.log schemas=scott

Oracle has explain very well i.e.,
“The reason can be that the connect string (TNS Name) is a load balancing connect string and whenever you try to use the connect string with expdp/impdp, it goes to the other node where the directory information is not available, or the directory might be a local folder which is not a shared one.”

Solution1) Use expdp/impdp without connection string
2) Make sure directory are shared between all nodes and permissions are correct.


Reason 3)
One Single node or RAC instance both with connection string and without connection string may not work due to non existence of directory or path may be different.

SolutionWhen creating directory using “create directory” command, directory should be created on same path and on both nodes in RAC instance.

Reason 4) 
Directories are available but ownership or not accessible to oracle user.

SolutionGrant required permission to oracle user from where import/export is performed.


Note: At last must check user has proper permission to export to run utl_file package.


Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert
 
 

Wednesday, January 25, 2017

ORA-29702: error occurred in Cluster Group Service operation

ORA-29702: error occurred in Cluster Group Service operation


If you are working on Solaris and having Oracle database 10g or above, you might face ORA-29702 issue after reboot of your server or starting up the database.

Your database is not running on RAC but still oracle assuming it to be RAC instance.



Very simple solution to overcome this situation is to re-link oracle libraries.

Step 1. Shutdown the database completely if no-mount or any other state.

Step 2. Relink with RAC OFF :


Run following two commands one by one.(Refer below screen shots for the same.)

$ make -f ins_rdbms.mk rac_off
$ make -f ins_rdbms.mk ioracle




Step 3. Startup the database

Now start your database normally.




That's it.. Database will be started normally without any error.



Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert

Thursday, January 12, 2017

init.ora Parameter vs Kernel Parameter

init.ora Parameter vs Kernel Parameter


Recently I came across performance degradation after changing of DB parameter. Many times we change database init.ora parameter, at the same time we should also monitor kernel parameter as well. This is because few of memory and process parameter are directly effecting to our OS.

DB Memory and process parameters are directly linked with following kernel parameters, let's have look on below table,

**Below comparison is taken from oracle Docs



Init.ora Parameter
Kernel Parameter
db_block_buffers
shmmax, shmall
db_files (maxdatafiles)
nfile, maxfiles
large_pool_size
shmmax, shmall
log_buffer
shmmax, shmall
Processes
nproc, semmsl, semmns
shared_pool_size
shmmax, shmall



Common Kernel Parameter Definitions

Following Kernel Parameters tend to be generic across most Unix/Linux platforms. However, their names may be different in flavors of Unix/Linux. Check OS document for exact name.

maxfiles - Soft file limit per process.
maxuprc - Maximum number of simultaneous user processes per userid.
nfile - Maximum number of simultaneously open files systemwide at any given time.
nproc - Maximum number of processes that can exist simultaneously in the system.
shmall - This parameter sets the total amount of shared memory pages that can be used system wide. Hence, shmall should always be at least ceil(shmmax/page_size).
shmmax - The maximum size(in bytes) of a single shared memory segment.
shmmin - The minimum size(in bytes) of a single shared memory segment.
shmmni - The number of shared memory identifiers.
shmseg - The maximum number of shared memory segments that can be attached by a process.
semmns - The number of semaphores in the system.
semmni - The number of semaphore set identifiers in the system; determines the number of semaphore sets that can be created at any one time.
semmsl - The maximum number of sempahores that can be in one semaphore set. It should be same size as maximum number of Oracle processes.




Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert