Table of audit and send me an email

Hi all

11 GR 2

I have a table T1 with 100 + columns (c1, c2... C999), with PK t1_pk1.
All columns are mandatory fields, but the value of the entry may be delayed depending on the availability of info, but must be filled-up during the day.
So I can not put a constraint on them as 'not null '.
And 12midnight dailyt, a script will be executed and check if any 1 column in each line was not being filled.
If there is at least 1, the script will send me the primary key in the affected rows.

How can I do this? I have a simple script for this? Is there a default messaging system in 11 GR 2?


Thank you very much

If your definition of the table is static I recommend you to write the sql query static with clause or to verify the columns with null values. Alternatively, you can the pl/sql user to dynamically build the query sql and execute it and then send the result by e-mail using the UTL_SMTP package example:

------------------

CREATE OR REPLACE PROCEDURE SEN_NULL_ROWS_PK
IS
CURSOR find_null_row
IS
SELECT primary_key_column
Of your_big_table
WHERE column1 IS NULL or column2 IS NULL or column999 IS NULL
;

mail_body VARCHAR2 (32000);
mailhost VARCHAR2 (50): = "your_smtp_ip_address";
mail_conn UTL_SMTP.connection;
sender VARCHAR2 (50): = "[email protected]";
recipient VARCHAR2 (50): = "[email protected]";
subject to VARCHAR2 (50): = 'null row id ';
content in VARCHAR2 (32000);
BEGIN
OPEN find_null_row.

LOOP
SEEK find_null_row INTO mail_body;

EXIT WHEN find_null_row % NOTFOUND;
content: content = | mail_body;
END LOOP;

IF find_null_row % ROWCOUNT = 0
THEN
RETURN;
END IF;

CLOSE Find_null_row;

content: = content;

mail_conn: = UTL_SMTP.open_connection (mailhost, 25);
UTL_SMTP. HELO (mail_conn, mailhost);
UTL_SMTP.mail (mail_conn, sender);
UTL_SMTP. RCPT (recipient, mail_conn);

UTL_SMTP.open_data (mail_conn);
() UTL_SMTP.write_raw_data
mail_conn,
UTL_RAW.cast_to_raw ('From' |) ': ' || the sender | UTL_TCP. CRLF));
UTL_SMTP.write_data (mail_conn, ' from: ' | recipient |) UTL_TCP. CRLF);

() UTL_SMTP.write_raw_data
mail_conn,
UTL_RAW.cast_to_raw ("Subject" |) ': ' || topic | UTL_TCP. CRLF));
() UTL_SMTP.write_raw_data
mail_conn,
UTL_RAW.cast_to_raw ("MIME-Version" |) ': ' || «1.0 "|"» UTL_TCP. CRLF));
() UTL_SMTP.write_raw_data
mail_conn,
() UTL_RAW.cast_to_raw
"Content-Type".
|| ': '
|| ' text/html; charset = "CP1252" '
|| UTL_TCP. CRLF));

UTL_SMTP. WRITE_DATA (mail_conn, UTL_TCP. CRLF. content);

UTL_SMTP.close_data (mail_conn);
UTL_SMTP. Quit (mail_conn);
EXCEPTION
WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error
THEN
UTL_SMTP. Quit (mail_conn);
raise_application_error (-20000, 'impossible to email' |) SQLERRM);
END;
/

Best regards

Javid Hasanov

Published by: 845702 on 04.07.2012 01:06

Published by: 845702 on 04.07.2012 01:27

Published by: 845702 on 04.07.2012 01:28

Tags: Database

Similar Questions

  • I do my job to the computer on a MAC computer. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open t

    I do my job to the computer on a MAC book PRO. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open the document. My problem is the document does not show the icon, but rather the document is already open. I spoke with 2 Apple. 'Experts' care and can help me. Can someone tell me what to do?

    It's a question of how the recipients e-mail programs deal with attachments. Many e-mail programs will open all the files they can handle, including files jpg and PDF, by default, and if the recipient has not changed that there is nothing you can do about it. The only solution is to the compress first, then it will be delivered as an attachment, allowing the recipient to decompress and open it.

  • Create groups and send a notification email to specific groups

    Hi all

    I'm quite new to foglight. In our environment, we monitor DB ORACLE using foglight. My requirement is that I have to create 3 groups (Production stage & development). I need to issue alerts that are created for the Production environment for SCOM and for other groups, I need to send these as email notification. Can someone help me how to create groups and email notification separately.

    Thank you very much.

    NGO

    According to me, the simplest will be to do it in the DB administration dashboard.

    Golan

  • Why isn't my journal suggests matching and send me an email?

    I am creating a journal watch, so I can be notified when appear specific reasons of the journal entries. Model appeared in the log file and I see some of the wldf debugging messages I have activated, showing that he is at least trying to do something, but the expression does not match, and I get no email.

    An example short of I want to check for the message is the following:

    # < Sep 8, 2011 12:44:38 PM PDT > < opinion > < Stdout > < myhost > < AdminServer > < ExecuteThread [ASSET]: '3' for queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <><>< 1315511078074 > < BEA-000000 > < [ExecuteThread [ASSET]: '3' for queue: "(self-adjusting) weblogic.kernel.Default"] WARN mypackage - no service set to Manager 'stuff '. >

    I want to check for the string "no service defined for Manager." This message is issued by Log4J in my application, and I'm filtering stdout and stderr in the server log (via the settings in the logging of the server definition area).

    I configured a mail session to go to our SMTP host.

    I've created a new module of diagnosis with a notification using this mail session and just goes to my e-mail address. I created a "Server Log" type shows and I put it to "Enabled". I aimed the module to my server admin. I put the 'Gravity' and 'Log Watch gravity' to 'Info '. My watch rule is simply this:

    (MESSAGE LIKE "no service defined for Manager")

    I don't use an alarm, and I updated the notification for the watch that I just created.

    I also activated the debug indicator "DebugDiagnosticWatch".

    I see the log messages like this that shows doing this correspondence:

    # < Sep 8, 2011 12:44:38 PM PDT > < Debug > < DiagnosticWatch > < myhost > < AdminServer > < ExecuteThread [pending]: '4' for queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <><>< 1315511078074 > < BEA-000000 > < Evaluating shows Watch: unmatched Manager rule: (MESSAGE LIKE "no service defined for Manager") ruleType : severity 1: 64 alarmType: alarmReset 0: 60000 status: notifications 0: me >
    # < Sep 8, 2011 12:44:38 PM PDT > < Debug > < DiagnosticWatch > < myhost > < AdminServer > < ExecuteThread [pending]: '4' for queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <><>< 1315511078074 > < BEA-000000 > < evaluated Manager unmatched watch to false to LogEntry [ExecuteThread [ASSET]: '3' for queue] [: "(self-adjusting) weblogic.kernel.Default"] WARN com.att.sunlight.service - no service set to Manager "tricks". >

    I don't see a log message that clearly states that it will send a notification, so I think that there can be no match for a reason any.

    I also enabled 'mail.debug' flag in the mail session properties, so I see if he tried to send email.

    Maybe you can try to write the query in the form

    MESSAGE LIKE 'no service defined % '.

    in the case of MESSAGE LIKE "no service defined for Manager" the LIKE operator acts more like a MATCHES and tries to search for the exact string

    http://download.Oracle.com/docs/CD/E12840_01/WLS/docs103/wldf_configuring/appendix_query.html

  • WhatsApp messages and send me an email with a big delay on the 4 g and WiFi help!

    I get my WhatsApp messages and emails with large arrears, does anyone else have this problem happens on the 4g and WiFi its really irritating me

    You have activated the endurance.

  • Chromebook and .emls of sent emails

    (Since it was not a set "Chromebook" that appeared when he was asked to choose a Board I stuck in Android tablets since it's sorta a 'Android' mobile so if is not where it needs to go, feel free to move it where it should go and perhaps you should consider a Chromebook Council or at least one that appears when you are asked "to choose the card that best fits your question to product questions or advice" )

    Hi, I have about 20 emails that I have sent from my account on my desk to my Chromebook.  However, instead of waiting for each other to convey, I forwarded these all at the same time which, of course, I had 20 files .eml should be 'extracted' (for lack of a better job) and there is nothing for me to read, which means I have to go back to my office and send each one email at a time so I can read them.

    Is there an app or extension available that I missed or maybe in the making that will handle this problem?  When they are out there, I would like to know could not find the name of it, so I can find it - look under the forwarded e-mail messages or .eml extensions or apps.

    If not, would you consider either a creation so that when we have these issues, we should not monkey with 1 email at a time.  I have this happen a lot and I can't leave my email on the server to do it when I get on my Chromebook, because I can not connect to the server with my email on this subject with my Chromebook - it specific hardware.

    Thank you.

    Jodi

    Hi @Dojers. I understand that you want to display on your Chromebook *.eml files. I don't know of a specific tool that you can use to do this on a Chromebook, but this site allows you to view them. I don't know if it will work on ChromeOS: Welcome to from Encryptomatic free Email Viewer online. I've never used, so I don't know if it's safe, or even that it will work for you.

    In addition, you will probably find a site online that lets you display the *.eml files. I think that there is webmail sites that can do as well. You will need to research further if that link above does not help.

    Good luck

  • How can I attach and send photos in Hotmail?

    known using hotmail

    How to attach photo and and send it by email

    Hello

    "How to send an attachment with Windows Live Hotmail"

    http://email.about.com/od/windowslivehotmailtips/Qt/How_to_Send_a_File_Attachment_with_Windows_Live_Hotmail.htm

    For any other questions about Hotmail, please repost in the Hotmail Forums:

    http://windowslivehelp.com/product.aspx?ProductID=1

    See you soon.

  • Design and send an e-newsletter in Adobe Muse

    I decided to design an e-newsletter in adobe muse instead of indesign that I found easier installation and simple tutorials to follow. Now I'm almost done I tried for this email as an e-newsletter. I tried many solutions like exporting as html file, but I can't seem to make it work. I also tried to look in and understand the adobe business catalyst. I am struggling to figure out and could use some advice and assistance. I don't know anything about coding or how to extract the code of the muse of adobe. Is there someone who can help me understand this and send it as an e-newsletter or how I can save at least some of my work, rather than start over completely?

    Thank you @.

    Starting over is pretty much your best option. You can't do it the way you are trying, even if it worked, the code creates Muse would probably kill someone customer e-mail (OK maybe it's a little much, but it's not ideal anyway).

    You need to understand some basics of html email, the first being, you can attach or include images in the email real herself, at all. Images must be hosted somewhere online and referenced using absolute links in the code of the email.

    Sending a lot of e-mails from your personal account (whether commercial or private) is a sure way to get blacklisted by the corporate e-mail filters. Do not make if you wish that the people actually get your newsletters.

    Here is a very good article by one of the contributors here (Nancy O): Alt-Web, HTML emails and newsletters Articles

    Since a long time and too late, for the moment, until you understand what is happening in the code, use a service that provides models like Mailchimp, iContact, ConstantContact or to create and send your html email.

  • Impossible to connect to the smtp server and send an email using javamail.

    Hi all

    I am struggling with sending e-mail with javamail api.

    I've visited a few forums but not be able to solve the problem then post here.

    Details of the situation are:

    1 SMTP - to which we are able to connect with telnet and able to send emails that work even between the firewall.

    2 tried to disable IPV6 from my windows machine 7 after reading something - java tries to connect to smtp with IPV6 and it should be disabled so that javamail work.

    3 has tried to run the same code to a linux environment. in this environment, we are also able to connect to the smtp with telnet server and send mail

    the code I have tried is below.

    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    
    public class SendEmail
    {
    public static void main(String [] args){
    String to = "[email protected]";//change accordingly
    String from = "[email protected]";//change accordingly
    String host = "smtp.somthing.com";//or IP address
    
    //Get the session object
    Properties properties = System.getProperties();
    properties.setProperty("mail.debug", "true");
    properties.setProperty("mail.smtp.host", host);
    properties.put("mail.smtp.starttls.enable", "false");
    //properties.put("mail.smtp.port", "25"); //commented as its by default takes 25
    Session session = Session.getDefaultInstance(properties);
    
    ////compose the message
    try{
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));
    message.setSubject("Ping");
    message.setText("Hello, this is example of sending email  ");
    
    // Send message
    Transport.send(message);
    System.out.println("message sent successfully....");
    
    }catch (MessagingException mex) {mex.printStackTrace();}
    }
    }
    

    I get the errors are

    DEBUG: JavaMail version 1.4.7
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "smtp.something.com", port 25, isSSL false
    Exception in thread "main" java.lang.RuntimeException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.something.com, port: 25;
      nested exception is:
        java.net.ConnectException: Connection timed out: connect
        at emailer.SendMail.main(SendMail.java:64)
    Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.something.com, port: 25;
      nested exception is:
        java.net.ConnectException: Connection timed out: connect
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1961)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)
        at javax.mail.Service.connect(Service.java:295)
        at javax.mail.Service.connect(Service.java:176)
        at emailer.SendMail.main(SendMail.java:58)
    Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:321)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:237)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1927)
        ... 4 more
    

    someone had a problem like this?

    suggestions are welcome...

    The server I used was not accessible from the telnet command or java code.
    However when I telnet to the server it was implicitly redirected to another server that I failed to notice.

    My sincere apologies to all
    I'll take more precautions before posting and check the facts in more detail.

  • creation of a forgotten password page and sending an email to this user

    Hello
    I need to create a forgotten password page in which there will be two text box named name and email user id and the user will provide its email and usename id in the text box. If apex will verify that the provided name and identification of email are there in the database and if identification of email is the name of the user and an email will be send to this email Id automatically generated container password.
    pls help
    Thank you

    1003090 wrote:
    Hello
    I need to create a forgotten password page in which there will be two text box named name and email user id and the user will provide its email and usename id in the text box. If apex will verify that the provided name and identification of email are there in the database and if identification of email is the name of the user and an email will be send to this email Id automatically generated container password.
    pls help
    Thank you

    Hello

    Welcome to the Forum!

    It is a question that is too large for anyone to explain in the forum, unless they have a link to the documentation or blog entry or a few books.

    Have you ever tried something for this? If so, please send the code here...

    Algorithm for this would be...

  • Compare the user name and email with the DB values, go to the next step, if they are correct error message, otherwise return
  • Generate random password by using a combination of user name and/or random strings. You can use DBMS_RANDOM. STRING to generate this password
  • Update your table with new password. If you store the password as a hash value (as it should be kept), then hash password before updating to the table
  • Send e-mail to use APEX_MAIL using. SEND

    Kind regards
    Hari

  • Emails received in a single account shows no object and sender in the Inbox list.

    Hello

    I have a weird problem with my Thunderbird. I have two accounts in use. One of them, from Sept. 16., 2015, no longer displays the subject and sender to the Inbox list. However, the emails are perfectly fine when open. What bothers me because I can no longer search and sort the list. Help, please. Thank you.

    Looks like your mail files are corrupt.

    Try to rebuild the troubled folder index file.
    Right click on the file - properties - file Repair

    Note: according to corruption it may delete the affected folder messages that cannot be recovered more.
    In this case, you need to restore from a recent backup.

    Corruption is often caused by anti-virus software to play with the Thunderbird e-mail files. Therefore, it is recommended to create an exception for the Thunderbird profile folder, so that the real-time scanner tries to analyze the profile with your mail.

    For more information on localization, see profile
    http://KB.mozillazine.org/Profile_folder_-_Thunderbird

  • Mine is Yahoo where POP is used. Tuberculosis is IMAP. I can receive and send emails, but when doing action on tuberculosis (Del or send) any reflection on the primary server

    Hello
    My e-mail address is Yahoo and Yahoo by default user POPs.
    I understood from your help file synchronization is only compatible with the IMAP e-mail provider
    I can receive and send emails from TB, but during action on tuberculosis (Del or send) any reflection on the primary server, even when doing the action on the main server (Del or send), no change on tuberculosis

    help from yahoo I managed to find the Setup for IMAP, but could not apply them on TB, TB already have Yahoo as POP in the configuration list
    Please your help on this

    Best regards
    Mohamad

    You cannot convert an existing account, but you can set up your Yahoo as IMAP account in parallel to the existing POP account. See
    http://KB.mozillazine.org/Convert_a_POP_account_to_a_IMAP_account

  • When I try and send mail from one of two email addresses, he asks me a password of a google mail account, I have more, so now I can't send any mail

    I have x 6 gmail accounts set up on top of my pop mail to Thunderbird. Every time I try and send ANY email of 2 of these accounts ([email protected] & [email protected]), a window appears and says the following:

    Enter your password for [email protected] on smtp.googlemail.com

    I did have this address of electronic mail for a few years, and I've tried every password I've ever used with no luck.

    I have to finally press Cancel, the a new error box appears which says the following:

    The message send failed.
    An error occurred sending a message: could not get password for smtp.googlemail.com. The message is not sent.

    Please PLEASE help, I need these two addresses to work. Each other (x 4) address through Thunerbird works.

    Thank you for your time and your support.

    Looks like you need to do a cleaning of your SMTP server settings.

    The menu bar, select Tools-Account Settings-outgoing server (SMTP)

    No menu bar? Press the ALT key.

    Remove the old server and add the right ones for your 2 accounts problem.

  • I just tried to send a word attachment and now my account is blocked and I can't send or receive emails using

    Then he said that it has expired

    Hi m3964,

    Thank you for your message. I understand that you are stuck on an account. Unfortunately, Mozilla does not provide email service. However, there is an e-mail client that we support. In order to better evaluate your question, please check the following items:

    • What do you use to send the attachment?
    • What happens to expired?
    • Please also ask your email provider what the limit on attachments, or you can try Dropbox or drive and send a link to the document instead.

    I hope this helps, I am looking forward to your reply.

  • I need help, I forgot my security answers and Email not send to my Email of relief.

    I need help, I forgot my security answers and Email not send to my Email of relief.

    Unless it is in a spam filter, you have to ask Apple to reset your security questions. To do this, 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.

    (137175)

Maybe you are looking for