How to export the data of Physical standby database (DataGuard) using the network link.
Posted by Mir Sayeed Hassan on September 17th, 2025
How to export the data of Physical standby database (DataGuard) using the network link.
Note: Consider your production database has primary and standby database, during the business hours it is not recommend to take the export of data from the primary database due to the performance issue might occur., Therefore we can perform the export of data from the Physical standby database (Data Guard)
– Data Guard database in in read-only state which is active dataguard.
– Datapump jobs can be only run in read-write state., therefore we cannot perform on standby database.
– Hence to perform this operation we should use the NETWORL_LINK and execute the datapump jobs from primary database.
Check the status of the physical standby database.
SQL> select database_name,open_mode, database_role from v$database; DATABASE_NAME OPEN_MODE DATABASE_ROLE ----------------------------------------------------------- ORASTBYDB READ ONLY WITH APPLY PHYSICAL STANDBY
Create a DB Link on primary db (Pointing to Standby db as entried from tnsnames.ora)
Login to Primary db
SQL> select name, open_mode, database_role from V$database; NAME OPEN_MODE DATABASE_ROLE ------------------------------------------ ORAPRIDB READ WRITE PRIMARY
SQL> create public database link expdp_link_stby connect to hassan identified by hassan123 using 'ORASTBYDB'; Database link created.
SQL> select sysdate from dual@expdp_link_stby ; SYSDATE --------- 17-SEP-25
Create a directory at OS & DB Level
OS Level
[oracle@orapridb ~]$ mkdir -p /backup/dump_link_stby
DB Level
SQL> create directory dump_link_stby as '/backup/dump_link_stby/'; Directory created.
SQL> grant read, write on directory dump_link_stby to sys; Grant succeeded.
SQL> grant read, write on directory dump_link_stby to system; Grant succeeded.
Run the export of the “Schema:HASSAN” by using the standby network link
[oracle@orapridb dump_link_stby]$ expdp directory=dump_link_stby network_link=expdp_link_stby dumpfile=standby_sch_hassan.dmp logfile=standby_sch_hassan.log schemas=hassan Export: Release 11.2.0.4.0 - Production on Wed Sep 17 15:49:15 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Username: / as sysdba Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=dump_link_stby network_link=expdp_link_stby dumpfile=standby_sch_hassan.dmp logfile=standby_sch_hassan.log schemas=hassan Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 10.06 MB Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE . . exported "HASSAN"."TEST1" 8.494 MB 87568 rows . . exported "HASSAN"."TEST2" 14.98 KB 39 rows Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is: /backup/dump_link_stby/standby_sch_hassan.dmp Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Sep 17 15:49:55 2025 elapsed 0 00:00:36






