LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mail from oracle user in linux (https://www.linuxquestions.org/questions/linux-newbie-8/mail-from-oracle-user-in-linux-800264/)

nagavinodh 04-06-2010 01:00 AM

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.

grail 04-06-2010 01:45 AM

So which part are you stuck on? Have you any code already? Which shell are you in?

nagavinodh 04-06-2010 01:49 AM

Quote:

Originally Posted by grail (Post 3925799)
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.

grail 04-06-2010 02:20 AM

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?

nagavinodh 04-06-2010 07:47 AM

Quote:

Originally Posted by grail (Post 3925835)
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.

PMP 04-06-2010 08:50 AM

What is there in the alert log file?
Are the error getting appended to it, every time an error occur?

grail 04-06-2010 08:51 AM

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)

TB0ne 04-06-2010 08:58 AM

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.

pixellany 04-06-2010 09:05 AM

Quote:

Originally Posted by nagavinodh (Post 3925759)
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?

nonamenobody 04-06-2010 08:09 PM

Quote:

Originally Posted by TB0ne (Post 3926180)
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 '/').

nonamenobody 04-06-2010 08:16 PM

Quote:

Originally Posted by pixellany (Post 3926187)
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).

grail 04-06-2010 10:20 PM

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)

nagavinodh 04-07-2010 12:49 AM

Quote:

Originally Posted by pixellany (Post 3926187)
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.

grail 04-07-2010 01:50 AM

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

pixellany 04-07-2010 06:31 AM

Quote:

Originally Posted by nagavinodh (Post 3927044)
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?


All times are GMT -5. The time now is 03:25 PM.