Link to home
Start Free TrialLog in
Avatar of thomasliju
thomasliju

asked on

export

I want to export schema sch1 from db1 which is residing in serv1 to a location /back
which is in serv2

what is the command

how we make directory in db1 and grants..

before we start export using expdp
we have to create directory,.
I am confused about the syntax to create directory..
Avatar of johnsone
johnsone
Flag of United States of America image

The command to create a directory is CREATE DIRECTORY, documentation is here -> http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_5008.htm#SQLRF01207  Good examples in the doc.  What are you confused about with this command?

I am not an expert on expdp, however, I don't believe you can do what you are asking.  The directory has to be on serv1 to use expdp.  What you would need to do is have the client installed on serv2 and run the exp command there.  Or, you could have an NFS mount of the directory, but I wouldn't recommend that.
In oracle, this is to create and use aliases that are platform independent.  One example of the syntax is at http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5007.htm.

Is this clear to you, or would an example help?

dvz
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I just came across an 11gR2 doc that implies a NETWORK_LINK eliminates the need to pass a dumpfile, classic style.  One more feature for my to-explore list....

"Specifying a connect identifier when you invoke the Import utility is different from performing an import operation using the NETWORK_LINK parameter. When you start an import operation and specify a connect identifier, the local Import client connects to the database instance identified by the connect identifier and imports the data from the dump file named on the command line to that database instance.

Whereas, when you perform an import using the NETWORK_LINK parameter, the import is performed using a database link, and there is no dump file involved. (A database link is a connection between two physical database servers that allows a client to access them as one logical database.)"  source: http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#SUTIL300
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

The issue with NETWORK_LINK you need to create a database link (DBLINK) between the two databases.  This is not always viable, allowed or desired depending on what databases you are exporting and importing.

For example:
If you are taking data from production and refreshing a test or dev database, you probably should NEVER create a database link between a production and non-production database.
Yeah, I suppose we have a subscriber or two who would want to try that.....
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.