創建oracle數據庫的表空間、用戶、目錄、導入\導出文件等信息


1、創建表空間

  create tablespace ts_aw

  logging 

  datafile 'd:\app\Administrator\product\tablespace\ts_aw.dbf'

  size 10M

  autoextend on

  next 5M

  maxsize 20480M;

2、創建用戶

  create user hb identified by hb

  default tablespace ts_aw;

3、給用戶授權限

  grant connect,resource,dba to hb;

4、創建目錄

  create or replace directory data_pump_dir as 

  'E:\data_pump_dir';

  grant read,write on directory data_pump_dir to hb;

  grant exp_full_database,imp_full_database to hb;

  exit;

5、導入文件

  imp userid=hb/hb@hb file=F:\c3\project\tzhb\hb.dmp full=y;

  或

  impdp hb/hb directory=data_pump_dir

  dumpfile=gts.dmp table_exists_action=append

  data_options=skip_constraint_errors nologfile=y;

6、導出文件

  expdp hb/hb directory=data_dump_dir dumpfile=hb.dmp

  logfile=hb.log

  compression=all schemas=hb include=table:"\like 'GT%'\";

  或者

  exp hb/hb file=文件路徑\xxx.dmp;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM