oracle迁移数据
程序员文章站
2022-06-03 13:53:46
...
往本地oracle的xxx_user用户迁移数据,生成迁移日志
imp xxx_user/[email protected]/orcl file=F:\xxx_user_20191203.dmp fromuser=xxx_user touser=xxx_user log=d:\xxx_user.log
创建用户xxx_user
create user xxx_user identified by xxx_user default tablespace test;
grant connect to xxx_user;
grant dba to xxx_user;
revoke unlimited tablespace from xxx_user;
alter user xxx_user quota unlimited on test;
grant select any table to xxx_user;
说明
create user xxx_user(用户名) identified by xxx_user(用户密码) default tablespace test(默认表空间);
grant connect to xxx_user;(授予连接权限:)
grant dba to xxx_user;(授予使用空间权限:)
revoke unlimited tablespace from xxx_user;(撤销在其他表空间里随意建表权限,这个位置很关键)
alter user xxx_user quota unlimited on test;(表空间配额无限制)
grant select any table to xxx_user;(分配权限SELECT所有表)
创建表空间test(工作空间)
create tablespace test datafile 'D:\oracle\oradata\orcl\test.dbf' size 1000M;
alter database datafile 'D:\oracle\oradata\orcl\test.dbf' autoextend on;