假设oracle有个全新的数据库orcl,现在要把数据库文件(.dmp)导入这个全新的数据库orcl中。详细步骤如下: 
 
1. 创建表空间 
例如: 
create tablespace test(表空间名称) datafile 'F:\oracle\oradata\orcl\test.dmp'(表空间的存储位置) 
size 50M (表空间大小,单位兆) 
autoextend on next 50M 
maxsize unlimited 
extent management local autoallocate 
segment space management auto; 
 
2. 创建用户并将表空间分配给用户 
create user test(用户名) 
identified by test(密码) 
default tablespace test(表空间名称); 
 
3. 给用户授予权限 
grant dba,connect,resource, 
aq_administrator_role,aq_user_role, 
authenticateduser to test(用户名); 
 
4. 导入数据(在命令提示符窗口) 
imp test/test@orcl 
BUFFER=64000 
file=D:\test.dmp(dmp文件所在位置) 
FULL=y(FULL和TABLES是两种导入模式,TABLES可以只导入部分表,TABLES=(tab1,tab2,...)) 
COMMIT=y  IGNORE=y  LOG=test.log 

相关文章:

  • 2021-11-30
  • 2021-08-01
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-09
  • 2021-10-29
  • 2021-12-29
  • 2021-12-03
  • 2021-11-29
  • 2021-06-28
  • 2021-11-20
相关资源
相似解决方案