使用SYS用户以DBA身份登陆:
创建表空间步骤:
1:创建临时表空间
create temporary tablespace test_temp
tempfile 'D:\oracle\db_data\Oracle10i\test_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
2:创建数据表空间
create tablespace test_data
logging
datafile 'D:\oracle\db_data\Oracle10i\test_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
3:创建用户并指定表空间
create user username identified by password
default tablespace test_data
temporary tablespace test_temp ;
4:给用户授予权限
grant connect,resource to username;
------------------------------------------------------------------------------
设定后查看表空间信息
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE,
(B.BYTES*100)/A.BYTES "% USED",(C.BYTES*100)/A.BYTES "% FREE"
FROM SYS.SM$TS_AVAIL A,SYS.SM$TS_USED B,SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE