代码拉取完成,页面将自动刷新
-- | PURPOSE : Report on all USED and FREE SPACE within a tablespace. This is |
-- | a good script to report on tablespace fragmentation. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET PAGESIZE 9999
SET VER off
COLUMN owner FORMAT a15 HEADING "Owner"
COLUMN object FORMAT a20 HEADING "Object"
COLUMN file_id HEADING "File ID"
COLUMN block_id HEADING "Block ID"
COLUMN bytes FORMAT 999,999,999 HEADING "Bytes"
PROMPT
PROMPT ****************************************************
PROMPT ****** RUNNING THIS SCRIPT CAN TAKE LONG TIME AS ***
PROMPT ****** IT QUERY DBA_EXTENTS ***
PROMPT ****************************************************
PROMPT
ACCEPT tbs prompt 'Enter Tablespace Name : '
SELECT
SUBSTR(owner, 1, 20) "Owner"
, SUBSTR(segment_name, 1, 32) "Segment_name"
, segment_type "Segment_type"
, file_id
, block_id
, bytes/1024/1024 "Mbytes"
FROM
dba_extents
WHERE
tablespace_name = UPPER('&tbs') and
file_id = '&file_id'
ORDER BY 5
/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。