Database Reference
In-Depth Information
A tablespace-level import will attempt to create any tables and indexes within the tablespace. The import doesn't
try to recreate the tablespaces themselves.
■
there is also a transportable tablespace mode export. See the section “Copying Data Files”, later in
this chapter.
Note
Transferring Data
One of the main uses of Data Pump is the copying of data from one database to another. Often, source and destination
databases are located in data centers thousands of miles apart. Data Pump offers several powerful features for
efficiently copying data:
•
Network link
•
Copying data files (transportable tablespaces)
•
External tables
Using a network link allows you to take an export and import it into the destination database without having to
create a dump file. This is a very efficient way of moving data.
Oracle also provides the transportable tablespace feature, which lets you copy the data files from a source
database to the destination and then use Data Pump to transfer the associated metadata. These two techniques are
described in the following sections.
Exporting and Importing Directly Across the Network
Suppose you have two database environments—a production database running on a Solaris box and a test database
running on a Linux server. Your boss comes to you with these requirements:
•
Make a copy of the production database on the Solaris box.
•
Import the copy into the testing database on the Linux server.
•
Change the names of the schemas when importing so as to meet the testing database
standards for names.
First, consider the steps required to transfer data from one database to another, using the old
exp
/
imp
utilities.
The steps would look something like this:
1.
Export the production database (which creates a dump file on the database server).
2.
Copy the dump file to the testing database server.
3.
Import the dump file into the testing database.
You can perform those same steps using Data Pump. However, Data Pump provides a much more efficient
and transparent method for executing those steps. If you have direct network connectivity between the production
and testing database servers, you can take an export and directly import it into your target database without having
to create or copy any dump files. Furthermore, you can rename schemas on the fly as you perform the import.
Additionally, it doesn't matter if the source database is running on an OS different from that of the target database.