Automate mount directory

by GarciaPL on Tuesday 7 May 2013

I would like to introduce a small script written in Python which allows to automate mount unmounted specified directory. Script can be placed in crontab. User should define command, password which is required for this command, path to directory which should be mounted and expected text as usual after executing specified command. You can also make further adjustments of script if your command does not need for instance password.

Script uses modules :

  • pexpect
  • time
  • datetime
  • os
https://pastebin.com/7gHaMmeR

ORA-01861: literal does not match format string

by GarciaPL on Thursday 2 May 2013

In last few days I had a problem with some SQL queries in Oracle database. I won't give you this particular SQL query which has ended with error which you can find in the header of this post, but i will give solution! :)

Suppose that your SQL queries use data in format for instance YYYY-MM-DD, so before them execute below command which specifies the default date format which can be used in TO_CHAR and TO_DATE functions :

alter session  set NLS_DATE_FORMAT='YYYY-MM-DD';


Reference :
[1] Docs Oracle NLS_DATE_FORMAT