1.创建表空间
create tablespace example_tablespace datafile 'e:****.dbf' size 10m reuse autoextend on next 1m maxsize unlimited;
2.创建用户,指定表空间,临时表空间
create user username identified by password default tablespace usertablespace temporary tablespace temp;
3.IMP导入数据库文件注意
SQL> grant resource,connect to username;
grant dba to username;DBA权限是必需的
一般默认导入的表空间是导出时候的表空间
revoke unlimited tablespace from username;
alter user username quota 0 on users;表空间限额设置
alter user username quota unlimited on user_define_tablespace;
imp username/password file='e:***.dbf' tablespaces=tbs fromuser=sourcename touser=targetname log='e:a.txt'
4.imp导入用户
imp username/password file=***.imp fromuser=sourcename touser=targetname
5.imp导入指定表
imp username/password file=***.imp tables=(tablename)