ORA-03297: file contains used data beyond requested RESIZE value
来源:互联网 发布:自学python要多久 编辑:程序博客网 时间:2024/05/01 10:44
当我们回收数据库空间时,常用的方法是:
ALTER DATABASEITPUB个人空间$E7f]jD wo f
DATAFILE '/oradata/ora9i/tools03.dbf' RESIZE 900M
但一执行报以下错误
ORA-03297: file contains used data beyond requested RESIZE value
ORA-03297 file contains used data beyond requested RESIZE value
z4[FbO4|0Cause: Some portion of the file in the region to be trimmed is currently in use by a database object.
Action: Drop or move segments containing extents in this region prior to resizing the file, or choose a resize value such that only free space is in the trimmed.
使用如下脚本可以获得分配到高位top_blocks的对象信息
SQL> select distinct owner,segment_name,segment_type from dba_extents where file_id = &file_id and (block_id + &top_blocks) >(select max(block_id) from dba_extents where file_id=&file_id)
top_blocks 可以通过以下方法得出;
SQL>select file#,name from v$datafile;
SQL>select max(block_id) from dba_extents where file_id=12;
MAX(BLOCK_ID)ITPUB个人空间,ZV.|t1qt
-------------
l7a/aZ0^:q0124553
SQL> show parameter db_block_size;ITPUB个人空间iF)ZCHQ.ogV/J:k
ITPUB个人空间 ^ h'isg3V,Ar
NAME TYPE VALUEITPUB个人空间x2R2Y:HK+/ g?:E
------------------------------------ ----------- ------------------------------
E4Sr r$C*G)_0db_block_size integer 8192ITPUB个人空间x o-~,v/.Lb
SQL> select 124553*8/1024 from dual;ITPUB个人空间PAS;H!x:D hnS!Y4A
s-~b7bNt1Lg3a0124553*8/1024ITPUB个人空间#N%qMoWv
-------------ITPUB个人空间~rbL J'Z6t
973.0703125
该块位于973M与974M之间
通过上面sql查出来的对象信息
alter table t_obj move new_tablespace_name;
对于分区表信息:ITPUB个人空间FT5d;i+Fweo c sV
ALTER TABLE "TEST"."TB_ACCESS"
z3XJmU ]Y0 MOVE PARTITION "TB_ACCESS_P200608"
.N7f1r*]6?/v:E%SP5@0 TABLESPACE "new_tablespace_name"
再进行回收表空间
转载:http://space.itpub.net/7199859/viewspace-193116
- ORA-03297: file contains used data beyond requested RESIZE value
- ORACLE 11G收缩表空间报错 ORA-03297: file contains used data beyondrequested RESIZE value
- ORA-01110: data file
- RESIZE DATAFILE与ORA-03297
- ORA-01110: data file 56
- ORA-01157: cannot identify/lock data file
- ORA-01565: error in identifying file '+DATA/spfilerac.ora'
- Resize Datafile时ORA-03297: 文件包含在请求的 RESIZE 值以外使用的数据
- oracle 启动时出现ORA-01157: cannot identify/lock data和ORA-01110: data file 错误
- ORA-01187: cannot read from file because it failed verification tests ORA-01110: data file 201: '/
- 【续】ORA-01157: cannot identify/lock data file 6 - see DBWR trace file ORA-01110: 解决方法
- 【精】ORA-01157: cannot identify/lock data file 6 - see DBWR trace file ORA-01110: 解决方法
- ORA-01110 ORA-01111: name for data file 69 is unknown - rename to correct file
- ORA-01578: ORACLE data block corrupted (file # 6, block # 129)
- ORA-01157: cannot identify/lock data file - see DBWR tracefile
- ORA-01157报错"cannot identify/lock data file"解决
- ORA-01157: cannot identify/lock data file 7
- ORA-01111: name for data file 81 is unknown - rename to correct file ORA-01110: ORA-01157:
- 弹窗代码-直接使用一下试试
- IEEE浮点数的存放格式(转)
- CSS学习总结1:绝对大小与相对大小的单位
- ArrayList的使用方法【转载】
- vc++注册异步事件WSAAsyncSelect函数中的窗体句柄的获得
- ORA-03297: file contains used data beyond requested RESIZE value
- 如何excel中大写英文换成小写
- just a test
- 止语的好处
- 火箭赢球我也怕---相当郁闷!
- Enterprise Library2.0(1):Data Access Application Block学习
- va_list,va_start,va_end分析
- 创建你自己的Vista风格的”Chrome”样式的按钮
- DLL(Dynamic Link Libraries)专题