Chinaunix首页 | 论坛 | 博客
  • 博客访问: 36176
  • 博文数量: 20
  • 博客积分: 915
  • 博客等级: 准尉
  • 技术积分: 175
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-08 16:08
文章分类

全部博文(20)

文章存档

2011年(1)

2009年(6)

2008年(13)

我的朋友
最近访客

分类: Oracle

2009-02-11 12:17:41

由于一个数据库的临时表空间temp的数据文件无意间被其他用户删除,造成数据库虽然能够使用,但当进行较大的查询排序时出错,而且在查询 dba_temp_files时报错.此时不能简单的通过增加数据文件和在oracle中删除原来已经物理删除的数据文件来排除故障,我的措施是:
1. 创建新的临时表空间mytemp;
SQL>create temporary tablespace mytemp tempfile '/oradata/c3admin/mytemp01.dbf' size 20M;
2. 将mytemp设置成为数据库的缺省表空间;
SQL>alter database default temporary tablespace mytemp;
3. 将临时表空间为temp的用户的临时表空间修改成mytemp;
SQL>alter user sys temporary tablespace mytemp;
SQL>alter user system temporary tablespace mytemp;
SQL>alter user DBSNMP temporary tablespace mytemp;
SQL>alter user C3ADMIN  temporary tablespace mytemp;
4. 删除表空间temp;
SQL>drop tablespace temp;
 
5. 重新创建temp表空间;
SQL>create temporary tablespace temp tempfile '/oradata/c3admin/temp01.dbf' size 20M;
6. 将temp设为数据库的缺省临时表空间;
SQL>alter database default temporary tablespace temp;
7. 将临时表空间为mytemp的用户的临时表空间修改成temp;
SQL>alter user sys temporary tablespace temp;
SQL>alter user system temporary tablespace temp;
SQL>alter user DBSNMP temporary tablespace temp;
SQL>alter user C3ADMIN  temporary tablespace temp;
8. 删除临时表空间mytemp;
SQL> tablespace mytemp;
阅读(1309) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~