Export data using expdp to remote host [message #556550] |
Tue, 05 June 2012 04:07 |
pradies
Messages: 250 Registered: May 2008
|
Senior Member |
|
|
Hi,
I have to servers 'A' and 'B', On Server there is a schema with the name "test" having a table "t1". I want to import this t1 table to server B.
Is it possible to export dump using expdp to remote host.
After some googling I found that there is an option for this like "network_link". for testing this, I created a dblink from Server "B" to "A" named "vxmldb".
When I am using the below command on Server B there I am getting the following error.
C:\>expdp directory=data_pump_dir logfile=test.log network_link=vxmldb schemas=test dumpfile=test.dmp
Export: Release 11.1.0.6.0 - 64bit Production on Tuesday, 05 June, 2012 14:22:07
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Username: system/vxmldb@vxmldb
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39170: Schema expression 'TEST' does not correspond to any schemas.
In above command
directory ---> Server "B" location
network_link ----- > dblink name which is created on Server "B" to access Server "A"
schemas ------ > schema name which is to be exported . Exists on Server "A" DB
username/password ---- >> higher level username/password for Server "A".
@connectString ----- >> connecting to Server "A"
So Please tell me where I am wrong and if it is possible then how.
Thanks in Advance
Pradeep Sharma
|
|
|
|
Re: Export data using expdp to remote host [message #556555 is a reply to message #556553] |
Tue, 05 June 2012 04:43 |
pradies
Messages: 250 Registered: May 2008
|
Senior Member |
|
|
Hi Michal,
Thanks for your reply. According to requirement I want to export a schema and dump should be create on remote server not on the server. So if I will use the impdp command it will read a existing dump file (in my case test.dmp). but I want to create/export the dump file.
C:\>expdp directory=data_pump_dir logfile=test.log network_link=vxmldb schemas=test dumpfile=test.dmp
Export: Release 11.1.0.6.0 - 64bit Production on Tuesday, 05 June, 2012 15:05:48
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Username: system/************
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39170: Schema expression 'TEST' does not correspond to any schemas.
kindly clear me if I am wrong anywhere.
Thanks Again
Pradeep
|
|
|
|
Re: Export data using expdp to remote host [message #556561 is a reply to message #556559] |
Tue, 05 June 2012 05:40 |
pradies
Messages: 250 Registered: May 2008
|
Senior Member |
|
|
Hi Michal,
Quote:If you want to create a dump file on server B, you must connect on database on server B and access database on server A using the db link.
Quote:must connect on database on server B and access database on server A
confusing me ..... !!! please clear with example
Thanks
Pradeep
|
|
|
|
Re: Export data using expdp to remote host [message #556571 is a reply to message #556563] |
Tue, 05 June 2012 06:56 |
pradies
Messages: 250 Registered: May 2008
|
Senior Member |
|
|
hi Michal,
According to your solution I am doing the following
Quote:
On server B with ORACLE_HOME/ORACLE_SID set to database on B and TWO_TASKS not set (check "env"):
expdp x/y directory=data_pump_dir logfile=test.log network_link=vxmldb schemas=test dumpfile=test.dmp
Server A (DB running - vxmldb)
Server B (DB running - ncpr)
Server B (Db link name - vxmldb ) point to server A
Step -1 :: On Server B command prompt
SET ORACLE_SID=vxmldb
SET ORACLE_HOME=D:\app\Administrator\product\11.1.0\db_1
C:\>expdp system/**** directory=data_pump_dir logfile=test.log network_link=vxmldb schemas=test dumpfile=test.dmp
Export: Release 11.1.0.6.0 - 64bit Production on Tuesday, 05 June, 2012 17:18:03
Copyright (c) 2003, 2007, Oracle. All rights reserved.
UDE-12560: operation generated ORACLE error 12560
ORA-12560: TNS:protocol adapter error
And if I am changing ORACLE_SID=ncpr Then it is throwing the following error
C:\>expdp system/**** directory=data_pump_dir logfile=test.log network_link=vxmldb schemas=test dumpfile=test.dmp
Export: Release 11.1.0.6.0 - 64bit Production on Tuesday, 05 June, 2012 17:18:48
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39170: Schema expression 'TEST' does not correspond to any schemas.
Please tell me where I am wrong .
Thanks
Pradeep Sharma
|
|
|
|
Re: Export data using expdp to remote host [message #556713 is a reply to message #556574] |
Wed, 06 June 2012 04:45 |
pradies
Messages: 250 Registered: May 2008
|
Senior Member |
|
|
Hi Michal,
Thanks for your important reply. Its works.
One more thing I want to ask in this aspect that Any point of time, there is some network issue then dblink will not work. so at that time what will happen.
1) database export exit at that location with error.
2) database export (expdp) process wait for the dblink to be up.
Thanks Again.
Pradeep Sharma
|
|
|
|
|
Re: Export data using expdp to remote host [message #557269 is a reply to message #557267] |
Mon, 11 June 2012 07:19 |
pradies
Messages: 250 Registered: May 2008
|
Senior Member |
|
|
Hi shaan121,
thanks for your reply. But this process will import data from source to destination schema.
My Requirement was
Quote:
Is it possible to export dump using expdp to remote host.
As per the suggestion provided by Mr Michal, its done.
Thanks for your reply again.
Pradeep
|
|
|
|
|
|
Re: Export data using expdp to remote host [message #557384 is a reply to message #557269] |
Tue, 12 June 2012 06:36 |
|
x-oracle
Messages: 380 Registered: April 2011 Location: gujarat
|
Senior Member |
|
|
yeah you always welcome pradies
and yeah you can export this dmp file using network_link i just did this task i send you this steps how can i did this
bellow its my steps i just test it and its successful it
Here I have two computer
Name
1. Test 1
2. Test 2
On test 1 I have one database name Star
We perform this following steps on Test 1 pc (Star Database)
SQL> Create user roz identified by roz;
SQL> alter user roz default tablespace users;
SQL> alter user roz temporary tablespace temp;
SQL> grant dba to roz;
After that connect to this roz user and create directory name practice
SQL> connect roz/roz@star
SQL> create or replace directory practice as 'E:\practice';
After that create dblink on this star database in roz user
SQL> create database link ts connect to roz identified by roz using 'star';
Now perform this export task on this test2 pc remotely
before using this you have to create service name star on your test 2 pc
to create service goto START - All Programm - oracle-Oradb10g_home1 -
Configuration and Migration Tools - Net Manager - and add this star service on this test 2 computer
after that export this using this syntax on this test 2 pc remotely
E:\oracle\product\10.2.0\db_1\bin> expdp roz/roz@star directory=practice network_link=ts dumpfile=test.dmp
Now goto this test 1 pc and open goto this E drive and open this practice folder you can find this test.dmp file there
|
|
|