楼主: eygle

[精华] 关于HWM的一点研究!

[复制链接]
论坛徽章:
1
ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
41#
发表于 2008-7-3 18:09 | 只看该作者
SQL> alter database datafile '/prx016/oradata/TEST/tools06.dbf' resize 100M;
alter database datafile '/prx016/oradata/TEST/tools06.dbf' resize 100M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value


减小文件size 时,如何确定是受限于哪个segment的HWM ?

使用道具 举报

回复
论坛徽章:
13
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44奥运会纪念徽章:蹦床
日期:2012-09-06 08:24:582012新春纪念徽章
日期:2012-01-04 11:53:29ITPUB十周年纪念徽章
日期:2011-11-01 16:23:26咸鸭蛋
日期:2011-10-19 20:35:25紫蛋头
日期:2011-06-20 14:37:442010广州亚运会纪念徽章:射击
日期:2011-01-03 09:21:38生肖徽章2007版:鸡
日期:2009-11-13 08:54:30参与WIN7挑战赛纪念
日期:2009-11-06 16:05:25生肖徽章2007版:虎
日期:2009-09-11 08:11:01
42#
发表于 2008-7-3 20:54 | 只看该作者
marking.

支持一下.!!

使用道具 举报

回复
论坛徽章:
21
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44itpub13周年纪念徽章
日期:2014-10-08 15:20:46itpub13周年纪念徽章
日期:2014-10-08 15:20:46itpub13周年纪念徽章
日期:2014-10-08 15:20:46itpub13周年纪念徽章
日期:2014-10-08 15:20:46itpub13周年纪念徽章
日期:2014-10-08 15:20:46itpub13周年纪念徽章
日期:2014-10-08 15:20:46ITPUB社区12周年站庆徽章
日期:2013-10-08 14:56:08ITPUB社区12周年站庆徽章
日期:2013-10-08 14:53:152013年新春福章
日期:2013-02-25 14:51:24
43#
发表于 2008-7-4 01:37 | 只看该作者
游过,学习

使用道具 举报

回复
论坛徽章:
1
ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
44#
发表于 2008-7-21 17:07 | 只看该作者
原帖由 liqy103 于 2008-7-3 18:09 发表
SQL> alter database datafile '/prx016/oradata/TEST/tools06.dbf' resize 100M;
alter database datafile '/prx016/oradata/TEST/tools06.dbf' resize 100M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value


减小文件size 时,如何确定是受限于哪个segment的HWM ?



自己从metalink Note:1029252.6 找到答案

FINDEXT.SQL

Script to find database object locations for a given datafile.

-----------CUT-----------------CUT-----------------CUT--------
REM findext.sql
REM
REM This script prompts user for a datafile ID number, and
REM then lists all the segments contained in that datafile,
REM the blockid where it starts, and how many blocks the
REM segment contains.  It shows the owner, segment name, and
REM segment type.
REM
REM Janet Robinson Stern April 2, 1997
REM   variation on Cary  Millsap's script
REM

SET ECHO OFF
ttitle -
  center  'Segment Extent Summary'  skip 2

col ownr format a8      heading 'Owner'        justify c
col type format a8      heading 'Type'         justify c trunc
col name format a28     heading 'Segment Name' justify c
col exid format     990 heading 'Extent#'      justify c
col fiid format    9990 heading 'File#'        justify c
col blid format   99990 heading 'Block#'       justify c
col blks format 999,990 heading 'Blocks'       justify c

select
  owner         ownr,
  segment_name  name,
  segment_type  type,
  extent_id     exid,
  file_id     fiid,
  block_id      blid,
  blocks        blks
from
  dba_extents
where
file_id = &file_id
order by
  block_id
/

-----------------CUT--------------CUT---------------CUT------

Example Output:

SQL> @findext.sql
Enter value for file_id: 5
old  12:  file_id = &file_id
new  12:  file_id = 5

                   Segment Extent Summary

Owner   Segment Name   Type   Extent# File#  Block#   Blocks
-------- ------------ -------- ------- ------ ------- --------
USER     EMP          TABLE          0      5       2        5
USER     TAB3         TABLE          0      5     108        5
USER     TEST         TABLE          0      5     348        5
USER     PK_EMP       INDEX          0      5     483        5
USER     EMP          TABLE          1      5     433        5
USER     EMP          TABLE          2      5     438       10
USER     PK_EMP       INDEX          1      5     488       10

使用道具 举报

回复
论坛徽章:
0
45#
发表于 2008-7-21 17:12 | 只看该作者

学习ing

使用道具 举报

回复
论坛徽章:
129
蓝锆石
日期:2008-08-23 16:25:58萤石
日期:2008-02-26 15:38:51祖母绿
日期:2008-08-18 16:12:54海蓝宝石
日期:2008-02-23 15:06:23紫水晶
日期:2008-08-22 14:58:26红宝石
日期:2008-07-26 15:02:37九尾狐狸
日期:2008-09-16 09:24:50红孩儿
日期:2008-10-26 12:20:09紫蜘蛛
日期:2008-11-19 08:33:41玉兔
日期:2009-02-02 09:09:53
46#
发表于 2008-7-21 19:23 | 只看该作者
nice

使用道具 举报

回复
论坛徽章:
1
2009新春纪念徽章
日期:2009-01-04 14:52:28
47#
发表于 2008-7-29 15:40 | 只看该作者
了解学习了不少东西。很好。支持一下

使用道具 举报

回复
论坛徽章:
3
2011新春纪念徽章
日期:2011-02-18 11:43:35ITPUB十周年纪念徽章
日期:2011-11-01 16:23:26优秀写手
日期:2014-08-19 06:00:13
48#
发表于 2008-8-14 11:29 | 只看该作者

alter system dump datafile 10 block 2; 这条语句什么意思?

使用道具 举报

回复
论坛徽章:
8
生肖徽章2007版:虎
日期:2008-09-17 22:03:472013年新春福章
日期:2013-02-25 14:51:24
49#
发表于 2008-8-14 16:28 | 只看该作者
老大的帖,收藏了再顶

使用道具 举报

回复
论坛徽章:
8
生肖徽章2007版:虎
日期:2008-09-17 22:03:472013年新春福章
日期:2013-02-25 14:51:24
50#
发表于 2008-8-14 16:30 | 只看该作者

回复 #49 iamxmy 的帖子

alter system dump datafile 10 block 2; 这条语句什么意思?

将数据文件号为10的块号为2的块dump出来

使用道具 举报

回复

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

本版积分规则 发表回复

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