Posts

Showing posts with the label Oracle Maintenance

Is it safe to move/recreate alertlog while the database is up and running

 Is it safe to move/recreate alertlog while the database is up and running?? It is totally safe to "mv" or rename it while we are running. Since chopping part of it out would be lengthly process, there is a good chance we would write to it while you are editing it so I would not advise trying to "chop" part off -- just mv the whole thing and we'll start anew in another file. If you want to keep the last N lines "online", after you mv the file, tail the last 100 lines to "alert_also.log" or something before you archive off the rest. [oracle@Linux03 trace]$ ls -ll alert_* -rw-r-----. 1 oracle oracle    488012 Nov 14 10:23 alert_orcl.log I will rename the existing alertlog file to something   [oracle@Linux03 trace]$ mv alert_orcl.log alert_orcl_Pre_14Nov2016.log [oracle@Linux03 trace]$ ls -ll alert_* -rw-r-----. 1 oracle oracle 488012 Nov 14 15:42 alert_orcl_Pre_14Nov2016.log [oracle@Linux03 trace]$ ls -ll alert_* Now lets create some activity ...

ORA-00020: maximum number of processes exceeded

ORA-00020: maximum number of processes This error occurs when your total numbers of sessions connecting to oracle database has exceeded the max limit set in parameter file. Simplest way to overcome this error is to reset the max sessions value to a greater value than existing.Here is how to do it   oracle@LINUX201:[~] $ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 13 10:20:26 2016 Copyright (c) 1982, 2013, Oracle.  All rights reserved. ERROR: ORA-00020: maximum number of processes (500) exceeded oracle@LINUX201:[~] $ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 13 10:23:42 2016 Copyright (c) 1982, 2013, Oracle.  All rights reserved. ERROR: ORA-00020: maximum number of processes (500) exceeded Enter user-name: Disconnected from ORACLE I wasn't able get into the oracle database to kill some database session. So I tried to kill few sessions on OS to make my way into DB. oracle@LINUX201:[~] $ ps -ef|grep oracle . . . . . . ....

AWR SENT VIA EMAIL

This is an awesome script that I have found online blogpost by  Gokhan Atil  (ORACLE ACE).I wanted to share this with my friends, as it will be very help full in daily maintenance. PLSQL to sen AWR report to you email directly. DECLARE    dbid           NUMBER;    inst_id        NUMBER;    bid            NUMBER;    eid            NUMBER;    db_unique_name VARCHAR2(30);    host_name       VARCHAR2(64);    starttime      CHAR (5);    endtime        CHAR (5);    v_from         VARCHAR2 (80);    v_recipient    VARCHAR2 (80) := 'arvind@domain.com';    v_mail_host    VARCHAR2 (30) := 'YOUR_SMTP_SERVER';    v_mail_conn    UTL_SMTP.connection; BEGIN    sta...