dbms_space.free_space[4]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 youbo2004 的 blog

errors in show_space  september 20, 2001
reviewer:  a reader

tom, tried using your show_space procedure. it compiled successfully but on 
using it i get following errors:

sql> exec show_space('t')
begin show_space('t'); end;

*
error at line 1:
ora-00942: table or view does not exist
ora-06512: at "sys.dbms_space", line 55
ora-06512: at "tom.show_space", line 22
ora-06512: at line 1

the table t exists under schema tom and the show_space procedure was compiled 
under user tom.

dbmsutil/prvtutil etc. have all been run. what am i missing ?

 

followup:
something must be wrong -- give me a full example like this (that shows it 
works)


ops$tkyte@ora817dev.us.oracle.com> create user a identified by a;
user created.

ops$tkyte@ora817dev.us.oracle.com> grant create session, create procedure, 
create table to a;
grant succeeded.

ops$tkyte@ora817dev.us.oracle.com> alter user a quota unlimited on users;
user altered.

ops$tkyte@ora817dev.us.oracle.com> connect a/a
connected.

a@ora817dev.us.oracle.com> @showspace
procedure created.

a@ora817dev.us.oracle.com> create table t ( x int ) tablespace users;
table created.

a@ora817dev.us.oracle.com> exec show_space( 't' )
pl/sql procedure successfully completed.

ops$tkyte@ora817dev.us.oracle.com> set serveroutput on
ops$tkyte@ora817dev.us.oracle.com> exec show_space( 't' );
free blocks.............................0
total blocks............................64
total bytes.............................524288
unused blocks...........................63
unused bytes............................516096
last used ext fileid....................7
last used ext blockid...................4809
last used block.........................1

pl/sql procedure successfully completed.

so, do the whole create user/install the procedure/run the test and see if it 
reproduces.  if not, either you were not logged in as tom, tom did not own t, 
etc... (is t a view or synonym in your case??) 

a little question  october 18, 2001
reviewer:  igor  from france

i don't understand how you knew it would be 32 blocks
for one row of 2000 chars and number ? 

followup:
the 5 extents were expected.  the 32 blocks just happened.  

 

本文关键:dbms_space.free_space
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top