> hr
createtablespace trans_tbs datafile size 100M;
col tablespace_name format a30
col file_name format a100
select tablespace_name, file_name from dba_data_files orderby tablespace_name;
测试用户
> hr
createuser trans identified by trans defaulttablespace trans_tbs;alteruser trans quota unlimited on trans_tbs;grantconnectto trans;grantcreatetableto trans;grantselecton hr.jobs to trans;
> hr
!mkdir /data/dumpcreate directory dump_dir as'/data/dump';grantread,writeon directory dump_dir to system;
col directory_name format a20
col directory_path format a40
select directory_name, directory_path from dba_directories where directory_name=upper('dump_dir');
> hr
droptablespace trans_tbs including contents;select tablespace_name,statusfrom dba_tablespaces;selectcount(*)from trans_tb;--drop tablespace trans_tbs including contents and datafile;