Remotely run the dump file for Oracle
When we have TWO servers
- server 1 (client server )
- Platform - Linux Ret Hat
- Oracle - Client
- server 2 (host server - the target server host the DB) - Linux Ret Hat
- Platform - Linux Ret Hat
- Oracle - Full Version
The following are the suggested steps to achieve this.
- Ensure the client server's Oracle Client is Administrator Type. If not, please do re-run the runInstaller
- This to ensure the Oracle Client provide 'import' and 'export' services.
- Add the host server IP into client server's
- File name - host.allow
- E.g: /etc/host.allow
- Line to be added -> nfs: 10.116.1.123
- File name - hosts
- E.g: /etc/hosts
- 10.116.1.123 ORCL dbmain.company.com
- File name - host.allow
- Both server need to start the following services
- portmap
- netfs
- nfs
- E.g : $ /sbin/service nfs start
- Add the following line into file etc/exports
/home linux(rw,sync) linuxd600(rw,sync)/u01 10.116.1.123(rw,sync) - Must define the database address for establishing connection instead of pure text such as :-
$ imp host_user/host.com@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST='$DB_HOST')(PORT='$DB_PORT')))(CONNECT_DATA=(SID='$DB_SID')))'FILE=/get/dump/file/directory/dbdump.dmp FULL=y- Please define it in tnsnames.ora file E.g: /u01/app/oracle/product/11.2.0/client_1/network/admin/tnsnames.ora
ORCL=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbmain.company.com)(PORT =1521)))(CONNECT_DATA =(SID = orcl))) - No need to restart listener as Oracle Client do not have such services being installed.
- Please define it in tnsnames.ora file E.g: /u01/app/oracle/product/11.2.0/client_1/network/admin/tnsnames.ora
- Set the proper environment variables
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1$ PATH=$PATH:$ORACLE_HOME/bin$ LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH$ export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib - Now is the time to execute the dump file.
$ imp cnm_developerX/password@ORCLFILE=/get/dump/file/directory/dbdump.dmp FULL=y

No comments:
Post a Comment