Monday 18 August 2014

Using oracle DB to find on which day of the week you were born? :-)

To find out which day of the week a specific event was on, you can use the database, see example below:



SQL> alter session set nls_date_format='day dd-mon-yyyy';

Session altered.

SQL> select to_date('31-mar-1979','dd-mon-yyyy') from dual;

TO_DATE('31-MAR-1979'
---------------------

saturday  31-mar-1979

Crontab job to run every 5 minutes, for example

Just a small note, if you ever need to run a job in crontab every 5 minutes, let’s say, this is the way to do it:  (as opposed to writing 00,05,10,15….)


*/5 * * * * /u01/app/oracle/bin/ora_rm_arc MYDB 24 > /dev/null 2>&1