{ oracle } 创建表空间、用户

空间 table_space_name
用户名、密码 account/password

sys as sysdba (system 没创建表空间的权限)

1:创建临时表空间

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:创建数据表空间

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:创建用户并指定表空间

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';

推荐阅读更多精彩内容