Shell Script to export database tables from oracle

Hi,

After a long time gap I am back again. This time I was assigned a very interesting task to automate backup and restore functionality on a oracle installed on a linux machine(though I am not a geek using linux as well as oracle :P).

I started to dig around the google for this task and found many webpages which have helped(I really appriciate all the people who gave me the knowledge on this..) to acheive the task successfully.

So here I go:

1> Create a folder where you want your backup folder to be placed. I have created a folder called DBIMPEXP at /home/oracle/

$ cd /home/oracle/DBIMPEXP

2> vi DBExport.sh

3> Type all the below into this file.

#!/bin/bash
ORACLE_HOME=/opt/oracle/products/11.1.0/database;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH;export PATH
ORACLE_SID=CI;export ORACLE_SID
DIRECTORY='dmpdir';export DIRECTORY

echo $ORACLE_HOME
echo $PATH
SUBJECT="Database export operation performed"
EMAIL="email@domain.com"
MSG="/home/oracle/DBIMPEXP/Hi"

echo "Database or tables have been exported successfully!" >$MSG
echo "This is a system generated message so do not reply to this email!" >>$MSG

NOW=$(date +"%d-%m-%Y-%T")
echo $NOW

exp DBusername/DBPassword@yourSID file=/home/oracle/DBIMPEXP/"Backup_$NOW.dmp" log=/home/oracle/DBIMPEXP/"explog_$NOW.log" tables={SC_LEARNING,SC_NEWS}

/bin/mail -s "$SUBJECT" "$EMAIL" < $MSG

4> To save and close hit Esc and ctrl+zz

5> execute the shell script by sh DBExport.sh

6> Now inside the /home/oracle/DBIMPEXP folder you should get the dmp file and the log file.

7> Thats it!!! Be happy always :)

JAutodocs for auto comments

Hi today I had seen one useful eclipse plugin for generating comments into your source code automatically, today I am writing an introduction about the same. Lets try to utilize this plugin...

JAutodoc is a very useful eclipse plugin which helps in generating javadoc style comments very easily. Apart from adding the template for javadoc style comments for the class/method & attributes it is smart enough to add the description also based on the signatures. This can cover a substantial part of description creation effort for the methods like the setters/getters etc which do not need much human skills to generate the descriptions.

For more information on how to install and use please visit the official site for JAutoDocs at http://jautodoc.sourceforge.net/

Hope you will find it useful.

GOODBYE

It is hard to say goodbye when u really love that person
but it is harder to stay when all u feel is pain.
it is hard to forget when all u do is feel the pain.
it's harder to say goodbye without wanting to leave
but u know it's the best.
But that doesn't mean i will ever stop love u ..
so here it go's GOODBYE..

Alone