我想用Java得到Solaris上Oracle DB的以下参数:
Total DB Space, Used DB Space, Total Log Space, Used Log Space, DB Connection and Throughput of DBMS.
哪位大侠知道改怎么做?
Total DB Space, Used DB Space, Total Log Space, Used Log Space, DB Connection and Throughput of DBMS.
哪位大侠知道改怎么做?
column db_block_size new_value blksz noprint
select value db_block_size from v$parameter where name='db_block_size';
column tablespace_name format a16;
column file_name format a60;
set linesize 160;
select file_name,round(bytes/(1024*1024),0) total_space,autoextensible,increment_by*&blksz/(1024*1024) as incement,maxbytes/(1024*1024) as maxsize from dba_data_files order by tablespace_name;
2.查看日志文件
select member from v$logfile;
3.查看表空间的使用情况
select * from( select sum(bytes)/(1024*1024) as "free_space(M)",tablespace_name
from dba_free_space
group by tablespace_name) order by "free_space(M)";
1.表空间占多少空间:
select fs.tablespace_name "Tablespace",
(df.totalspace - fs.freespace) "Used MB",
fs.freespace "Free MB",
df.totalspace "Total MB",
round(100 * (fs.freespace / df.totalspace)) "Pct. Free"
from
(select tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from dba_data_files
group by tablespace_name) df,
(select tablespace_name,
round(sum(bytes) / 1048576) FreeSpace
from dba_free_space
group by tablespace_name) fs
where df.tablespace_name = fs.tablespace_name
order by 1
2. oracle的连接数
在:\Oracle\admin\oradb\pfile\init.ora读取processes参数