--select * from dba_data_files where file_name like '%SPACE%';
--select * from dba_temp_files where file_name like '%SPACE%';
--drop tablespace xxxx including contents and datafiles;
--drop tablespace xxxx including contents cascade constraints;
--創建缺省表空間,系統支持表、公用數據表
create bigfile tablespace SPACE_DATA datafile 'E:\OracleData\SPACE\DataFiles\SPACE_data.dbf' size 256m autoextend on;
--創建臨時表空間
create bigfile temporary tablespace SPACE_TEMP tempfile 'E:\OracleData\SPACE\DataFiles\SPACE_temp.dbf' size 256m autoextend on;
--籃球表空間
create bigfile tablespace BASKETBALL datafile 'E:\OracleData\SPACE\DataFiles\basketball.dbf' size 256m autoextend on;
--銷售表空間
create bigfile tablespace LOTTERY_SALE datafile 'E:\OracleData\SPACE\DataFiles\sale.dbf' size 10240m autoextend on;
--業務日志
create bigfile tablespace SPACE_LOG datafile 'E:\OracleData\SPACE\DataFiles\log.dbf' size 256m autoextend on;
--drop user SPACEDba cascade;
--創建管理員用戶
create user SPACEDba identified by qweasd default tablespace SPACE_data temporary tablespace SPACE_temp;
--授權
grant connect,dba to SPACEdba;
--修改限額
ALTER USER "SPACEDBA" QUOTA UNLIMITED ON SPACE_DATA;
--查看所有用戶對象
select uo.object_name,uo.object_type from user_objects uo where uo.object_type<>'LOB' order by uo.object_type desc