Oracle数据库DBA日常Sql列表
发布日期:2025-04-30 03:35:44 浏览次数:21 分类:精选文章

本文共 1598 字,大约阅读时间需要 5 分钟。

??????????

??????????????????????????????????????????????????????????????????

???????

1.1 ??????????????????SQL???

select * from v$object_usage where index_name = 'index_name';

1.2Latch????Latch??????????????????

select name,sum(gets),sum(misses),sum(sleeps),sum(wait_time)from v$latch_childrengroup by namehaving sum(gets) > 50order by 2;

1.3 ????????????????????????

select p.pid,p.spid,s.program,s.sid,s.serial# from v$process p,v$session s where s.paddr=p.addr;

?????????

2.1 ????????????????????????

select o.owner,o.object_type,o.object_name,count(b.objd)from v$bh b,dba_objects owhere b.objd = o.object_idgroup by o.owner,o.object_type,o.object_namehaving count(b.objd) > (select to_number(value)*0.05 from v$parameter where name = 'db_block_buffers');

2.2 ?????????????????????????

select 'alter procedure '||object_name||' compile;' from dba_objectswhere status='INVALID' and wner='&' and object_type in ('PACKAGE','PACKAGE BODY');

2.3 ????????????????????????

select ksppinm, ksppstvlfrom x$ksppi pi, x$ksppcv cvwhere cv.indx=pi.indx and pi.ksppinm like '\_%' escape '\' and pi.ksppinm like '%meer%';

????????

3.1 ????????????????????????

select sn.name,ms.valuefrom v$mystat ms,v$statname snwhere ms.statistic#=sn.statistic# and ms.value > 0and sn.name like '%redo size%';

3.2 ???????????????????????

select table_name,partition_name,HIGH_VALUE from user_tab_partitions where table_name='&table_name';

3.3 SQL????SQL????????????

explain plan set statement_id = 'sql_id' for 'sql';select * from table(dbms_xplan.display);

??????????????????????????????????????????????????????????????????

上一篇:Oracle数据库ORA-01555解决含clob和blob字段表报错快照过旧问题
下一篇:oracle数据库 添加定时器

发表评论

最新留言

很好
[***.229.124.182]2026年06月02日 06时59分40秒