1.创建用户表空间
CREATE TABLESPACE my_tsLOGGINGDATAFILE 'D:\app\win7\oradata\orcl\my_ts.dbf' SIZE 10M AUTOEXTEND ON NEXT 2M MAXSIZE 1024MEXTENT MANAGEMENT LOCAL;
2.创建临时表空间
CREATE TEMPORARY TABLESPACE my_ts_tempTEMPFILE 'D:\app\win7\oradata\orcl\my_ts_temp.dbf'SIZE 10MAUTOEXTEND ONNEXT 2M MAXSIZE 1024MEXTENT MANAGEMENT LOCAL;
删除表空间:DROP TABLESPACE my_ts_temp; 如果表空间包含对象则使用DROP TABLESPACE my_ts_temp INCLUDING CONTENTS;删除表空间并且删除物理文件:DROP TABLESPACE my_ts_temp INCLUDING CONTENTS AND DATAFILES;
3.创建用户并指定表空间
CREATE USER test IDENTIFIED BY testDEFAULT TABLESPACE my_tsTEMPORARY TABLESPACE my_ts_temp;
删除用户: DROP USER test CASCADE;
4.授予用户权限
GRANT CONNECT TO test;GRANT RESOURCE TO test;
回收用户权限: REVOKE 权限名 FROM 用户名