ORACLE创建表空间 新建用户 授权
--建表空间
create tablespace <用户>
datafile 'D:\oradatadev\<用户>.dbf' size 200m
autoextend on
next 50m maxsize 4096m
extent management local;
create temporary tablespace <用户>_temp
tempfile 'D:\oradatadev\<用户>_temp.dbf' size 100M
autoextend on
next 50m maxsize 20480m
extent management local;
--建用户
create user <用户> identified by
<用户密码> default tablespace <用户> temporary tablespace <用户>_temp;
grant connect,resource to <用户>;
grant create any view to <用户>;
grant debug any procedure to <用户> ;
grant dba to <用户>;
grant select on sys.dba_pending_transactions to <用户>;
grant select on sys.pending_trans$ to <用户>;
grant select on sys.dba_2pc_pending to <用户>;
grant execute on sys.dbms_system to <用户>;
SELECT username,SID,serial# FROM v$session;
--删除用户
drop user <用户> cascade;
--删除表空间
DROP TABLESPACE <用户> INCLUDING CONTENTS AND DATAFILES;
DROP TABLESPACE <用户>_temp INCLUDING CONTENTS AND DATAFILES;