Home » RDBMS Server » Server Utilities » Send email after the export done (successfully without error and with error ) (ORACLE 10g [10.2.0.1.0])
Send email after the export done (successfully without error and with error ) [message #511925] Thu, 16 June 2011 02:51 Go to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Hi All,

I have a ORACLE 10g(10.2.0.1.0) database that I am running on windows. I have export backups batch file running every day through windows scheduler. I would like to know If there is some way that sends me an email after the backup is finished and also send me if it does not finish with error.

I have successfully done this om my SQL Server machine but don't know for ORACLE as I have not purchased it and have license

If anyone can help me on this.

Thanks
Deepak



Re: Send email after the export done (successfully without error and with error ) [message #511927 is a reply to message #511925] Thu, 16 June 2011 02:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I use a simple BMAIL program to do that. Basically, first you do what you do, and then e-mail a log file (or something) to yourself.
Re: Send email after the export done (successfully without error and with error ) [message #511955 is a reply to message #511927] Thu, 16 June 2011 04:43 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Sir, I have no idea how to do this in ORACLE. If you can give idea to me, I'll do R&D and then tell you status.

Thanks
Deepak
Re: Send email after the export done (successfully without error and with error ) [message #511956 is a reply to message #511955] Thu, 16 June 2011 04:46 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Eh? Oracle? Who said anything about Oracle? You are doing that You
every day through windows scheduler
Re: Send email after the export done (successfully without error and with error ) [message #511957 is a reply to message #511955] Thu, 16 June 2011 04:46 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Don't do it through oracle. Do it through the batch file you use to run export.
Re: Send email after the export done (successfully without error and with error ) [message #511961 is a reply to message #511957] Thu, 16 June 2011 05:36 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Sorry I mean that only, but how to schedule email for oracle backups. This is my question.

Regards
Deepak
Re: Send email after the export done (successfully without error and with error ) [message #511962 is a reply to message #511961] Thu, 16 June 2011 05:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Explain in details what you currently do and what you want.
No one seems to understand the same thing reading your posts.

Regards
Michel
Re: Send email after the export done (successfully without error and with error ) [message #511963 is a reply to message #511961] Thu, 16 June 2011 05:39 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
By calling a program to send the email from the batch file.
Re: Send email after the export done (successfully without error and with error ) [message #511965 is a reply to message #511925] Thu, 16 June 2011 05:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I have export backups batch file

Carefully note that an export is NOT a database backup.

Regards
Michel

[Updated on: Thu, 16 June 2011 05:42]

Report message to a moderator

Re: Send email after the export done (successfully without error and with error ) [message #511967 is a reply to message #511965] Thu, 16 June 2011 05:55 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

I am sorry Sir, I read your same suggestions in some other posts as well. sorry to use those wordings.

Ok let me explain in detail:

We I have different server of ORACLE and SQL Server in my company.
I have scheduled the weekly export of different users to commman repository. For SQL Server I have already schedule jobs for backup and email notification both after success and failure of the backups.

Now I want to do the same for the case of export logs, either the export is succesfull without warnings or with warnings.

I want that I should receive an e-mail for this.

Hope now I am able to make some clarification on my requirement.

Thanks
Deepak
Re: Send email after the export done (successfully without error and with error ) [message #511969 is a reply to message #511967] Thu, 16 June 2011 06:07 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
An example: this is my EXPORT.BAT file (highly, but HIGHLY confidential info is obfuscated by Xs):
exp scott/tiger@ora10 file=scott.dmp log=export.log

bmail -s mail.xxxx.xxxxx -f export@lf.hr -t little.foot@xxx.hr -a "Export Log" -m export.log -c

Here are BMAIL's parameters:
M:\>bmail

Command Line SMTP Emailer V1.07
Copyright(C) 2002-2004 Craig.Peacock @ beyondlogic.org
Date: Thu, 16 Jun 2011 13:05:45 +0200
Usage: bmail [options]
        -s    SMTP Server Name
        -p    SMTP Port Number (optional, defaults to 25)
        -t    To: Address
        -f    From: Address
        -b    Text Body of Message (optional)
        -h    Generate Headers
        -a    Subject (optional)
        -m    Filename (optional) Use file as Body of Message
        -c    Prefix above file with CR/LF to separate body from header
        -d    Debug (Show all mail server communications)

BACKUP.BAT is scheduled in Widnows Task Scheduler. Its execution window looks like this (I ran EXPORT.BAT from the command prompt, just for illustration); note the MS Outlook's notification, which means that the mail has arrived to my e-mail address.

/forum/fa/9111/0/

Quite simple, I'd say. I don't understand what you don't understand, but it is possible that I don't understand what you are saying all the time.

[Updated on: Thu, 16 June 2011 06:13]

Report message to a moderator

Re: Send email after the export done (successfully without error and with error ) [message #511971 is a reply to message #511956] Thu, 16 June 2011 06:08 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Hello Sir,

I have tried bmail utility to send an e-mail and it worked.

But how can i use the log file of the export in the bmail utility, till now I am able to send a text msg typed by myself. Below is the command I used.

bmail -s abc.com -t dsharma@abc.com -f dsharma@abc.com -h -a "HI Deepak" -b "Hoe are you??"


Please help me how I can use the log file of the export.

Thanks
Deepak
Re: Send email after the export done (successfully without error and with error ) [message #511973 is a reply to message #511969] Thu, 16 June 2011 06:20 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Got your point Sir, but there are some different scenerio which I am following..

Code which you have used is:

exp scott/tiger@ora10 file=scott.dmp log=export.log

bmail -s mail.xxxx.xxxxx -f export@lf.hr -t little.foot@xxx.hr -a "Export Log" -m export.log -c



Here in your case dump file and the logfile is located at default location.

In my case I have oracle installed on "A" server and a hard drive of 10 TB is on "B" Server which is mapped as network drive at Server "A".

Mentioned below is the export command which I have used.

set path=E:\oracle\product\10.2.0\db_1\bin
exp abc/abc file='\\192.xx.xxx.xx0\dbbackups\192.xx.xxx.xx3\ORACLE\abc_%date:~4,2%-%date:~7,2%-%date:~10%.dmp' log='\\192.xx.xxx.xx0\dbbackups\192.xx.xxx.xx3\ORACLE\abc_%date:~4,2%-%date:~7,2%-%date:~10%.log'


Now how to call log file from network drive.

Thanks
Deepak
Re: Send email after the export done (successfully without error and with error ) [message #511974 is a reply to message #511973] Thu, 16 June 2011 06:22 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"-m export.log" should contain the full path.
Re: Send email after the export done (successfully without error and with error ) [message #511978 is a reply to message #511967] Thu, 16 June 2011 06:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
dsharma wrote on Thu, 16 June 2011 12:55
I am sorry Sir, I read your same suggestions in some other posts as well. sorry to use those wordings.
...


There is no problem with the words, I just wanted to emphasize that if you lose the database or just a file you cannot recover it with an export. The only thing you can then do is to recreate a database, reimport the data and lose all modifications since the export.

Regards
Michel

[Updated on: Thu, 16 June 2011 06:51]

Report message to a moderator

Re: Send email after the export done (successfully without error and with error ) [message #511984 is a reply to message #511974] Thu, 16 June 2011 07:32 Go to previous messageGo to next message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

Thanks everyone for your efforts, my problem is resolved now.

Regards
Deepak Smile
Re: Send email after the export done (successfully without error and with error ) [message #511985 is a reply to message #511978] Thu, 16 June 2011 07:34 Go to previous message
dkdms2124
Messages: 369
Registered: April 2010
Location: INDIA
Senior Member

You are obsolutely right Sir, I really appreciate your knowledgable suggestion and will try to implement on this accordingly.

Thanks
Deepak
Previous Topic: Datapump API
Next Topic: SQL Loader Error Message
Goto Forum:
  


Current Time: Thu Mar 28 07:14:40 CDT 2024