1 ) Importing the data from
remotely without taking the export by database link :
Steps:
Remote side :
·
Create a new user name called <prod>
Sql> Create user prod identified by prod;
·
Grant connect, resource ,dba , imp_full_database, exp_full_database to user prod;
·
Now log into user which we created
Conn prod/prod
·
Now create a db link
Create database link <newlink>
connect scott identified by tiger using
‘remotedb’;
·
Now execute the impdb comment
$ ] Impdp prod/prod@testdb network_link=newlink schemas=scott
remap_schema=scott:prod
--------------------------------------------------------------------------------------------------------
2) Exporting data by expdp :
Expdp
username/password
dumpfile=<filename>
logfile=<filename> schemas=<schema name> directory=<directory name>
For Example:
Expdp scott/tiger dumpfile=scott.dmp logfile=scott.log
schemas=scott directory=data
3) Importing data by impdb:
Impdp username/username
dumpfile=<filename> logfile=<filename> remap_schema=<from
schema: to schema> directory=<directory name>
For
Example:
Impdp prod/prod
dumpfile=scott.dmp logfile=scott1.log remap_schema=scott:prod schemas=scott
if any quories just revert back
ReplyDelete