Data Pump Export to ASM

swiss_army_knife
I usually do the data pump export to a file system that is large enough to hold my export files. However, sometimes I don’t have any cluster file system available for my export data. But there is tons of free space on my RAC DB’s ASM. Of course, I would choose to backup to ASM as a fast alternative to my regular approach. ASM is my swiss army knife for everything. Here is the detail of the steps:

1. Create a Directory in ASM for the dumpfile
Logon as grid user and run the following commands.

asmcmd
lsdg 
cd +RECO/MYDEMO
mkdir DPDUMP

2. Create an Oracle Directory in the database to use the dumpfile
$ sqlplus / as sysdba

create or replace directory ASM_DUMP as '+RECO/MYDEMO/DPDUMP';
grant read,write on directory asm_dump to system;

3. Create a Unix directory for the logfile
$ mkdir /home/wzhou/log

4. Create an Oracle Directory for the logfile

create or replace directory ASMDP_LOGDIR as '/home/wzhou/log';
grant read,write on directory ASMDP_LOGDIR to system;

select * from dba_directories;

5. Create a parameter file for the datapump export
cd /home/wzhou/etc
$ vi expdp_mydemo_schemas.par
Input the following content in the expdp_mydemo_schemas.par file.

PARALLEL=6
userid=system/system_password
directory=ASM_DUMP
logfile=ASMDP_LOGDIR:mydemo_expdp_schemas.log
DUMPFILE=mydemo_schemas_%U.dmp
METRICS=Y
FILESIZE=4G
COMPRESSION=ALL
JOB_NAME=backup_mydemo_schemas
SCHEMAS=
SUPPLATFORM,
MYDW,
MYMDS

6. Run datapump export
$ expdp parfile=expdp_mydemo_schemas.par

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s