Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Emails as attachment in Oracle 8 DB - Urgent

Status
Not open for further replies.

devone

Technical User
Nov 2, 2000
2
US
Hi,
I have a situation where I have a PL./SQL routine running on an Oracle 8 server. and gereating a text_file on the server.. using UTL_FILE utility..
The user wants the output file to be emailed to him once the routine completes...
Is this acheivalble in Oracle 8 .0.6 ?

Please help..
 
Hi Devone,

OK there are two ways to do this....

The first is quite easy but proably not practical.

1. Upgrade to Oracle 8.1.6
2. Once the file is written read it back in with Utl file or just store whats been written out in a PL/SQL table
3. Use UTL_SMTP to write out the email (This package is only available in 8.1.6)


The second has been available since Oracle 7. But you will need to complile some Pro C and have a Demon running to pick up and send out the emails.

I've never used this version as I wasn't allowed to use the PRO C code. Now we are 8.1.6 It's not a problem. But the process invloves using DBMS_PIPE to set up a communication link to outside Oracle. on the otherside of the pipe you have a DEMON listening for packages to email out. So inside your PL/SQL you just write to the pipe and then "Flush it" out to outside Oracle. the code is to long to include here, but go to for a full explaination and code listing.

Have fun!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top