--創(chuàng)建表空間
create tablespace QHDZW
datafile 'D:\app\lyl\product\11.2.0\dbhome_1\QHDZW.dbf'
size 50M
autoextend on next 50m maxsize 2048m
extent management local;
--創(chuàng)建臨時(shí)表空間
create temporary tablespace qhdzw_temp
tempfile
'D:\app\lyl\product\11.2.0\dbhome_1\qhdzw_temp.dbf'
size 32m
autoextend on next 32m maxsize 1024m
extent management local;
--創(chuàng)建用戶(hù)
create user qhd identified by qhd default tablespace QHDZW
temporary tablespace qhdzw_temp;
--用戶(hù)授權(quán)
grant connect,resource to qhd;
grant dba to qhd;
-----------------為了防止臨時(shí)表空間超,增加臨時(shí)表空間
alter tablespace QHDZW
add datafile 'D:\APP\LYL\PRODUCT\11.2.0\DBHOME_1\QHDZW02.DBF'
size 1024M autoextend on next 50M maxsize unlimited;
alter database datafile 'D:\APP\LYL\PRODUCT\11.2.0\DBHOME_1\QHDZW02.DBF' autoextend on;
alter tablespace QHDZW
add datafile 'D:\APP\LYL\PRODUCT\11.2.0\DBHOME_1\QHDZW03.DBF'
size 1024M autoextend on next 50M maxsize unlimited;
alter database datafile 'D:\APP\LYL\PRODUCT\11.2.0\DBHOME_1\QHDZW03.DBF' autoextend on;
---------------導(dǎo)入
imp 'qhd/qhd@whzd' full=y file=D:\oracle-2019-02-18.DMP log=d:\whzd1.log
注意:如果導(dǎo)入的表空間名稱(chēng)和用戶(hù)名稱(chēng)和當(dāng)前表空間和用戶(hù)不同, 可以在當(dāng)前表空間中先建表寒砖,然后導(dǎo)入語(yǔ)句
先建表:imp combiz/eyoucom@combiz file=D:\sfw.dmp full=y rows=n
再導(dǎo)入:imp combiz/eyoucom@combiz file=D:\sfw.dmp full = y ignore=y