divers ajouts de scripts sql
This commit is contained in:
4
check_db_restart.sql
Normal file
4
check_db_restart.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
alter session set nls_date_format='YYYY/MM/DD HH24:MI:SS';
|
||||
col host_name format a15
|
||||
SELECT instance_name, host_name, startup_time, status, logins FROM gv$instance ORDER BY 1;
|
||||
|
||||
4
check_failed_cheduler_jobs.sql
Normal file
4
check_failed_cheduler_jobs.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
SELECT owner, job_name, job_type, state, TRUNC(start_date) SDATE, TRUNC(next_run_date) NXTRUN, failure_count
|
||||
FROM dba_scheduler_jobs
|
||||
WHERE failure_count <> 0;
|
||||
|
||||
13
check_pga_use.sql
Normal file
13
check_pga_use.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
col osuser format a15
|
||||
col pid format 9999
|
||||
col program format a20
|
||||
col sid format 99999
|
||||
col spid format a6
|
||||
col username format a12
|
||||
|
||||
SELECT p.spid,p.pid,s.sid,s.serial#,s.status,p.pga_alloc_mem,p.PGA_USED_MEM,s.username,s.osuser,s.program
|
||||
FROM v$process p,v$session s
|
||||
WHERE s.paddr ( + ) = p.addr
|
||||
-- AND p.background IS NULL -- comment if need to monitor background processes
|
||||
ORDER BY p.pga_alloc_mem DESC;
|
||||
|
||||
6
check_sort_area.sql
Normal file
6
check_sort_area.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
SELECT a.value "Disk Sorts", b.value "Memory Sorts",
|
||||
ROUND((100*b.value)/DECODE((a.value+b.value), 0,1,(a.value+b.value)),2) "Pct Memory Sorts"
|
||||
FROM v$sysstat a, v$sysstat b
|
||||
WHERE a.name = 'sorts (disk)'
|
||||
AND b.name = 'sorts (memory)';
|
||||
|
||||
3
check_supplemntal_logging.sql
Normal file
3
check_supplemntal_logging.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
SELECT supplemental_log_data_min, supplemental_log_data_pk, supplemental_log_data_ui, supplemental_log_data_fk, supplemental_log_data_all, supplemental_log_data_pl
|
||||
FROM v$database;
|
||||
|
||||
Reference in New Issue
Block a user