摘要:1 check stats status 1. select owner,last_ddl_time from dba_objects where object_name = '&table'; 2. select owner,table_name, to_char(last_analyzed,'D 阅读全文
从AWR快照中固定执行计划
2023-05-19 16:34 by 明朝散发, 54 阅读, 0 推荐, 收藏, 编辑
摘要:Troubleshooting/resolution cw97pxhjgtcqq –sql_id provide by user if not pls confirm sql_id using following query: --1. Active sessions info order by L 阅读全文
增加redo大小
2023-05-19 16:28 by 明朝散发, 21 阅读, 0 推荐, 收藏, 编辑
摘要:``` --#increase log file size SELECT a.GROUP#, a.THREAD#, a.SEQUENCE#, a.ARCHIVED, a.STATUS, b.MEMBER AS REDOLOG_FILE_NAME, (a.BYTES/1024/1024) AS SIZ 阅读全文
清理SYSAUX(其三)
2023-05-19 16:21 by 明朝散发, 41 阅读, 0 推荐, 收藏, 编辑
摘要:``` SQL> col occupant_name format a30 select occupant_name,space_usage_kbytes from v$sysaux_occupants order by space_usage_kbytes desc; OCCUPANT_NAME 阅读全文
清理SYSAUX(其二)
2023-05-19 16:06 by 明朝散发, 27 阅读, 0 推荐, 收藏, 编辑
摘要:【是由于升级到19C之后index扩大导致,重建index】 1. ```--检查表空间使用情况 column used format 999,999,999 heading 'USED(MB)' column free format 999,999,999 heading 'FREE(MB)' c 阅读全文
清理SYSAUX(其一)
2023-05-19 16:03 by 明朝散发, 27 阅读, 0 推荐, 收藏, 编辑
摘要:1: add SYSAUX tablespace 或者如下脚本: ``` if test -f /var/opt/oracle/oratab then voratab=/var/opt/oracle/oratab else voratab=/etc/oratab fi export voratab 阅读全文
19C DG 应用lag快捷恢复
2023-05-19 16:00 by 明朝散发, 25 阅读, 0 推荐, 收藏, 编辑
摘要:--standby db: SELECT thread#, group#, sequence#, bytes, archived, status FROM v$standby_log order by thread#, group#; --lack of archivelogs --solution 阅读全文
oracle CPU usage 100% 处理一例
2023-05-19 15:58 by 明朝散发, 188 阅读, 0 推荐, 收藏, 编辑
摘要:1. 确定cpu usage top sqls ``` select * from ( select SQL_ID , sum(decode(session_state,'ON CPU',1,0)) as CPU, sum(decode(session_state,'WAITING',1,0)) - 阅读全文
SQL server 备份job堵塞查询
2023-05-19 15:53 by 明朝散发, 21 阅读, 0 推荐, 收藏, 编辑
摘要:``` SELECT req.session_id, database_name = db_name(req.database_id), req.status, req.blocking_session_id, req.command, [sql_text] = Substring(txt.TEXT 阅读全文
check and kill long running session if needed
2023-05-19 15:48 by 明朝散发, 6 阅读, 0 推荐, 收藏, 编辑
摘要:select 'alter system kill session '''|| t.SID||','||t.SERIAL#||''';' from v$session t where t.SQL_ID='&sql_id' 阅读全文