LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2010, 02:00 AM   #1
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Rep: Reputation: 15
mail from oracle user in linux


Hi,

I am asked to create a script.whenever ora(oracle errors) errors occurs in alert log file.That error automatically goes to particular mail with ip address of the machine.
 
Old 04-06-2010, 02:45 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,256

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
So which part are you stuck on? Have you any code already? Which shell are you in?
 
Old 04-06-2010, 02:49 AM   #3
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by grail View Post
So which part are you stuck on? Have you any code already? Which shell are you in?
Sorry.I don't have any code about it.I don't know to where to start.
 
Old 04-06-2010, 03:20 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,256

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Well I see you are currently in Windows, so what system is Oracle running on?
Are you also able to tell us which shell you will be using?
 
Old 04-06-2010, 08:47 AM   #5
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by grail View Post
Well I see you are currently in Windows, so what system is Oracle running on?
Are you also able to tell us which shell you will be using?

we using Red hat 4,5 and bash shell.
 
Old 04-06-2010, 09:50 AM   #6
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
What is there in the alert log file?
Are the error getting appended to it, every time an error occur?
 
Old 04-06-2010, 09:51 AM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,256

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
In that case I would point you towards the following:

man cron (to setup how often to check the log)
man grep (to retrieve the appropriate line(s))
man sendmail (as the name suggests, to send the email)
 
Old 04-06-2010, 09:58 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,960

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
we using Red hat 4,5 and bash shell.
Ok, which is it? RedHat 4 or RedHat 5? And do you mean RedHat ENTERPRISE 4 and/or 5??

And if you want a bash script, write it yourself. There are many tutorials on the internet, that can walk you through basic scripting. Many linux logfile watch utilities, too, that are easily found by a Google search, or a search on this very site.

Last edited by TB0ne; 04-06-2010 at 09:59 AM.
 
Old 04-06-2010, 10:05 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by nagavinodh View Post
Hi,I am asked to create a script.whenever ora(oracle errors) errors occurs in alert log file.That error automatically goes to particular mail with ip address of the machine.
Quote:
Sorry.I don't have any code about it.I don't know to where to start.
If you have no experience in shell scripting, then who is asking you to do this? Is this homework?

What books or tutorials on scripting do you have?
 
Old 04-06-2010, 09:09 PM   #10
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
Quote:
Originally Posted by TB0ne View Post
Ok, which is it? RedHat 4 or RedHat 5? And do you mean RedHat ENTERPRISE 4 and/or 5??
Redhat 4 or 5 :-) I pity the person looking after a 12+ yearold Linux install because their boss is too cheap to buy an upgrade.

My guess is that he means RHEL 4.5. It could be 4 and/or 5 - however it is much more common to use a comma where English speakers (writers?) use a fullstop (I can't think of any languages/countries that use a comma where we would use a '/').

Last edited by nonamenobody; 04-06-2010 at 09:11 PM.
 
Old 04-06-2010, 09:16 PM   #11
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
Quote:
Originally Posted by pixellany View Post
If you have no experience in shell scripting, then who is asking you to do this? Is this homework?
I don't know which is worse, doing someone's homework for them or doing someone's job because they have been asked to do something entirely outside of their skill set and probably outside their job description (shell scripts are not usually part of an Oracle DBA's job description, AFAIK).

Last edited by nonamenobody; 04-06-2010 at 09:44 PM. Reason: Missed an all important 'not'
 
Old 04-06-2010, 11:20 PM   #12
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,256

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Quote:
shell scripts are not usually part of an Oracle DBA's job description, AFAIK
Can be ... just depends how stingy your boss is to hire qualified people (hope the boss isn't looking)
 
Old 04-07-2010, 01:49 AM   #13
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany View Post
If you have no experience in shell scripting, then who is asking you to do this? Is this homework?

What books or tutorials on scripting do you have?
Hi,
Thanks for reply.I searched in google.but there is no use.if you know the answer,please tell and guide me.otherwise do n't say like this.

If you know everything in red hat,you should answer for it.
 
Old 04-07-2010, 02:50 AM   #14
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,256

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
To be fair, no one is going to do the job for you as that would mean when something goes wrong with it you will come back to / blame us
that it wasn't any good, and seeing that you are being paid to get a solution and we are offering our services freely, you can see why
comments like:

Quote:
if you know the answer,please tell and guide me.otherwise do n't say like this.

If you know everything in red hat,you should answer for it
Might just result in everyone telling you to bugger off.

That being said, pixellany's suggestion was to point you toward literature that would help you understand scripting
so that when someone does give you any help / suggestions that you have clue one about what is going on.

To this end, I will also offer the following url (which if you searched must have been very well hidden):

http://www.gnu.org/software/bash/manual/bashref.html
 
Old 04-07-2010, 07:31 AM   #15
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by nagavinodh View Post
Hi,
Thanks for reply.I searched in google.but there is no use.if you know the answer,please tell and guide me.otherwise do n't say like this.

If you know everything in red hat,you should answer for it.
You will not get good help here with this kind of response....It is completely appropriate for us to try and understand the situation you are in. If you do not want to answer our questions, that's OK---but then don't be surprised if noone helps you.

Once again: Who is asking you to write this script? Your employer? A Homework assignment?

What books or tutorials are you using?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
login as oracle user but prompt show [root@ablnx oracle] how come? sathyguy Linux - Newbie 12 08-23-2008 03:52 AM
LXer: Oracle and Symantec Certify Veritas Data Center Solutions on Oracle(R) Enterprise Linux LXer Syndicated Linux News 0 07-18-2007 07:31 AM
xhost + as user oracle not working, need to see oracle install GUI enzo250gto Linux - Software 2 02-11-2007 12:27 PM
Changing Oracle user password will affect oracle db? sathyguy Linux - Newbie 1 02-11-2006 07:34 PM


All times are GMT -5. The time now is 01:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration