创建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