创建表空间
create tablespace AAA
logging
datafile 'G:\oracledata\AAA.dbf'
size 1500m
autoextend on
next 100m maxsize 10000m
extent management local;
扩展表空间
ALTER TABLESPACE PRO ADD
DATAFILE '/opt/oracle/data/data01/aaa/obak/datafile/aaa.dbf' SIZE 1500M
AUTOEXTEND ON NEXT 100M MAXSIZE 10000M;
创建临时表空间
create temporary tablespace user_temp
tempfile 'Q:\oracle\product\10.2.0\oradata\Test\xyrj_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
创建用户并指定表空间
create user username identified by password
default tablespace user_data
temporary tablespace user_temp;
给用户授予权限
grant connect,resource,dba to username;
查询表空间路径的语句是:
select * from dba_data_files