Oracle 10g dump file push into Oracle 11g database

oracleoracle-10goracle-11g

Currently when executing the imp command with the following parameters: file=my.dmp log=my.log fromuser=myuser touser=myuser

The following errors occur:

IMP-00058: ORACLE error 12560 encountered
ORA-12560: TNS:protocol adapter error
IMP-00000: Import terminated unsuccessfully

However, tnsping successfully looks up the values in my tnsnames.ora file. My question is does the dump file created in 10g cause an issue on import into 11g or is this error something else that I am unable to diagnose.

Best Answer

Your problem might very well have to do with incorrect versions or wrong default connection. Make sure that you use the exp utility from the 10g installation and the imp utility from the 11g installation. Also make sure that the environment variables like ORACLE_HOME are correct and that PATH is adjusted for the correct ORACLE_HOME/bin

How does your connect string look like? Is your TNS_ADMIN variable defined? (if not, you might need to have multiple tnsnames.ora files in place, or tnsnames.ora is in a platform specific location (/etc, /var/opt/oracle etc.)) tnsping shows where it gets the sqlnet.ora (next to tnsnames.ora) from.

Even better is to start using expdp and impdp. You can use impdp to directly import your data in the 11g database, using a datasbase link.