1、数据泵导入
1.1、数据泵导入
将导入放在文章最开头原因是,因为在大多数情况下,是接触不到生产服务器的,直接由别人给的DMP文件,然后自己导入,但是一般企业级都是实用数据泵导出的。
1.1.1、登录终端
# 切换到 Oracle用户
su - oracle
# 创建数据文件夹,后边所有操作都在该目录下执行
mkdir -p /home/oracle/20210910/
1.1.2、新建用户
# 管理员账户登录
sqlplus / as sysdba
# 创建表空间文件
create tablespace HMICMSPACE logging datafile
'/home/oracle/20210910/HMICMSPACE.dbf' size 100m autoextend on next 100m maxsize 2048m extent management local;
# 在创建用户之前先查看你要创建的用户名存不存在
SELECT * FROM ALL_USERS WHERE USERNAME LIKE '%HM%';
# 创建用户,并指定上边创建的表空间名称
create user HMICMS identified by "dhcc1234" default tablespac HMICMSPACE temporary tablespace temp profile default;
# 授权用户
grant connect to HMICMS;
grant resource to HMICMS;
grant alter any table to HMICMS;