12
返回列表 发新帖
楼主: biazai2002

求助:DCNMCONS数据库空间太高无法减少

[复制链接]
论坛徽章:
0
11#
 楼主| 发表于 2008-4-2 16:00 | 只看该作者
原帖由 funnyok 于 2008-4-1 20:07 发表
if you customer allow delete all the history data, truncate is the best choice.
but if you cannot lost data, you should
export tables
delete data
alter table move
alter index rebuild

btw, I recomment you move table and rebuild index twice to avoid the fragmentation of extent space.



Could you tell me how to use the command "alter index rebuild", such as, how to get the index of tbl_Event &tbl_HisAlm?

Thanks a lot !

使用道具 举报

回复
论坛徽章:
10
授权会员
日期:2008-03-13 10:32:44生肖徽章2007版:鸡
日期:2008-04-03 18:55:51数据库板块每日发贴之星
日期:2008-04-21 01:01:58奥运会纪念徽章:拳击
日期:2008-06-14 10:29:372014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11
12#
发表于 2008-4-3 22:31 | 只看该作者
select index_name,table_name from dba_indexes where table_name in ('TBL_EVENT','TBL_HISALM');

alter table <table_name> move tablespace <tablespace_name> [storage clause];
alter index <index_name> rebuild tablespace <tablespace_name> [storage clause];

[ 本帖最后由 kdkd 于 2008-4-3 22:32 编辑 ]

使用道具 举报

回复
论坛徽章:
0
13#
 楼主| 发表于 2008-4-6 14:12 | 只看该作者
多谢各位朋友!
问题解决了,通过
alater table move和 alter index rebuild !
虽然对oracle数据库几乎没什么了解,
但通过这个小问题在这里学到了些东西并解决掉,还得感谢各位朋友的支持!

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表