空間 table_space_name
用戶名脾歧、密碼 account/password
sys as sysdba (system 沒創(chuàng)建表空間的權限)
1:創(chuàng)建臨時表空間
create temporary tablespace table_space_name_temp
tempfile 'C:\app\Administrator\oradata\lingyi\table_space_name_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
2:創(chuàng)建數(shù)據(jù)表空間
create tablespace table_space_name
logging
datafile 'C:\app\Administrator\oradata\lingyi\table_space_name_data.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
3:創(chuàng)建用戶并指定表空間
create user account identified by 'password'
default tablespace table_space_name
temporary tablespace table_space_name_temp;
4:給用戶授予權限
grant connect,resource,dba to account;
5: 導入dmp文件
imp account/password file=xx.dmp full=y
6: 查看此空間下的所有表
Select Table_Name, Tablespace_Name
From Dba_Tables
Where Tablespace_Name = 'table_space_name';