oracle导入数据

注意:

1.保证在E:\oracleData盘下有一个fund_data文件夹

2.保证在E:\oracleData盘下有一个导入文件, ds.dmp.

导入数据库的步骤

1.登录sqlplus,在命令行输入sqlplus username/password@sid

2.创建临时表空间

DROP TABLESPACE fund_temp INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;

create temporary tablespace fund_temp

tempfile 'E:\oracleData\fund_data\fund_temp.dbf' 

size 32m 

autoextend on 

next 32m maxsize 2048m 

extent management local;

3.创建数据表空间

DROP TABLESPACE OTSDATA1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;

create tablespace OTSDATA1  

logging 

datafile 'E:\oracleData\fund_data\OTSDATA1.dbf' 

size 32m 

autoextend on 

next 32m maxsize 2048m 

extent management local;

create tablespace OTSDATA3  

logging 

datafile 'E:\oracleData\fund_data\OTSDATA3.dbf' 

size 32m 

autoextend on 

next 32m maxsize 2048m 

extent management local;

4.创建用户

drop user c##ds cascade;

create user c##ds identified by ds  

default tablespace OTSDATA1

temporary tablespace fund_temp; 

5.给用户授权

grant connect,resource,dba to c##ds;

6.在windows命令行执行导入(在cmd下)

imp c##ds/ds@orcl file=E:\oracleData\ds.dmp fromuser=ds touser=c##ds ignore=true


你可能感兴趣的:(oracle)