oracle创建临时表空间和数据表空间以及删除

时间:2022-01-19 03:46:18

没有那么多废话,直接进入主题

-----创建临时表空间-----
create temporary tablespace zhangmingchaotemp tempfile 'd:\oracle\zhangmingchaotemp.dbf'
-----初始化大小-----
size 50m
-----自动增长-------
autoextend on
-----每次扩展50m,无限制增长-----
next 50m maxsize unlimited
-----本地管理表空间--------
extent management local;

-----创建数据表空间-----
ceate tablespace zhangmingchaodata logging datafile 'd:\app\zcm\oradata\orcl\zhangmingchao.dbf'
size 50m autoextend on next 50mm maxsize 2048m
extent management local;
----创建用户并制定临时表空间和数据表空间----
create user zcm identifide by zcm default tablespace zhangmingchaodata temporary tablespace zhangmingchaotemp;
----删除表空间(含物理位置)
alter tablespace zhangmingchaodata offline;
drop tablespace zhangmingchaodata including
contents and datafiles;