oracle 6
2015-10-20 19:29
471 查看
监控事务回滚进度:
select n.USED_UBLK*x.VALUE/1024/1024 ,s.*
from gv$transaction n, gv$session s,
v$parameter x
where n.INST_ID = s.INST_ID
and n.ADDR = s.TADDR
and x.name = 'db_block_size'
and n.INST_ID = 2;
--
select ((select (nvl(sum(bytes), 0))
from dba_undo_extents
where tablespace_name = 'UNDOTBS1'
and status in ('ACTIVE'/*, 'UNEXPIRED'*/ )) * 100) /
(select sum(bytes)
from dba_data_files
where tablespace_name = 'UNDOTBS1')
"PCT_INUSE"
from dual;
Script to Monitor SMON Rollback Progress [ID 1352046.1]
Master Note: Troubleshooting Database Transaction Recovery (文档 ID 1494886.1)
Rollback Is Taking A Long Time After Session Killed (文档 ID 1060831.6)
V$FAST_START_TRANSACTIONS displays information about the progress of the transactions that Oracle is recovering.
评估事务回滚完成时间
select inst_id,
usn,
state,
undoblockstotal "Total",
undoblocksdone "Done",
undoblockstotal - undoblocksdone "ToDo",
decode(cputime,
0,
'unknown',
to_char(sysdate + (((undoblockstotal - undoblocksdone) /
(undoblocksdone / cputime)) / 86400),'yyyy-mm-dd hh24:mi:ss')) "Estimated time to complete"
from gv$fast_start_transactions;
select min(s.snap_id), max(s.snap_id)
From dba_hist_snapshot s
where s.end_interval_time >=
to_date('2014-06-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
根据XID找出造成回滚的语句
select /*+ parallel(8) */
distinct h.sql_id
from gv$fast_start_transactions st, dba_hist_active_sess_history h where st.STATE = 'RECOVERING'
and st.XID = h.xid
and st.INST_ID = h.instance_number
and h.snap_id >= 60197
and h.snap_id <= 60330;
《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《
查看权限:
select * from user_sys_privs where username in ('PERFSTAT');
select * from user_role_privs where username in ('PERFSTAT');
select * from user_TAB_PRIVS where grantee in ('PERFSTAT');
select * from dba_role_privs where grantee in ('PERFSTAT');
select * from dba_sys_privs where grantee in ('PERFSTAT');
select n.USED_UBLK*x.VALUE/1024/1024 ,s.*
from gv$transaction n, gv$session s,
v$parameter x
where n.INST_ID = s.INST_ID
and n.ADDR = s.TADDR
and x.name = 'db_block_size'
and n.INST_ID = 2;
--
select ((select (nvl(sum(bytes), 0))
from dba_undo_extents
where tablespace_name = 'UNDOTBS1'
and status in ('ACTIVE'/*, 'UNEXPIRED'*/ )) * 100) /
(select sum(bytes)
from dba_data_files
where tablespace_name = 'UNDOTBS1')
"PCT_INUSE"
from dual;
Script to Monitor SMON Rollback Progress [ID 1352046.1]
Master Note: Troubleshooting Database Transaction Recovery (文档 ID 1494886.1)
Rollback Is Taking A Long Time After Session Killed (文档 ID 1060831.6)
V$FAST_START_TRANSACTIONS displays information about the progress of the transactions that Oracle is recovering.
评估事务回滚完成时间
select inst_id,
usn,
state,
undoblockstotal "Total",
undoblocksdone "Done",
undoblockstotal - undoblocksdone "ToDo",
decode(cputime,
0,
'unknown',
to_char(sysdate + (((undoblockstotal - undoblocksdone) /
(undoblocksdone / cputime)) / 86400),'yyyy-mm-dd hh24:mi:ss')) "Estimated time to complete"
from gv$fast_start_transactions;
select min(s.snap_id), max(s.snap_id)
From dba_hist_snapshot s
where s.end_interval_time >=
to_date('2014-06-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
根据XID找出造成回滚的语句
select /*+ parallel(8) */
distinct h.sql_id
from gv$fast_start_transactions st, dba_hist_active_sess_history h where st.STATE = 'RECOVERING'
and st.XID = h.xid
and st.INST_ID = h.instance_number
and h.snap_id >= 60197
and h.snap_id <= 60330;
《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《
查看权限:
select * from user_sys_privs where username in ('PERFSTAT');
select * from user_role_privs where username in ('PERFSTAT');
select * from user_TAB_PRIVS where grantee in ('PERFSTAT');
select * from dba_role_privs where grantee in ('PERFSTAT');
select * from dba_sys_privs where grantee in ('PERFSTAT');
相关文章推荐
- oracle 4
- oracle 3
- oracle 2
- 如何用Excel直接查询Oracle中的数据(转)
- oracle oracle中ORA-00923: 未找到要求的 FROM 关键字
- IE11 打开Oracle ERP报错的解决方法
- 定时每天执行前一天的数据导入oracle
- sqoop导入hdfs上的数据到oracle
- 本地搭建gitlab环境,配置邮件通知和基本操作
- ORACLE数据恢复方法(提交事务也可以)
- oracle pl/sql之sql中的复合变量之记录类型
- oracle第三周
- 【转】Oracle存储过程常用技巧
- oracle 死锁
- 【转】Oracle存储过程学习
- 32位plsql配置连接64位ORACLE 11g的方法
- oracle免安装服务器,pl/sql加instantclient的配置使用
- 如何用Excel直接查询Oracle中的数据
- Oracle中connect by...start with...的使用
- OracleRAC集群SCAN说明