Database Reference
In-Depth Information
Taking an Export
A small amount of setup is required when you run a Data Pump export job. Here are the steps:
1.
Create a database directory object that points to an OS directory that you want to
write/read Data Pump files to/from.
2.
Grant read and write privileges on the directory object to the database user running the
export.
From the OS prompt, run the expdp utility.
3.
Step 1. Creating a Database Directory Object
Before you run a Data Pump job, first create a database directory object that corresponds to a physical location on
disk. This location will be used to hold the export and log files and should be a location where you know you have
plenty of disk space to accommodate the amount of data being exported.
Use the CREATE DIRECTORY command to accomplish this task. This example creates a directory named dp_dir
and specifies that it is to map to the /oradump physical location on disk:
SQL> create directory dp_dir as '/oradump';
To view the details of the newly created directory, issue this query:
SQL> select owner, directory_name, directory_path from dba_directories;
Here is some sample output:
OWNER DIRECTORY_NAME DIRECTORY_PATH
---------- --------------- --------------------
SYS DP_DIR /oradump
Keep in mind that the directory path specified has to physically exist on the database server. Furthermore, the
directory has to be one that the oracle OS user has read/write access to. Finally, the user performing the Data Pump
operations needs to be granted read/write access to the directory object (see step 2).
If you don't specify the DIRECTORY parameter when exporting or importing, Data Pump will attempt to use the
default database directory object (as previously discussed, this maps to ORACLE_HOME/rdbms/log ). I don't recommend
using the default directory for two reasons:
If you're exporting large amounts of data, it's better to have on disk the preferred location,
where you know you have enough room to accommodate your disk space requirements.
If you use the default directory, you run the risk of inadvertently filling up the mount point
associated with ORACLE_HOME and then potentially hanging your database.
If you grant privileges to non-DBA users to take exports, you don't want them creating large
dump files in a location associated with ORACLE_HOME . Again, you don't want the mount point
associated with ORACLE_HOME to become full to the detriment of your database.
 
Search WWH ::




Custom Search