Breaking News

Datapump

Check Directories

==================

 

SQL> desc DBA_DIRECTORIES;

 

SQL> select * from dba_directories where directory_name=’DATA_PUMP_DIR’;

 

===================================================================

Change datapump directory

===================================================================

 

SQL> CREATE OR REPLACE DIRECTORY “DATA_PUMP_DIR” as ‘/app/oracle/product/11.2.0/dbhome_1/rdbms/log/’;

 

===================================================================

Create a database directory:

===================================================================

 

SQL> CREATE OR REPLACE DIRECTORY tmp AS ‘/tmp’;

 

================================================

Grant a user access to the directory:

================================================

SQL> GRANT read, write ON DIRECTORY tmp TO scott;

================================================

Revoke access from a directory:

================================================

SQL> REVOKE write ON DIRECTORY tmp FROM scott;

=====================================================================Allow a user to create their own directories (not recommended, seen as a security risk as users can overwrite any file on the OS):

=====================================================================

SQL> GRANT create any directory TO scott;

SQL> GRANT drop any directory TO scott;

=====================================================================Export Full Schema

=====================================================================expdp system/oracle   directory=datapump dumpfile=full.dmp logfile=full.log full=y

    About Muhammad Mubashir Khan

    Leave a Reply