---
title: "oracle 10g   temp表空间满的解决办法"
author: "collinsxu"
date: "2011-03-16T18:30:35Z"
tags: []
categories: ["数据库"]
slug: "oracle-10g-temp"
draft: false
lastmod: "2011-03-16T18:30:35Z"
id: 964583
url: "https://collinsxu.iteye.com/blog/964583"
---

oracle 10 g 
新建一个temp表空间，
然后把默认的temp表空间更改为新建的临时表空间
alter database default temporary tablespace temp_2;
然后删除以前的temp表空间。
drop tablespace temp including contents and datafiles;

查看当前连接的用户都在使用哪些temp表空间
SELECT   sess.SID, blocks * 8 / 1000 "MB", sort.tablespace FROM v$sort_usage sort, v$session sess
WHERE sort.session_addr = sess.saddr ORDER BY blocks DESC;