Sessions :
CPU/Mem : ps -eo pid,ppid,user,tty,cmd,%mem,%cpu --sort=-%cpu | head
DB time statistic : total elapsed processing time spent by database for a particular session.DB CPU statistics : total cumulative time spent by Oracle for all sessions
Cumulative time spent by Oracle for all sessions :selectstat_name,Round(value/1000000) "Time (Sec)"from v$sys_time_modelwhere stat_name = 'DB CPU';CPU for any Oracle user session :selectss.username,se.SID,VALUE/100 cpu_usage_secondsfromv$session ss,v$sesstat se,v$statname snwherese.STATISTIC# = sn.STATISTIC#andNAME like '%CPU used by this session%'andse.SID = ss.SIDandss.status='ACTIVE'andss.username is not nullorder by VALUE desc;Query for wait events Guy Harrison :COLUMN wait_class format a20COLUMN name format a30COLUMN time_secs format 999,999,999,999.99COLUMN pct format 99.99SELECTwait_class,NAME,ROUND (time_secs, 2) time_secs,ROUND (time_secs * 100 / SUM (time_secs) OVER (), 2) pctFROM(SELECTn.wait_class,e.event NAME,e.time_waited / 100 time_secsFROMv$system_event e,v$event_name nWHEREn.NAME = e.event AND n.wait_class <> 'Idle'ANDtime_waited > 0UNIONSELECT'CPU','server CPU',SUM (VALUE / 1000000) time_secsFROMv$sys_time_modelWHEREstat_name IN ('background cpu time', 'DB CPU'))ORDER BYtime_secs DESC;
I/O :
SQL Trace : https://techgoeasy.com/how-to-turn-on-trace-in-database-and/
Tablespace : http://edba.blogspot.com/2013/01/tablespace-utilization.html
Logical Stdby :
RMAN :
Archivelog wrk :
Windows Cmd :
FRA : Parameters : DB_RECOVERY_FILE_DEST_SIZE , DB_RECOVERY_FILE_DEST
Queries : SELECT * FROM V$RECOVERY_FILE_DEST;
SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;
alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST' scope=both;
select name, floor(space_limit / 1024 / 1024) "Size MB", ceil(space_used / 1024 / 1024) "Used MB" from v$recovery_file_dest;
SELECTROUND((A.SPACE_LIMIT / 1024 / 1024 / 1024), 2) AS FLASH_IN_GB,ROUND((A.SPACE_USED / 1024 / 1024 / 1024), 2) AS FLASH_USED_IN_GB,ROUND((A.SPACE_RECLAIMABLE / 1024 / 1024 / 1024), 2) AS FLASH_RECLAIMABLE_GB,SUM(B.PERCENT_SPACE_USED) AS PERCENT_OF_SPACE_USEDFROM V$RECOVERY_FILE_DEST A, V$FLASH_RECOVERY_AREA_USAGE BGROUP BY SPACE_LIMIT, SPACE_USED , SPACE_RECLAIMABLE ;
Check : Archive destination is USE_DB_RECOVERY_FILE_DESTBackup FRA : BACKUP RECOVERY AREA;
DB Recovery :
export schema
export full
Standby database
script to auto tablespace addition
script to allow killing session for application;
auto back and check if successfull and restorable
In duplicate/ which file to go to which file on the second database.
Query running more than 1 hr
No. of session increasing.
No. of Active and Inactgive sessions.
Sending awr report and addm report every 4 hrs
High CPU utilization , High Memory utilization
Max amount of Temp Tablespace used , Max UNDO used
How to Restore CRS after accidentally run localconfig
How to Restore CRS after CRS diskgroup is lost
https://orasg.com/2015/10/04/how-to-restore-asm-based-ocr-after-complete-loss-of-the-crs-diskgroup-on-linuxunix-systems/
How to Rename CRS diskgroup ( Containing Voting disk and spfile)