Chinaunix首页 | 论坛 | 博客
  • 博客访问: 585722
  • 博文数量: 57
  • 博客积分: 877
  • 博客等级: 准尉
  • 技术积分: 1275
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-24 16:16
文章分类

全部博文(57)

文章存档

2014年(2)

2013年(15)

2012年(20)

2011年(20)

我的朋友

分类: Oracle

2011-11-03 13:52:37

    今天查看 alert 日志,发现又告警信息
  1. hu Nov 03 12:57:55 2011
  2. ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
  3. Thu Nov 03 12:57:55 2011
  4. ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
  5. ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
  6. Thu Nov 03 12:57:55 2011
  7. ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
  8. Thu Nov 03 13:01:02 2011
  9. ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
  10. Thu Nov 03 13:04:28 2011
  11. ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
  12. Thu Nov 03 13:17:07 2011

一看就是临时表空间满了,所以准备扩展临时表空间

先查看下默认的临时表空间是哪个

select * from database_properties
where property_name='DEFAULT_TEMP_TABLESPACE';

默认临时表空间是temp,路径是:E:\ORACDATA\TESTSXX\TEMP01.DBF

用alter database tempfile ‘E:\ORACDATA\TESTSXX\TEMP01.DBF’ resize 50000M

但出现报错:报错的原因是由于在当初建立这个临时表空间的时候设置了maxsize 参数,所以现在不能用resize

现在只能先建立个临时表空间

create temporary tablespace TEMPORARY_DATA1
TEMPFILE 'e:/oradata/testsxx/TEMPORARY_DATA02.DBF'
SIZE 50M
AUTOEXTEND ON
NEXT 50M MAXSIZE 30720M
EXTENT MANAGEMENT LOCAL ;

然后把新建立的 临时表空间 设为默认的临时表空间

alter database default temporary tablespace TEMPORARY_DATA1;

增加下哪些用户在使用临时表空间的语句:

Select se.username,se.sid,se.serial#,su.extents,su.blocks*to_number(rtrim(p.value))as Space,
tablespace,segtype,sql_text
from v$sort_usage su,v$parameter p,v$session se,v$sql s
where p.name='db_block_size' and su.session_addr=se.saddr and s.hashvalue=su.sqlhash
and s.address=su.sqladdr
order by se.username,se.sid;

删除临时表空间语句:

drop tablespace tempspacename including contents and datafiles;

 

阅读(8610) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~