How to monitor the current situation of oracle database tables and tablespaces

Source: Internet
Author: User

How to monitor the current situation of oracle database tables and tablespaces declare unf number; unfb number; fs1 number; fs1b number; fs2 number; fs2b number; fs3 number; fs3b number; fs4 number; fs4b number; full number; fullb number; begin dbms_space.space_usage ('& 1',' & 2', 'table', unf, unfb, fs1, fs1b, fs2, fs2b, fs3, fs3b, fs4, fs4b, full, fullb); dbms_output.put_line ('unformatted _ blocks: '| unf); dbms_output.put_line ('full _ blocks (0% free):' | full ); dbms_output.put_line ('fs1 _ blocks (0-25% free): '| fs1); dbms_output.put_line ('fs2 _ blocks (25-50% free):' | fs2 ); dbms_output.put_line ('fs3 _ blocks (50-75% free): '| fs3); dbms_output.put_line ('fs4 _ blocks (75-100% free):' | fs4); end; /2. the use history of the tablespace (only the first statistical result of the day is output) select B. name,. rtime,. tablespace_usedsize,. tablespace_size, round (100 *. tablespace_usedsize/. tablespace_size) used_percent from dba_hist_tbspc_space_usage a, (select t2.name, min (rtime) rtime, min (tablespace_id) tablespace_id from dba_hist_tbspc_space_usage t1 inner join v $ tablespace t2 on t1.tablespace _ id = t2.TS # where t2.NAME = upper ('& 1') group by name, substr (rtime, 1, 10 )) B where. tablespace_id = B. tablespace_id and. rtime = B. rtimeorder by. rtime; 3. table's remaining space prediction select * from TABLE (dbms_space.OBJECT_GROWTH_TREND ('ecc _ CC', 'yz_orderrelevance ', 'table ')

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.