Data Pump -- Example

Example:

  • 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 demo;

  • Revoke access from a directory:

SQL> REVOKE write ON DIRECTORY tmp FROM demo;

 

  • 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 demo;

SQL> GRANT drop any directory

 

export PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/oracle/10gR2/db_1/bin

-------------------------------------------------------------------------------------------------------------------

impdp demo/tartan directory=tmp dumpfile=agile_20120128-1_01.dmp,agile_20120128-1_02.dmp,agile_20120128-1_03.dmp,agile_20120128-1_04.dmp Remap_schema=agile:demo; 

impdp demo/tartan@agile93g directory=tmp dumpfile=AGIL_00025149_C1_DP__0529132942.DMP Remap_schema=agile:demo tables=agile.nodetable,agile.propertytable,agile.adminmsatt,agile.admincriteria;

你可能感兴趣的:(Data Pump -- Example)