question of UTL_MAIL

Oracle 11.2.0.4 SE 64 - bit

Oracle Linux 5

A few days only, it doesn't pay to get out of bed...

The last two weeks, I've worked on some procedures that use utl_mail.  Everything worked great until this morning, in the database a particular test.

Consider the following:

SQL> --------------------------------------------------------
SQL> set define off;
SQL> 
SQL>   CREATE OR REPLACE PROCEDURE "TESTSCHEMA"."MAIL_TEST" (
  2             email_recipient in varchar2
  3        )
  4  as
  5  --
  6  begin
  7  --
  8  sys.utl_mail.send (sender         => 'oracle@myserver',
  9              recipients   => '[email protected]',
 10              subject      => 'test subject',
 11              message      => 'hello world'
 12              );
 13  
 14  end;
 15  /

Procedure created.

SQL> exec testschema.mail_test('[email protected]');
BEGIN testschema.mail_test('[email protected]'); END;

*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.UTL_MAIL", line 662
ORA-06512: at "SYS.UTL_MAIL", line 679
ORA-06512: at "TESTSCHEMA.MAIL_TEST", line 8
ORA-06512: at line 1


SQL> --
SQL> spo off

This works in each database, except one.  And it worked in this last week.  What has changed on this database since last week is that it was "refreshed" from a backup of prod, via rman DUPLICATE the DATABASE.  And above always works in which database prod.

If it's a permissions problem, I should not get far enough to get the indicated error.

Hi EdStevens

Everyone regenerated the settings file? Check if the parameter, smtp_out_server is set correctly. Also the port.

What has changed on this database since last week is that it was "refreshed" from a backup of prod, via rman DUPLICATE the DATABASE.  And above always works in which database prod.

Really, what happened to your network administrator. Changes of network firewall?

Kind regards

Juan M

Tags: Database

Similar Questions

  • Questions concerning the UTL_MAIL package

    Hi all

    I created a script to mail sent from the oracle database to my group by using the UTL_MAIL package.

    I want to improve the mail package now. Can we have a structure table with colors in the mail so that I can show the data by post in a report.

    Receive your answer.

    Thank you
    Madhu K.

    Can we have a structure table with colors in the mail so that I can show the data by post in a report.

    Yes.
    You can have what you implement.
    Oracle RDBMS does not care the format of your e-mail messages.

  • sending mail via the utl_mail package

    I am trying to create a meeting notification utility and want to send meeting information to our sales team 90 days before the date of meeting customer expected so that they can make arrangements accordingly

    I have 2 tables) 1 information customer table that holds customer information table 2) sale of information that contains details about the commercial attaché... something like that


    TABLE_CUST_INFO:
    CLIENT_NAME, SALES_REP, NOTES, NEXT_MEETING_DATE
    ABC REP_A blablabla January 9, 2011
    ECB REP_B blablabla February 7, 2011
    DCE REP_B blablabla February 8, 2011


    TABLE_SALES_INFO:
    SALES_REP, EMAIL_ADDRESS
    REP_A [email protected]
    REP_B [email protected]



    with an intermediate knowledge of Oracle jobs/trigger, I have created suite code and you want someone to check the logic before I'll actually try it (I had a bad experience in the past juggle utl_mail and would like to get some expert advice before implementation/testing it me)



    BEGIN
    SYS. DBMS_JOB. REMOVE (306);
    COMMIT;
    END;
    /

    DECLARE
    X NUMBER;
    BEGIN
    SYS. DBMS_JOB. Send
    (work = > X)
    , this = > ' for email_msg in)
    Select a.CUSTOMER_NAME, a.SALES_REP, a.NOTES, a.NEXT_MEETING_DATE, b.EMAIL_ADDRESS
    TABLE_CUST_INFO a, TABLE_SALES b
    WHERE a.SALES_REP = b.SALES_REP and (NEXT_MEETING_DATE - sysdate) = 90) loop
    () UTL_MAIL. Send
    sender = > "[email protected]",
    recipients = > email_msg. EMAIL_ADDRESS
    subject = > "customer notice of meeting".
    message = > "good day". email_msg. SALES_REP | UTL_TCP. CRLF. email_msg. Notes
    );
    end loop; »
    , next_date = > to_date (January 1, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss')
    , interval = > ' TRUNC (LAST_DAY (SYSDATE)) + 1'.
    , no_parse = > FALSE
    );
    SYS. DBMS_OUTPUT. Put_line (' job number is: ' | to_char (x));
    COMMIT;
    END;
    /

    looks fine except that missing a comma right after the allocation to BENEFICIARIES.
    >
    sender-online "[email protected]",
    recipients-online email_msg. Email_address--> lack a comma
    question-online "customer notice of meeting",

  • How to move the UTL_MAIL response message

    Hello

    I use the UTL_MAIL for sending mail. As I want to save the details of the success and failure.

    How to get the answer from UTL_MAIL package.

    for ex: I'll give you the wrong email id. If his will delivered how to trap these errors in my log table?

    Can someone help me this?

    See you soon,.
    Shan...

    Shan says:

    There is no way to get the details of the failure or success depending on your answer?

    When errors do not address the part of the e-mail transmission.

    If I use the utl_smtp package I can get the above details?

    It is not a problem or a question UTL_SMTP . This is how the SMTP Protocol and design works.

    Connect to a mail server and provide an email to be delivered. You then remove. It was the beginning and the end of the interactions between you and the SMTP mail server.

    The mail server will now try to put this email on your part. If there are failures, may not inform you directly. That SMTP session, that you had with the mail server no longer exists. So it can inform you via SMTP that there is a failure.

    What will make a mail server is to send a notification by e-mail to the address of the sender. Notification will specify if the issue of delivery is a soft bounce (mail server will continue to try) or a hard bounce (fatal error and mail server will be to stop trying).

    Again - this has nothing to do with the SMTP protocol itself. Transmission problems error notification is not part of the SMTP specification, is not supported and no sense.

    The bottom line is - send you an e-mail, you don't know if that email has been delivered or not. Period.

    The only way to address this specific issue is to add a notification request to the e-mail address. It takes the reader to the recipient mail please send you an e-mail notification when this email is read. It is not reliable as the recipient mail reader can (and likely will) ignore this request.

    This leaves the standard method to add a URL in the e-mail message that you send, asking the recipient to please click on this URL to confirm that he received the e-mail message. And even in this case, the user can ignore this request and ignore to click that URL to your web service that keeps track emails delivered successfully.

    He saw "+ bad +" with it. It is simply how e-mail is designed to work with moving parts, the simpler moving parts, in order to provide a robust and the system of mail on the Internet.

  • UTL_MAIL, ORA-29261: bad argument

    Hi, I'm sort of a newbie PLSQL and this is my first post here. I saw that people asked this question before and I saw concerned responses. But here's the situation:
    BEGIN
            UTL_MAIL.SEND('[email protected]', 
                '[email protected]');
    END;
    This is the code that I'm running. But I get the error indicated in the title. Here is what I tried so far; I installed UTl_MAIL packets because they are not pre installed according to http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm#i1001699, and then I set the parameter SMTP_OUT.
    show parameter smtp_out_server
    ---
    smtp_out_server                      string   10.200.123.135
    But I still get the error. I'm running on 10g release 2 XE on my local, and I am able to ping the e-mail server.

    Published by: user1156042 on July 14, 2010 01:37

    UTL_MAIL is an excellent example of how not to write a bunch of IMO... and is kind of disgusting to see this junk programming of Oracle.

    I think you simply run into a bug because you do not specify the optional material and/or message parameters. At the very least, include the subject.

    Here is an example (10.2 XE):

    SQL> exec utl_mail.send( sender => '', recipients => '', subject => 'Test', message => 'Test email' );
    
    PL/SQL procedure successfully completed.
    
    SQL> exec utl_mail.send( sender => '', recipients => '', subject => 'Test' );
    
    PL/SQL procedure successfully completed.
    
    SQL> exec utl_mail.send( sender => '', recipients => '' );
    BEGIN utl_mail.send( sender => '', recipients => '' ); END;
    
    *
    ERROR at line 1:
    ORA-29261: bad argument
    ORA-06512: at "SYS.UTL_ENCODE", line 190
    ORA-06512: at "SYS.UTL_ENCODE", line 315
    ORA-06512: at "SYS.UTL_MAIL", line 152
    ORA-06512: at "SYS.UTL_MAIL", line 455
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 1
    

    As you can see, do not specify the object (optional parameter) causes an error (trying to encode the header using the ENCODE_HEADER() function according to the UTL_MAIL package source).

  • iOS 10 people record problem/question

    Hello

    I have a couple of "faces" in the issue of people who are coming in white, but acknowledged same 'face' of many times.  Is anyway to update it for photo comes actually?  At a few faces, I don't know that facial recognition found since it is coming from white.

    Hi JohnP007,

    Congratulations on your iPhone 7 more running iOS 10! I understand that some of your faces in the album of people pull up as a draft and you want to refresh. You can try to use the steps below to fix the faces on the thumbnails in albums.

    Difficulty faces and names mixed-up

    If you notice that there is a photo of someone in a collection that is poorly identified, you can remove it.

    1. Tap the person you want to remove in the album of people > select.
    2. Type Show done face to emphasize his face in every photo.
    3. Press on each photo that is not the person.
    4. Type > not this person.

    Hide people

    You can hide the people or groups that you don't want in your album of people.

    1. Open the album people and press Select.
    2. Touch the people you don't want to see.
    3. Click Hide.

    If you want to see the people that you have hidden, press on show hidden people.

    People in the Photos on your iPhone, iPad or iPod touch

    This should be corrected without delay faces. Please use the Apple Support communities to post your question. Good day.

  • Questions - and answers forgotten

    How to get my 'secret' answers to the questions that I have noted the way back when?

    If you forgot the answers to your questions of security of Apple ID - Apple Support

  • I can't reset the security questions. We received notice as below:

    Hello world

    I can't reset the security questions. We received notice as below:

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    Please help me as soon as possible! Thank you very much.

    Hello

    You will need to contact the Apple Support.

    The information is available here:

    Contact Apple for assistance with the security of the Apple ID - Apple Support accounts

    (I'm afraid that no one here can solve the problem for you - this is a user-based community).

  • Question of cloning for SSD upgrade on 12 Macbook Pro

    Previously, I did an upgrade to SSD on my Macbook Air to 2012 according to the instructions of JetDrive transcend. Basically connection via USB 3 and using Mac OS X to clear (and format) disc utilities new SSD, then restore again SSD and then remove the original 128 GB SSD and insert the new 480 GB SSD.  For about a month and so far without problem.

    Now I'm trying to 2012 Macbook upgrade my Pro partner (on 10.11.6).  I got a Crucial SSD MX300 to replace his HARD drive.  Crucial comes with (or recommend) Acronis software.  And a lot of the messages of the forum recommend Carbon Copy Clone.

    My question is if I can use the same method for the cloning of the HD as my Macbook Air (just restore disk of Mac OS X utilities)?  This time, I'm upgrading HARD drive and I don't know if something is different.  At the same time, if I got lucky the first time, I don't not ruin Macbook Pro my spouse this time.

    Thank you.

    Yes, you can use disk utility to clone your MBP wives, but unlike CCC, it will not clone the recovery and Partition.

  • Question about resolution movie downloads

    If I buy a movie at a certain resolution (780p for example), but I want more later re - download at a higher or lower resolution (SD or 1080 p), can I do so and how?

    Same question perhaps for music. Some of my songs have been bought before the latest Apple codecs.

    Any help is appreciated!

    THX!

    Once you have made a purchase on the iTunes store, you will see your purchased items in the menu under accounts bar > bought. You can simply select the item purchased and re-upload.

    With regard to the resolution of the film for films that are offered, and you select the resolution, you can download it again and select a different resolution. For movies that are available as separate download to SD, 780, or 1080 points, you would be limited to the original resolution you selected.

  • Why I can't ask questions.

    I just have a question.  I said that I can't ask questions.

    Do exactly what you did to make this post, but your question in there instead.

  • Cannot reset the Security Questions

    Hello my dear

    -J' forgot my account security questions, but I remember password

    And I'm changing my Security Questions, but show me this sentence

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    -I want to solve this problem as soon as possible if permitted

    You should contact the account of Apple security team. To join, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (145081)

  • Bootcamp Windows 10 question

    Hi all

    Stumbled upon a problem, try to install Windows 10 an end 2014 27' iMac w/retina education runs Yosemite 10.10.5. Bootcamp is V 5.1.4. 32 GB, 3.5 ghz Intel I5. Disk of 1 TB of Fusion. Before you try this, I read the guide of Bootcamp to install windows, but also a number of other tutorials and forum messages about potential problems. This research, I learned that for EDU edition you must change the name of the file from Win10_1607_Education_English_x64.iso to Win10_1607_English_x64.iso. Apparently to have the former name of the file may cause OS X to not recognize the ISO. That fact I started Bootcamp, waited while the software downloaded and created a bootable USB key and partitioned my drive giving Windows 70 GB of space. After that, I got the message that my computer is restarts. Upon restarting, I got the black screen with the blue Windows logo and a spinning loading animation. After a few minutes, a blue screen with a message "Windows has encountered and error with computer and must restart," or something similar. He was pretty quick, so maybe it's not word for Word, but it was not a helpful post in terms of saying something specific. When the computer reboots, I am sent directly to OS X, though a bit slower than normal. I tried to restart with the flash drive to see if the installer would start up, no dice. Try now the Option key at startup, the flash player is not available. Went into my settings to see if I could change my startup on Win disk install USB, no luck it no more.

    Now for the question: How can I get the Windows installation again? What I have to start the process, and if so, what should I use Bootcamp to delete the partition that was created? I have re-run Bootcamp and the only option that is checked is the partition and start and install/uninstall windows and delete the partition.

    Thanks for the help.

    Perform the following two procedures

    Reset the management system (SCM) controller on your Mac - Apple Support

    How to reset the NVRAM on your Mac - Apple Support

    If you use a USB drive, not a USB flash drive, you will have problems. It is recommended to use a 8-16 GB USB2 flash drive.

    If the installation program is located on a USB Flash drive, stop your Mac, connect the USB key, restart and hold down the alt/option key and select the Windows icon in the USB port. This installs Windows in BIOS mode. If you click the start EFI icon, it will install using the EFI mode (faster). You may need to change the partition from MBR to GPT using GPT Fdisk.

  • Yahoo account question

    Yes, I understand these are the Apple support forums, but I don't know where else to ask this question and I thought some of you would have the answer to this question.

    I deleted my Yahoo account last week, but I've heard that the 500 million Yahoo accounts were hacked in 2014. I made my account in 2015. Im sure it is hacked since I made my account a year after the supposed hack, but if my account has been hacked and I deleted which would be safe?

    If your account did not exist in 2014, then it is has not been hacked. Removal of the guarantees it will not be new since there was more pirate. Normally, at least the hackers got access to more information in the narrative, as credit card numbers, change your Yahoo password would have sufficed.

  • Text backup question / deleted

    I accidentally deleted one of my iPhone SMS 6 Plus.  They always show on my iMac and iPad but I fear when an AutoSave occurs, it will back up the iPhone and remove them to two other devices. What will happen?  I use iCloud if that makes a difference.

    Hi melissahh625,

    I understand that you have questions about your messages deleted on different devices. I know that it is important to have a handle on your data, so I'm happy to help you.

    When you receive messages, they are stored on different devices. This means that when you delete a device they will not be deleted on the other. This is the case, even if one of your backup devices to iCloud that these backups are specific to devices, as well.

    Thank you for using communities Support from Apple. See you soon!

Maybe you are looking for