Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE:

RE:

From: Aponte, Tony <AponteT_at_hsn.net>
Date: Fri, 29 Dec 2000 14:43:22 -0500
Message-Id: <10725.125469@fatcity.com>


I think this is a privilege problem. You can eliminate this as the culprit by granting execute on sys.dmbs_space to the account you are logged on as while running howmuchspace. I know that my writing is not always clear so here is the pseudo procedure:

connect sys/paaswd_at_sid;
grant execute on dbms_space to myaccount; connect myaccount/passwd_at_sid
begin
howmuchspace;
end;
/

Good luck.

-----Original Message-----
From: Tiger Woods [mailto:arhk_at_yahoo.com] Sent: Friday, December 29, 2000 12:41 PM To: Multiple recipients of list ORACLE-L Subject:

dear sir:
here is my problem:
I have created a procedure which return error: SQL> begin
  2 howmuchspace;
  3 end;
  4 /
begin
*
ERROR at line 1:

ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SPACE", line 40
ORA-06512: at "OPS$ORACLE.HOWMUCHSPACE", line 17
ORA-06512: at line 2

however when i run the pl/sql code of procedure like this:
"declare
cursor seg_info_cur is
select owner, segment_name, segment_type from naughty_segments;
total_blocks number;
total_bytes number;
used_blocks number;
used_bytes number;
unused_blocks number;
unused_bytes number;
last_ext_full number;
last_ext_blank number;
last_used_block number;

begin
for v_seg_info_cur in seg_info_cur
loop
DBMS_SPACE.UNUSED_SPACE(v_seg_info_cur.owner, v_seg_info_cur.segment_name, v_seg_
info_cur.SEGMENT_TYPE, total_blocks,
total_bytes,unused_blocks, unused_bytes, las t_ext_full, last_ext_blank, last_used_block); dbms_output.put_line(v_seg_info_cur.owner||'.'|| v_seg_info_cur.segment_name||'.'
|| v_seg_info_cur.SEGMENT_TYPE);
used_blocks := (total_blocks-unused_blocks);
used_bytes := (total_bytes-unused_bytes);
dbms_output.put_line('total_blocks:     

'||total_blocks);

dbms_output.put_line('total_bytes [KB]:
'||round(total_bytes/1024,0));

dbms_output.put_line('used_blocks:
'||used_blocks);

dbms_output.put_line('used_bytes [KB]:
'||round(used_bytes/1024,0));

dbms_output.put_line('unused_blocks:
'||unused_blocks);
dbms_output.put_line('unused_bytes [KB]:

'||round(unused_bytes/1024,0));

dbms_output.put_line('last_ext_full:
'||last_ext_full);

dbms_output.put_line('last_ext_blank:
'||last_ext_blank);

dbms_output.put_line('last_used_block:
'||last_used_block);

end loop;
end;
I don't understand why. can you help me out. regards,

Asim Riaz Kaghzi
Oracle DBA,
Stamford, CT 06092
Res: 203.357.0255
Off: 203.316.6792

Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Tiger Woods
  INET: arhk_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
Received on Fri Dec 29 2000 - 13:43:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US