Oracle用dos命令imp数据库dmp文件

     之前一直用的是sqlserver ,乍一用Oracle还有点方,闲话就不多说了。这几天主要做的是Oracle,Oracle轻量客户端和plsql的安装配置,在网上找的教程,主要是配置环境变量path和ora这里容易出问题。plsql的话sys权限最大。然后就是用dos导入dmp的操作了,这卡了挺久的,得幸亏度娘威武。
    dos导入这块,主要进行以下操作:
1.创建表空间:
create tablespace AA01
datafile 'D:\Oracle11g\product\11.2.0\userdata1\AA01.dmp'
size 60m
autoextend on next 60M
maxsize unlimited
extent management local autoallocate
segment space management auto;
2.创建用户,将表空间赋给他

create user AA01
identified by Oracle11g
default tablespace AA01;
3.赋予相应权限:
网上说普通用户这个就行:grant dba,connect,resource,
aq_administrator_role,aq_user_role,
authenticateduser
 to AA01;但我弄完出了问题  ora959 我怀疑我权限赋少了,就又赋了好多权限 ,可能有的并不是你需要的:
grant create session to AA01;
grant unlimited tablespace to AA01;
grant create tablespace to AA01;
grant alter tablespace to AA01;
grant drop tablespace to AA01;
grant manage tablespace to AA01;
grant create table to AA01;
grant create view to AA01;
grant create trigger to AA01;
grant create procedure to AA01;
grant create sequence to AA01;
grant create rollback segment to AA01;
grant alter rollback segment to AA01;
grant drop rollback segment to AA01;
grant create synonym to AA01;
grant create public synonym to AA01;
grant drop public synonym to AA01;
grant create user to AA01;
grant alter user to AA01;
grant become user to AA01;
grant drop user to AA01;
grant create role to AA01;
grant create profile to AA01;
grant alter profile to AA01;
grant drop profile to AA01;
grant select any dictionary to AA01
酱紫。
4.dos命令导入dmp: imp 用户名/密码@实例名  file='你放要导入的dmp的目录(一直到这个dmp文件)'  full=y

大致操作如上。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值