Solved

import DB when multiple oracle versions same server

Posted on 2011-03-02
7
659 Views
Last Modified: 2012-05-11
Hi Experts,

      I don’t know the difference between 11g and 11gr2 but they ask me to install the new version..  No box left, so I installed it on my 11g  server.  I can communicate with both database without problem.  My question is, normally when I import a dump, I’m using this command; IMP system/Password  file=c:\dump.dmp fromuser=SchemaUser touser=My_user ignore=yes log=c:\nom_log.log

I already import a dump to our 11gr2, but now, I need to import a dump on the 11g database. How can a select which version of oracle I want to import it too. ?  Any switch to add?

Thanks,
0
Comment
Question by:C2enterprise
7 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 35019308
always import with the SAME version of "imp" as the target db.

always export with the LOWEST version of "exp" of either the source or the target.

So, if you are moving from 11gR1 to 11gR2  then use 11gR1 exp  and 11gR2 imp

if you are moving from 11gR2 to 11gR1 then use 11gR1 for both exp and imp
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 250 total points
ID: 35019316
you choose which by adjusting the PATH to whichever oracle home corresponds to the version you want to use.

Or run it explicitly with fully qualified path  something like...  /oracle/product/11.1/bin/imp
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35019324
You also need to set up the tnsnames.ora file for the version of imp you are using to be able to see the other version.

Then on import: useername/password@dbalias_from_tnsnames
0
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.

 
LVL 73

Expert Comment

by:sdstuber
ID: 35019363
since you are working with 11g,  you should also get used to using the new datapump (dp) versions


expdp and impdp

but, if you have older exp dump files, it's safe (and required) to use the 11g imp for them, but it's recommended practice to use the new dp versions going forward
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 35019393
To make sure you are using the right version each time, you should create shortcuts, executing
    cmd /k cd «YourOracleBinPathHere»
or at least
    cmd /k set path=«YourOracleBinPathHere»;%PATH%
for each release you install, and then use the corresponding Command prompt to execute. Of course you can set up other vars, too, like ORALE_HOME and TNS_ADMIN, but that should not be necessary.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35019401
The main negative for datapump is the ability to create a DMP file on a remote machine.
0
 

Author Closing Comment

by:C2enterprise
ID: 35019751
Other solution are certainly good..  but this one is the easier for us that doesn't really use oracle except for debugging.
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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

772 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