How to export a table based on WHERE condition.
Create a parameter file exp.par with below contents
userid='hrm/123'directory=exptestdumpfile=attendance.DMPtables=attendancequery="WHERE employee_no LIKE '12345' "logfile=attendance.log
Invoke expdp calling the parameter fileexpdp parfile=exp.par
Export: Release 19.0.0.0.0 - Production on Thu Mar 6 12:51:09 2025Version 19.25.0.0.0Copyright (c) 1982, 2024, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionStarting "HRM"."SYS_EXPORT_TABLE_01": hrm/******** parfile=exp.parProcessing object type TABLE_EXPORT/TABLE/TABLE_DATAProcessing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSProcessing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERProcessing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/INDEX/INDEXProcessing object type TABLE_EXPORT/TABLE/TRIGGER. . exported "HRM"."attendance" 145.4 KB 491 rowsMaster table "HRM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded******************************************************************************Dump file set for HRM.SYS_EXPORT_TABLE_01 is: E:\BACKUPS_FOR_RESTORE\attendance.DMPJob "HRM"."SYS_EXPORT_TABLE_01" successfully completed at Thu Mar 6 12:51:27 2025 elapsed 0 00:00:17
No comments:
Post a Comment