Oracle常用命令-用户、表空间、赋权限、导入导出

1.1   删除表空间

drop tablespace QBKJ including contents and datafiles;

1.2   删除用户

drop user admin cascade;

1.3   创建表空间

create tablespace QBKJ  

datafile 'D:\app\oracle_tablespaces\QBKJ.dbf'  

size 1024M  

autoextend on next 5M maxsize 20480M;

 注意:创建表空间时,路径要有,如oracle_tablespaces这个文件夹要先创建好

1.4   创建用户

create user admin identified by "qb123456" default tablespace QBKJ;

1.5   给用户赋权限

grant connect,resource to admin; 

grant dba to admin;

grant create any sequence to admin; 

grant create any table to admin; 

grant delete any table to admin; 

grant insert any table to admin; 

grant select any table to admin; 

grant unlimited tablespace to admin; 

grant execute any procedure to admin; 

grant update any table to admin; 

grant create any view to admin;

 

 

1.6   导入/导出数据(此种命令导入方式实在cmd的dos窗口下)

1.部分表导致:

imp qbkjpro/qb123456@localhost/orcl file="D:\dmp_150\qbkjhlw.DMP"  tables=(vacc_dic_tmp,vac_child_info) ignore=y

2.全表导入

imp admin/qb123456@localhost/orcl file="E:\奇兵科技\qbkj.dmp"  ignore=y full=y

 

 

ignore=y:表示已存在表忽略

 

1.全表导出:

exp admin/qb123456@localhost/orcl file="C:\Users\Administrator\Desktop\admin0218.dmp"

2.部分表导出:

exp admin/qb123456@localhost/orcl file="C:\Users\Administrator\Desktop\admin0218.dmp"  tables=(vacc_dic_tmp,vac_child_info) 

转载于:https://www.cnblogs.com/banxian-yi/p/10636457.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值