新建一个TEMP02作为默认表空间,然后删除之前的表空间
2015-07-29 10:16
337 查看
1.新建一个TEMP02作为默认表空间,然后删除之前的表空间
create temporary tablespace temp02 tempfile '/u01/app/oracle/oradata/sfmtest/temp02.dbf' size 1g;
alter user bosswg temporary tablespace temp02;
alter database default temporary tablespace temp02;
select username,default_tablespace,temporary_tablespace from dba_users;
ps:如果TEMP表空间还有会话在使用,删除TEMP表空间会失败,一下语句是查下TEMP表空间是否还有会话在使用
select m.USERNAME,
m.SID,
m.SERIAL#,
m.SQL_ADDRESS,
m.MACHINE,
m.PROGRAM,
n.TABLESPACE,
n.SEGTYPE,
n.CONTENTS
from v$session m, v$sort_usage n
where m.SADDR = n.SESSION_ADDR;
删除掉使用TEMP空间的会话
alter system kill session 'SID,SERIAL#';
然后再执行
drop tablespace temp including contents and datafiles;
本文出自 “技术库” 博客,请务必保留此出处http://springseaside.blog.51cto.com/6147537/1679491
create temporary tablespace temp02 tempfile '/u01/app/oracle/oradata/sfmtest/temp02.dbf' size 1g;
alter user bosswg temporary tablespace temp02;
alter database default temporary tablespace temp02;
select username,default_tablespace,temporary_tablespace from dba_users;
ps:如果TEMP表空间还有会话在使用,删除TEMP表空间会失败,一下语句是查下TEMP表空间是否还有会话在使用
select m.USERNAME,
m.SID,
m.SERIAL#,
m.SQL_ADDRESS,
m.MACHINE,
m.PROGRAM,
n.TABLESPACE,
n.SEGTYPE,
n.CONTENTS
from v$session m, v$sort_usage n
where m.SADDR = n.SESSION_ADDR;
删除掉使用TEMP空间的会话
alter system kill session 'SID,SERIAL#';
然后再执行
drop tablespace temp including contents and datafiles;
本文出自 “技术库” 博客,请务必保留此出处http://springseaside.blog.51cto.com/6147537/1679491
相关文章推荐
- 6月.CN域名注册量突破1200万个 增速环比加快
- ActiveMQ入门实例
- 解决VIM-NERDTree windows上无效书签的问题
- html5的web存储与cookie的区别
- csu 1507: 超大型LED显示屏(要重新敲一遍)
- poj 1185 炮兵阵地 【状压DP】
- 在IE兼容模式下 提示JSON未定义
- C++设计模式:单例模式
- 饮中八仙歌
- 初学structs2,表单验证简单补充
- bzoj3503: [Cqoi2014]和谐矩阵
- 会话描述协议(SDP)介绍
- 谈谈Markdown的认识与入门
- Nmap命令的29个实用范例
- 如何用Maven创建web项目
- INSTALL_FAILED_UID_CHANGED解决办法
- IOC容器——Ninject
- &
- 搭建git服务器
- USB storage drivers分析之一