--建表空間 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 itouch123 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;
