Make an Oracle export to asm diskgroup

Introduction

Good day to you all , quick blog on how to make an export in Oracle with datapump to an ASM diskgroup. Background of such an action could be a scenario that your database server does not provide “normal filesystem”.

  • In an Asm Diskgroup:
    I have created ( with asmcmd +DATA02/MYDEV/DPDUMP)
  • In the Oracle database:
    create or replace directory ASM_DUMP as ‘+DATA02/MYDEV/DPDUMP’;
    grant read,write on directory asm_dump to system;
  • On Linux create this subdirectory, (note it is mandatory to be able to write during the expdp to a NON asm Filesystem):
    /opt/oracle/TOSCAOSV1/admin/restore/DPLOG.
  • In the Oracle database create a directory which will hold the logfile of the expdp:
    create or replace directory ASMDP_LOGDIR as ‘/opt/oracle/MYDB1/admin/restore/DPLOG’;
    grant read,write on directory ASMDP_LOGDIR to system;
  • Seeing is believing so lets check:
    Set lines 2000
    select * from dba_directories;

DSYS ASM_DUMP
+DATA02/TOSCAOSV/DPDUMP

SYS ASMDP_LOGDIR
/opt/oracle/TOSCAOSV2/admin/restore/DPLOG

  1. Create a Parfile for the expdp
    PARALLEL=1
    userid=system
    directory=ASM_DUMP
    logfile=ASMDP_LOGDIR:myMyDevDp.log
    DUMPFILE=myMyDev_%U.dmp
    FILESIZE=4G
    COMPRESSION=ALL
    JOB_NAME=backup_MyDev_schemas
    SCHEMAS=TOSCAADMIN

oracle@mysrvr1:/opt/oracle/MYDB1/admin/DP [MYDB1]# ls -ltr
total 4
-rw-r–r–. 1 oracle dba 189 Jun 15 13:02 expdp.par

  1. Run the datapump: expdp parfile=/opt/oracle/MYDB1/admin/DP/expdp.par

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s