建立表空間: 數據庫
create tablespace PMSPHASE2 session
logging oracle
datafile 'E:\oracle\product\10.2.0\PMS\PMSPHASE2.dbf' ide
size 50m spa
autoextend on .net
next 50m maxsize 20480m orm
extent management local; get
2.修改表空間的大小 io
alter database datafile 'E:\oracle\product\10.2.0\PMS\PMSPHASE2.DBF' resize 10240M; table
3. 建立用戶並給用戶受權
create user mypms identified by pms ;
grant create session,connect,resource,dba to mypms;
或:
(
grant create session to 用戶名;
grant create table to 用戶名;
grant create tablespace to 用戶名;
grant create view to 用戶名;
)
4. 建立用戶並給給用戶指定表空間:
create user username identified by password
default tablespace user_data
temporary tablespace user_temp;
5.修改用戶表空間:
alter user pms default tablespace PMSPHASE2;
將 dmp 文件導入到 oracle 數據庫中:
將全部的表導入到 oracle :
imp mypms/pms@orcl file=F:\pms_20140707_pms_oracle11gdatabase.dmp full=y ignore=y log=e:\T.log
將部分表導入到 oracle :
imp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)
將一個用戶的表,導入到另一個用戶中:
IMP SONIC/SONIC BUFFER=64000 FILE=C:\SONIC.DMP FROMUSER=SONIC TOUSER=SONIClog=exp_icdmain_yyyymmdd.log