Bo's Oracle Station

查看: 1754|回复: 0

第47次: 2014-10-14

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2014-10-16 11:07:23 | 显示全部楼层 |阅读模式
  1. select  * from dba_directories;

  2. select  * from dba_tab_privs tp where tp.grantee='HR';

  3. select  * from dba_datapump_jobs;

  4. select  * from full_job;

  5. select  username from dba_users;

  6. select  * from dba_objects o where o.owner='HR';

  7. grant resource , connect to hr;

  8. grant all on directory dir1 to hr;

  9. select  * from dba_source where name='SECURE_EMPLOYEES';
复制代码
  1. expdp hr/oracle_4U  directory=dir1 dumpfile=t_bank_invoice.dmp  tables=T_BANK_INVOICE

  2. impdp  hr/oracle_4U directory=mydir dumpfile=t_bank_invoice.dmp

  3. expdp \'sys/oracle_4U as sysdba\' attach=full_job

  4. impdp  \'sys/oracle_4U as sysdba\' directory=dir1 dumpfile=full.img schemas=hr

  5. expdp hr/oracle_4U directory=dir1 dumpfile=my.dmp  schemas=hr job_name=my_job  exclude=table:"in \(\'T_BANK_INVOICE\'\)", procedure:" in \(\'SECURE_DML\'\)"  "query='employees:where department_id=90'"


  6. SQL> conn / as sysdba
  7. Connected.
  8. SQL> create user hr identified by oracle_4U ;

  9. User created.

  10. SQL> grant connect , resource to hr;

  11. Grant succeeded.

  12. impdp  \'sys/oracle_4U as sysdba\' directory=dir1 dumpfile=full.img schemas=hr

  13. expdp  \'sys/oracle_4U as sysdba\' directory=dir1 dumpfile=tablespace.dmp  tablespaces=tbs05217

  14. impdp \'sys/oracle_4U as sysdba\' directory=mydir dumpfile=tablespace.dmp  remap_tablespace=TBS05217:USERS

复制代码

my2.par:
  1. directory=dir1
  2. dumpfile=my2.dmp  
  3. schemas=hr
  4. job_name=my2_job  
  5. exclude=table:"in ('T_BANK_INVOICE')", procedure:"in ('SECURE_DML')"  
  6. query='employees:where department_id=90'
  7. flashback_time='2014-10-14:20:34:12'
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-12 05:14 , Processed in 0.039656 second(s), 24 queries .

快速回复 返回顶部 返回列表