oracle 其他表空间,Oracle查询表空间使用情况以及其他查询

alter system kill session '436,35123';

7.RAC环境中锁查找

SELECT inst_id,DECODE(request,0,'Holder: ','Waiter: ')||sid sess,

id1, id2, lmode, request, type,block,ctime

FROM GV$LOCK

WHERE (id1, id2, type) IN

(SELECT id1, id2, type FROM GV$LOCK WHERE request>0)

ORDER BY id1, request;

8.监控当前数据库谁在运行什么SQL语句

select osuser, username, sql_text

from v$session a, v$sqltext b

where a.sql_address =b.address order by address, piece;

9.找使用CPU多的用户session

select a.sid,spid,status,substr(a.program,1,40) prog, a.terminal,osuser,value/60/100 value

from v$session a,v$process b,v$sesstat c

where c.statistic#=12 and

c.sid=a.sid and

a.paddr=b.addr

order by value desc;

10.查看死锁信息

SELECT (SELECT username

FROM v$session

WHERE SID = a.SID) blocker, a.SID, 'is blocking',

(SELECT username

FROM v$session

WHERE SID = b.SID) blockee, b.SID

FROM v$lock a, v$lock b

WHERE a.BLOCK = 1 AND b.request > 0 AND a.id1 = b.id1 AND a.id2 = b.id2;

11.具有最高等待的对象

SELECT o.OWNER,o.object_name, o.object_type, a.event,

SUM (a.wait_time + a.time_waited) total_wait_time

FROM v$active_session_history a, dba_objects o

WHERE a.sample_time BETWEEN SYSDATE - 30 / 2880 AND SYSDATE

AND a.current_obj# = o.object_id

GROUP BY o.OWNER,o.object_name, o.object_type, a.event

ORDER BY total_wait_time DESC;

SELECT a.session_id, s.osuser, s.machine, s.program, o.owner, o.object_name,

o.object_type, a.event,

SUM (a.wait_time + a.time_waited) total_wait_time

FROM v$active_session_history a, dba_objects o, v$session s

WHERE a.sample_time BETWEEN SYSDATE - 30 / 2880 AND SYSDATE

AND a.current_obj# = o.object_id

AND a.session_id = s.SID

GROUP BY o.owner,

o.object_name,

o.object_type,

a.event,

a.session_id,

s.program,

s.machine,

s.osuser

ORDER BY total_wait_time DESC;

12.查询当前连接会话数

select s.value,s.sid,a.username

from

v$sesstat S,v$statname N,v$session A

where

n.statistic#=s.statistic# and

name='session pga memory'

and s.sid=a.sid

order by s.value;

13.等待最多的用户

SELECT s.SID, s.username, SUM (a.wait_time + a.time_waited) total_wait_time

FROM v$active_session_history a, v$session s

WHERE a.sample_time BETWEEN SYSDATE - 30 / 2880 AND SYSDATE

GROUP BY s.SID, s.username

ORDER BY total_wait_time DESC;

14.等待最多的SQL

SELECT a.program, a.session_id, a.user_id, d.username, s.sql_text,

SUM (a.wait_time + a.time_waited) total_wait_time

FROM v$active_session_history a, v$sqlarea s, dba_users d

WHERE a.sample_time BETWEEN SYSDATE - 30 / 2880 AND SYSDATE

AND a.sql_id = s.sql_id

AND a.user_id = d.user_id

GROUP BY a.program, a.session_id, a.user_id, s.sql_text, d.username;

15.查看消耗资源最多的SQL

SELECT hash_value, executions, buffer_gets, disk_reads, parse_calls

FROM V$SQLAREA

WHERE buffer_gets > 10000000 OR disk_reads > 1000000

ORDER BY buffer_gets + 100 * disk_reads DESC;

16.查看某条SQL语句的资源消耗

SELECT hash_value, buffer_gets, disk_reads, executions, parse_calls

FROM V$SQLAREA

WHERE hash_Value = 228801498 AND address = hextoraw('CBD8E4B0');

17.查询会话执行的实际SQL

SELECT a.SID, a.username, s.sql_text

FROM v$session a, v$sqltext s

WHERE a.sql_address = s.address

AND a.sql_hash_value = s.hash_value

AND a.status = 'ACTIVE'

ORDER BY a.username, a.SID, s.piece;

18.显示正在等待锁的所有会话

SELECT * FROM DBA_WAITERS;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/417202.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

四则运算题目生成程序(基于控制台)

基于控制台的四则运算 代码地址 a.需求分析 运算符为 , −, , 除了整数以外,还要支持真分数的四则运算,真分数的运算,例如:1/6 1/8 7/24要求能处理用户输入的真分数, 如 1/2, 5/12 等并且要求能处理用户的输入&#…

前端学习(2306):react之组件使用

Home.js import React, {Component} from react;class Home extends Component {render() {return (<div><div>你好我是组件{parseInt(Math.random()*10)}</div><div>你好我是组件2{parseInt(Math.random()*10)}</div></div>);} }export …

input的属性AutoComplete——关闭浏览器文本框自动提示

1. 有时候我们并不需要AutoComplete&#xff0c;例如需要用户自己再次输入而非自动完成。只要将所在表单元素的autocomplete属性设置为off即可。<form>请双击文本框 <input type"text" name"wd" autocomplete"off"> <input type&…

oracle过滤器基础,示例过滤器表达式 (Oracle Solaris Studio 12.2:性能分析器)

示例过滤器表达式本节介绍可通过 er_print -filters 命令以及在分析器过滤对话框中使用的过滤器表达式的示例。利用 er_print -filters 命令&#xff0c;过滤器表达式用单引号引起来&#xff0c;如下所示&#xff1a;er_print -filters FNAME("myfunc") SOME IN USTA…

前端学习(2306):react之组件使用之图片使用

Home.js import React, {Component,Fragment} from react; import ImgA from "../assset/index.jpg" class Home extends Component {render() {return (<Fragment><div>你好我是组件{parseInt(Math.random()*10)}</div><div>你好我是组件2…

CodeJock 实现MFC换肤

Skin,Skin#64位编译的dll文件没有找到&#xff0c;也没有源码可以编译&#xff0c;最后找到了Codejock换肤的库&#xff0c;源码编译生成64位dll进行MFC换肤 安装Codejock后使用安装路径下的Deploy.exe选择生成64位对应的dll和lib&#xff0c;ToolkitPro1531vc100x64D.dll自动生…

css强制自动换行

table自动换行.table_autobr{ table-layout:fixed;}.table_autobr td,.table_autobr th{word-break : break-all;word-wrap : break-word ;}div自动换行div{white-space:normal; word-break:break-all; overflow:auto;}

php背景图添加字,怎样给视频后面加背景图 视频加背景图片并添加一行广告文字...

有不少广告小视频中&#xff0c;视频画面是一张海报背景图片&#xff0c;图片上显示一个小视频播放&#xff0c;并且在画面上还有显示一行广告字幕。这样的宣传视频制作其实蛮简单的&#xff0c;怎样给视频后面加背景图片的方法倒是挺多&#xff0c;要给视频加背景图片的同时还…

前端学习(2307):react之props和state

Home,js import React, {Component} from react; import News from "./News"; class Home extends Component {render() {return (<div>home<News name"你好"/></div>);} }export default Home; news,js import React, {Component} f…

css设置表格边框

table,td,th{border:1px solid #333;border-collapse:collapse;}border-collapse 属性设置表格的边框是否被合并为一个单一的边框&#xff0c;还是象在标准的 HTML 中那样分开显示。collapse为合并显示。

移动硬盘修复

修复损坏的盘区&#xff1a; CHKDSK G: /F /R 一个命令就搞定了&#xff0c;也是神奇 转载于:https://www.cnblogs.com/wancy86/p/chkdsk.html

oracle如何并发重建索引,oracle数据库如何重建索引?

【问题描述】oracle数据库表如何重建索引&#xff1f;【概述】请在Oracle数据库里面执行如下语句&#xff1a;declare v_table_name varchar(255):;v_index_name varchar(255):;cursor cur_tb is SELECT T.INDEX_NAME INDEXNAMEFROM USER_INDEXES TWHERE TEMPORARY NAND TAB…

前端学习(2308):react之子传父

Home,js import React, {Component} from react; import News from "./News"; class Home extends Component {constructor(props) {super(props);this.state{text:我是默认值}}dataFun(text)>{console.log(text)this.setState({text})}render() {return (<di…

table合并单元格宽度自适应

table中合并单元格导致的css样式不同处理方式&#xff1a;1.每行都拆成一个table。2.多设置几个单元格的宽度&#xff08;自适应失效、第一列都设置宽度也有可能失效&#xff09;。

linux 密码复杂度,用PAM 搞定Linux 平台密码复杂度问题

用PAM 搞定Linux 平台密码复杂度问题星期五, 十二月 27, 20130作为一个PAM的一个模块&#xff0c;pam_cracklib可以被用来检查密码是否违反密码字典&#xff0c;这个验证模块可以通过插入password堆栈&#xff0c;为特殊的应用提供可插入式密码强度性检测&#xff0c;能够很好地…

for循环,定时器,闭包混合一块的那点事。

1&#xff0c;对于一个基本的for循环&#xff0c;顺序输出变量值。 for(var i 1; i < 4; i){console.log(i);//结果不多说了吧} 2&#xff0c;如果for循环中有定时器&#xff0c;如下代码。 for (var i 1; i < 4; i) {setTimeout(function() {console.log(i);//3个4}, …

前端学习(2309):react之同级传值

Home,js import React, {Component} from react; import News from "./News"; class Home extends Component {constructor(props) {super(props);this.state{text:我是默认值}}dataFun(text)>{console.log(text)this.setState({text})}render() {return (<di…

ie6/7 position relative overflow

ie6/7父容器overflow:auto;子容器position:relative;时子容器下面超出的部分会显示在父容器的外边。解决办法&#xff1a;父容器也加position:relative

linux基于域的虚拟目录,RHELAS4.0 apache配置之我的小结(虚拟目录,虚拟主机)

说明一下几个基本的Listen 80ServerName localhost:80ServerAdmin rootlocalhostServerRoot /etc/httpd #apache运行所在目录DirectoryRoot /var/www/htmlOptions FollowSymLinksAllowOrride NoneOrder allow,denyAllow from all#在httpd.conf上打上这些是不能启动apache的&…

11.SolrJ索引操作

创建索引 说明&#xff1a;根据id&#xff08;唯一约束&#xff09;域来更新Document的内容&#xff0c;如果根据id值搜索不到id域则会执行添加操作&#xff0c;如果找到则更新。 public void testCreateIndex() throws SolrServerException, IOException { SolrServer solrSer…