找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索本站精品资源

首页 教程频道 查看内容

oracle怎么修改临时表空间

作者:模板之家 2022-3-8 10:46 80人关注

方法:1、用“drop tablespace temp including contents and datafiles”删除原来的临时表空间;2、用“create temporary tablespace”语句创建新的临时表空间。

方法:1、用“drop tablespace temp including contents and datafiles”删除原来的临时表空间;2、用“create temporary tablespace”语句创建新的临时表空间。

本教程操作环境:Windows10系统、Oracle 11g版、Dell G3电脑。

oracle怎么修改临时表空间

--查询当前数据库默认临时表空间名

select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';

--创建新的临时表空间

create temporary tablespace temp01   tempfile '/oradata/temp01.dbf' size 2G autoextend on;

--修改默认表空间为新建的临时表空间

alter database default temporary tablespace temp01;

--查看用户当前使用的临时表空间

select username,temporary_tablespace from dba_users;

--删除原来的临时表空间

drop tablespace temp including contents and datafiles;

--查看所有表空间名确认临时表空间是否已删除

select tablespace_name from dba_tablespaces;

扩展:

--临时表空间添加数据文件

alter tablespace temp01 add tempfile '/oradata/temp02.dbf' size 2G autoextend on;

--修改临时表空间数据文件大小

alter database tempfile '/oradata/temp02.dbf' resize 4G;

路过

雷人

握手

鲜花

鸡蛋
来自: 网络收集

全部回复(0)