Oracle使用数据泵导入数据

登陆
sqlplus User/Password@database as sysdba;

步骤1:创建表空间

CREATE TABLESPACE User_IDX LOGGING DATAFILE ‘D:\xx001.DBF’ SIZE 500M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;

–添加数据文件
ALTER TABLESPACE User_DATA ADD DATAFILE ‘D:\xx002.dbf’ SIZE 100M AUTOEXTEND ON NEXT 50M MAXSIZE unlimited;

步骤2:创建用户

CREATE USER User IDENTIFIED BY Password ACCOUNT UNLOCK DEFAULT TABLESPACE User_DATA;
GRANT DBA, CONNECT,RESOURCE TO User;

步骤3:创建目录:
CREATE OR REPLACE DIRECTORY dt_1 as ‘E:\dt_1’;
GRANT read, write ON DIRECTORY dt_1 TO User;

步骤4:把文件放入此目录中然后导入

impdp User/Password@database directory=dt_1 table_exists_action=replace dumpfile=ABC.DMP logfile=20191001.log;

猜你喜欢

转载自blog.csdn.net/hardyer/article/details/103259898
今日推荐