usefulscripts
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| usefulscripts [2019/07/12 15:16] – z0hpvk | usefulscripts [2025/08/07 09:11] (current) – z0hpvk | ||
|---|---|---|---|
| Line 62: | Line 62: | ||
| | | ||
| </ | </ | ||
| + | |||
| + | <code SQL> | ||
| + | SET linesize 140 | ||
| + | COL owner FORMAT a15 | ||
| + | COL segment_name FORMAT a35 | ||
| + | |||
| + | SELECT owner, segment_name, | ||
| + | round(sum(bytes)/ | ||
| + | FROM dba_segments | ||
| + | GROUP BY owner, segment_name | ||
| + | HAVING sum(bytes) > 102400000 | ||
| + | ORDER BY bytes DESC; | ||
| + | </ | ||
| + | |||
| <code SQL> | <code SQL> | ||
| SELECT OWNER, SEGMENT_NAME, | SELECT OWNER, SEGMENT_NAME, | ||
| Line 101: | Line 115: | ||
| from V$RESOURCE_LIMIT | from V$RESOURCE_LIMIT | ||
| where RESOURCE_NAME in (' | where RESOURCE_NAME in (' | ||
| + | </ | ||
| + | |||
| + | <code SQL> | ||
| + | set lines 180 | ||
| + | col opname format a30 | ||
| + | col target format a40 | ||
| + | col start_time format a20 | ||
| + | col last_update_time format a20 | ||
| + | |||
| + | alter session set nls_date_format = ' | ||
| + | |||
| + | select inst_id, sid, serial#, opname, target, start_time, last_update_time, | ||
| + | from gv$session_longops | ||
| + | where to_char(start_time, | ||
| + | and target is not null | ||
| + | and time_remaining > 0 | ||
| + | order by elapsed_seconds DESC, start_time; | ||
| </ | </ | ||
| Line 135: | Line 166: | ||
| ORDER BY owner, job_name; | ORDER BY owner, job_name; | ||
| </ | </ | ||
| + | |||
| + | < | ||
| + | exec dbms_scheduler.set_scheduler_attribute(' | ||
| + | exec dbms_scheduler.set_scheduler_attribute(' | ||
| + | select * from DBA_SCHEDULER_GLOBAL_ATTRIBUTE; | ||
| + | </ | ||
| ====Optimiser Statistics==== | ====Optimiser Statistics==== | ||
| <code SQL> | <code SQL> | ||
| Line 307: | Line 344: | ||
| </ | </ | ||
| - | ====Patching==== | + | ====Patching |
| <code SQL> | <code SQL> | ||
| SET LINESIZE 120 | SET LINESIZE 120 | ||
| Line 314: | Line 351: | ||
| select PATCH_ID, ACTION_TIME, | select PATCH_ID, ACTION_TIME, | ||
| + | </ | ||
| + | |||
| + | <code SQL> | ||
| + | SET LINESIZE 120 | ||
| + | COL COMP_NAME FORMAT A40 | ||
| + | COL VERSION FORMAT A20 | ||
| + | |||
| + | select COMP_NAME, VERSION, STATUS from DBA_REGISTRY; | ||
| </ | </ | ||
usefulscripts.1562944612.txt.gz · Last modified: (external edit)
