Monitor exclusive lock on a table and send notification email through EM

Hi,
I have Oracle10g and EM10G running on different servers.
now one of my plsql code creates an exclusive lock on one of my tables.
i want to monitor this exclusive lock on this table through the EM. and when the exclusive lock on the table is continuing for more than 1 hour, i want an email notification sent to me by the EM.
How can i do this?
Can someone help me achieve this above situation.
Thanks.
Philip.

One of the nice about OEM is that a lot of the things are self explanatory. E.g. I never read docs to set up our first user defined metrics. It is really just to dive in there. Define a metric and the sql you want to use for monitoring the lock. Then you just go and create email notification for this when it hits warning or critical treshold.

Similar Messages

  • How to count records in table and send email only if count 0

    I thought this would be fairly simple, but apparently not.  I'm trying to count the number of records I have in my staging table, and send an email if count > 0  . . . .  and . . . . I want to put the count in the body of the email. 
    I'm running into a problem with the concatenation part of it.
    SET NOCOUNT ON
    SELECT * FROM [dbo].[Staging]
    SELECT @@rowcount as Row_Count
    SET NOCOUNT OFF
    IF @@rowcount > 0
    BEGIN
    exec msdb.dbo.sp_send_dbmail @profile_name = 'MailTest',
    @recipients = '[email protected]',
    @subject = 'Successfully Loaded Production',
    @body = 'Successfully Loaded Production ' + @@rowcount + ' records loaded',
    @body_format = 'text'
    END
    The problem comes from the '+' character not being recognized.  Maybe it's out of scope, not sure.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Try this
    SET NOCOUNT ON
    IF EXISTS (SELECT TOP 1 1 FROM [dbo].[Staging])
    BEGIN
    exec msdb.dbo.sp_send_dbmail @profile_name = 'MailTest',
    @recipients = '[email protected]',
    @subject = 'Successfully Loaded Production',
    @body = 'Successfully Loaded Production ' + @@rowcount + ' records loaded',
    @body_format = 'text'
    END
    Thanks
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Updating  a  row  in  table  exclusive  lock on entire table

    Hi
    We have table master table and few child tables .
    when we try to update a row in master table , it is locking entire table
    i.e seems update process holding exclusive lock on entire table
    it is not allowing any furthur update to that table
    Could you please tell me what could be the problem for that
    Thanks,
    - AK

    Does the table has primary key - foreign key relationship? Try disabling the constraint and see if it works. If it works then it is about unindexed foreign key issue.

  • Trigger a event and send an email  when a new entry is created in a table

    Hi All,
                I have scenario here where i want to trigger a event and send an email too when a new entry is created in a Ztable or an existing entry is changed.
    Please let me know how can i achieve this.
    Please excuse me if you find it basic as I am not very old in Workflows.
    Thanks in Advance,
    Saket.

    Hi..
    For your Requirement workflow not Required.
    Write a  Program to send Mail. This Program has to execute when ever the Save Button is Click, then the mail will be sent.
    Check the program in this [link|https://wiki.sdn.sap.com/wiki/x/nYKdAw ], which send the mail.
    Regards,
    Surjith

  • Find deadlock and send notification

    Hi World,
    I am looking for trigger to find out the deadlock and send an email to me to kill .
    can you help me please

    proora, the condition you are speaking about is probably just lock waited task rathter than a deadlock. A deadlock (simple form) is where task_A wants resources held by task_B and task_B want resources held by task_A. Since both process hold resouces needed by the other neighter will ever be able to get the resouces it needs to continue. Oracle will detect this situation and automatically choose a process and kill it so the other process can get the newly freed resources and complete. Oracle records when this occurs.
    Your situation is more highly a locked waited task caused by one session performing DML and not issueing a timely commit to release the locks. Oracle provides a lock tree script in the $ORACLE_HOME/rdbms/admin directly named something like utlltree.sql Numerous lock waited scripts have been posted on this and other forumns.
    The other possibility is that the entire database is hung, but this situation is unlikely. Oracle support provides articles on what to do in the case of a hung database.
    HTH -- Mark D Powell --

  • I was receiving and sending my emails perfectly, now nothing gets downloaded? It checks for new emails but do not find anything and I know there is. Please help

    I was receiving and sending my emails perfectly, now nothing gets downloaded? It checks for new emails but do not find anything and I know there is. Please help

    Oh, the irony of referring to yourself as "myklthebrain".  Make an appointment, at the nearest Apple store, with an Apple Genius, and hope that (s)he can sort it out.

  • Weird: receiving and sending old emails

    I am both receiving and sending old emails - from about a month ago.
    Emails that I've previously received are turning up again in my inbox. They are flagged as newly received, but the send date is from about 6 weeks ago. No message appears more than once and they are appearing in the order they were originally sent.
    In addition, my contacts are receiving emails from me again, also sent from that same period, about 6 weeks previously.
    There's another thing. Often, an email will appear in the Outbox from nowhere. This can be either an email I previously sent, or an email I've previously received. When I delete it, it goes to trash. However, when I go to inbox, or another folder, then BACK to Outbox, another email will appear in its place.
    Weird, huh?
    I've talked at length with my ISP about this and they've had me rebuild my account, only for the problem to persist.
    Any advice would be greatly appreciated. Many thanks!

    Some if not all the problems you’ve described are caused by some index corruption (which in turn might be caused by some filesystem corruption) that makes messages to randomly appear in a mailbox different from where they’re supposed to be. If that mailbox happens to be Outbox, Mail thinks the messages are waiting to be sent and dutifully proceeds to try to send them.
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    After having fixed all the filesystem issues, if any, and ensuring that there’s enough space available on the startup disk (a few GB, plus the space needed to make a backup copy of the Mail folder), try this:
    1. Quit Mail if it’s running.
    2. In the Finder, go to ~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the Option (Alt) key down. This is where all your mail is locally stored.
    3. Locate Envelope Index and move it to the Trash. If you see any other “Envelope Index”-named file there, delete it as well.
    4. Move any “IMAP-”, “Mac-”, or “Exchange-” account folders to the Trash. Note that you can do this with IMAP-type accounts because they store mail on the server and Mail can easily re-create them. DON’T trash any “POP-” account folders, as that would cause all the mail stored there to be lost.
    5. Open Mail. It will tell you that your mail needs to be “imported”. Click Continue and Mail will proceed to re-create Envelope Index — Mail says it’s “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.
    6. As a side effect of having removed the IMAP account folders, those accounts may be in an “offline” state now. Do Mailbox > Go Online to bring them back online.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. That is, ~/Library is the Library folder within the user’s home folder, i.e. /Users/username/Library.

  • My iMac drops settings information.  Sounds associated with receiving and sending an email disappear after about a week and return following a restart after a shutdown.  Also my picture taken, which was taken about a year ago, recently disappeared.

    My iMac drops settings information.  Sounds associated with receiving and sending an email disppear after about a week and return following a shutdown and a restart.  The cycle contunes.  Also, the picture of me that was taken when I bought the iMac more than a year ago and appeared at logon recently disappeared and was replaced by a soccer ball.  I took a new picture, which appeared for about a week at logon, and it has now been replace by a blank picture.

    The standard procedure with these types of isues is a PRAM reset.
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Excerpt from http://support.apple.com/kb/ht1379

  • Create and send an email as a delegate using EWS Managed API

    Hi All,
    I would like to create and send an email as a delegate using EWS Managed API for that i have crated one user as a delegate to that mailbox owner.
    after adding user as delegate, when i try to create an email The EmailMessage class taking only FolderId as parameter but not taking Mailbox object as parameter. But in web reference they said that EmailMessage taking FolderId and Mailbox object as parameter.
    EmailMessage message = new EmailMessage(service);
    message.Subject = "Company Soccer Team";
    message.Body = "Are you interested in joining?";
    message.ToRecipients.Add("[email protected]");
    message.Save(new FolderId(WellKnownFolderName.Drafts, new Mailbox("[email protected]")));https://msdn.microsoft.com/EN-US/library/office/dn641963(v=exchg.150).aspx#bk_createewsmacould you people please help me on this?ThanksNaresh

    Thanks for reply glen.
    I have added delegate using Add-MailboxPermissions. Now i am able to save an email in mailbox owner drafts
    folder.
    Glen,
     I have a one more question.(I am using EWS Managed API).
    I(owner) have shared my calendar(eg. samplecalenderfolder) with another user(delegate) (i.e.,he is the
    delegate of my mailbox) and i have given only permission to the this folder(samplecalenderfolder)
    only and the permission level is Reviewer.
    if i login with user(i.e.delegate) i am not able to get the shared calendar folders(i.e.,samplecalenderfolder)
    that what i a have shared.
    below is the code snippet i am using to get the calendar folders.
    Folder folder = Folder.Bind(service,WellKnownFolderName.Calendar);
    FindFoldersResults addtionalFolders = service.FindFolders(folder.Id, new FolderView(10));
    could you please tell us how to get the shared calendar folders.
    Thanks
    Naresh

  • HT4623 I received a message on my iPad re update to iO7 and I said yes, install. Now it's stuck on the agree/disagree page; nothing moves when I press Agree and Send by Email. Can anyone help?

    I received a message on my iPad re update to iO7 and I said yes, install. Now it's stuck on the agree/disagree page; nothing moves when I press Agree and Send by Email. Can anyone help?

    Reset iPad and continue with update.
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • I forgot the answers to my questions when I try and send an email to reset it the email never comes

    I forgot the answers to my questions when I try and send an email to reset it the email never comes. Help please.

    A rescue email address is different than an alternate email address.
    Contact iTunes Support online at: http://apple.com/emea/support/itunes/contact.html (select Account Security as your help topic)
    or
    by phone: Apple Support Numbers

  • Sending an email through JSP and WML

    I am trying to send an email through jsp in wml, i think i have everything set up properly with regards to tomcat however I keep getting the error
    "Invalid element 'PCDATA' in context of card expected on event ....."
    The line of code in which this occurs is           
    <jsp:setProperty name="mailer" property="*"/>
    I was wondering if anyone would be able to help me with this and be able to tell me why it thinks this is PCDATA and not jsp code.
    Any help would be much appreciated.

    Check out:
    http://jakarta.apache.org/taglibs/index.html

  • Encrypt file and send via email

    Hi,
    I have a file which I wish to encrypt and send via email. I know how to send by email but wish to send the file (csv), protected. I have read a few boards that say you could zip the file and add password protection. But sadly none of the forums show how to do this, does anyone have any code examples of what packages I would need?
    Any help would be greatly appreciated.

    See the JavaMail Third Party Products list at http://java.sun.com/products/javamail/Third_Party.html.
    Bouncy Castle is a popular package to handle secure email.

  • Certificate for the website, was going to copy and send an email to the website to ask about the certificate. I got my cursor just inside the pop up and the whole computer shut down. Why what happened i am not sure about going to the website now....

    Question
    Went to Crossings Book Club website while there something popped up about the certificate for the website, i was going to copy it and send an email to the website to ask about the certificate. I got my cursor just inside the pop up and the whole computer shut down.

    If you think getting your web pages to appear OK in all the major browsers is tricky then dealing with email clients is way worse. There are so many of them.
    If you want to bulk email yourself, there are apps for it and their templates will work in most cases...
    http://www.iwebformusicians.com/Website-Email-Marketing/EBlast.html
    This one will create the form, database and send out the emails...
    http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
    The alternative is to use a marketing service if your business can justify the cost. Their templates are tested in all the common email clients...
    http://www.iwebformusicians.com/Website-Email-Marketing/Email-Marketing-Service. html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • How to assign a button for attachment and send the data through browser ?

    Hi friends,
    How to convert to browser ?
    how to assign a button for attachment and send the data through browser ?
    Thanking you.
    Regards
    Subash.

    Refer to
    How to create a text box in ascreen painter?
    where another user (venkateshwar reddy) has asked a very similar question...
    Jonathan

Maybe you are looking for