[oracle@hzjz ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat May 2918:26:15 2021
Copyright (c)1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL> create tablespace demo datafile '/u01/app/oracle/oradata/demo/demo.dbf' size 256M autoextend on next 32M ;
Tablespace created.
SQL> create tablespace demo_idx datafile '/u01/app/oracle/oradata/demo/demo_idx.dbf' size 256M autoextend on next 32M ;
Tablespace created.
SQL> create user DEMO identified by DEMO default tablespace demo;
User created.
SQL> grant dba to DEMO;
Grant succeeded.
SQL>
删除表空间
[oracle@hzjz ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat May 2918:30:50 2021
Copyright (c)1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL> drop tablespace demo including contents and datafiles cascade constraint;
Tablespace dropped.
SQL> drop tablespace demo_idx including contents and datafiles cascade constraint;
Tablespace dropped.
SQL> drop user DEMO cascade;
User dropped.
SQL>