摘要:
Troubleshooting/resolution cw97pxhjgtcqq –sql_id provide by user if not pls confirm sql_id using following query: --1. Active sessions info order by L 阅读全文
随笔档案-2023年05月
增加redo大小
2023-05-19 16:28 by 明朝散发, 23 阅读, 收藏, 编辑
摘要:
``` --#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 明朝散发, 50 阅读, 收藏, 编辑
摘要:
``` 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 明朝散发, 30 阅读, 收藏, 编辑
摘要:
【是由于升级到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 明朝散发, 30 阅读, 收藏, 编辑
摘要:
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 明朝散发, 26 阅读, 收藏, 编辑
摘要:
--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 明朝散发, 247 阅读, 收藏, 编辑
摘要:
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 明朝散发, 24 阅读, 收藏, 编辑
摘要:
``` 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 明朝散发, 7 阅读, 收藏, 编辑
摘要:
select 'alter system kill session '''|| t.SID||','||t.SERIAL#||''';' from v$session t where t.SQL_ID='&sql_id' 阅读全文
oracle归档日志清理
2023-05-19 15:45 by 明朝散发, 97 阅读, 收藏, 编辑
摘要:
1.检测所有归档 RMAN> crosscheck archivelog all; 2.列出所有无效的归档 RMAN> list expired archivelog all; 3.删除过期的归档 RMAN> delete noprompt expired archivelog all; 阅读全文