導入DMP文件過程
--釋放重名表空間
drop tablespace hxgr including contents and datafiles cascade constraints;
--建立表空間
create tablespace hxgr
logging
datafile 'D:\oracle\oradata\hxgr\hxgr.dbf'
size 100m
autoextend on
next 32m maxsize 2048m
extent management local;
--建立臨時表空間
create temporary tablespace hxgr_temp
tempfile 'D:\oracle\oradata\hxgr\hxgr_temp.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
--建立用戶
create user lzgr identified by hxgr
default tablespace hxgr temporary tablespace hxgr_temp;
--附上權限
grant connect,resource,dba,create any view to lzgr;
利用Sys用戶進入到PLSQL
My objects->users->右鍵點hxgr->edit->Role privileges
添加exp_full_database和imp_full_database兩個權限,resource的grantable點上
在選System privileges也添加添加exp_full_database和imp_full_database兩個權限
回歸到dos下D:\oracle\product\10.2.0\db_1\BIN
格式為:imp 用戶名/密碼@數據庫 file="地址"
imp lzgr/lzgr@orcl? file=D:\oracle\bak\hxgr201210072100.dmp full=y ;
用戶lzgr建表的時候提示:ora-01950:對表空間‘lzgr’無權限原因:用戶沒有resource權限解決方法
:連接sys用戶,賦予用戶lzgr resource權限grant resource to lzgr;
?