--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