本文主要是介绍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;
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;
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
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
大致操作如上。
这篇关于Oracle用dos命令imp数据库dmp文件的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!