July 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

July 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

List last modified – shell Script

SHORT_HOSTNAME=`hostname -s` LOCATION=”/home” # DESTINATION=”$1″ if [ -z “$1″ ] then DESTINATION=”$LOCATION” fi # EMAIL_TO=”test@rmohan.com” EMAIL_SUBJECT=”List Last Modified files from $SHORT_HOSTNAME” EMAIL_BODY_Line1=”Below is the list of last modified files:” # MOD_FILES=`find $DESTINATION -type f -mmin -10 -ls` # if [ -n “$MOD_FILES” ] then printf “$EMAIL_BODY_Line1\n\n$MOD_FILES\n” | mail -s “$EMAIL_SUBJECT” $EMAIL_TO fi # […]

Recover lost passwords

To recover a password in Oracle, simply connect under command line mode on the server:

#sqlplus /nolog SQL>conn / as sysdba SQL>alter user Username identified by PASSWORD;

To reset your Orable database password:

Your password file should be under <orahome>\database\PWD<SID>.ora.

Delete it and run the Oracle password utility from the command prompt:

c\:Oracle\ora92\database>ORAPWD file=PWD<SID>.ora password={password} […]