How to import and dump file to remote Oracle server?

Hi All,

I have a

 linux centos

instance which has a

 dump file

. I need to import the dump file to the

oracle serve

r which is located at some remote location. I have installed the

oracle client 

on my machine and I am able to connect to the remote oracle server.

Now how to import the dump to the oracle server in order to create the database. What are the prerequisites for this??

Thanks in advance

Could you please stay away from marking arbitrary words with "CODE"-tags, please? CODE-tags are for marking code (as the name suggests) and terminal output, not for highlighting. Consider using bold or italic text for this instead.

To answer your question: that depends on how the dump was created. If it was created with the "exp" utility and the database schema is included in the export:

create the user, grant rights (import, create session and imp_full_database), then import with the "imp" utility:

sqlplus> create user <user> identified by <passwd> default tablespace <tblspc-name> quota unlimited on <tblspc-name>;
sqlplus> grant connect, create session, imp_full_database to <user>;

# imp <user>/<passwd>@<host> file=<dumpfile> log=<logfile> full=y

If the export was done with "expdp" then instead of the "imp" above use:

sqlplus> impdp <user>/<passwd> directory=<dir> dumpfile=<file> logfile=<logfile> full=y;

I hope this helps.

bakunin

Hi Bakunin,

The oracle server is at remote location. I have the oracle client to connect to the server.

Also I have installed the client using following commands:

Go to Instant Client downloads for Linux x86-64 to download the oracle Linux x86-64 instant clients

Download the matching client
oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

Install
rpm -ivh oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm
rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

Set environment variables in your ~/.bash_profile
ORACLE_HOME=/usr/lib/oracle/11.2/client64
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOME
export LD_LIBRARY_PATH
export PATH

After this I am able to connect to the oracle server.

But the oracle client does not contains the /network/admin/ directory and also the tnsname.ora file.

So i created one to login to the server.

But the bin directory of oracle home contains adrci genezi sqlplus libraries. Whenever I try import, it never works.

Please help.

I think so I have not configured the client properly.

Log-out user and log-in again and now you're ready to use SQL*Plus and connect your server. Type in :

sqlplus "username/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.1)(PORT=1521))(CONNECT_DATA=(SID=YOURSID)))"

---------- Post updated 05-08-14 at 03:21 AM ---------- Previous update was 05-07-14 at 11:39 PM ----------

Can u tell me how to install imp/�xp utilities in linux?

Or using RMAN

  1. Connect to the database using RMAN
  2. execute following command backup database
  3. on target oracle instance recover database with command recover database;