How to export table from MALLIK user in Oracle database?
1. create directory inside database pointing to physical directory at OS level & grant read and write permission
[oracle@oraclelab1 DUMP]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 6 08:44:29 2024
Version 19.17.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
SQL> CREATE OR REPLACE DIRECTORY TEST_DIR AS '/u01/DUMP';
Directory created.
SQL> GRANT READ, WRITE ON DIRECTORY TEST_DIR TO system;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
[oracle@oraclelab1 DUMP]$
2. export table from Mallik user
[oracle@oraclelab1 DUMP]$ expdp system/Mallik123 tables=MALLIK.STUDENT1 directory=TEST_DIR dumpfile=STUDENT.dmp logfile=expdpSTUDENT.log
Export: Release 19.0.0.0.0 - Production on Tue Aug 6 08:46:20 2024
Version 19.17.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** tables=MALLIK.STUDENT1 directory=TEST_DIR dumpfile=STUDENT.dmp logfile=expdpSTUDENT.log
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "MALLIK"."STUDENT1" 6.390 KB 2 rows
Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:
/u01/DUMP/STUDENT.dmp
Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at Tue Aug 6 08:46:37 2024 elapsed 0 00:00:17
[oracle@oraclelab1 DUMP]$ ls -ltrh
total 180K
-rw-r-----. 1 oracle oinstall 176K Aug 6 08:46 STUDENT.dmp
-rw-r--r--. 1 oracle oinstall 1.1K Aug 6 08:46 expdpSTUDENT.log
[oracle@oraclelab1 DUMP]$
No comments:
Post a Comment