有时候我们需要快速浏览数据库的大致情况,如表空间大小,数据库参数,表格等。以下脚本引自www.orafaq.com,个人觉得还不错。摘录如下
引用
SET LINESIZE 1000
SET PAGESIZE 1000
spool report.txt
prompt You can leave this script copied at $ORACLE_HOME\rdbms\admin\
prompt - Remember to use also statspack o bstats depending on the Oracle version
prompt - Review alert.log
prompt
prompt
prompt TABLESPACE STATUS
Select t.tablespace_name "Tablespace", t.status "Estado",
ROUND(MAX(d.bytes)/1024/1024,2) "MB Tamaño",
ROUND((MAX(d.bytes)/1024/1024) -
(SUM(decode(f.bytes, NULL,0, f.bytes))/1024/1024),2) "MB Usados",
ROUND(SUM(decode(f.bytes, NULL,0, f.bytes))/1024/1024,2) "MB Libres",
t.pct_increase "% incremento",
SUBSTR(d.file_name,1,80) "Fichero de datos"
FROM DBA_FREE_SPACE f, DBA_DATA_FILES d, DBA_TABLESPACES t
WHERE t.tablespace_name = d.tablespace_name AND
f.tablespace_name(+) = d.tablespace_name
AND f.file_id(+) = d.file_id GROUP BY t.tablespace_name,
d.file_name, t.pct_increase, t.status ORDER BY 1,3 DESC;
prompt
prompt
prompt INSTALLED PRODUCTS AND ITS VERSION
select * from product_component_version;
prompt
prompt
prompt ORACLE PARAMETERS DIFFERENT TO DEFAULT
select name, value from v$parameter where isdefault = 'FALSE';
prompt
prompt
prompt STATUS OF TABLES
select OWNER,TABLE_NAME,PCT_FREE,PCT_USED,AVG_SPACE,PARTITIONED,LAST_ANALYZED from DBA_TABLES ORDER BY OWNER,AVG_SPACE;
spool off;
quit
分享到:
相关推荐
Overview of Administering an Oracle Database
an overview of the OMNeT++ framework, recent challenges brought about by the growing amount and complexity of third party simulation models, and the solutions we introduce in the next major ...
2007年OCR经典文献。Tesseract is an open-source OCR engine that was developed at HP between 1984 and 1994.... Now for the first time, details of the architecture and algorithms can be revealed.
An Oracle database is a collection of data treated as a unit. The purpose of a database is to store and retrieve related information 数据库服务器是解决信息管理问题的核心组件。大体上说,数据库服务器 的...
A Quick Overview of Linux Kernel Crash Dump Analysis∗A Quick Overview of Linux Kernel Crash Dump Analysis∗
The Cloud DBA-Oracle provides an overview of Database-as-a-Service (DBaaS) that you can use in defining your cloud adoption strategy. In-depth details of various cloud service providers for Oracle ...
C++最新标准!Overview of the New C++ (C++0x)
for MTL in Deep Learning, gives an overview of the literature, and discusses recent advances. In particular, it seeks to help ML practitioners apply MTL by shedding light on how MTL works and ...
Overview of the OMG Data Distribution Service
Overview of the System Engineering Process System Engineering 系统工程 信息化 ERP 大数据
Overview Of The GSM System and Protocol Architecture
The goal of this chapter is to present a high-level overview of the capabilities you can feature in your Oracle applications and provide an introduction to the chapters that describe them.
Overview of the H.264/AVC video coding standard,ABSTRACT H.264/MPEG-4 AVC is the latest coding standard jointly developed by the Video Coding Experts Group (VCEG) of ITU-T and Moving Picture Experts ...
TECHNICAL OVERVIEW OF VP8, AN OPEN SOURCE VIDEO CODEC FOR THE WEB
This paper provides a brief technical overview of the coding tools included in VP9, along with coding performance comparisons with other state-of-the-art video codecs - namely H.264/AVC and HEVC - on...
The RANdom SAmple Consensus (RANSAC) algorithm proposed by Fischler and Bolles [1] is a general parameter estimation approach designed to cope with a large proportion of outliers in the input data....
这篇文章对JPEG2000标准进行了一个概况性的描述,需要学习JPEG2000的可以看下.
This technical white paper provides an overview of the LTE physical layer (PHY), including technologies that are new to cellular such as Orthogonal Frequency Division Multiplexing (OFDM) and Multiple ...