我最近被分配担任 DBA(临时)的角色。我是一名开发人员,所以我对 Oracle 的了解不多……但是今天,在监视活动时,我看到正在从开发人员的工作站 (TOAD.EXE) 执行以下 SQL。这是 Toad 以某种方式自动生成的,还是手动编写的查询?原因是,我担心个人有权从 SYS 模式中进行选择。
我咨询了开发人员,他说他们不查询 sys 表也不需要。所以我有点担心这个查询是如何生成的。
任何建议都值得赞赏。谢谢!
SELECT INDEX_NAME "Index Name",
INDEX_TYPE "Index Type",
UNIQUENESS "Uniqueness",
STATUS "Status",
TABLE_OWNER || '.' || TABLE_NAME "Table",
TABLE_TYPE "Table Type",
TABLESPACE_NAME "Tablespace",
BUFFER_POOL "Buffer Pool",
INITCAP (partitioned) "Partitioned",
DECODE (temporary, 'N', 'No', 'Yes') "Temporary",
INI_TRANS "Initial Transactions",
MAX_TRANS "Max Transactions",
INITIAL_EXTENT "Initial Extent Size",
NEXT_EXTENT "Next Extent Size",
MIN_EXTENTS "Minimum Extents",
MAX_EXTENTS "Maximum Extents",
PCT_INCREASE "Percent Increase",
PCT_FREE "Percent Free",
FREELISTS "Freelists",
FREELIST_GROUPS "Freelist Groups",
DEGREE "Degree",
INSTANCES "Instances",
LAST_ANALYZED "Last Analyzed",
BLEVEL "BLevel",
LEAF_BLOCKS "Leaf Blocks",
DISTINCT_KEYS "Distinct Keys",
AVG_LEAF_BLOCKS_PER_KEY "Avg Leaf Blocks Per Key",
AVG_DATA_BLOCKS_PER_KEY "Avg Data Blocks Per Key",
CLUSTERING_FACTOR "Clustering Factor",
NUM_ROWS "Num Rows",
SAMPLE_SIZE "Sample Size",
GENERATED "Generated",
DECODE (JOIN_INDEX, 'NO', 'No', 'Yes') "Join Index",
Visibility "Visibility"
FROM SYS.ALL_INDEXES
WHERE OWNER = :OO AND INDEX_NAME = :NN