//Create
temporary tablespace create temporary tablespace haibi_temp tempfile 'D:\oracledata\haibi_temp.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; //create data tablespace create tablespace haibi logging datafile 'D:\oracledata\ haibi.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; //Create a user and specify a tablespace create user haibi identified by 123456 default tablespace haibi temporary tablespace haibi_temp; //Grant permissions to users grant connect,resource,dba to haibi; //---------------------Tablespace delete operation -------------
--find user
select * from dba_users; --find
the path of the workspace
select * from dba_data_files; --delete
user
drop user username cascade; --delete tablespace
drop
tablespace tablespace name including contents and datafiles cascade constraint;
for example: Delete the user name to become LYK, the table space name is LYK
-- delete the user, and also delete the cascade relationship
drop user LYK cascade;
-- delete the table space, and the corresponding table space file also delete
drop tablespace LYK including contents and datafiles cascade constraint;
temporary tablespace create temporary tablespace haibi_temp tempfile 'D:\oracledata\haibi_temp.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; //create data tablespace create tablespace haibi logging datafile 'D:\oracledata\ haibi.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; //Create a user and specify a tablespace create user haibi identified by 123456 default tablespace haibi temporary tablespace haibi_temp; //Grant permissions to users grant connect,resource,dba to haibi; //---------------------Tablespace delete operation -------------
--find user
select * from dba_users; --find
the path of the workspace
select * from dba_data_files; --delete
user
drop user username cascade; --delete tablespace
drop
tablespace tablespace name including contents and datafiles cascade constraint;
for example: Delete the user name to become LYK, the table space name is LYK
-- delete the user, and also delete the cascade relationship
drop user LYK cascade;
-- delete the table space, and the corresponding table space file also delete
drop tablespace LYK including contents and datafiles cascade constraint;