Create a table space and user
Switching oracle user
su - oracle
Connect to the database
sqlplus /nolog
conn /as sysdba
Create a temporary table space, temporary table space name and path can specify your own
create temporary tablespace MES_TEMP tempfile '${ORACLE_HOME}\oradata\MES_TEMP.bdf' size 100m reuse autoextend on next 20m maxsize unlimited;
Create a table space and table space path names can specify your own
create tablespace MES datafile '${ORACLE_HOME}\oradata\MES.dbf' size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);
Create a user and specify the table space
create user mes identified by mes default tablespace MES temporary tablespace MES_TEMP;
Or use the default table space
create user mes identified by mes
To authorized users
grant dba to mes;
grant connect,resource to mes;
grant select any table to mes;
grant delete any table to mes;
grant update any table to mes;
grant insert any table to mes;
The user is created, users can use the new test connection
Delete the temporary table space
Queries temporary table space file
select name from v$tempfile;
Delete the temporary table space file
drop tablespace MES_TEMP including contents and datafiles;
Re-query the temporary table space file
select name from v$tempfile;
Table space delete temporary success,
Delete table space
Query table space file
select name from v$datafile;
Stop the use of table space
alter tablespace MES offline;
Delete the table space file
drop tablespace MES including contents and datafiles;
Re lookup table space file
select name from v$datafile;
Table space deleted successfully
delete users
drop user mes cascade;