Skip to main content

How to export oracle RAC database using expdp


<<Back to Oracle DATAPUMP Main Page

Running expdp on Multiple RAC Instances in Parallel

There are few points which must be considered while running an export job on oracle RAC database.
  • Whether you wish to start the export job on all or selected list of Instances or on the Instances where from you are invoking expdp.
  • If you are using CLUSTER=YES (by default) you are starting export worker process on other Oracle RAC instances too.
  • If you are  using CLUSTER=YES (by default) then the shared directory path must be available on all the Instances.
  • Use of the CLUSTER=YES parameter may affect performance because there is some additional overhead in distributing the export job across Oracle RAC instances. For small jobs, it may be better to specify CLUSTER=NO.
Example:
parfile content
directory=ASM_DUMP
dumpfile=EXP_TEST_%U.dmp
FILESIZE=10G
logfile=EXT:EXP_TEST.log
schemas=TEST01
CLUSTER=NO


TNS Used by expdp
Note: It resolves cluster and therefore can connect to any instance of the cluster
TEST_EXP =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac01-scan.oracle.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = test.oracle.com)
    )
  )


$ tnsping TEST_EXP
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac01-scan.oracle.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test.oracle.com)))
OK (10 msec)


$ expdp system@TEST_EXP parfile=TEST_EXP.par
Export: Release 12.1.0.2.0 - Production on Wed Oct 10 15:04:20 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Advanced Analytics and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_02":  system/********@TEST_EXP parfile=TEST_EXP.par
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 267.7 GB.........

....................................................................................................................................................
....................................................................................................................................................
Export> status
Job: SYS_EXPORT_SCHEMA_02
  Operation: EXPORT
  Mode: SCHEMA
  State: EXECUTING
  Bytes Processed: 0
  Current Parallelism: 1
  Job Error Count: 0
  Dump File: +DATA/exp/EXP_TEST_01.dmp
    size: 10,737,418,240
    bytes written: 4,096
  Dump File: +DATA/exp/EXP_TEST_%u.dmp
    size: 10,737,418,240

Worker 1 Status:
  Instance ID: 1
  Instance name: TEST1
  Host name: node1.oracle.com
  Process Name: DW00
  State: EXECUTING
  Object Schema: TEST01
  Object Name: TEST
  Object Type: SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
  Completed Objects: 720
  Worker Parallelism: 1


Note: As you can see export stared on node1 (TEST1 Instance).
Let us make a little change in parameter file and start the export with this new parfile 

parfile content

directory=ASM_DUMP
dumpfile=EXP_TEST_%U.dmp
FILESIZE=10G
logfile=EXT:EXP_TEST.log
schemas=TEST01
CLUSTER=YES
PARALLEL=4

$ expdp system@TEST_EXP  parfile=TEST_EXP.par
Export: Release 12.1.0.2.0 - Production on Wed Oct 10 15:43:40 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Password:
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Advanced Analytics and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_03":  system/********@TEST_EXP parfile=TEST_EXP.par
Estimate in progress using BLOCKS method...
...................................................................................................................................................
....................................................................................................................................................

Export> status

Job: SYS_EXPORT_SCHEMA_03
  Operation: EXPORT
  Mode: SCHEMA
  State: EXECUTING
  Bytes Processed: 0
  Current Parallelism: 4
  Job Error Count: 0
  Dump File: +DATA/exp/EXP_TEST_%u.dmp
    size: 10,737,418,240
  Dump File: +DATA/exp/EXP_TEST_01.dmp
    size: 10,737,418,240
    bytes written: 4,096
  Dump File: +DATA/exp/EXP_TEST_02.dmp
    size: 10,737,418,240
    bytes written: 4,096
  Dump File: +DATA/exp/EXP_TEST_03.dmp
    size: 10,737,418,240
    bytes written: 4,096
  Dump File: +DATA/exp/EXP_TEST_04.dmp
    size: 10,737,418,240
    bytes written: 4,096
Worker 1 Status:
  Instance ID: 1
  Instance name: TEST1
  Host name:node1.oracle.com

  Process Name: DW00
  State: EXECUTING
  Object Schema: TEST01
  Object Name: EMP
  Object Type: SCHEMA_EXPORT/TABLE/TABLE
  Completed Objects: 842
  Worker Parallelism: 1
Worker 2 Status:
  Instance ID: 2
  Instance name: TEST2
  Host name: node2.oracle.com

  Process Name: DW00
  State: EXECUTING
  Object Schema: TEST01
  Object Name: EMP_HIST
  Object Type: SCHEMA_EXPORT/TABLE/TABLE_DATA
  Completed Objects: 1
  Total Objects: 13,115
  Worker Parallelism: 1
Worker 3 Status:
  Instance ID: 1
  Instance name: TEST1
  Host name: node1.oracle.com

  Process Name: DW02
  State: EXECUTING
  Object Schema: TEST01
  Object Name: DEPT
  Object Type: SCHEMA_EXPORT/TABLE/TABLE_DATA
  Completed Objects: 1
  Total Objects: 13,115
  Completed Rows: 1,307,382
  Worker Parallelism: 1
Worker 4 Status:
  Instance ID: 2
  Instance name: TEST2
  Host name:node2.oracle.com

  Process Name: DW01
  State: EXECUTING
  Object Schema: TEST01
  Object Name: LOG
  Object Type: SCHEMA_EXPORT/TABLE/TABLE_DATA
  Completed Objects: 1
  Total Objects: 13,115
  Worker Parallelism: 1

Note: As you can see export stared on both the nodes node1 & node2 (TEST1 & TEST2 Instance).

Comments