Oracle 练习用(1)

desc v$logfile;
select * from v$logfile;

select * from v$controlfile;

select * from v$datafile;


select * from all_tables where OWNER='ADMIN';

-- Find large process
SELECT
L.sid ssid,
substr(OPNAME,1,15) opname,
target,
trunc((sofar/totalwork)*100) pct,
to_char(60*sofar*8192/(24*60*(last_update_time - start_time))/1024/1024/60, '9999.0')
Rate,
elapsed_seconds/60 es,
time_remaining/60 tr,
PROGRAM,
MACHINE
FROM v$session_longops L,v$session S
WHERE time_remaining > 0 AND L.SID=S.SID
ORDER BY start_time;

select * from user_views;

select * from user_indexes;
select * from user_ind_columns ;

select * from MBR_SECEDE_MST;

--rename the system auto-index name
alter index SYS_C005162 rename to USER_INFO_PK;

--1 shared pool
select (sum(pins - reloads)) / sum(pins) "Lib Cache" from v$librarycache; --share sql lib cache, If < 90% then must make large the shareed pool

select (sum(gets -getmisses - usage -fixED)) / sum(gets) "Row Cache" from v$rowcache; -- If < 90% then ...

--2 data cache
select name, value from v$sysstat where name in('db block gets','consistent gets','physical reads'); --If (1 - db block gets/(consistent gets + physical reads))<90% then ...

--3 log cache
select name, value from v$sysstat where name in('redo entries','redo log space requests'); --If  requests/entries is not be closed to 0 then ...

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值