Oracle DBA Daily Checklist
发布时间:2023-02-17 10:25:39 所属栏目:Oracle 来源:互联网
导读:There are several routine checklist and tasks to do in Oracle database by DBA ( Database Administrator ). This checklist and tasks are as follows. All scripts are valid for Single and RAC Database and Exadata. If you dont use RAC,then you
09-03-2020 18:39:21 DB INCR COMPLETED 5.9 1281.08734 1202.46387 SBT_TAPE 08-03-2020 18:00:30 DB INCR COMPLETED 5.7 1279.00639 1200.3584 SBT_TAPE 08-03-2020 17:27:04 ARCHIVELOG COMPLETED 0 .60765028 .608642578 SBT_TAPE 07-03-2020 18:00:23 DB INCR COMPLETED 7.3 1279.00921 1200.35254 SBT_TAPE 07-03-2020 15:22:58 ARCHIVELOG COMPLETED 0 .625060558 .626220703 SBT_TAPE 73 rows selected. sql> 8- Check any session blocking the other session ( blocking session and Lock control ) Use the following script to check Blocking session state. select s1.username || '@' || s1.machine || ' ( SID=' || s1.sid || ' ) is blocking ' || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status from gv$lock l1,gv$session s1,gv$lock l2,gv$session s2 where s1.sid=l1.sid and s2.sid=l2.sid and l1.BLOCK=1 and l2.request > 0 and l1.id1 = l2.id1 and l2.id2 = l2.id2 ; 9- Check the DBMS jobs running or not and check the status of the Jobs Use the following script to check Scheduler jobs state. -- Failed Scheduled Jobs SELECT owner,job_name,LOG_DATE,ERROR#,( EXTRACT (SECOND FROM run_duration) /60 + EXTRACT (MINUTE FROM run_duration) + EXTRACT (HOUR FROM run_duration) * 60 + EXTRACT (DAY FROM run_duration) * 60 * 24) MINUTES,ADDITIONAL_INFO FROM dba_scheduler_job_run_details WHERE LOG_DATE > SYSDATE - 1 AND status != 'SUCCEEDED' ORDER BY 1 ASC,4 DES -- Running and Succeeded Scheduled Jobs SELECT OWNER,JOB_NAME,LAST_START_DATE,STATE FROM DBA_SCHEDULER_JOBS WHERE LAST_START_DATE > SYSDATE - 1 AND STATE <> 'SCHEDULED'; 10- Check the Dataguard is synchronized or not. Use the following script to check Dataguard status select name,value from v$dataguard_stats; set lines 1000 select name,value from v$dataguard_stats; NAME VALUE -------------------------------- ------------------------- transport lag +00 00:03:52 apply lag +00 00:03:54 apply finish time +00 00:00:00.001 estimated startup time 16 second (编辑:莱芜站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |